:root {
  color-scheme: light;
  --ink: #0b1724;
  --navy: #07111f;
  --navy-soft: #0d1b2b;
  --blue: #2969ff;
  --blue-light: #8fb0ff;
  --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; }
.shell { width: min(calc(100% - 96px), var(--shell)); margin-inline: auto; }
.section-pad { padding: clamp(96px, 11vw, 168px) 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; }

/* Header and compact navigation share the same visible link hierarchy. */
.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 { display: grid; place-items: center; width: 36px; height: 36px; border: 1.5px solid currentColor; border-radius: 8px; font: 800 22px/1 'Segoe UI', Arial, sans-serif; letter-spacing: -.12em; padding-right: 4px; }
.brand-dot { color: var(--blue-light); }
.brand-word { font: 800 14px/1 'Segoe UI', Arial, sans-serif; letter-spacing: .27em; }
.primary-nav { display: flex; align-items: center; gap: clamp(24px, 3vw, 46px); font-size: 13px; font-weight: 600; }
.primary-nav a { transition: color .2s; }
.primary-nav a:hover { color: var(--blue-light); }
.primary-nav .nav-contact { border: 1px solid rgba(255,255,255,.55); padding: 12px 17px; }
.nav-contact span { margin-left: 14px; }
.menu-toggle { display: none; }

/* The image fills the hero while a stable scrim protects headline contrast. */
.hero { position: relative; min-height: min(850px, 100dvh); 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: 30px; }
.hero-copy { max-width: 790px; }
.eyebrow, .overline, .section-index, .work-number, .brief-card-top, .visual-caption { font: 700 11px/1.4 'Segoe UI', Arial, sans-serif; letter-spacing: .17em; text-transform: uppercase; }
.eyebrow { display: flex; align-items: center; gap: 13px; color: #d7e0ec; margin: 0 0 25px; }
.eyebrow-line { width: 28px; height: 1px; background: var(--blue-light); }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: 'Segoe UI', Arial, sans-serif; }
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: 470px; color: #e1e8f1; font-size: clamp(16px, 1.25vw, 19px); line-height: 1.6; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 29px; margin-top: 37px; }
.button { display: inline-flex; align-items: center; justify-content: space-between; gap: 28px; border: 0; border-radius: 0; padding: 16px 20px; font: 700 13px/1.2 'Segoe UI', Arial, sans-serif; cursor: pointer; white-space: nowrap; transition: background .2s, transform .2s; }
.button:hover { background: #1554e8; }
.button:active { transform: translateY(2px); }
.button-primary { background: var(--blue); color: white; }
.text-link { display: inline-flex; align-items: center; gap: 23px; width: fit-content; border-bottom: 1px solid currentColor; padding-bottom: 6px; color: var(--ink); font-weight: 700; font-size: 13px; }
.text-link.light { color: white; }
.text-link:hover { color: var(--blue); }
.text-link.light:hover { color: var(--blue-light); }
.hero-bottom { display: flex; justify-content: space-between; align-items: center; width: 100%; color: #ccd8e8; font: 700 11px/1 'Segoe UI', Arial, sans-serif; letter-spacing: .14em; text-transform: uppercase; }
.hero-bottom span:last-child span { margin-left: 10px; }

/* Editorial lists make the range of work scannable without invented case studies. */
.section-index { display: flex; justify-content: space-between; gap: 20px; padding-bottom: 22px; border-bottom: 1px solid var(--line); color: var(--muted); }
.section-index-dark { color: #9fb0c4; border-color: #314155; }
.intro-grid { display: grid; grid-template-columns: 1.12fr .88fr; gap: clamp(50px, 7vw, 120px); margin: clamp(60px, 8vw, 110px) 0 95px; }
.intro h2, .approach h2, .about h2, .contact h2 { font-size: clamp(42px, 5.1vw, 76px); letter-spacing: -.07em; line-height: 1.13; font-weight: 700; }
.intro h2 span { color: var(--blue); }
.intro-right { max-width: 500px; padding-top: 10px; color: var(--muted); font-size: 16px; }
.lead { font: 600 clamp(19px, 1.8vw, 26px)/1.48 'Segoe UI', Arial, sans-serif; letter-spacing: -.035em; color: var(--ink); }
.intro-right p:last-child { margin-bottom: 0; }
.work-list { border-top: 1px solid var(--line); }
.work-row { display: grid; grid-template-columns: 90px 1fr 70px; align-items: center; min-height: 153px; gap: 24px; border-bottom: 1px solid var(--line); }
.work-number { align-self: start; padding-top: 45px; color: var(--blue); }
.work-row h3 { margin-bottom: 5px; font-size: clamp(25px, 2.4vw, 35px); letter-spacing: -.055em; }
.work-row p { max-width: 620px; margin: 0; color: var(--muted); font-size: 15px; }
.work-arrow { justify-self: end; align-self: start; padding-top: 31px; color: var(--blue); font-size: 28px; }

/* The approach section shifts to a dark field for a deliberate pause. */
.approach { background: var(--navy); color: white; }
.approach-heading { margin: 95px 0 90px; }
.overline { margin-bottom: 20px; color: var(--blue-light); }
.approach h2 { max-width: 900px; margin: 0; }
.approach h2 span { color: #92a4ba; }
.approach-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12%; border-top: 1px solid #314155; padding-top: 45px; }
.approach-statement { display: flex; align-items: flex-start; gap: 30px; }
.statement-glyph { color: var(--blue-light); font-size: 44px; line-height: 1; }
.approach-statement p { max-width: 350px; font: 600 clamp(22px, 2.3vw, 32px)/1.4 'Segoe UI', Arial, sans-serif; letter-spacing: -.05em; }
.steps { list-style: none; padding: 0; margin: 0; }
.steps li { display: grid; grid-template-columns: 148px 1fr; gap: 18px; padding: 24px 0; border-bottom: 1px solid #314155; }
.steps li:first-child { padding-top: 0; }
.steps span { color: var(--blue-light); font: 700 11px/1.5 'Segoe UI', Arial, sans-serif; letter-spacing: .13em; text-transform: uppercase; }
.steps p { margin: 0; color: #c4d0de; font-size: 15px; }

/* About balances a code-native abstract portrait with readable personal copy. */
.about-grid { display: grid; grid-template-columns: .94fr 1.06fr; gap: clamp(80px, 10vw, 160px); align-items: center; margin-top: 85px; }
.about-visual { position: relative; display: grid; place-items: center; min-height: 620px; overflow: hidden; background: #dfe6ef; }
.about-visual::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 50% 50%, #f6f9fd 0 20%, transparent 55%), linear-gradient(135deg, #cad7e9, #edf2f7 60%); }
.about-orbit { position: absolute; width: 78%; aspect-ratio: 1; border: 1px solid #88a1c7; border-radius: 50%; transform: rotate(-22deg) scaleX(.64); }
.orbit-two { width: 103%; transform: rotate(28deg) scaleX(.57); border-color: #aebfd5; }
.about-core { position: relative; font: 800 clamp(160px, 18vw, 260px)/1 'Segoe UI', Arial, sans-serif; letter-spacing: -.15em; padding-right: .1em; color: var(--navy); }
.about-core span { color: var(--blue); }
.visual-caption { position: absolute; bottom: 23px; left: 27px; color: #465f79; font-size: 9px; }
.about-copy h2 { margin-bottom: 30px; }
.about-copy > p:not(.overline):not(.lead) { color: var(--muted); max-width: 540px; }
.about-copy .text-link { margin-top: 15px; }

/* Contact is an actual local email-draft interaction, not a fake submission. */
.contact { background: var(--navy-soft); color: white; }
.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; align-items: center; gap: 25px; margin-top: 27px; padding-bottom: 8px; border-bottom: 1px solid var(--blue-light); font: 700 clamp(18px, 2vw, 27px)/1.3 'Segoe UI', Arial, sans-serif; letter-spacing: -.035em; overflow-wrap: anywhere; }
.email-link:hover { color: var(--blue-light); }
.brief-card { padding: clamp(28px, 3vw, 44px); background: #f2f5f9; color: var(--ink); }
.brief-card-top { display: flex; justify-content: space-between; color: var(--blue); }
.brief-card-top span:last-child { font-size: 21px; line-height: .7; }
.brief-card h3 { margin: 48px 0 8px; font-size: 32px; letter-spacing: -.06em; }
.brief-card > p { 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-weight: 700; font-size: 13px; }
.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%; }
.site-footer { background: #050d17; color: #c4d0de; }
.footer-inner { min-height: 150px; display: flex; align-items: center; justify-content: space-between; gap: 25px; font-size: 12px; }
.footer-inner p { margin: 0; }
.footer-inner > div { display: flex; gap: 30px; }
.footer-inner a:hover { color: var(--blue-light); }

/* A dedicated error document gives missing URLs a clear way 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; gap: 18px; 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 { position: relative; z-index: 1; }
.not-found-main h1 em { color: var(--blue-light); }
.not-found-main > p:not(.eyebrow) { position: relative; z-index: 1; max-width: 460px; color: #c4d0de; font-size: 18px; }
.not-found-main .button { position: relative; z-index: 1; margin-top: 15px; }
.not-found-code { position: absolute; right: -20px; bottom: -80px; color: #12253c; font: 800 clamp(250px, 35vw, 610px)/1 'Segoe UI', Arial, sans-serif; letter-spacing: -.12em; }

@media (max-width: 900px) {
  .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: 700 12px 'Segoe UI', Arial, sans-serif; }
  .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; }
  .intro-grid, .approach-grid, .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .intro-grid { gap: 30px; margin-bottom: 65px; }
  .approach-grid, .about-grid, .contact-grid { gap: 55px; }
  .about-visual { min-height: 500px; }
  .approach-heading { margin: 70px 0; }
}

@media (max-width: 600px) {
  .shell { width: calc(100% - 40px); }
  .section-pad { padding: 86px 0; }
  .brand-word { font-size: 12px; }
  .hero { min-height: 760px; 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); }
  .hero-intro { max-width: 350px; font-size: 16px; }
  .hero-actions { gap: 23px; }
  .hero-bottom { font-size: 9px; }
  .section-index span:last-child { display: none; }
  .intro h2, .approach h2, .about h2, .contact h2 { font-size: clamp(40px, 10vw, 58px); }
  .work-row { grid-template-columns: 35px 1fr 20px; gap: 12px; min-height: 160px; }
  .work-number { padding-top: 34px; }
  .work-row h3 { font-size: 23px; }
  .work-row p { font-size: 13px; line-height: 1.5; }
  .work-arrow { padding-top: 27px; font-size: 20px; }
  .approach-grid { padding-top: 35px; }
  .steps li { grid-template-columns: 112px 1fr; gap: 12px; }
  .about-visual { min-height: 390px; }
  .about-core { font-size: 170px; }
  .contact-grid { margin-top: 65px; }
  .brief-card h3 { margin-top: 30px; }
  .footer-inner { align-items: flex-start; flex-direction: column; justify-content: center; gap: 17px; padding: 35px 0; }
  .footer-inner > div { width: 100%; justify-content: space-between; }
}

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