:root {
  color-scheme: light;
  --ink: #0b1724;
  --navy: #07111f;
  --navy-soft: #0d1b2b;
  --blue: #2969ff;
  --blue-light: #a5beff;
  --paper: #f2f5f9;
  --white: #fff;
  --muted: #536274;
  --line: #cbd4df;
  --shell: 1380px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.65 'Segoe UI', Arial, sans-serif; }
button, select, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
::selection { background: var(--blue); color: white; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: 'Segoe UI', Arial, sans-serif; }
h2 { font-size: clamp(42px, 5.2vw, 76px); line-height: 1.12; letter-spacing: -.065em; text-wrap: balance; }
h2 em { font-style: normal; color: var(--blue); }
p { text-wrap: pretty; }
.shell { width: min(calc(100% - 96px), var(--shell)); margin-inline: auto; }
.section-pad { padding: clamp(96px, 10vw, 152px) 0; }
.skip-link { position: fixed; z-index: 100; top: -100px; left: 20px; background: white; padding: 12px 18px; color: var(--ink); }
.skip-link:focus { top: 20px; }

/* Navigation and the portal mark remain legible over the hero image. */
.site-header { position: absolute; z-index: 20; inset: 0 0 auto; color: white; }
.header-inner { min-height: 94px; display: flex; align-items: center; justify-content: space-between; gap: 36px; border-bottom: 1px solid rgba(255,255,255,.22); }
.brand { display: inline-flex; align-items: center; gap: 12px; white-space: nowrap; }
.brand-mark { width: 40px; height: 40px; border-radius: 8px; }
.brand-word { font-size: 14px; font-weight: 800; line-height: 1; letter-spacing: .27em; }
.primary-nav { display: flex; align-items: center; gap: clamp(19px, 2.5vw, 40px); font-size: 13px; font-weight: 600; }
.primary-nav a, .site-footer a { transition: color .2s ease; }
.primary-nav a:hover, .site-footer a:hover { color: var(--blue-light); }
.primary-nav .nav-contact { border: 1px solid rgba(255,255,255,.55); padding: 12px 17px; }
.menu-toggle { display: none; }

/* The existing artwork anchors a direct hero with a single action. */
.hero { position: relative; min-height: max(700px, 100dvh); background: var(--navy); color: white; overflow: hidden; }
.hero-image, .hero-shade { position: absolute; inset: 0; }
.hero-image { background: url('/assets/img/pernito-portal.webp') center 52% / cover no-repeat; }
.hero-shade { background: linear-gradient(90deg, #07111ff2 0%, #07111fc4 34%, #07111f3b 65%, #07111f18 100%), linear-gradient(0deg, #07111fac, transparent 25%); }
.hero-inner { position: relative; display: flex; flex-direction: column; justify-content: space-between; min-height: inherit; padding-top: clamp(185px, 23vh, 235px); padding-bottom: 34px; }
.hero-copy { max-width: 790px; }
.eyebrow, .overline, .section-label, .service-kind, .brief-card-top { font-size: 11px; font-weight: 700; line-height: 1.4; letter-spacing: .16em; text-transform: uppercase; }
.eyebrow { display: flex; align-items: center; gap: 13px; color: #d7e0ec; margin-bottom: 25px; }
.eyebrow-line { width: 28px; height: 1px; background: var(--blue-light); }
h1 { margin-bottom: 25px; font-size: clamp(52px, 5.75vw, 92px); line-height: 1.06; letter-spacing: -.075em; font-weight: 700; }
h1 em, .contact h2 em { font-style: normal; color: var(--blue-light); }
.hero-intro { max-width: 520px; color: #e1e8f1; font-size: clamp(16px, 1.25vw, 19px); line-height: 1.6; }
.button { display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 0; padding: 17px 25px; font-size: 13px; font-weight: 700; line-height: 1.2; cursor: pointer; transition: background .2s ease, transform .2s ease; }
.button-primary { background: var(--blue); color: white; }
.button:hover { background: #1554e8; }
.button:active { transform: translateY(2px); }
.hero-copy .button { margin-top: 24px; }
.hero-note { margin: 0; color: #ccd8e8; font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }

/* Section labels are descriptive rather than numbered. */
.section-label { display: flex; justify-content: space-between; gap: 20px; padding-bottom: 22px; border-bottom: 1px solid var(--line); color: var(--muted); }
.section-label-dark { color: #a6b7c9; border-color: #314155; }
.lead { font-size: clamp(19px, 1.8vw, 26px); font-weight: 600; line-height: 1.48; letter-spacing: -.035em; color: var(--ink); }
.overline { margin-bottom: 20px; color: var(--blue); }

/* Services read as an editorial list, with symbols rather than index numbers. */
.section-intro { display: grid; grid-template-columns: 1.12fr .88fr; gap: clamp(50px, 7vw, 120px); margin: clamp(60px, 8vw, 110px) 0 95px; }
.section-intro h2 { margin-bottom: 0; }
.section-intro > div { max-width: 500px; padding-top: 10px; color: var(--muted); }
.section-intro p:last-child { margin-bottom: 0; }
.service-list { border-top: 1px solid var(--line); }
.service-row { display: grid; grid-template-columns: 70px minmax(0, 1fr) 150px; align-items: center; gap: 24px; min-height: 153px; padding: 30px 0; border-bottom: 1px solid var(--line); }
.service-symbol { align-self: start; color: var(--blue); font-size: 28px; line-height: 1.25; }
.service-row h3 { margin-bottom: 5px; font-size: clamp(25px, 2.4vw, 35px); letter-spacing: -.055em; line-height: 1.2; }
.service-row p { max-width: 620px; margin: 0; color: var(--muted); font-size: 15px; }
.service-kind { justify-self: end; color: var(--muted); text-align: right; }

/* The why and audience sections carry the story from offer to fit. */
.why { background: #e7edf5; }
.why-grid { display: grid; grid-template-columns: 1fr .82fr; gap: clamp(60px, 10vw, 165px); }
.why h2 { margin-bottom: 0; }
.why-copy { max-width: 570px; padding-top: 26px; color: var(--muted); }
.why-copy p:last-child { margin-bottom: 0; }
.for-grid { display: grid; grid-template-columns: 1fr .9fr; gap: clamp(70px, 10vw, 160px); margin-top: 85px; }
.for-grid > div:first-child p { max-width: 480px; color: var(--muted); }
.for-list { border-top: 1px solid var(--line); }
.for-list article { padding: 26px 0 30px; border-bottom: 1px solid var(--line); }
.for-list h3 { max-width: 480px; margin-bottom: 8px; font-size: clamp(22px, 2vw, 29px); line-height: 1.2; letter-spacing: -.045em; }
.for-list p { max-width: 470px; margin: 0; color: var(--muted); font-size: 15px; }

/* The approach offers a compact process and a personal introduction. */
.approach { background: var(--navy); color: white; }
.approach .overline { color: var(--blue-light); }
.approach-grid { display: grid; grid-template-columns: 1fr .85fr; gap: clamp(70px, 10vw, 160px); margin: 85px 0 95px; }
.approach-grid > div:first-child > p:last-child { max-width: 540px; color: #c4d0de; }
.approach h2 { max-width: 700px; }
.steps { border-top: 1px solid #314155; }
.steps article { padding: 20px 0 24px; border-bottom: 1px solid #314155; }
.steps h3 { margin-bottom: 6px; color: var(--blue-light); font-size: 23px; letter-spacing: -.035em; }
.steps p { max-width: 450px; margin: 0; color: #c4d0de; font-size: 15px; }
.about-strip { display: flex; align-items: center; gap: clamp(30px, 5vw, 70px); padding-top: 45px; border-top: 1px solid #314155; }
.about-strip img { width: clamp(72px, 8vw, 118px); border-radius: 16px; }
.about-strip p { max-width: 750px; margin: 0; font-size: clamp(20px, 2.2vw, 30px); font-weight: 600; line-height: 1.4; letter-spacing: -.035em; }

/* Native FAQ disclosure keeps questions readable and keyboard accessible. */
.faq-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(60px, 10vw, 160px); }
.faq-grid > div:first-child > p:last-child { max-width: 330px; color: var(--muted); }
.faq-list { border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { position: relative; list-style: none; cursor: pointer; padding: 26px 38px 26px 0; font-size: clamp(18px, 1.7vw, 23px); font-weight: 600; line-height: 1.3; letter-spacing: -.03em; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: '+'; position: absolute; right: 0; top: 22px; color: var(--blue); font-size: 26px; font-weight: 400; line-height: 1; }
.faq-list details[open] summary::after { content: '−'; }
.faq-list details p { max-width: 650px; margin: 0 40px 28px 0; color: var(--muted); }

/* Contact preserves the existing browser-only email draft behavior. */
.contact { background: var(--navy-soft); color: white; }
.contact .overline { color: var(--blue-light); }
.contact-grid { display: grid; grid-template-columns: 1fr minmax(380px, .75fr); gap: clamp(65px, 10vw, 160px); align-items: start; margin-top: 90px; }
.contact-copy h2 { margin-bottom: 25px; }
.contact-copy > p:not(.overline) { max-width: 470px; color: #c4d0de; font-size: 18px; }
.email-link { display: inline-flex; margin-top: 27px; padding-bottom: 8px; border-bottom: 1px solid var(--blue-light); font-size: clamp(18px, 2vw, 27px); font-weight: 700; line-height: 1.3; letter-spacing: -.035em; overflow-wrap: anywhere; }
.email-link:hover { color: var(--blue-light); }
.brief-card { padding: clamp(28px, 3vw, 44px); background: var(--paper); color: var(--ink); }
.brief-card-top { color: var(--blue); }
.brief-card h3 { margin: 48px 0 8px; font-size: 32px; letter-spacing: -.06em; }
.brief-card > p:not(.brief-card-top) { max-width: 400px; color: var(--muted); font-size: 14px; }
.brief-card form { display: flex; flex-direction: column; margin-top: 30px; }
.brief-card label { margin-bottom: 8px; font-size: 13px; font-weight: 700; }
.brief-card select, .brief-card textarea { width: 100%; border: 1px solid #9aaabe; border-radius: 0; background: white; color: var(--ink); padding: 12px 14px; font-size: 14px; }
.brief-card select { margin-bottom: 22px; }
.brief-card textarea { resize: vertical; min-height: 110px; }
.brief-card textarea::placeholder { color: #59697b; opacity: 1; }
.form-hint { color: #465769; margin: 10px 0 21px; font-size: 12px; }
.brief-card .button { width: 100%; }

/* Four footer columns offer short, working routes through the one-page site. */
.site-footer { background: #050d17; color: #c4d0de; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.2fr; gap: clamp(35px, 5vw, 80px); padding: 78px 0 85px; }
.footer-grid > div { display: flex; flex-direction: column; align-items: flex-start; gap: 13px; }
.footer-grid h2 { margin: 2px 0 11px; color: white; font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.footer-grid a:not(.brand), .footer-grid span:not(.brand-word) { font-size: 14px; }
.footer-identity p { max-width: 245px; margin: 14px 0 0; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; padding: 20px 0 28px; border-top: 1px solid #26354a; font-size: 12px; }

/* The 404 page shares the brand and offers a clear route home. */
.not-found-page { min-height: 100dvh; background: var(--navy); color: white; }
.not-found-page .site-header { position: relative; }
.not-found-page .nav-contact { display: inline-flex; align-items: center; border: 1px solid rgba(255,255,255,.55); padding: 12px 17px; font-size: 13px; font-weight: 700; }
.not-found-main { position: relative; min-height: calc(100dvh - 95px); display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding-top: 70px; padding-bottom: 120px; overflow: hidden; }
.not-found-main h1, .not-found-main > p, .not-found-main .button { position: relative; z-index: 1; }
.not-found-main > p:not(.eyebrow) { max-width: 460px; color: #c4d0de; font-size: 18px; }
.not-found-main .button { margin-top: 15px; }
.not-found-code { position: absolute; right: -20px; bottom: -80px; color: #12253c; font-size: clamp(250px, 35vw, 610px); font-weight: 800; line-height: 1; letter-spacing: -.12em; }

@media (max-width: 1000px) {
  .shell { width: min(calc(100% - 48px), var(--shell)); }
  .header-inner { min-height: 80px; }
  .menu-toggle { display: flex; align-items: center; gap: 13px; border: 0; background: transparent; color: white; cursor: pointer; font-size: 12px; font-weight: 700; }
  .menu-lines { display: grid; gap: 5px; width: 22px; }
  .menu-lines i { width: 100%; height: 1px; background: currentColor; }
  .primary-nav { display: none; position: absolute; top: 80px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--navy); padding: 12px 24px 25px; border-bottom: 1px solid #314155; }
  .primary-nav.is-open { display: flex; }
  .primary-nav a, .primary-nav .nav-contact { padding: 15px 0; border: 0; border-bottom: 1px solid #314155; }
  .section-intro, .why-grid, .for-grid, .approach-grid, .faq-grid, .contact-grid { grid-template-columns: 1fr; gap: 45px; }
  .section-intro { margin-bottom: 65px; }
  .for-grid, .approach-grid, .contact-grid { margin-top: 65px; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .shell { width: calc(100% - 40px); }
  .section-pad { padding: 82px 0; }
  .brand-word { font-size: 12px; }
  .hero { min-height: 100dvh; }
  .hero-image { background-position: 59% center; }
  .hero-shade { background: linear-gradient(90deg, #07111ff5, #07111f8a), linear-gradient(0deg, #07111fd0, transparent 45%); }
  .hero-inner { padding-top: 175px; padding-bottom: 24px; }
  h1 { font-size: clamp(47px, 12vw, 65px); }
  h2 { font-size: clamp(40px, 10vw, 58px); }
  .hero-intro { max-width: 350px; font-size: 16px; }
  .hero-note { font-size: 9px; }
  .section-label span:last-child { display: none; }
  .service-row { grid-template-columns: 32px 1fr; gap: 12px; min-height: 0; }
  .service-symbol { font-size: 21px; }
  .service-row h3 { font-size: 23px; }
  .service-row p { font-size: 13px; line-height: 1.5; }
  .service-kind { grid-column: 2; justify-self: start; margin-top: 5px; font-size: 9px; }
  .about-strip { align-items: flex-start; flex-direction: column; }
  .about-strip img { width: 72px; }
  .contact-grid { gap: 55px; }
  .brief-card h3 { margin-top: 30px; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 45px 20px; padding: 65px 0; }
  .footer-grid .footer-identity { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
