/* ==========================================================================
   MAIN BEACH TOWER — STYLES
   The page chrome is Kybos Site Atlas's (a demo of the platform): its
   tokens are the live app's. The Site Atlas layer over the film (bars, cards,
   capture viewer, timeline) is styled in atlas.css.
   ========================================================================== */
:root {
  /* Kybos Site Atlas, from the live app's CSS */
  --atlas-accent: #c8863a; /* primary buttons */
  --atlas-on-accent: #18261b;
  --atlas-accent-text: #e6a756;
  --atlas-panel: #0d1618d9;
  --atlas-card: #172326ec;
  --atlas-bar: #142024cc;
  --atlas-line: #ffffff1f;
  --atlas-line-2: #ffffff14;
  --atlas-fg: #edf2ed;
  --atlas-muted: #98aaa4;
  --atlas-muted-2: #8fa29c;
  --atlas-bg: #0d1618;
  --atlas-inset: clamp(16px, 2.4vw, 30px); /* the app's 30 px margin on a wide screen */
  --ink: #14120f;
  --ink-soft: #3a352e;
  --paper: #efe9df;
  --bone: #f7f3ec;
  --sun: #e2a35e;
  --line: rgba(247, 243, 236, 0.28);
  --serif: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --gutter: clamp(1rem, 4vw, 4rem);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  margin: 0;
  background: var(--atlas-bg);
  color: var(--bone);
  font: 400 1rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--atlas-accent-text); outline-offset: 3px; }

.skip-link {
  position: absolute; left: var(--gutter); top: -4rem; z-index: 50;
  padding: 0.6rem 1rem; border-radius: 999px; background: var(--bone); color: var(--ink);
  text-decoration: none; font-weight: 500;
}
.skip-link:focus { top: 1rem; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---- Header: the Site Atlas app's ------------------------------------------ */
/* The Kybos logo | the product, the project and its note; the call to action on the right. */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 30;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
  padding: 22px var(--atlas-inset) 0;
  color: var(--atlas-fg);
  font-family: var(--sans);
}
/* past the film, over the close: the app's dark bar behind it */
.header { transition: background-color 0.5s var(--ease-out), border-color 0.5s var(--ease-out); border-bottom: 1px solid transparent; padding-bottom: 14px; }
.header.is-paper { background: #0d1618f0; border-bottom-color: var(--atlas-line); }
.header__lead { display: flex; align-items: center; gap: 22px; min-width: 0; }
.brand { display: block; flex: none; text-decoration: none; }
.brand__logo { display: block; width: 150px; height: auto; }
.project { min-width: 0; padding-left: 22px; border-left: 1px solid var(--atlas-line); }
.project__product { margin: 0 0 4px; font: 600 9px/1.2 var(--sans); letter-spacing: 2.4px; text-transform: uppercase; color: var(--atlas-accent-text); }
.project__name { margin: 0; font: 500 16px/1.3 var(--sans); letter-spacing: 0; }
.project__note { margin: 3px 0 0; font: 400 11px/1.3 var(--sans); color: var(--atlas-muted); }
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 2.9rem; padding: 0 1.4rem; border-radius: 999px;
  background: var(--bone); color: var(--ink);
  font: 500 0.95rem/1 var(--sans); text-decoration: none;
  transition: background 0.3s, color 0.3s;
}
.button:hover { background: var(--sun); }
.button--small { min-height: 2.5rem; padding: 0 1.1rem; font-size: 0.875rem; }
/* The app's primary button: the accent, dark text, 9 px corners. */
.button--accent { background: var(--atlas-accent); color: var(--atlas-on-accent); border-radius: 9px; font-weight: 600; }
.button--accent:hover { background: var(--atlas-accent-text); }
.header .button--accent { min-height: 2.2rem; margin-top: 4px; padding: 0 14px; font-size: 12px; }

/* ---- The film ------------------------------------------------------------- */
.track { position: relative; }
.stage {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  overflow: hidden;
  background: #2a2420;
}
.stage__canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block;
  opacity: 0; transition: opacity 1.2s var(--ease-out);
}
.stage.is-ready .stage__canvas { opacity: 1; }
.vignette, .grain, .scrim { position: absolute; inset: 0; pointer-events: none; }
.vignette { background: radial-gradient(120% 90% at 50% 45%, transparent 55%, rgba(10, 8, 6, 0.38)); }
.grain {
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}
.scrim {
  background:
    linear-gradient(to top, rgba(12, 10, 8, 0.62) 0%, rgba(12, 10, 8, 0.18) 34%, rgba(12, 10, 8, 0) 55%),
    linear-gradient(to right, rgba(12, 10, 8, 0.35) 0%, rgba(12, 10, 8, 0) 50%);
}

.copy {
  --show: 0;
  position: absolute;
  left: var(--gutter);
  bottom: clamp(5.5rem, 14vh, 9rem);
  width: min(31rem, calc(100% - 2 * var(--gutter) - 2.5rem));
  opacity: var(--show);
  transform: translate3d(0, calc((1 - var(--show)) * 18px), 0);
  visibility: hidden;
}
.eyebrow {
  margin: 0 0 0.9rem;
  font: 500 0.75rem/1.2 var(--sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.85;
}
.copy__title { margin: 0; font: 400 clamp(2.5rem, 6vw, 5.25rem)/0.98 var(--serif); letter-spacing: -0.01em; }
.word { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.1em; margin-bottom: -0.1em; }
.word__inner { display: inline-block; will-change: transform; }
.is-motion-loading .copy .word__inner { transform: translateY(110%); }
.is-motion-loading .copy .eyebrow,
.is-motion-loading .copy .copy__body { opacity: 0; }
.copy__body { margin: 1.1rem 0 0; max-width: 26rem; font-size: clamp(0.95rem, 1.2vw, 1.05rem); line-height: 1.6; opacity: 0.9; }

.cue {
  position: absolute; right: var(--gutter); bottom: clamp(5.5rem, 14vh, 9rem);
  display: flex; align-items: center; gap: 0.75rem; margin: 0;
  font: 500 0.75rem/1 var(--sans); letter-spacing: 0.16em; text-transform: uppercase;
}
.cue__line { position: relative; width: 3rem; height: 1px; background: var(--line); overflow: hidden; }
.cue__line::after { content: ''; position: absolute; inset: 0; background: var(--bone); animation: cue 2.4s var(--ease-out) infinite; }
@keyframes cue { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

.rail { position: absolute; right: calc(var(--gutter) * 0.6); top: 50%; transform: translateY(-50%); z-index: 5; }
.rail__list { display: grid; gap: 0.2rem; margin: 0; padding: 0; list-style: none; }
.rail__button { display: grid; place-items: center; width: 1.75rem; height: 1.75rem; padding: 0; border: 0; background: none; cursor: pointer; color: inherit; }
.rail__button::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: 0.4; transition: transform 0.4s var(--ease-out), opacity 0.4s; }
.rail__button[aria-current='step']::before { opacity: 1; transform: scale(1.6); }

/* "Simulated captures · demo project" and the stop count: top right, under the call to action. */
.tag {
  position: absolute; right: var(--atlas-inset); top: 72px; margin: 0;
  display: flex; gap: 1rem;
  font: 500 9px/1 var(--sans); letter-spacing: 1.6px; text-transform: uppercase; color: #ffffffa0;
  text-shadow: 0 0 6px rgba(8, 14, 15, 0.6);
}
.tag__count { font-variant-numeric: tabular-nums; }
.status {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); margin: 0;
  font: 500 0.75rem/1.4 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.8; text-align: center;
}
.stage.is-fallback .status { top: 6rem; transform: translateX(-50%); }

/* ---- The close: booking a demo, in the app's dark ----------------------------- */
.end { position: relative; z-index: 2; background: #101b1e; color: var(--atlas-fg); padding: clamp(5rem, 14vw, 10rem) var(--gutter); border-top: 1px solid var(--atlas-line); }
.end:focus { outline: none; }
.end__inner { max-width: 44rem; }
.end .eyebrow { color: var(--atlas-accent-text); font-weight: 600; letter-spacing: 2.4px; font-size: 0.7rem; opacity: 1; }
.end__title { margin: 0; font: 400 clamp(2.5rem, 6vw, 4.75rem)/1 var(--serif); }
.end__body { margin: 1.25rem 0 2rem; color: var(--atlas-muted); font-size: 1.1rem; max-width: 34rem; }
.end .button--accent { min-height: 2.9rem; padding: 0 1.4rem; }
.end__legal { margin-top: 3.5rem; font-size: 0.8rem; color: var(--atlas-muted-2); max-width: 36rem; }
.noscript { padding: 6rem var(--gutter) 2rem; }
.no-js .track { display: none; }

@media (max-width: 640px) {
  .rail, .cue { display: none; }
}
/* A phone: a smaller logo, the project's short name, no note; the tag at the foot. */
@media (max-width: 700px) {
  .header { padding: 12px var(--atlas-inset) 10px; }
  .header__lead { gap: 12px; }
  .brand__logo { width: 88px; }
  .project { padding-left: 12px; }
  .project__product { margin-bottom: 2px; font-size: 8px; letter-spacing: 1.8px; }
  .project__name { font-size: 13px; white-space: nowrap; }
  .project__more, .project__note { display: none; }
  .header .button--accent { min-height: 2rem; margin-top: 2px; padding: 0 11px; font-size: 11.5px; }
  .tag { top: auto; bottom: 6px; left: 50%; right: auto; transform: translateX(-50%); white-space: nowrap; font-size: 8px; letter-spacing: 1.3px; }
}
@media (prefers-reduced-motion: reduce) {
  .cue__line::after { animation: none; }
  .stage__canvas { transition: none; }
}
