/* Landing page (DESIGN.md section 5.1). */

/* ---------------- first screen */
.hero { position: relative; min-height: 100svh; min-height: 100vh; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; isolation: isolate; }
@supports (min-height: 100svh) { .hero { min-height: 100svh; } }
.hero-media { position: absolute; inset: 0; z-index: -1; background: var(--bg); }
.hero-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 50%; filter: contrast(1.05) brightness(.8);
  animation: posterIn 2.4s var(--ease) both; }
/* entrances never start from opacity 0: if a browser throttles the animation, the content is still there */
@keyframes posterIn { from { transform: scale(1.06); } to { transform: none; } }
/* Fig. 1: the point field */
.field-fig { margin-top: clamp(48px, 6vw, 80px); }
.field-box { position: relative; aspect-ratio: 21 / 8; border: 1px solid var(--line); border-radius: var(--r); background: #000; overflow: hidden; }
.field-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
@media (max-width: 760px) { .field-box { aspect-ratio: 4 / 3; } }
.hero-poster { opacity: .5; }
.hero-live { position: absolute; inset: 0; }
/* the live playback / film: fades in over the poster */
.hero-layer { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.2s var(--ease); }
.hero-layer.in { opacity: 1; }
video.hero-layer.in { opacity: .85; }
.hero[data-live="live"] .hero-poster, .hero[data-live="film"] .hero-poster { opacity: 0; transition: opacity 1.2s var(--ease) 1s; }
/* phones: the film drifts slowly instead of following a mouse */
.hero-drift { animation: drift 26s ease-in-out infinite alternate; transform-origin: 60% 50%; }
@keyframes drift { from { transform: scale(1.06) translate(-1.2%, .6%); } to { transform: scale(1.1) translate(1.2%, -.6%); } }
.hero-state { display: inline-block; font: 600 12.5px/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--ion); border: 1px solid rgba(108,201,255,.5); border-radius: 999px; padding: 4px 8px; margin-right: 6px; vertical-align: 1px; }
.hero[data-live="poster"] .hero-state, .hero[data-live="loading"] .hero-state { color: var(--fg-2); border-color: var(--line-2); }
/* solid backing behind the words: the text never sits on bare imagery */
.hero-scrim { position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(0,0,0,.92) 0%, rgba(0,0,0,.8) 34%, rgba(0,0,0,.3) 62%, rgba(0,0,0,.08) 100%),
    linear-gradient(0deg, rgba(0,0,0,1) 0%, rgba(0,0,0,.6) 22%, rgba(0,0,0,0) 50%),
    linear-gradient(180deg, rgba(0,0,0,.75) 0%, rgba(0,0,0,0) 18%); }
.hero-inner { position: relative; padding-top: calc(var(--head-h) + 48px); padding-bottom: 28px; }
.hero-copy { max-width: 980px; }
.hero-name { margin: 0; font: 700 clamp(56px, 11.2vw, 168px)/.9 var(--display); letter-spacing: -0.045em; color: var(--fg); }
.hero-name span { display: inline-block; }
.hero-name span + span { color: transparent; -webkit-text-stroke: 0; background: linear-gradient(180deg, #f2f5fa 0%, #b9c6d8 100%); -webkit-background-clip: text; background-clip: text; }
.hero-lead { margin: 30px 0 0; font-size: clamp(19px, 1.8vw, 23px); line-height: 1.55; color: var(--fg); max-width: 40ch; }
.hero .eyebrow { margin-bottom: 26px; }
.hero-foot { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding-bottom: 28px; }
.hero-cap { margin: 0; max-width: 62ch; font-size: 16px; line-height: 1.55; color: var(--fg-2);
  padding: 12px 16px; background: rgba(0,0,0,.82); border: 1px solid var(--line); border-radius: 8px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.hero-cap b { font: 600 13px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--fg); margin-right: 6px; }
.hero-scroll { flex: none; width: 28px; height: 46px; border: 1.5px solid var(--line-3); border-radius: 14px; position: relative; }
.hero-scroll span { position: absolute; left: 50%; top: 9px; width: 3px; height: 9px; margin-left: -1.5px; border-radius: 2px; background: var(--fg); animation: cue 2.2s var(--ease) infinite; }
@keyframes cue { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(14px); opacity: 0; } 100% { opacity: 0; } }
/* entrance: staggered, short, and absent under reduced motion */
.hero-in { animation: rise 1s var(--ease) both; animation-delay: calc(var(--d) * 110ms + 120ms); }
@keyframes rise { from { transform: translateY(26px); } to { transform: none; } }
.hero-name.hero-in { animation-name: settle; animation-duration: 1.6s; }
@keyframes settle { from { transform: translateY(18px); letter-spacing: -0.015em; } to { transform: none; letter-spacing: -0.045em; } }
@media (max-width: 760px) {
  .hero-scrim { background: linear-gradient(0deg, rgba(0,0,0,1) 0%, rgba(0,0,0,.88) 45%, rgba(0,0,0,.55) 75%, rgba(0,0,0,.7) 100%); }
  .hero-poster { object-position: 70% 50%; }
  .hero-scroll { display: none; }
  .hero-cap { font-size: 15.5px; }
  .hero-inner { padding-top: calc(var(--head-h) + 28px); }
}

/* ---------------- sections */
.split h2 { max-width: 14ch; }
.split .ticks { margin-top: 26px; }
.xc-head { max-width: 860px; margin-bottom: clamp(32px, 4vw, 52px); }
.xc-head h2 { max-width: 18ch; }
.xc-cards { margin: clamp(32px, 4vw, 48px) 0 24px; }

/* the 3D figure: poster, then a live canvas or the film fades in over it */
.fly .plate { aspect-ratio: 16 / 10; }
.fly .plate > img, .fly-layer { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fly-layer { opacity: 0; transition: opacity 1.2s var(--ease); }
.fly-layer.in { opacity: 1; }
.fly-hud { position: absolute; left: 14px; right: 14px; bottom: 14px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; z-index: 2; pointer-events: none; }
.fly-hud > span:not(.fly-load) { font: 500 13.5px/1 var(--mono); color: var(--fg); background: rgba(0,0,0,.84); border: 1px solid var(--line-2); border-radius: 999px; padding: 8px 12px; }
.fly-badge { display: inline-flex; align-items: center; gap: 8px; }
.fly-badge i { width: 7px; height: 7px; border-radius: 50%; background: var(--fg-3); }
.fly[data-state="live"] .fly-badge i { background: var(--ion); box-shadow: 0 0 0 3px var(--ion-dim); }
.fly[data-state="film"] .fly-badge i { background: var(--warn); }
.fly-load { position: absolute; left: 0; right: 0; bottom: -14px; height: 2px; background: transparent; }
.fly-load i { display: block; height: 100%; width: var(--p, 0%); background: var(--ion); transition: width .3s; }
.fly[data-state="live"] .fly-load, .fly[data-state="film"] .fly-load, .fly[data-state="poster"] .fly-load { display: none; }

.acc { margin-top: clamp(56px, 7vw, 96px); padding-top: clamp(40px, 5vw, 56px); border-top: 1px solid var(--line-2); }
.acc h3 { font-size: clamp(24px, 2.6vw, 32px); }
.acc .grid { margin: 26px 0 22px; }

.mapcard { display: block; text-decoration: none; color: var(--fg); }
.mapcard .plate { aspect-ratio: 16 / 10; }
.mapcard .plate img { transition: transform .8s var(--ease); }
.mapcard:hover .plate img { transform: scale(1.03); }
.mapcard .plate .lic { position: absolute; left: 12px; top: 12px; }
.mapcard h3 { margin: 16px 0 4px; }
.mapcard p { margin: 0; color: var(--fg-2); font-size: 16.5px; }
.mapcard .label { display: block; margin-top: 10px; }
.js-maps { margin: 32px 0 24px; }

.contact-in { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: end; }
.contact-in h2 { max-width: 18ch; margin: 0; }
@media (max-width: 760px) { .contact-in { grid-template-columns: minmax(0, 1fr); } .contact .btn { font-size: 15.5px; } }

@media (prefers-reduced-motion: reduce) {
  .hero-in, .hero-name.hero-in, .hero-poster { animation: none; }
  .hero-poster { opacity: .5; }
  .hero-drift { animation: none; }
  .hero-scroll span { animation: none; }
}
