/**
 * Glasshead v3 — homepage: hero poster, statement, system demo, work panels.
 */

/* ─── Hero: a poster. WebGL replaces it pixel for pixel. ───────── */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: calc(var(--nav-h) + 60px) var(--edge) clamp(18px, 2.4vw, 34px);
  background-color: var(--cobalt);
  background-image:
    repeating-linear-gradient(90deg, rgba(237, 234, 226, 0.14) 0 1px, transparent 1px 120px),
    repeating-linear-gradient(0deg, rgba(237, 234, 226, 0.14) 0 1px, transparent 1px 120px),
    repeating-linear-gradient(90deg, rgba(237, 234, 226, 0.07) 0 1px, transparent 1px 24px),
    repeating-linear-gradient(0deg, rgba(237, 234, 226, 0.07) 0 1px, transparent 1px 24px);
  color: var(--bone);
}
/* Fallback art for no-WebGL, reduced motion and low-end devices: the lens and crystal as line drawings. */
.hero__lens {
  position: absolute; z-index: 0; border-radius: 50%; pointer-events: none;
  width: min(36vw, 54svh, 560px); aspect-ratio: 1;
  right: 13vw; top: calc(var(--nav-h) + 8svh);
  border: 2px solid rgba(237, 234, 226, 0.85);
  background: radial-gradient(circle at 34% 30%, rgba(237, 234, 226, 0.34) 0 6%, rgba(237, 234, 226, 0.1) 6.5%, rgba(237, 234, 226, 0.04) 60%, transparent 61%);
}
.hero__crystal {
  position: absolute; z-index: 0; pointer-events: none;
  width: min(15vw, 25svh, 250px); aspect-ratio: 1 / 1.75;
  right: 27vw; bottom: 31svh;
  clip-path: polygon(50% 0, 100% 20%, 100% 80%, 50% 100%, 0 80%, 0 20%);
  background: linear-gradient(100deg, rgba(237, 234, 226, 0.5) 0 33%, rgba(237, 234, 226, 0.22) 33% 66%, rgba(237, 234, 226, 0.34) 66%);
}
.hero__gl { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; opacity: 0; transition: opacity 0.9s var(--ease); }
.hero.has-gl .hero__gl { opacity: 1; }
.hero__iris { position: absolute; inset: 0; z-index: 6; background: var(--bone); clip-path: circle(0px at 50% 50%); pointer-events: none; }

.hero__top {
  position: absolute; z-index: 3; top: calc(var(--nav-h) + 18px); left: var(--edge); right: var(--edge);
  display: flex; justify-content: space-between; gap: 24px;
  font-family: var(--font-mono); font-size: 0.78rem; font-weight: 500; color: var(--soft);
}
.hero__title {
  position: relative; z-index: 2; margin: 0 0 clamp(20px, 2.8vw, 40px);
  font-size: min(16.8vw, 26svh);
  color: var(--bone);
}
.hero__title .line { display: block; overflow: hidden; padding-top: 0.02em; margin-top: -0.02em; }
.hero__title .word { display: inline-block; }
html.js .hero__title .word { transform: translateY(108%); }
html.reveal-all .hero__title .word { transform: none !important; }
.hero.has-gl .hero__title { visibility: hidden; }

.hero__foot {
  position: relative; z-index: 3;
  display: grid; grid-template-columns: minmax(0, 580px) 1fr; gap: 24px 40px; align-items: end;
  padding-top: 18px; border-top: 1px solid rgba(237, 234, 226, 0.45);
}
.hero__lede { font-size: clamp(1.05rem, 0.9rem + 0.55vw, 1.3rem); line-height: 1.42; color: var(--soft); max-width: 50ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.hero__scroll { justify-self: end; align-self: end; display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--soft); }
.hero__scroll i { display: block; width: 44px; height: 1px; background: currentColor; position: relative; overflow: hidden; }
.hero__scroll i::after { content: ""; position: absolute; inset: 0; background: var(--bone); transform: translateX(-100%); animation: sweep 2.4s var(--ease-io) infinite; }
@keyframes sweep { 0% { transform: translateX(-100%); } 60%, 100% { transform: translateX(100%); } }

@media (min-width: 901px) and (max-height: 820px) {
  .hero { padding-top: calc(var(--nav-h) + 52px); }
  .hero__title { font-size: min(15vw, 23svh); margin-bottom: 20px; }
  .hero__lede { font-size: 1rem; max-width: 56ch; }
  .hero__actions { margin-top: 14px; }
  .hero .btn { height: 52px; }
}

@media (max-width: 900px) {
  .hero { min-height: 0; justify-content: flex-start; padding: calc(var(--nav-h) + 14px) var(--gutter) 30px; }
  .hero__top { order: 0; position: static; margin-bottom: 20px; font-size: 0.72rem; }
  .hero__tz { display: none; }
  .hero__title { order: 1; font-size: min(15.6vw, 6.2rem); margin-bottom: 0; }
  .hero__lens { order: 2; position: relative; right: auto; top: auto; width: min(72vw, 44svh); margin: 18px auto 0; }
  .hero__crystal { order: 3; position: relative; right: auto; bottom: auto; width: min(22vw, 14svh); margin: -16vw 4vw 0 auto; }
  .hero__foot { order: 4; grid-template-columns: 1fr; margin-top: 22px; }
  .hero__lede { font-size: 1.02rem; }
  .hero__scroll { display: none; }
}

/* ─── Statement ─────────────────────────────────────────────────── */
.statement { padding-block: clamp(110px, 16vw, 270px); padding-top: clamp(32px, 5vw, 80px); /* the hero's bone end-frame already supplies the space above */ }
.statement__text { font-size: clamp(2.2rem, 6.4vw, 7.4rem); max-width: 22ch; }
html.js .statement__text .sw { opacity: 0.5; }
html.js .statement__text .hl .sw { opacity: 0.75; }
html.reveal-all .statement__text .sw { opacity: 1 !important; }
@media (prefers-reduced-motion: reduce) { html.js .statement__text .sw { opacity: 1; } }
.hl { background: var(--cobalt); color: var(--bone); padding: 0 0.12em; margin: 0 -0.06em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.statement__foot { display: flex; flex-wrap: wrap; gap: 14px; margin-top: clamp(40px, 6vw, 96px); }

/* ─── System demo ───────────────────────────────────────────────── */
.demo__wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 120px); align-items: center; }
.demo__steps { margin-top: clamp(16px, 3svh, 36px); border-top: 1px solid var(--line-strong); }
.demo__steps li { display: grid; grid-template-columns: 52px 1fr; gap: 14px; padding: clamp(8px, 1.5svh, 18px) 0; border-bottom: 1px solid var(--line); color: var(--muted); transition: color 0.4s; }
.demo__steps li b, .demo__steps li p { transition: color 0.4s; }
.demo__steps li.is-active { color: var(--fg); }
.demo__steps li.is-active p { color: var(--soft); }
.demo__steps .mono { padding-top: 0.5em; color: inherit; font-weight: 700; }
.demo__steps li.is-active .mono { color: var(--accent); }
.demo__steps b { display: block; font-family: var(--font-display); font-weight: 900; font-stretch: 62.5%; text-transform: uppercase; font-size: min(2.6vw, 4.6svh); line-height: 0.95; }
.demo__steps p { margin-top: 4px; color: inherit; max-width: 40ch; line-height: 1.35; font-size: 0.98rem; }
.demo__note { margin-top: 22px; color: var(--muted); }

.device {
  position: relative; background: var(--ink-2); color: var(--bone);
  box-shadow: 14px 14px 0 var(--cobalt); overflow: hidden;
  aspect-ratio: 16 / 11; min-height: 460px;
}
.app__bar { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: center; padding: 14px 22px; border-bottom: 1px solid rgba(237, 234, 226, 0.2); background: var(--ink-2); font-family: var(--font-mono); font-size: 0.72rem; font-weight: 600; }
.app__sync { display: inline-flex; align-items: center; gap: 8px; }
.app__sync::before { content: ""; width: 8px; height: 8px; background: #4ADE80; }
.app__sync.is-off { color: var(--cobalt-light); }
.app__sync.is-off::before { background: var(--cobalt-light); }
.scene { position: absolute; inset: 49px 0 0 0; padding: clamp(18px, 2.4vw, 36px); display: flex; flex-direction: column; }
.scene__title { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; font-family: var(--font-mono); font-size: 0.74rem; font-weight: 600; color: rgba(237, 234, 226, 0.7); }

.q__row { display: grid; grid-template-columns: minmax(0, 1fr) 56px 110px; gap: 12px; padding: 12px 0; border-bottom: 1px solid rgba(237, 234, 226, 0.16); font-size: clamp(0.82rem, 0.9vw, 0.98rem); }
.q__row span:nth-child(2) { color: rgba(237, 234, 226, 0.6); text-align: right; }
.q__row span:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.q__sum { display: flex; justify-content: space-between; padding-top: 10px; color: rgba(237, 234, 226, 0.65); font-size: 0.86rem; font-variant-numeric: tabular-nums; }
.q__tot { display: flex; justify-content: space-between; align-items: baseline; margin-top: auto; padding-top: 14px; }
.q__tot b { font-family: var(--font-display); font-weight: 900; font-stretch: 62.5%; font-size: clamp(2.2rem, 4.2vw, 4.4rem); line-height: 0.9; font-variant-numeric: tabular-nums; }
.q__send { background: var(--cobalt); color: var(--bone); border: 0; padding: 13px 22px; font-weight: 800; font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; }
.q__send.is-sent { background: #4ADE80; }

.sched { display: grid; grid-template-columns: 74px repeat(5, minmax(0, 1fr)); grid-template-rows: auto repeat(2, minmax(60px, 1fr)); gap: 6px; flex: 1; }
.sched__h { font-family: var(--font-mono); font-size: 0.68rem; font-weight: 600; color: rgba(237, 234, 226, 0.6); align-self: end; padding-bottom: 4px; }
.sched__crew { font-family: var(--font-mono); font-size: 0.72rem; font-weight: 700; align-self: center; }
.sched__cell { background: rgba(237, 234, 226, 0.06); }
.chip { z-index: 1; display: flex; align-items: center; padding: 6px 10px; background: #323858; font-size: clamp(0.64rem, 0.72vw, 0.78rem); font-weight: 700; line-height: 1.15; }
.chip--new { background: var(--cobalt); color: var(--bone); }
.offline { margin-top: 12px; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border: 1px dashed var(--cobalt-light); color: var(--cobalt-light); font-family: var(--font-mono); font-size: 0.72rem; font-weight: 600; }

.cost__row { margin-bottom: clamp(14px, 2vw, 26px); }
.cost__label { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 0.72rem; font-weight: 600; margin-bottom: 8px; color: rgba(237, 234, 226, 0.75); }
.bar { position: relative; height: 16px; background: rgba(237, 234, 226, 0.1); margin-bottom: 6px; }
.bar i { position: absolute; inset: 0 auto 0 0; width: var(--w); }
.bar--q i { background: rgba(237, 234, 226, 0.55); }
.bar--a i { background: var(--cobalt-light); }
.cost__result { margin-top: auto; display: flex; justify-content: space-between; align-items: baseline; padding-top: 12px; border-top: 1px solid rgba(237, 234, 226, 0.2); }
.cost__result b { font-family: var(--font-display); font-weight: 900; font-stretch: 62.5%; font-size: clamp(2.2rem, 4.2vw, 4.2rem); line-height: 0.9; color: var(--cobalt-light); font-variant-numeric: tabular-nums; }

.inv { position: relative; flex: 1; display: flex; flex-direction: column; }
.inv__stamp {
  position: absolute; right: 6%; top: 30%; transform: rotate(-9deg);
  border: 5px solid var(--cobalt-light); color: var(--cobalt-light); padding: 2px 22px 0;
  font-family: var(--font-display); font-weight: 900; font-stretch: 62.5%; font-size: clamp(3rem, 6.4vw, 6.6rem); line-height: 1; letter-spacing: 0.02em;
}

.demo { padding-top: calc(var(--nav-h) + 20px); padding-bottom: 32px; min-height: 100svh; display: flex; align-items: center; }
.demo .sec__bar { margin-bottom: clamp(18px, 3svh, 36px); }
.demo > .wrap { width: 100%; }
.demo .t-xl { font-size: min(4.2vw, 7svh); }
html:not(.js) .demo .scene:not([data-scene="0"]) { display: none; }
.demo.is-static { min-height: 0; display: block; padding-block: var(--sec-y); }
.demo.is-static .device { aspect-ratio: auto; min-height: 0; }
.demo.is-static .scene { position: relative; inset: auto; border-bottom: 1px solid rgba(237, 234, 226, 0.2); min-height: 340px; }
.demo.is-static .inv { min-height: 280px; }
@media (max-width: 900px) {
  .demo { min-height: 0; display: block; padding-block: var(--sec-y); }
  .demo__wrap { grid-template-columns: 1fr; }
  .demo__steps b { font-size: 1.9rem; }
  .device { box-shadow: 8px 8px 0 var(--cobalt); aspect-ratio: auto; min-height: 0; }
  .scene { position: relative; inset: auto; opacity: 1 !important; visibility: visible !important; border-bottom: 1px solid rgba(237, 234, 226, 0.2); min-height: 340px; }
  .inv { min-height: 280px; }
}

/* ─── Work: stacked panels ──────────────────────────────────────── */
.work__head { margin-bottom: clamp(40px, 6vw, 96px); }
.panels { position: relative; }
.panel {
  position: sticky; top: calc(var(--nav-offset) + 16px);
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 80px);
  min-height: min(76vh, 780px); margin-bottom: 8vh;
  padding: clamp(26px, 3.6vw, 64px);
  background: var(--bg); color: var(--fg); border: 1px solid var(--line-strong);
  transform-origin: 50% 0;
}
.panel:last-child { margin-bottom: 0; }
.panel__main { display: flex; flex-direction: column; justify-content: space-between; gap: 32px; }
.panel__title { font-size: clamp(2.4rem, 5.6vw, 6.2rem); }
.panel__n { font-family: var(--font-display); font-weight: 900; font-stretch: 62.5%; font-size: clamp(6rem, 17vw, 17rem); line-height: 0.74; color: var(--accent); }
.panel__side { display: flex; flex-direction: column; justify-content: flex-end; gap: 28px; }
.panel__side p { font-size: clamp(1.05rem, 1rem + 0.3vw, 1.25rem); line-height: 1.5; color: var(--soft); }
.panel__note { border-top: 1px solid var(--line-strong); padding-top: 14px; color: var(--muted); }
@media (max-width: 900px) { .panel { position: relative; top: auto; grid-template-columns: 1fr; min-height: 0; margin-bottom: 24px; } .panel__n { font-size: 6rem; } }

/* ─── Services in four columns ──────────────────────────────────── */
.svc-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line-strong); border-left: 1px solid var(--line-strong); }
.svc-col { padding: clamp(22px, 2.4vw, 40px); border-right: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); display: flex; flex-direction: column; gap: 14px; }
.svc-col__title { font-size: clamp(1.9rem, 2.8vw, 3rem); }
.svc-col__body { min-height: 3.2em; max-width: 30ch; }
.svc-col__list { display: flex; flex-direction: column; margin-top: 10px; border-top: 1px solid var(--line); }
.svc-col__list a { display: grid; gap: 2px; padding: 14px 0; border-bottom: 1px solid var(--line); text-decoration: none; position: relative; transition: padding-left 0.4s var(--ease), color 0.3s; }
.svc-col__list a:hover, .svc-col__list a:focus-visible { padding-left: 14px; color: var(--signal); }
.svc-col__name { font-weight: 700; font-size: 1.12rem; line-height: 1.2; }
.svc-col__price { color: var(--muted); font-size: 0.72rem; }
@media (max-width: 1100px) { .svc-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .svc-cols { grid-template-columns: 1fr; } .svc-col__body { min-height: 0; } }

/* ─── AI automation ─────────────────────────────────────────────── */
.ai__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(32px, 6vw, 110px); margin-top: clamp(40px, 6vw, 88px); align-items: start; }
.ai__uses { margin-top: clamp(28px, 3vw, 44px); border-top: 1px solid var(--line-strong); }
.ai__uses li { display: grid; grid-template-columns: 48px 1fr; gap: 14px; padding: 20px 0; border-bottom: 1px solid var(--line-strong); }
.ai__uses .mono { padding-top: 0.6em; }
.ai__uses h3 { font-size: clamp(1.5rem, 2.2vw, 2.2rem); }
.ai__uses p { margin-top: 6px; color: var(--soft); max-width: 46ch; line-height: 1.4; }
.flow { position: relative; padding: clamp(24px, 3vw, 44px); background: var(--ink); color: var(--bone); box-shadow: 14px 14px 0 var(--bone); }
.flow ol { position: relative; display: flex; flex-direction: column; gap: clamp(22px, 3vw, 40px); padding-left: 0; }
.flow__rail { position: absolute; left: calc(clamp(24px, 3vw, 44px) + 21px); top: calc(clamp(24px, 3vw, 44px) + 22px); bottom: calc(clamp(24px, 3vw, 44px) + 54px); width: 2px; background: rgba(237, 234, 226, 0.2); }
.flow__rail i { display: block; width: 100%; height: 0; background: var(--cobalt-light); }
.flow__step { position: relative; display: grid; grid-template-columns: 44px 1fr; gap: 18px; }
/* inactive steps dim the number and heading only; dimming the paragraph too drops it below 4.5:1 contrast */
.flow__step .flow__n, .flow__step h3 { opacity: 0.6; transition: opacity 0.5s var(--ease), background-color 0.4s, border-color 0.4s, color 0.4s; }
.flow__step.is-on .flow__n, .flow__step.is-on h3 { opacity: 1; }
.flow__n { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid rgba(237, 234, 226, 0.5); background: var(--ink); transition: background-color 0.4s, border-color 0.4s, color 0.4s; position: relative; z-index: 1; font-weight: 700; }
.flow__step.is-on .flow__n { background: var(--cobalt); border-color: var(--cobalt); color: var(--bone); }
.flow h3 { font-size: clamp(1.6rem, 2.4vw, 2.4rem); }
.flow p { color: #C9CBDA; margin-top: 4px; line-height: 1.4; }
.flow__note { margin-top: 26px; color: #959AB6; }
@media (max-width: 900px) { .ai__grid { grid-template-columns: 1fr; } .flow { box-shadow: 8px 8px 0 var(--bone); } .flow__step .flow__n, .flow__step h3 { opacity: 1; } }

/* ─── Cities ────────────────────────────────────────────────────── */
.cities { display: flex; flex-wrap: wrap; gap: 0.08em 0.5em; font-size: clamp(2.6rem, 8.4vw, 9rem); line-height: 0.95; }
.cities a { text-decoration: none; position: relative; color: var(--fg); transition: color 0.3s; }
.cities a:not(:last-child)::after { content: "/"; position: absolute; right: -0.34em; color: var(--muted); }
.cities a:hover, .cities a:focus-visible { color: var(--signal); }
