/* Rocket Solving — site styles */
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-var.woff2") format("woff2-variations"), url("../fonts/archivo-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --graphite: #1D262D;
  --graphite-2: #26323B;
  --graphite-3: #33424F;
  --blue: #3366FF;
  --blue-dark: #2450D6;
  --teal: #51D7D1;
  --steel: #8A99A6;
  --paper: #F3F5F7;
  --white: #FFFFFF;
  --ink: #1D262D;
  --ink-soft: #4A5864;
  --line-dark: rgba(255, 255, 255, .12);
  --line-light: #D9DFE4;
  --radius-s: 6px;
  --radius-m: 12px;
  --gutter: clamp(16px, 4vw, 48px);
  --maxw: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  font-stretch: 100%;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: var(--blue); text-underline-offset: .18em; }
a:hover { color: var(--blue-dark); }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--teal); color: var(--graphite); padding: 10px 16px; border-radius: var(--radius-s); font-weight: 700; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }

/* type */
h1, h2, h3 { margin: 0; font-weight: 700; color: inherit; }
h1 { font-size: clamp(2.2rem, 4.2vw, 3.55rem); line-height: 1.04; font-stretch: 112%; letter-spacing: -.012em; }
h2 { font-size: clamp(1.85rem, 3.4vw, 2.75rem); line-height: 1.08; font-stretch: 112%; letter-spacing: -.008em; }
h3 { font-size: 1.3rem; line-height: 1.25; font-stretch: 104%; }
p { margin: 0 0 1em; max-width: 68ch; }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.55; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 52px; padding: 0 1.4em; border-radius: 999px; border: 2px solid transparent;
  font: inherit; font-weight: 700; font-stretch: 108%; text-decoration: none; cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--blue-dark); color: var(--white); }
.btn-ghost { border-color: rgba(255, 255, 255, .35); color: var(--white); }
.btn-ghost:hover { border-color: var(--teal); color: var(--white); }

/* header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(29, 38, 45, .92); backdrop-filter: saturate(140%) blur(10px); border-bottom: 1px solid var(--line-dark); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 24px; }
.brand img { width: 168px; height: auto; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a { color: #DCE3E8; text-decoration: none; font-weight: 600; font-size: .98rem; }
.nav a:hover { color: var(--white); }
.nav .btn { min-height: 44px; padding: 0 1.1em; color: var(--white); }
.nav-toggle { display: none; background: none; border: 0; padding: 10px; margin-right: -10px; cursor: pointer; color: var(--white); }
.nav-toggle span { display: block; width: 24px; height: 2px; background: currentColor; margin: 5px 0; transition: transform .2s ease, opacity .2s ease; }
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav { position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--graphite); border-bottom: 1px solid var(--line-dark); padding: 8px var(--gutter) 20px; display: none; }
  .nav.open { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line-dark); font-size: 1.05rem; }
  .nav .btn { margin-top: 16px; border-bottom: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* dark sections */
.dark { background: var(--graphite); color: #E4EAEE; }
.dark p { color: #C3CDD4; }
.dark a:not(.btn) { color: var(--teal); }

/* hero */
.hero { position: relative; overflow: hidden; padding: clamp(48px, 7vw, 96px) 0 clamp(40px, 5vw, 72px); }
.hero::before { /* engineering grid, like a cutting mat */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 32px 32px; mask-image: linear-gradient(180deg, #000 0%, #000 60%, transparent 100%);
}
.hero .wrap { position: relative; display: grid; grid-template-columns: minmax(0, 11fr) minmax(0, 13fr); gap: clamp(32px, 4.5vw, 64px); align-items: center; }
.hero h1 { color: var(--white); }
.hero .lead { margin-top: 24px; color: #C9D3DA; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
@media (max-width: 960px) { .hero .wrap { grid-template-columns: 1fr; } }

/* drawing frame with dimension lines around media */
.drawing { position: relative; padding: 0 44px 44px 0; }
.drawing video, .drawing img.media { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-s); background: #182026; }
.dim { position: absolute; color: var(--teal); font-size: .8rem; font-weight: 600; font-stretch: 90%; font-variant-numeric: tabular-nums; }
.dim-h { left: 0; right: 44px; bottom: 10px; height: 18px; border-left: 1px solid currentColor; border-right: 1px solid currentColor; }
.dim-h::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid currentColor; }
.dim-h span { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: var(--graphite); padding: 0 8px; }
.dim-v { top: 0; bottom: 44px; right: 10px; width: 18px; border-top: 1px solid currentColor; border-bottom: 1px solid currentColor; }
.dim-v::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; border-left: 1px solid currentColor; }
.dim-v span { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-90deg); background: var(--graphite); padding: 0 8px; white-space: nowrap; }
.title-block { position: absolute; right: 44px; bottom: 44px; transform: translateY(1px); display: grid; grid-template-columns: auto auto; background: var(--graphite); border: 1px solid var(--line-dark); border-radius: var(--radius-s) 0 var(--radius-s) 0; font-size: .78rem; line-height: 1.3; }
.title-block div { padding: 7px 12px; border-right: 1px solid var(--line-dark); border-bottom: 1px solid var(--line-dark); }
.title-block div:nth-child(2n) { border-right: 0; }
.title-block div:nth-last-child(-n+2) { border-bottom: 0; }
.title-block b { display: block; color: var(--white); font-weight: 600; }
.title-block small { color: var(--steel); font-size: .72rem; }
@media (max-width: 560px) { .drawing { padding: 0 0 36px 0; } .dim-v { display: none; } .dim-h { right: 0; bottom: 6px; } .title-block { position: static; margin-top: 12px; border-radius: var(--radius-s); } }

/* proof strip */
.proof { border-top: 1px solid var(--line-dark); }
.proof ul { list-style: none; margin: 0; padding: 28px 0 32px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.proof li { color: #C3CDD4; font-size: .98rem; line-height: 1.45; padding-left: 16px; border-left: 2px solid var(--blue); }
.proof strong { display: block; color: var(--white); font-size: 1.35rem; font-stretch: 112%; line-height: 1.2; margin-bottom: 2px; }
@media (max-width: 760px) { .proof ul { grid-template-columns: 1fr; } }

/* generic section */
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section-head { max-width: 760px; margin-bottom: clamp(32px, 4vw, 56px); }
.section-head p { margin-top: 16px; color: var(--ink-soft); }
.dark .section-head p { color: #C3CDD4; }

/* services */
.services { background: var(--paper); }
.service-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-light); }
.service { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr) 220px; gap: clamp(20px, 3vw, 48px); align-items: center; padding: 32px 0; border-bottom: 1px solid var(--line-light); }
.service p { margin: 0; color: var(--ink-soft); }
.service .example { font-size: .92rem; margin-top: 10px; display: inline-block; font-weight: 600; }
.service img { width: 220px; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius-s); background: var(--graphite); }
@media (max-width: 900px) { .service { grid-template-columns: 1fr; gap: 12px; } .service img { width: 100%; max-width: 420px; order: -1; } }

/* process */
.process { background: var(--white); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; counter-reset: step; }
.step { position: relative; padding: 0 24px 0 0; }
.step::before { counter-increment: step; content: counter(step); display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--blue); color: var(--blue); font-weight: 700; font-stretch: 110%; background: var(--white); position: relative; z-index: 1; margin-bottom: 20px; }
.step::after { content: ""; position: absolute; top: 22px; left: 44px; right: 0; border-top: 2px dashed var(--line-light); }
.step:last-child::after { display: none; }
.step h3 { margin-bottom: 8px; }
.step p { color: var(--ink-soft); font-size: 1rem; margin: 0; }
@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .step { padding: 0 0 0 64px; }
  .step::before { position: absolute; left: 0; top: -4px; margin: 0; }
  .step::after { top: 44px; left: 21px; right: auto; bottom: -28px; border-top: 0; border-left: 2px dashed var(--line-light); }
}
.why { margin-top: clamp(48px, 6vw, 80px); display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; padding: 28px; background: var(--paper); border-radius: var(--radius-m); }
.why h3 { font-size: 1.05rem; margin-bottom: 6px; }
.why p { font-size: .96rem; color: var(--ink-soft); margin: 0; }
@media (max-width: 960px) { .why { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .why { grid-template-columns: 1fr; } }

/* cases */
.case { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 4vw, 64px); align-items: center; }
.case + .case { margin-top: clamp(56px, 7vw, 96px); }
.case:nth-child(even) .case-media { order: 2; }
.case-media video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-m); background: #182026; }
.case-client { display: inline-block; color: var(--teal); font-weight: 600; font-size: .95rem; margin-bottom: 12px; }
.case h3 { font-size: clamp(1.45rem, 2.4vw, 1.9rem); font-stretch: 110%; color: var(--white); margin-bottom: 16px; }
.case dl { margin: 20px 0 24px; display: grid; gap: 12px; }
.case dt { color: var(--white); font-weight: 600; font-size: .95rem; }
.case dd { margin: 2px 0 0; color: #C3CDD4; font-size: .98rem; }
@media (max-width: 900px) { .case { grid-template-columns: 1fr; } .case:nth-child(even) .case-media { order: 0; } }

/* contact */
.contact { background: var(--paper); }
.contact .wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
@media (max-width: 860px) { .contact .wrap { grid-template-columns: 1fr; } }
.contact ul { padding-left: 1.1em; color: var(--ink-soft); }
.contact li { margin-bottom: 6px; }
.form { background: var(--white); border: 1px solid var(--line-light); border-radius: var(--radius-m); padding: clamp(20px, 3vw, 36px); display: grid; gap: 18px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 560px) { .form .row { grid-template-columns: 1fr; } }
.field label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: 6px; }
.field input, .field textarea { width: 100%; font: inherit; font-size: 1rem; color: var(--ink); background: var(--white); border: 1px solid #BFC9D1; border-radius: var(--radius-s); padding: 12px 14px; }
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 0; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(51, 102, 255, .2); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; color: var(--ink-soft); }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--blue); flex: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 0; font-weight: 600; }
.form-status.ok { color: #1F8A5B; }
.form-status.err { color: #C0392B; }

/* footer */
.site-footer { padding: 48px 0 40px; }
.site-footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.site-footer img { width: 150px; margin-bottom: 16px; }
.site-footer h2 { font-size: 1rem; font-stretch: 100%; color: var(--white); margin-bottom: 10px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer a { color: #C3CDD4; text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }
.site-footer .legal-line { grid-column: 1 / -1; border-top: 1px solid var(--line-dark); padding-top: 20px; font-size: .88rem; color: var(--steel); }
@media (max-width: 760px) { .site-footer .wrap { grid-template-columns: 1fr; } }

/* case pages */
.page-hero { padding: clamp(48px, 7vw, 88px) 0 clamp(32px, 4vw, 56px); }
.page-hero .crumb { font-size: .92rem; margin-bottom: 18px; display: inline-block; }
.page-hero h1 { font-size: clamp(2.1rem, 4.4vw, 3.6rem); color: var(--white); max-width: 18ch; }
.page-hero .lead { margin-top: 20px; color: #C9D3DA; }
.facts { list-style: none; margin: 32px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.facts li { border: 1px solid var(--line-dark); border-radius: 999px; padding: 8px 16px; color: #DCE3E8; font-size: .95rem; }
.facts b { color: var(--white); }
.story { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(24px, 4vw, 64px); padding: 40px 0; border-top: 1px solid var(--line-light); }
.story:first-of-type { border-top: 0; }
.story h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.story p, .story li { color: var(--ink-soft); }
.story ul { padding-left: 1.1em; margin: 0 0 1em; }
@media (max-width: 860px) { .story { grid-template-columns: 1fr; } }
.figure { margin: 24px 0 0; }
.figure video, .figure img { width: 100%; border-radius: var(--radius-m); background: var(--graphite); }
.figure figcaption { font-size: .9rem; color: var(--ink-soft); margin-top: 8px; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 24px; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-s); }
@media (max-width: 640px) { .gallery { grid-template-columns: 1fr; } }
.cta-band { padding: clamp(48px, 6vw, 80px) 0; }
.cta-band .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.cta-band h2 { color: var(--white); max-width: 22ch; }

/* legal pages */
.legal { background: var(--white); }
.legal .wrap { max-width: 820px; }
.legal h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 8px; }
.legal h2 { font-size: 1.3rem; font-stretch: 104%; margin: 36px 0 10px; }
.legal p, .legal li { color: var(--ink-soft); }
.legal table { border-collapse: collapse; width: 100%; margin: 8px 0 16px; font-size: .95rem; }
.legal td, .legal th { border: 1px solid var(--line-light); padding: 8px 10px; text-align: left; vertical-align: top; }
.updated { color: var(--steel); font-size: .92rem; }

/* video play control for reduced motion */
.vid { position: relative; }
.vid-btn { position: absolute; right: 12px; bottom: 12px; min-height: 34px; padding: 0 12px; opacity: .75; border-radius: 999px; border: 0; background: rgba(29,38,45,.8); color: #fff; font: inherit; font-weight: 600; font-size: .8rem; cursor: pointer; }
.vid-btn:focus-visible, .vid:hover .vid-btn { opacity: 1; }
.vid-btn:hover { background: var(--blue); }

/* process: video synced with phases */
.process-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.process-media video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-m); background: var(--graphite); }
.phases { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.phase { width: 100%; display: grid; grid-template-columns: 36px 1fr; gap: 14px; align-items: start; text-align: left; font: inherit; color: var(--ink); background: transparent; border: 0; border-left: 3px solid var(--line-light); border-radius: 0 var(--radius-s) var(--radius-s) 0; padding: 10px 14px; cursor: pointer; transition: background-color .2s ease, border-color .2s ease; }
.phase:hover { background: var(--paper); }
.phase .num { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--line-light); display: flex; align-items: center; justify-content: center; font-weight: 700; font-stretch: 110%; font-size: .95rem; color: var(--steel); transition: background-color .2s ease, color .2s ease, border-color .2s ease; }
.phase .txt b { display: block; font-stretch: 106%; font-size: 1.05rem; line-height: 1.3; }
.phase .txt span { display: block; color: var(--ink-soft); font-size: .95rem; line-height: 1.45; margin-top: 2px; }
.phase.done .num { border-color: var(--blue); color: var(--blue); }
.phase.active { border-left-color: var(--blue); background: var(--paper); }
.phase.active .num { background: var(--blue); border-color: var(--blue); color: var(--white); }
@media (max-width: 900px) { .process-grid { grid-template-columns: 1fr; } }
