/* =========================================================
   CareRobotics — problem-led site
   Rules: one visual at a time, one sentence at a time.
   Navy + white, sky accent, blueprint line art, big serif type.
   Every animation plays on its own once in view, so fast
   scrollers still see it.
   ========================================================= */

:root {
  --navy-950: #050A18;
  --navy-900: #0A1228;
  --navy-850: #0D1733;
  --navy-800: #111D3F;
  --navy-700: #1A2A57;
  --line-d: rgba(148, 178, 255, 0.14);
  --line-d2: rgba(148, 178, 255, 0.26);
  --text-d: #EEF3FB;
  --muted-d: #9AA9C4;
  --dim-d: #6E7E9D;

  --sky: #38BDF8;
  --sky-2: #7DD3FC;
  --blue: #3B82F6;
  --blue-ink: #1D5FD6;

  --white: #FFFFFF;
  --cloud: #F3F6FB;
  --line-l: #DCE3EE;
  --line-l2: #C5D0E1;
  --text-l: #0A1228;
  --muted-l: #55657F;

  --grad: linear-gradient(110deg, #38BDF8 0%, #6E8EFF 55%, #A5B4FC 100%);

  --serif: "Fraunces", Georgia, serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  --gutter: 32px;
  --nav-h: 68px;
  --edge: max(var(--gutter), calc((100vw - 1240px) / 2 + var(--gutter)));
  color-scheme: light;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--navy-900); color: var(--text-d); font: 400 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, figure, fieldset { margin: 0; }
ul, ol { padding: 0; list-style: none; }
fieldset { border: 0; padding: 0; min-width: 0; }
.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; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--sky); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--sky); color: var(--navy-900); }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 10px; z-index: 100; background: var(--sky); color: var(--navy-900); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 10px; }
.dark { background: var(--navy-900); color: var(--text-d); }
.light { background: var(--white); color: var(--text-l); }
.cloud { background: var(--cloud); color: var(--text-l); }

/* ---------- type ---------- */
h1, h2 { font-family: var(--serif); font-weight: 380; font-variation-settings: "opsz" 60; letter-spacing: -0.025em; line-height: 1.04; text-wrap: balance; }
h2 { font-size: clamp(36px, 5vw, 68px); }
h1 em, h2 em { font-style: italic; font-weight: 340; }
.dark h1 em, .dark h2 em { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: 0.06em; }
.light h2 em, .cloud h2 em { color: var(--blue-ink); }
.dark .is-split em { background: none; color: inherit; padding-right: 0; }
.dark .is-split em .wi { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.split-h .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.22em; margin-bottom: -0.22em; }
.split-h .wi { display: inline-block; will-change: transform; }
em .wi { padding-right: 0.05em; }
.kicker { font: 600 12px/1 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; margin-bottom: 20px; display: flex; align-items: center; gap: 12px; }
.dark .kicker { color: var(--muted-d); }
.light .kicker, .cloud .kicker { color: var(--muted-l); }
.kicker b { font-weight: 600; color: var(--sky); }
.light .kicker b, .cloud .kicker b { color: var(--blue-ink); }
.kicker b::after { content: ""; display: inline-block; width: 24px; height: 1px; background: currentColor; opacity: .6; vertical-align: middle; margin-left: 12px; }
.sub { margin-top: 20px; font-size: clamp(18px, 1.6vw, 22px); line-height: 1.45; max-width: 32ch; }
.dark .sub { color: var(--muted-d); }
.light .sub, .cloud .sub { color: var(--muted-l); }
.grad-num { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .05em; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 15px 24px; border-radius: 999px; font: 600 15px/1 var(--sans); text-decoration: none; white-space: nowrap; border: 1px solid transparent; cursor: pointer; transition: transform .25s cubic-bezier(.2,.7,.2,1), background .25s, color .25s, border-color .25s; }
.btn:hover { transform: translateY(-2px); }
.btn-sm { padding: 11px 18px; font-size: 14px; }
.btn-sky { background: var(--sky); color: var(--navy-900); box-shadow: 0 8px 30px -10px rgba(56,189,248,.7); }
.btn-sky:hover { background: var(--sky-2); }
.btn-line { border-color: var(--line-d2); color: var(--text-d); }
.btn-line:hover { border-color: var(--text-d); }
.btn-navy { background: var(--navy-900); color: var(--white); }
.btn-navy:hover { background: var(--navy-700); }

/* ---------- progress + nav ---------- */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 70; pointer-events: none; }
.progress i { display: block; height: 100%; background: var(--grad); transform-origin: 0 50%; transform: scaleX(0); }
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 60; height: var(--nav-h); background: rgba(10, 18, 40, 0.72); -webkit-backdrop-filter: saturate(1.5) blur(16px); backdrop-filter: saturate(1.5) blur(16px); border-bottom: 1px solid var(--line-d); color: var(--text-d); }
.nav-inner { height: 100%; display: flex; align-items: center; gap: 24px; }
.logo { display: inline-flex; align-items: center; flex-shrink: 0; text-decoration: none; }
.logo-svg { display: block; width: auto; height: 20px; overflow: visible; }   /* the logo as the C: its height is the C's */
.footer .logo-svg { height: 26px; }
@media (max-width: 640px) { .logo-svg { height: 18px; } }
.js:not(.static) #nav-logo:not(.drawn) { visibility: hidden; }   /* main.js draws it in */
.nav-links { display: flex; gap: 28px; margin-left: auto; }
.nav-links a { text-decoration: none; font-size: 14px; color: var(--muted-d); transition: color .2s; }
.nav-links a:hover { color: var(--white); }
@media (max-width: 1000px) { .nav-links { display: none; } .nav .btn { margin-left: auto; } }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; overflow: hidden; padding: calc(var(--nav-h) + 32px) 0 110px; }
.hero-bg, .film-bg { position: absolute; inset: 0; pointer-events: none; }
.blueprint { position: absolute; inset: 0; background-image: linear-gradient(rgba(148,178,255,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(148,178,255,.07) 1px, transparent 1px); background-size: 56px 56px; -webkit-mask-image: radial-gradient(ellipse 80% 70% at 65% 45%, #000 30%, transparent 85%); mask-image: radial-gradient(ellipse 80% 70% at 65% 45%, #000 30%, transparent 85%); }
.film-bg .blueprint { -webkit-mask-image: radial-gradient(ellipse 75% 75% at 62% 55%, #000 20%, transparent 80%); mask-image: radial-gradient(ellipse 75% 75% at 62% 55%, #000 20%, transparent 80%); opacity: .7; }
.glow { position: absolute; width: 900px; height: 900px; right: -240px; top: -280px; background: radial-gradient(circle, rgba(56,189,248,.22), rgba(110,142,255,.08) 40%, transparent 68%); }
.footsteps { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--sky); overflow: visible; pointer-events: none; }
.fp { opacity: .14; }
.motion .fp { opacity: 0; animation: fp var(--dur, 10s) linear infinite; animation-delay: var(--d, 0s); }
@keyframes fp { 0% { opacity: 0; } 2% { opacity: .6; } 28% { opacity: .2; } 55%, 100% { opacity: 0; } }
.hero-inner { position: relative; z-index: 1; }
.hero-title { font-size: clamp(56px, 10vw, 152px); line-height: .94; max-width: 10ch; }
.hero-sub { margin-top: 30px; font-size: clamp(19px, 1.7vw, 23px); color: var(--muted-d); max-width: 31ch; line-height: 1.45; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 38px; }
.backed { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 22px; margin-top: 40px; font: 600 11px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--muted-d); }
.backed img { display: block; width: auto; height: 14px; opacity: .6; }
.backed .imp { filter: brightness(0) invert(1); }
.backed .ucl { height: 17px; }   /* a solid block reads smaller than a wordmark */
.scroll-cue { position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 10px; text-decoration: none; font: 600 11px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--dim-d); z-index: 1; }
.scroll-cue i { width: 1px; height: 40px; background: linear-gradient(var(--sky), transparent); position: relative; overflow: hidden; }
.scroll-cue i::after { content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: #fff; animation: cue 1.8s ease-in-out infinite; }
@keyframes cue { to { top: 110%; } }
.js:not(.static) .hero-anim { opacity: 0; }
.js:not(.static) .hero-title { visibility: hidden; }
html.js.motion .hero-title { visibility: visible; }
@media (max-aspect-ratio: 1/1) { .hero { align-items: flex-end; padding-bottom: 128px; } }
@media (max-width: 560px) { .hero-ctas .btn { flex: 1 1 100%; } }

/* =========================================================
   01 FILM — the building
   ========================================================= */
.film { position: relative; overflow: hidden; padding: 110px 0 90px; }
.film-text { position: relative; z-index: 2; max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); }
.film h2 { font-size: clamp(30px, 3.6vw, 54px); max-width: 15ch; }
.beats { display: grid; gap: 48px; }
.beat-sub { margin-top: 18px; font-size: clamp(19px, 1.8vw, 24px); line-height: 1.35; color: var(--muted-d); }
.beat-note { margin-top: 14px; font-size: 13px; color: var(--dim-d); max-width: 36ch; }
.status { margin-top: 18px; display: flex; flex-direction: column; gap: 18px; }
.status-count { display: flex; align-items: baseline; gap: 10px; font: 500 clamp(44px, 4.6vw, 64px)/1 var(--mono); letter-spacing: -0.04em; color: var(--sky); font-variant-numeric: tabular-nums; }
.status-count small { font: 600 12px/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted-d); }
/* the live note reads like the other beats' sub-lines, just brighter: the clock, then what she's doing */
.status-now { display: flex; gap: 12px; align-items: baseline; font-size: clamp(19px, 1.8vw, 24px); line-height: 1.35; color: var(--white); }
.status-time { font: 500 0.7em/1 var(--mono); color: var(--sky); flex: none; }
.status-now.flash .status-text { animation: flash .45s ease; }
@keyframes flash { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.play-bar { margin-top: 16px; height: 2px; width: 100%; max-width: 360px; background: var(--line-d2); border-radius: 2px; overflow: hidden; }
.play-bar i { display: block; height: 100%; background: var(--sky); transform-origin: 0 50%; transform: scaleX(0); }
.stops { display: none; }
.film-stage { position: relative; z-index: 1; height: 72vh; min-height: 440px; max-width: 1240px; margin: 48px auto 0; padding: 0 var(--gutter); }
.bldg, .trails { position: absolute; inset: 0; width: 100%; height: 100%; }
.trails { pointer-events: none; }

/* the building: an architectural section with rooms in perspective */
.bldg .shell { fill: none; stroke: rgba(148,178,255,.6); stroke-width: 2.2; }
.bldg .roof { stroke: rgba(148,178,255,.45); stroke-width: 1.3; fill: rgba(17, 29, 63, 0.6); }
.bldg .slab { fill: rgba(148,178,255,.26); }
.bldg .slab.ground { fill: rgba(148,178,255,.42); }
.bldg .earth { fill: rgba(5,10,24,.5); }
.bldg .earth-line { stroke: rgba(148,178,255,.55); stroke-width: 1.5; }
.bldg .door-gap { fill: var(--navy-900); }
.bldg .canopy { stroke: rgba(148,178,255,.6); stroke-width: 2; stroke-linecap: round; }
.bldg .lift { fill: rgba(5,10,24,.6); stroke: rgba(148,178,255,.18); stroke-width: 1; }
.bldg .lift-line { stroke: rgba(148,178,255,.22); stroke-width: 1; stroke-dasharray: 2 5; }
.bldg .landing { stroke: rgba(148,178,255,.3); stroke-width: 1.2; }
.bldg .rm-bg { fill: rgba(8, 14, 32, 0.9); }
.bldg .rm-back { stroke: rgba(148,178,255,.14); stroke-width: 1; }
.bldg .rm-ceil { fill: rgba(5, 10, 24, 0.75); }
.bldg .lamp { pointer-events: none; }
.bldg .rm-edge { stroke: rgba(148,178,255,.18); stroke-width: 1; }
.bldg .glyph path { fill: none; stroke: rgba(196,212,240,.45); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; transition: stroke .4s; }
.bldg .room.lit .glyph path { stroke: #fff; }
.bldg .room.home .glyph path { stroke: var(--sky); }
.bldg .room.home .rm-back { fill: rgba(56,189,248,.16); }
.bldg .room.lit .rm-back { fill: rgba(255,255,255,.1); }
.bldg .room .rm-back { transition: fill .5s; }
.bldg .cell { fill: none; stroke: rgba(56,189,248,0); stroke-width: 1.6; transition: stroke .5s; }
.bldg .cell.home { stroke: rgba(56,189,248,.9); }
.bldg .cell.visited { stroke: rgba(56,189,248,.35); }
.bldg .cell.active { stroke: rgba(255,255,255,.9); }
.bldg .label { fill: rgba(176,196,232,.82); font-family: var(--sans); font-weight: 600; letter-spacing: .09em; transition: fill .4s; }
.bldg .label.on { fill: #fff; }
.bldg .tag { opacity: 0; transition: opacity .4s; }
.bldg .tag rect { fill: var(--sky); }
.bldg .tag text { fill: var(--navy-900); font-family: var(--sans); font-weight: 700; letter-spacing: .06em; }
.bldg .tag.on { opacity: 1; }
/* each errand leaves its minutes in the room it went to, so the building ends up showing where the 63 went */
.bldg .etag { opacity: 0; transform: translateY(5px); transform-box: fill-box; transition: opacity .35s ease, transform .45s cubic-bezier(.2,.7,.2,1); }
.bldg .etag rect { fill: #fff; }
.bldg .etag text { fill: var(--navy-900); font-family: var(--sans); font-weight: 700; letter-spacing: .06em; }
.bldg .etag.on { opacity: 1; transform: none; }
.bldg .flabel { fill: var(--dim-d); font-family: var(--mono); font-weight: 500; text-anchor: end; }

/* pinned film */
.film.is-pinned { height: 100vh; height: 100svh; padding: 0; }
.is-pinned .film-text { position: absolute; margin: 0; max-width: none; padding: 0; }
.is-pinned .beats { position: relative; display: block; height: var(--beats-h, 320px); }
.is-pinned .beat { position: absolute; left: 0; right: 0; top: 0; opacity: 0; transform: translateY(14px); transition: opacity .35s ease, transform .5s cubic-bezier(.2,.7,.2,1); pointer-events: none; }
.is-pinned .beat.on { opacity: 1; transform: none; pointer-events: auto; }
.is-pinned #beat-sub { opacity: 0; transform: translateY(8px); transition: opacity .4s ease .35s, transform .5s cubic-bezier(.2,.7,.2,1) .35s; }
.is-pinned .beat.on #beat-sub, .is-pinned #beat-sub.on { opacity: 1; transform: none; }
.is-pinned .film-stage { position: absolute; margin: 0; padding: 0; max-width: none; height: auto; min-height: 0; }
.is-pinned .stops { display: flex; gap: 8px; margin-top: 22px; }
.stops li { width: 8px; height: 8px; border-radius: 999px; background: var(--line-d2); transition: width .35s, background .35s; }
.stops li.on { width: 26px; background: var(--sky); }

@media (min-width: 900px) and (min-aspect-ratio: 1/1) {
  .is-pinned .film-text { left: var(--edge); top: var(--nav-h); bottom: 0; width: min(34vw, 440px); display: flex; flex-direction: column; justify-content: center; }
  .is-pinned .film-stage { top: calc(var(--nav-h) + 28px); bottom: 32px; right: max(var(--gutter), 4vw); left: calc(var(--edge) + min(34vw, 440px) + 48px); }
}
@media (max-width: 899px), (max-aspect-ratio: 1/1) {
  .is-pinned .film-text { left: var(--gutter); right: var(--gutter); top: calc(var(--nav-h) + 20px); }
  .is-pinned .film-stage { left: var(--gutter); right: var(--gutter); top: calc(var(--nav-h) + 20px + var(--text-h, 220px) + 14px); bottom: 18px; }
  .film h2 { font-size: clamp(26px, 5.4vw, 46px); max-width: 22ch; }
  .is-pinned .kicker { margin-bottom: 12px; }
  .beat-sub { margin-top: 10px; font-size: clamp(17px, 3.2vw, 22px); }
  .status { margin-top: 10px; gap: 10px; }
  .status-now { font-size: clamp(17px, 3.2vw, 22px); }
  .status-count { font-size: clamp(34px, 7vw, 52px); }
  .play-bar { margin-top: 10px; max-width: none; }
  .beat-note { margin-top: 8px; }
  .is-pinned .stops { position: absolute; right: 0; top: 0; margin: 0; }
}
@media (max-height: 720px) and (max-aspect-ratio: 1/1) { .is-pinned .film-text .kicker { display: none; } .is-pinned .stops { display: none; } }

/* =========================================================
   Sections
   ========================================================= */
.sec { padding: clamp(96px, 12vw, 150px) 0; position: relative; }
.sec-head { margin-bottom: clamp(40px, 5vw, 64px); }
.sec-head h2 { max-width: 17ch; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(36px, 6vw, 96px); align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
.stat-src, .stat-src a { display: inline-block; margin-top: 12px; font: 600 12px/1.3 var(--sans); letter-spacing: .03em; color: var(--muted-d); text-decoration: none; }
.stat-src a { margin-top: 0; }
.stat-src:hover, .stat-src a:hover { color: var(--sky); }

/* line-art shared by every small illustration */
.ln { fill: none; stroke: rgba(196,212,240,.55); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ln.thin { stroke-width: 1.4; }
.ln.dim { stroke: rgba(148,178,255,.2); }
.ln.sky { stroke: var(--sky); }
.ln.white { stroke: #fff; }
.ln.dotted { stroke-dasharray: 0.1 9; stroke-width: 3; }
.fill-sky { fill: var(--sky); }
.fill-soft { fill: rgba(148,178,255,.14); }
.fill-navy { fill: var(--navy-900); }
.viz text, .fix-icon text { font-family: var(--sans); font-weight: 600; fill: var(--muted-d); }

/* 02 evidence: a bento of illustrated statistics */
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.stat { grid-column: span 6; position: relative; overflow: hidden; display: flex; flex-direction: column; background: var(--navy-900); color: var(--text-d); border-radius: 24px; isolation: isolate; }
.stat::before { content: ""; position: absolute; width: 420px; height: 420px; right: -180px; top: -220px; background: radial-gradient(circle, rgba(56,189,248,.18), transparent 65%); z-index: -1; }
.s-7 { grid-column: span 7; } .s-5 { grid-column: span 5; } .s-6 { grid-column: span 6; }
.viz { width: 100%; height: clamp(150px, 15vw, 200px); margin-top: 16px; overflow: visible; }
.stat-body { padding: 4px 28px 28px; margin-top: auto; }
.stat-num { font: 380 clamp(52px, 5.6vw, 82px)/1 var(--serif); font-variation-settings: "opsz" 60; letter-spacing: -0.035em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .05em; font-variant-numeric: lining-nums tabular-nums; }
.stat-text { margin-top: 10px; font-size: 17px; line-height: 1.45; color: var(--text-d); max-width: 36ch; }
.viz .dot { fill: rgba(148,178,255,.16); }
.viz .fp { color: var(--sky); }
.viz .person path, .viz .person circle { fill: rgba(196,212,240,.75); }
.viz .person.hit path, .viz .person.hit circle { fill: var(--sky); }
@media (max-width: 1000px) { .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stat { grid-column: span 1 !important; } }
@media (max-width: 640px) { .bento { grid-template-columns: 1fr; } .stat-body { padding: 4px 22px 24px; } }

/* 03 why it persists */
.fixes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.fix { background: var(--navy-800); border: 1px solid var(--line-d); border-radius: 22px; padding: 22px 24px 26px; }
.fix-icon { width: 100%; height: 108px; margin-bottom: 18px; overflow: visible; }
.fix h3 { font: 600 20px/1.25 var(--sans); color: var(--white); margin-bottom: 8px; letter-spacing: -0.01em; }
.fix s { text-decoration: none; background: linear-gradient(var(--sky), var(--sky)) no-repeat 0 58% / var(--strike, 100%) 2.5px; }
.fix p { color: var(--muted-d); font-size: 16px; }
.gap { margin-top: 16px; background: linear-gradient(160deg, var(--navy-800), var(--navy-900)); border: 1px solid var(--line-d); border-radius: 24px; padding: clamp(26px, 4vw, 52px); display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.gap-num { font: 380 clamp(84px, 10vw, 148px)/0.9 var(--serif); font-variation-settings: "opsz" 60; letter-spacing: -0.045em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .05em; }
.gap-line { margin-top: 14px; font-size: clamp(17px, 1.5vw, 20px); line-height: 1.45; color: var(--text-d); max-width: 36ch; }
.gap-viz svg { width: 100%; height: auto; overflow: visible; }
.gap-viz figcaption { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 14px; font-size: 13px; color: var(--muted-d); }
.gap-viz figcaption span { display: inline-flex; align-items: center; gap: 8px; }
.k-solid, .k-dash { display: inline-block; width: 12px; height: 12px; border-radius: 50%; }
.k-solid { background: rgba(238,243,251,.9); }
.k-dash { border: 1.5px dashed var(--sky); }
.gap svg .p-solid path, .gap svg .p-solid circle { fill: rgba(238,243,251,.88); }
.gap svg .p-dash path, .gap svg .p-dash circle { fill: rgba(56,189,248,.06); stroke: var(--sky); stroke-width: 1.5; stroke-dasharray: 3 3; }
@media (max-width: 760px) { .fixes { grid-template-columns: 1fr; } .fix-icon { height: 96px; } }
@media (max-width: 860px) { .gap { grid-template-columns: 1fr; } }

/* 04 cost */
.calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "in out" "mix out"; gap: 16px; }
.calc-in, .calc-mix { background: var(--cloud); border: 1px solid var(--line-l); border-radius: 22px; padding: clamp(24px, 3.5vw, 40px); }
.calc-in { grid-area: in; display: flex; flex-direction: column; justify-content: center; gap: 30px; }
.calc-mix { grid-area: mix; }
.calc-mix .out-label { color: var(--muted-l); margin-bottom: 18px; }
.chips.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: var(--white); border: 1px solid var(--line-l); border-radius: 999px; }
.chips.seg label { display: block; }
.chips.seg span { display: block; text-align: center; border: 0; background: transparent; padding: 11px 12px; font-size: 15px; font-weight: 600; }
.mix { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.mix li { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 7px 12px; }
.mix-name { font-size: 15px; font-weight: 500; }
.mix-val { font: 500 15px/1 var(--mono); color: var(--blue-ink); font-variant-numeric: tabular-nums; }
.mix-bar { grid-column: 1 / -1; height: 7px; border-radius: 4px; background: rgba(10,18,40,.07); overflow: hidden; }
.mix-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--grad); transition: width .5s cubic-bezier(.2,.7,.2,1); }
.field { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 10px 16px; }
.field label { font-weight: 600; font-size: 16px; }
.field label small { display: block; margin-top: 4px; font-size: 13px; font-weight: 400; color: var(--muted-l); }
.field output { font: 500 18px/1 var(--mono); color: var(--blue-ink); font-variant-numeric: tabular-nums; }
.field input { grid-column: 1 / -1; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 30px; background: transparent; cursor: pointer; --p: 50%; }
input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(to right, var(--sky) var(--p), var(--line-l2) var(--p)); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -9px; border-radius: 50%; background: var(--white); border: 2px solid var(--navy-900); box-shadow: 0 4px 12px -2px rgba(10,18,40,.3); }
input[type=range]::-moz-range-track { height: 6px; border-radius: 3px; background: var(--line-l2); }
input[type=range]::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--sky); }
input[type=range]::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: var(--white); border: 2px solid var(--navy-900); }
input[type=range]:focus-visible { outline: none; }
input[type=range]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 5px rgba(56,189,248,.35); }
.calc-out { grid-area: out; background: var(--navy-900); color: var(--text-d); border-radius: 22px; padding: clamp(28px, 3.5vw, 44px); display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden; }
.calc-out::before { content: ""; position: absolute; width: 480px; height: 480px; right: -200px; top: -220px; background: radial-gradient(circle, rgba(56,189,248,.24), transparent 65%); pointer-events: none; }
.calc-out > * { position: relative; }
.out-label { font: 600 12px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--muted-d); margin-bottom: 14px; }
.out-big { font: 380 clamp(72px, 8vw, 116px)/0.95 var(--serif); font-variation-settings: "opsz" 60; letter-spacing: -0.04em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .05em; font-variant-numeric: tabular-nums; }
.out-line { margin-top: 12px; font-size: 17px; color: var(--muted-d); }
.out-line b { color: var(--white); font-weight: 600; }
.crowd { width: 100%; height: auto; margin: 26px 0 12px; }
.crowd .p path, .crowd .p circle { fill: rgba(148,178,255,.16); transition: fill .35s ease; }
.crowd .p.on path, .crowd .p.on circle { fill: #D6DEEC; }
.crowd .p.on.rn path, .crowd .p.on.rn circle { fill: var(--sky); }
.crowd-key { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; font-size: 13px; color: var(--muted-d); }
.crowd-key .key { display: inline-flex; align-items: center; gap: 7px; }
.crowd-key i { width: 9px; height: 9px; border-radius: 50%; background: #D6DEEC; }
.crowd-key .k-rn { background: var(--sky); }
@media (max-width: 520px) { #crowd-per { flex-basis: 100%; } }
.out-stock { margin-top: 18px; font-size: 16px; }
.out-note { margin: 10px 0 24px; font-size: 13px; color: var(--dim-d); }
.calc-out .btn { align-self: flex-start; }
@media (max-width: 860px) { .calc { grid-template-columns: 1fr; grid-template-areas: "in" "out" "mix"; } }
/* size presets: a three-way switch between the bed count and its slider */
.sizes { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin: 4px 0 0; padding: 4px; border: 1px solid var(--line-l); border-radius: 16px; background: var(--white); }
.sizes label { position: relative; cursor: pointer; }
.sizes input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.sizes span { display: block; padding: 9px 6px; border-radius: 12px; text-align: center; font-size: 14px; font-weight: 600; line-height: 1.25; transition: background .2s, color .2s; }
.sizes small { display: block; font-size: 12px; font-weight: 400; color: var(--muted-l); transition: color .2s; }
.sizes input:checked + span { background: var(--navy-900); color: var(--white); }
.sizes input:checked + span small { color: var(--muted-d); }
.sizes input:focus-visible + span { outline: 2px solid var(--sky); outline-offset: 2px; }
/* advanced options: a quiet button that opens every figure for editing */
.calc-more { display: flex; align-items: center; gap: 10px; width: 100%; padding: 22px 0 0; border: 0; border-top: 1px solid var(--line-l); background: none; color: var(--blue-ink); font: 600 15px/1 var(--sans); cursor: pointer; text-align: left; }
.calc-more svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.calc-more span { flex: 1; }
.calc-more .chev { width: 9px; height: 9px; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-3px) rotate(45deg); transition: transform .35s cubic-bezier(.2,.7,.2,1); }
.calc-more[aria-expanded="true"] .chev { transform: translateY(2px) rotate(-135deg); }
.calc-more:hover { color: var(--navy-900); }
.calc-more:focus-visible { outline: 2px solid var(--sky); outline-offset: 6px; border-radius: 4px; }
.calc-adv { display: grid; grid-template-rows: 0fr; margin-top: -30px; transition: grid-template-rows .5s cubic-bezier(.2,.7,.2,1); }
.calc-adv.open { grid-template-rows: 1fr; }
.adv-in { min-height: 0; overflow: hidden; opacity: 0; transition: opacity .35s ease; }
.calc-adv.open .adv-in { opacity: 1; transition-delay: .1s; }
.adv-lead { margin: 26px 0 0; font-size: 15px; color: var(--muted-l); }
.adv-sec { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line-l); }
.adv-sec h3 { margin: 0 0 16px; font: 600 12px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--muted-l); }
.adv-tabs { margin: 0 0 18px; padding: 0; border: 0; }
.adv-tabs span { padding: 8px 14px; }
.adv-tabs label.edited span::after, .num.edited .num-k::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 7px; border-radius: 50%; background: var(--sky); vertical-align: 2px; }
.adv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.num { display: flex; flex-direction: column; justify-content: flex-end; gap: 7px; min-width: 0; }
.num.wide { grid-column: 1 / -1; }
.num-k { font-size: 13px; line-height: 1.3; color: var(--muted-l); }
.num-in { display: flex; align-items: center; gap: 6px; height: 46px; padding: 0 14px; background: var(--white); border: 1px solid var(--line-l2); border-radius: 12px; transition: border-color .2s, box-shadow .2s; }
.num-in:focus-within { border-color: var(--sky); box-shadow: 0 0 0 4px rgba(56,189,248,.2); }
.num.edited .num-in { border-color: var(--sky); }
.num-in input { flex: 1; min-width: 0; width: 100%; height: 100%; padding: 0; border: 0; background: none; color: var(--text-l); font: 500 16px/1 var(--mono); font-variant-numeric: tabular-nums; outline: none; -moz-appearance: textfield; }
.num-in input::-webkit-inner-spin-button, .num-in input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.num-in i, .num-in b { flex: none; font-style: normal; font-size: 13px; font-weight: 500; color: var(--muted-l); white-space: nowrap; }
.num-in b { font: 500 16px/1 var(--mono); }
.adv-reset { margin-top: 22px; padding: 0; border: 0; background: none; color: var(--blue-ink); font: 600 14px/1.4 var(--sans); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.adv-reset:disabled { color: var(--muted-l); opacity: .5; text-decoration: none; cursor: default; }
@media (max-width: 520px) { .adv-grid { gap: 14px 10px; } .num-in { padding: 0 11px; } }
@media (max-width: 359px) { .adv-grid { grid-template-columns: 1fr; } }
/* while editing, the result card stays in view beside the options; on one column, a live total floats instead */
@media (min-width: 861px) and (min-height: 760px) { .calc.adv-open .calc-out { position: sticky; top: calc(var(--nav-h) + 16px); align-self: start; } }
.calc-float { position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 40; margin: 0; padding: 12px 20px; border-radius: 999px; background: var(--navy-900); color: var(--muted-d); font-size: 14px; white-space: nowrap; box-shadow: 0 14px 40px -12px rgba(10,18,40,.6); opacity: 0; transform: translate(-50%, 16px); pointer-events: none; transition: opacity .3s ease, transform .3s ease; }
.calc-float b { margin-right: 4px; font: 500 18px/1 var(--mono); color: var(--sky); }
.calc-float.show { opacity: 1; transform: translate(-50%, 0); }

/* 05 close: who we are + contact */
.close { overflow: hidden; }
.close > .footsteps { z-index: 0; }
.close .wrap { position: relative; z-index: 1; }
.about { align-items: end; }
.about-lead { font: 380 clamp(24px, 2.4vw, 34px)/1.25 var(--serif); font-variation-settings: "opsz" 60; color: var(--white); letter-spacing: -0.01em; }
.about-copy p + p { margin-top: 16px; color: var(--muted-d); font-size: 18px; }
.facts { margin-top: clamp(48px, 6vw, 80px); display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.facts li { border: 1px solid var(--line-d); border-radius: 20px; padding: 24px 24px 26px; background: linear-gradient(180deg, rgba(56,189,248,.08), rgba(56,189,248,0)); display: flex; flex-direction: column; gap: 10px; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.fact-k { font: 380 32px/1 var(--serif); font-variation-settings: "opsz" 60; color: var(--white); letter-spacing: -0.02em; }
.facts li span:last-child { color: var(--muted-d); font-size: 15px; }
@media (max-width: 1100px) { .facts { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .facts { grid-template-columns: 1fr; } }
/* closing invitation: pick who you are, the pop-up opens ready for you */
.cta-panel { margin-top: clamp(96px, 12vw, 160px); display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.cta-text h2 { max-width: 13ch; }
.contact-mail { margin-top: 26px; font-size: 15px; color: var(--muted-d); }
.contact-mail a { color: var(--sky); font-weight: 600; }
.cta-roles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.role {
  position: relative; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 8px; min-height: 150px;
  padding: 22px 22px 24px; border-radius: 20px; border: 1px solid var(--line-d2); color: var(--text-d);
  background: linear-gradient(180deg, rgba(56,189,248,.08), rgba(17,29,63,.6));
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: border-color .25s, transform .25s cubic-bezier(.2,.7,.2,1), background .25s;
}
.role:hover { border-color: var(--sky); transform: translateY(-3px); background: linear-gradient(180deg, rgba(56,189,248,.16), rgba(17,29,63,.7)); }
.role-k { font: 380 23px/1.15 var(--serif); font-variation-settings: "opsz" 60; letter-spacing: -0.01em; color: var(--white); padding-right: 28px; }
.role-d { font-size: 15px; color: var(--muted-d); line-height: 1.45; }
.role i { position: absolute; right: 20px; top: 20px; font-style: normal; color: var(--sky); font-size: 20px; transition: transform .25s; }
.role:hover i { transform: translateX(4px); }
@media (max-width: 900px) { .cta-panel { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .cta-roles { grid-template-columns: 1fr; } .role { min-height: 0; } }

/* the contact pop-up */
html.modal-open, html.modal-open body { overflow: hidden; }
.modal { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 24px; border: 0; background: transparent; color: var(--text-l); overflow: auto; }
.modal[open] { display: grid; place-items: center; }
.modal::backdrop { background: rgba(5, 10, 24, 0.74); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.modal[open]::backdrop { animation: fadeIn .3s ease; }
.modal[open] .modal-card { animation: popIn .45s cubic-bezier(.2,.8,.2,1); }
.modal.closing .modal-card { animation: popOut .22s ease forwards; }
.modal.closing::backdrop { animation: fadeOut .22s ease forwards; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }
@keyframes popIn { from { opacity: 0; transform: translateY(24px) scale(.98); } }
@keyframes popOut { to { opacity: 0; transform: translateY(16px) scale(.98); } }
.modal-card { position: relative; width: min(980px, 100%); display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); border-radius: 28px; overflow: hidden; background: var(--white); box-shadow: 0 60px 120px -40px rgba(0,0,0,.7); }
.modal-close { position: absolute; top: 14px; right: 14px; z-index: 3; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-l); background: var(--white); cursor: pointer; display: grid; place-items: center; transition: background .2s, transform .2s; }
.modal-close:hover { background: var(--cloud); transform: rotate(90deg); }
.modal-close svg { width: 18px; height: 18px; fill: none; stroke: var(--navy-900); stroke-width: 2; stroke-linecap: round; }
.modal-side { position: relative; overflow: hidden; background: var(--navy-900); color: var(--text-d); padding: clamp(28px, 4vw, 48px); display: flex; }
.modal-side .blueprint { -webkit-mask-image: radial-gradient(ellipse 90% 80% at 30% 30%, #000 20%, transparent 85%); mask-image: radial-gradient(ellipse 90% 80% at 30% 30%, #000 20%, transparent 85%); }
.modal-side::after { content: ""; position: absolute; width: 420px; height: 420px; left: -160px; top: -200px; background: radial-gradient(circle, rgba(56,189,248,.25), transparent 65%); pointer-events: none; }
.modal-side .footsteps { z-index: 0; }
.modal-side-in { position: relative; z-index: 1; display: flex; flex-direction: column; }
.modal-side h2 { font-size: clamp(44px, 5vw, 64px); }
.modal-lead { margin-top: 18px; font-size: 18px; line-height: 1.45; color: var(--text-d); max-width: 24ch; }
.modal-points { margin-top: 26px; display: grid; gap: 12px; }
.modal-points li { display: flex; gap: 10px; align-items: baseline; font-size: 15px; color: var(--muted-d); }
.modal-points li::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--sky); transform: translateY(-1px); }
.modal-mail { margin-top: auto; padding-top: 32px; font-size: 14px; color: var(--muted-d); }
.modal-mail a { color: var(--sky); font-weight: 600; word-break: break-word; }
.modal-main { padding: clamp(26px, 3.5vw, 44px); padding-top: clamp(30px, 4vw, 48px); }
.modal-done { min-height: 360px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 14px; }
.modal-done[hidden] { display: none; }
.done-tick { width: 56px; height: 56px; border-radius: 50%; background: var(--sky); display: grid; place-items: center; animation: popIn .5s cubic-bezier(.2,.8,.2,1); }
.done-tick svg { width: 28px; height: 28px; fill: none; stroke: var(--navy-900); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.modal-done h3 { font: 380 40px/1.05 var(--serif); font-variation-settings: "opsz" 60; letter-spacing: -0.02em; color: var(--navy-900); }
.modal-done p { color: var(--muted-l); font-size: 17px; margin-bottom: 10px; }
@media (max-width: 860px) {
  .modal-card { grid-template-columns: 1fr; }
  .modal-side { padding: 26px 24px 22px; }
  .modal-side h2 { font-size: 40px; }
  .modal-lead { margin-top: 10px; font-size: 16px; max-width: none; }
  .modal-points, .modal-mail, .modal-side .footsteps { display: none; }
}
@media (max-width: 640px) {
  .modal { padding: 0; place-items: end stretch; }
  .modal[open] { display: grid; align-items: end; }
  .modal-card { width: 100%; border-radius: 24px 24px 0 0; max-height: 94svh; overflow: auto; }
  .modal[open] .modal-card { animation: sheetIn .45s cubic-bezier(.2,.8,.2,1); }
  .modal.closing .modal-card { animation: sheetOut .25s ease forwards; }
  .modal-close { top: 12px; right: 12px; background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.25); }
  .modal-close svg { stroke: #fff; }
}
@keyframes sheetIn { from { transform: translateY(100%); } }
@keyframes sheetOut { to { transform: translateY(100%); } }
.form { display: flex; flex-direction: column; gap: 18px; color: var(--text-l); }
.f textarea::placeholder { color: #8A97AE; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips legend { font-size: 14px; font-weight: 600; margin-bottom: 12px; padding: 0; }
.chips label { position: relative; cursor: pointer; }
.chips input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chips span { display: inline-block; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line-l2); background: var(--white); font-size: 14px; font-weight: 500; transition: background .2s, color .2s, border-color .2s; }
.chips input:checked + span { background: var(--navy-900); border-color: var(--navy-900); color: var(--white); }
.chips input:focus-visible + span { outline: 2px solid var(--sky); outline-offset: 2px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .row2 { grid-template-columns: 1fr; } }
.f { display: flex; flex-direction: column; gap: 8px; }
.f label { font-size: 14px; font-weight: 600; }
.f label small { font-weight: 400; color: var(--muted-l); }
.f input, .f textarea { width: 100%; background: var(--cloud); border: 1px solid var(--line-l2); border-radius: 12px; padding: 13px 14px; font-size: 16px; color: var(--text-l); transition: border-color .2s, box-shadow .2s; }
.f textarea { resize: vertical; min-height: 110px; }
.f input:focus, .f textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(56,189,248,.2); background: var(--white); }
.form-foot { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.form-note { font-size: 13px; color: var(--muted-l); }
.form-status:empty { display: none; }
.form-status.ok { background: var(--cloud); border-radius: 14px; padding: 16px; font-size: 16px; }
.form-status.err { color: #B4232C; font-size: 15px; }
.form.sent { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* footer */
.footer { background: var(--navy-950); padding: 80px 0 40px; border-top: 1px solid var(--line-d); }
.foot-top { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.foot-tag { font: 380 26px/1.2 var(--serif); font-variation-settings: "opsz" 60; color: var(--muted-d); }
.sources { margin-top: 48px; border-top: 1px solid var(--line-d); padding-top: 20px; }
.sources summary { cursor: pointer; font: 600 12px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--muted-d); list-style: none; display: inline-flex; align-items: center; gap: 10px; }
.sources summary::-webkit-details-marker { display: none; }
.sources summary::after { content: "+"; font-size: 16px; color: var(--sky); }
.sources[open] summary::after { content: "–"; }
.sources ol { list-style: decimal; padding-left: 20px; margin-top: 20px; columns: 2; column-gap: 48px; font-size: 13px; color: var(--dim-d); line-height: 1.55; }
.sources li { break-inside: avoid; padding: 0 0 10px 4px; }
.sources a { color: var(--muted-d); }
@media (max-width: 760px) { .sources ol { columns: 1; } }
.foot-bottom { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line-d); display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; font-size: 13px; color: var(--dim-d); }
.foot-bottom p { max-width: 60ch; }
.foot-bottom a { color: var(--muted-d); }

@media (max-width: 640px) { :root { --gutter: 18px; --nav-h: 60px; } body { font-size: 16px; } }
@media (prefers-reduced-motion: reduce) {
  .fp { animation: none !important; opacity: .14 !important; }
  .scroll-cue i::after { animation: none; }
  .btn, .is-pinned .beat, .bldg .cell, .bldg .label, .bldg .etag, .crowd .p path, .crowd .p circle, .mix-bar i, .calc-adv, .adv-in, .calc-float, .calc-more .chev { transition: none; }
}
