:root {
  --ink: #111827;
  --navy: #172033;
  --paper: #f5f7fa;
  --white: #ffffff;
  --muted: #667386;
  --line: #dce2e8;
  --cyan: #28b8d5;
  --cyan-dark: #0f8098;
  --success: #18794e;
  --error: #b42318;
  --shadow: 0 18px 60px rgba(17, 24, 39, 0.08);
  --radius: 14px;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Segoe UI Variable", "Segoe UI", Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.62;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  background-image: linear-gradient(rgba(17,24,39,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(17,24,39,.025) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, black, transparent 60%);
}

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 4px; }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.shell { width: min(calc(100% - 40px), var(--max)); margin-inline: auto; }
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 100; padding: 10px 14px; background: var(--white); color: var(--ink); }
.skip-link:focus { top: 16px; }
.mono { font-family: ui-monospace, "Cascadia Code", "SFMono-Regular", Consolas, monospace; }
.accent { color: var(--cyan); }

.hero { color: var(--paper); background: radial-gradient(circle at 80% 0%, #1c2b43 0, var(--navy) 42%, #0e1623 100%); }
.site-header { display: flex; align-items: center; min-height: 82px; border-bottom: 1px solid rgba(245,247,250,.14); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.wordmark { font-size: 1.875rem; font-weight: 700; letter-spacing: .01em; text-decoration: none; white-space: nowrap; }
.main-nav { display: flex; align-items: center; gap: 28px; font-size: .9rem; color: #d9e1ea; }
.main-nav a { text-decoration: none; }
.main-nav a:hover, .main-nav a:focus-visible { color: var(--white); }
.lang-link { padding-left: 20px; border-left: 1px solid rgba(245,247,250,.2); font-family: ui-monospace, monospace; }
.menu-button { display: none; color: var(--paper); background: transparent; border: 1px solid rgba(245,247,250,.24); border-radius: 8px; padding: 8px 11px; }

.hero-content { padding: 96px 0 72px; }
.hero-copy { max-width: 1010px; }
.eyebrow { margin: 0 0 18px; color: #b9c8d7; font-family: ui-monospace, monospace; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, h3 { margin-top: 0; line-height: 1.12; letter-spacing: -.035em; }
h1 { margin-bottom: 18px; font-size: clamp(3.15rem, 6vw, 5.7rem); }
.hero-lead { max-width: 780px; margin: 0 0 18px; font-size: clamp(1.25rem, 2.4vw, 2rem); color: #e7edf3; }
.hero-description { max-width: 690px; margin: 0; color: #b9c8d7; font-size: 1.08rem; }
.hero-actions { display: flex; align-items: center; gap: 18px; margin-top: 34px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 11px 20px; border: 1px solid var(--cyan); border-radius: 8px; background: var(--cyan); color: #06232a; font-weight: 700; text-decoration: none; cursor: pointer; transition: transform .18s ease, background .18s ease, border-color .18s ease; }
.button:hover { transform: translateY(-1px); background: #4bc9e2; border-color: #4bc9e2; }
.button-secondary { color: var(--paper); background: transparent; border-color: rgba(245,247,250,.3); }
.button-secondary:hover { color: var(--white); background: rgba(255,255,255,.06); border-color: rgba(245,247,250,.55); }
.icon { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.button .icon { width: 19px; height: 19px; }

.proofs { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 74px; border-top: 1px solid rgba(245,247,250,.16); border-bottom: 1px solid rgba(245,247,250,.16); }
.proof { display: flex; align-items: center; gap: 16px; min-height: 92px; padding: 18px 28px; border-right: 1px solid rgba(245,247,250,.16); }
.proof:first-child { padding-left: 0; }
.proof:last-child { border-right: 0; }
.proof span { display: block; color: #b9c8d7; font-size: .9rem; line-height: 1.4; }
.proof strong { display: block; color: var(--paper); font-size: .96rem; }

.section { padding: 104px 0; }
.section-white { background: var(--white); }
.section-head { display: grid; grid-template-columns: .8fr 1.2fr; gap: 52px; align-items: end; margin-bottom: 48px; }
.section-kicker { margin: 0 0 12px; color: var(--cyan-dark); font-family: ui-monospace, monospace; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; }
h2 { margin-bottom: 0; font-size: clamp(2rem, 4vw, 3.6rem); }
.section-intro { max-width: 630px; margin: 0; color: var(--muted); font-size: 1.08rem; }

.services { border-top: 1px solid var(--line); }
.service { display: grid; grid-template-columns: 66px 1fr 1.2fr; gap: 24px; align-items: start; padding: 30px 0; border-bottom: 1px solid var(--line); }
.service .icon { width: 34px; height: 34px; color: var(--ink); }
.service h3 { margin: 2px 0 0; font-size: 1.25rem; letter-spacing: -.02em; }
.service p { margin: 0; color: var(--muted); }

.maintainable { display: grid; grid-template-columns: 110px 1fr; gap: 38px; padding: 54px; background: var(--navy); color: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); }
.maintainable > .icon { width: 70px; height: 70px; color: var(--cyan); }
.maintainable h2 { margin-bottom: 22px; font-size: clamp(2rem, 3.6vw, 3.2rem); }
.maintainable .section-kicker, .contact-section .section-kicker { color: var(--cyan); }
.maintainable p { max-width: 820px; margin: 0; color: #c8d2de; font-size: 1.12rem; }
.process { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 38px; border-top: 1px solid rgba(245,247,250,.16); }
.process-item { padding: 26px 26px 0 0; }
.process-item .mono { display: block; margin-bottom: 9px; color: var(--cyan); font-size: .76rem; }
.process-item strong { display: block; margin-bottom: 5px; }
.process-item span { color: #9fb0c0; font-size: .92rem; }

.support-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.support-item { min-height: 235px; padding: 30px; background: var(--white); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.support-item .icon { margin-bottom: 24px; }
.support-item h3 { margin-bottom: 12px; font-size: 1.2rem; }
.support-item p { margin: 0; color: var(--muted); }

.website-offer { display: grid; grid-template-columns: .92fr 1.08fr; gap: 72px; align-items: start; }
.website-copy h2 { margin-bottom: 24px; }
.website-copy > p:not(.section-kicker) { max-width: 560px; margin: 0; color: var(--muted); font-size: 1.08rem; }
.website-links { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 28px; }
.website-links .text-link { margin-top: 0; }
.text-link { display: inline-flex; align-items: center; gap: 10px; margin-top: 28px; color: var(--cyan-dark); font-weight: 700; text-decoration: none; }
.text-link:hover, .text-link:focus-visible { text-decoration: underline; }
.text-link .icon { width: 19px; height: 19px; }
.text-link-muted { color: var(--muted); }
.website-features { border-top: 1px solid var(--line); }
.website-feature { display: grid; grid-template-columns: 46px 1fr; gap: 20px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.website-feature .icon { width: 32px; height: 32px; }
.website-feature h3 { margin-bottom: 8px; font-size: 1.12rem; letter-spacing: -.02em; }
.website-feature p { margin: 0; color: var(--muted); }

.toolkit { display: grid; grid-template-columns: 1.2fr .8fr; gap: 56px; align-items: start; }
.tags { display: flex; flex-wrap: wrap; gap: 10px; }
.tag { padding: 8px 11px; border: 1px solid #cbd4dd; background: rgba(255,255,255,.55); color: #334155; font-family: ui-monospace, monospace; font-size: .78rem; }
.ai-panel { padding: 32px; background: var(--white); border-left: 4px solid var(--cyan); box-shadow: var(--shadow); }
.ai-title { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.ai-title h3 { margin: 0; font-size: 1.3rem; }
.ai-panel p { margin: 0; color: var(--muted); }

.collab-grid { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.collab-item { padding: 30px 22px; border-right: 1px solid var(--line); }
.collab-item:first-child { padding-left: 0; }
.collab-item:last-child { border-right: 0; }
.collab-item .icon { margin-bottom: 22px; }
.collab-item h3 { margin-bottom: 9px; font-size: 1rem; letter-spacing: -.01em; }
.collab-item p { margin: 0; color: var(--muted); font-size: .9rem; }
.availability-note { margin: 22px 0 0; color: var(--muted); font-size: .92rem; }

.contact-section { background: var(--navy); color: var(--paper); }
.contact-layout { display: grid; grid-template-columns: .75fr 1.25fr; gap: 76px; }
.contact-copy p { color: #b9c8d7; }
.contact-email { display: inline-block; margin-top: 18px; color: var(--paper); }
.contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 8px; }
.field-wide { grid-column: 1 / -1; }
.field label { color: #dce5ee; font-size: .9rem; }
.field input, .field textarea { width: 100%; color: var(--paper); background: rgba(255,255,255,.045); border: 1px solid rgba(245,247,250,.22); border-radius: 8px; padding: 12px 14px; outline: none; }
.field textarea { min-height: 155px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(40,184,213,.16); }
.form-trap { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.form-footer { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.form-note { max-width: 530px; margin: 0; color: #9fb0c0; font-size: .82rem; }
.form-status { grid-column: 1 / -1; min-height: 1.6em; margin: 0; font-size: .9rem; }
.form-status[data-kind="success"] { color: #73e2b0; }
.form-status[data-kind="error"] { color: #ff9e99; }
.button:disabled { opacity: .55; cursor: wait; transform: none; }

.site-footer { background: #0b111c; color: #9fb0c0; font-size: .84rem; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; min-height: 86px; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 12px 20px; }
.footer-links a { color: #cbd5df; }

.legal-page { min-height: 100vh; background: var(--white); }
.legal-header { padding: 26px 0; color: var(--paper); background: var(--navy); }
.legal-header .shell { display: flex; align-items: center; justify-content: space-between; }
.legal-content { max-width: 850px; padding: 70px 0 100px; }
.legal-content h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
.legal-content h2 { margin: 48px 0 16px; font-size: 1.55rem; }
.legal-content p, .legal-content li { color: #475569; }
.legal-content a { color: var(--cyan-dark); }
.legal-updated { color: var(--muted); font-size: .9rem; }

.subpage-hero .hero-content { padding-top: 82px; }
.subpage-hero .hero-copy { max-width: 980px; }
.subpage-hero h1 { max-width: 940px; font-size: clamp(2.9rem, 5.6vw, 5.25rem); }
.subpage-hero .hero-lead { max-width: 860px; }
.subpage-hero .proofs { margin-top: 64px; }
.process-four { grid-template-columns: repeat(4, 1fr); }
.standards-note { margin: 24px 0 0; color: var(--muted); font-size: .92rem; }

.work-intro { max-width: 760px; }
.work-list { border-top: 1px solid var(--line); }
.case-study { display: grid; grid-template-columns: .9fr 1.1fr; gap: 72px; padding: 76px 0; border-bottom: 1px solid var(--line); }
.case-copy { position: sticky; top: 24px; align-self: start; }
.case-study:nth-child(even) .case-visual { order: -1; }
.case-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 20px; color: var(--cyan-dark); font-family: ui-monospace, monospace; font-size: .76rem; letter-spacing: .08em; text-transform: uppercase; }
.case-study h2 { margin-bottom: 20px; font-size: clamp(2rem, 3.7vw, 3.35rem); }
.case-lead { margin: 0; color: var(--muted); font-size: 1.08rem; }
.case-role { margin-top: 28px; padding-left: 18px; border-left: 3px solid var(--cyan); }
.case-role strong { display: block; margin-bottom: 5px; }
.case-role p { margin: 0; color: var(--muted); }
.case-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.case-tag { padding: 6px 9px; color: #334155; background: var(--paper); border: 1px solid var(--line); font-family: ui-monospace, monospace; font-size: .72rem; }
.case-status { margin: 24px 0 0; color: var(--muted); font-size: .9rem; }
.case-status a { color: var(--cyan-dark); }
.case-visual { position: relative; min-height: 430px; overflow: hidden; background: #e9eef3; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.case-window-bar { display: flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; background: rgba(255,255,255,.88); border-bottom: 1px solid rgba(17,24,39,.1); }
.case-window-bar span { width: 8px; height: 8px; border-radius: 50%; background: #cbd5df; }
.case-window-label { margin-left: 8px; color: #64748b; font-family: ui-monospace, monospace; font-size: .68rem; }
.case-longshot { align-self: start; min-height: 0; margin: 0; background: #eef2f5; }
.case-longshot img { display: block; width: 100%; height: auto; min-height: 0; object-fit: contain; }
.case-shot-stack { background: var(--white); }
.case-yvc { color: var(--paper); background: radial-gradient(circle at 85% 0%, #243652, #172033 52%, #0e1623); }
.case-yvc .case-window-bar { color: var(--ink); }
.case-yvc-preview { padding: 55px 48px; }
.case-yvc-preview small { color: #b9c8d7; font-family: ui-monospace, monospace; letter-spacing: .1em; text-transform: uppercase; }
.case-yvc-preview h3 { max-width: 430px; margin: 18px 0 12px; font-size: clamp(2.5rem, 5vw, 4.6rem); }
.case-yvc-preview p { max-width: 430px; margin: 0; color: #b9c8d7; }
.case-yvc-preview .mini-button { display: inline-block; margin-top: 28px; padding: 9px 14px; color: #06232a; background: var(--cyan); border-radius: 7px; font-weight: 700; }
.case-psych { background: #f2eee7; }
.case-psych-preview { display: grid; grid-template-columns: 1.1fr .9fr; min-height: 392px; }
.case-psych-copy { padding: 55px 36px; }
.case-psych-copy small { color: #6b7568; font-family: ui-monospace, monospace; text-transform: uppercase; letter-spacing: .08em; }
.case-psych-copy h3 { margin: 18px 0 15px; color: #28342b; font-family: Georgia, serif; font-size: clamp(2rem, 3.8vw, 3.2rem); }
.case-psych-copy p { color: #667067; }
.case-psych-shape { position: relative; margin: 28px 28px 28px 0; overflow: hidden; background: #aebca8; border-radius: 160px 160px 20px 20px; }
.case-psych-shape::before, .case-psych-shape::after { position: absolute; content: ""; border-radius: 50%; }
.case-psych-shape::before { width: 170px; height: 170px; right: -45px; top: 35px; background: #d9c8b7; }
.case-psych-shape::after { width: 120px; height: 120px; left: 28px; bottom: 35px; background: #73856f; }
.case-rum { margin: 0; background: #eef8fa; }
.case-rum img { display: block; width: 100%; height: 100%; min-height: 430px; object-fit: cover; object-position: center 14%; }
.case-mortgage { background: #fff; }
.case-mortgage-preview { padding: 44px 46px; }
.case-mortgage-preview h3 { max-width: 370px; margin-bottom: 28px; font-size: clamp(1.8rem, 3.3vw, 2.8rem); }
.mortgage-steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.mortgage-step { display: grid; place-items: center; aspect-ratio: .76; color: #172033; background: #eef0ff; font-size: 2.4rem; font-weight: 800; }
.mortgage-step:nth-child(2n) { background: #f4d5e2; }
.mortgage-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 28px; padding: 25px; background: #efc0d6; }
.mortgage-form span { height: 14px; background: rgba(255,255,255,.8); }
.mortgage-form span:last-child { grid-column: 1 / -1; width: 45%; background: #5362f5; }
.work-principles { margin-top: 80px; }
.work-contact-layout { display: grid; grid-template-columns: 1fr auto; gap: 44px; align-items: center; }
.work-contact-layout h2 { margin-bottom: 14px; }
.work-contact-layout p { max-width: 720px; margin: 0; color: #b9c8d7; }
.work-contact-actions { display: flex; flex-direction: column; gap: 12px; min-width: 230px; }

@media (max-width: 900px) {
  .main-nav { display: none; position: absolute; inset: 82px 20px auto; z-index: 20; flex-direction: column; align-items: stretch; gap: 0; padding: 10px; background: var(--navy); border: 1px solid rgba(245,247,250,.16); border-radius: 10px; box-shadow: var(--shadow); }
  .main-nav[data-open] { display: flex; }
  .main-nav a { padding: 12px 10px; }
  .lang-link { border-left: 0; border-top: 1px solid rgba(245,247,250,.14); padding-left: 10px !important; }
  .menu-button { display: inline-flex; }
  .hero-content { padding-top: 70px; }
  .section-head, .contact-layout, .toolkit, .website-offer { grid-template-columns: 1fr; }
  .section-head { align-items: start; gap: 22px; }
  .website-offer { gap: 42px; }
  .services .service { grid-template-columns: 52px 1fr; }
  .service p { grid-column: 2; }
  .support-grid { grid-template-columns: 1fr; }
  .support-item { min-height: 0; }
  .collab-grid { grid-template-columns: repeat(2, 1fr); }
  .collab-item { border-bottom: 1px solid var(--line); }
  .maintainable { grid-template-columns: 1fr; }
  .process, .process-four { grid-template-columns: 1fr; }
  .process-item { padding-right: 0; }
  .case-study { grid-template-columns: 1fr; gap: 38px; }
  .case-copy { position: static; }
  .case-study:nth-child(even) .case-visual { order: initial; }
  .work-contact-layout { grid-template-columns: 1fr; }
  .work-contact-actions { align-items: flex-start; }
}

@media (max-width: 640px) {
  .shell { width: min(calc(100% - 28px), var(--max)); }
  .site-header { min-height: 70px; }
  .main-nav { top: 70px; }
  .hero-content { padding: 56px 0 42px; }
  h1 { font-size: clamp(2.45rem, 12vw, 3.4rem); }
  .hero-lead { font-size: 1.28rem; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .proofs { grid-template-columns: 1fr; margin-top: 46px; }
  .proof, .proof:first-child { min-height: 74px; padding: 14px 0; border-right: 0; border-bottom: 1px solid rgba(245,247,250,.16); }
  .proof:last-child { border-bottom: 0; }
  .section { padding: 72px 0; }
  .service { grid-template-columns: 42px 1fr !important; gap: 14px; padding: 24px 0; }
  .service .icon { width: 28px; height: 28px; }
  .maintainable { padding: 30px 24px; gap: 22px; }
  .maintainable > .icon { width: 48px; height: 48px; }
  .collab-grid { grid-template-columns: 1fr; }
  .collab-item, .collab-item:first-child { padding: 24px 0; border-right: 0; }
  .contact-form { grid-template-columns: 1fr; }
  .field-wide, .form-footer, .form-status { grid-column: 1; }
  .form-footer { align-items: stretch; flex-direction: column; }
  .form-footer .button { width: 100%; }
  .footer-inner { align-items: flex-start; flex-direction: column; padding: 24px 0; }
  .case-study { padding: 58px 0; }
  .case-visual { min-height: 350px; }
  .case-yvc-preview { padding: 42px 26px; }
  .case-psych-preview { grid-template-columns: 1fr; }
  .case-psych-copy { padding: 38px 26px 24px; }
  .case-psych-shape { min-height: 180px; margin: 0 26px 26px; border-radius: 100px 100px 16px 16px; }
  .case-rum img { min-height: 350px; }
  .case-mortgage-preview { padding: 34px 24px; }
  .mortgage-steps { grid-template-columns: repeat(5, minmax(48px, 1fr)); overflow: hidden; }
  .mortgage-step { font-size: 1.7rem; }
  .work-contact-actions, .work-contact-actions .button { width: 100%; }
}

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