/* Recall, the well-kept board. Tiles on 8px gaps, one 10px radius, flat
   fills, real screens shown whole. Forest, night and mint on paper. */

:root {
  --paper: #F7FAF8;
  --tile: #EAF2EC;
  --ink: #10231F;
  --ink-soft: #4A5E58;
  --forest: #166355;
  --night: #0D3D33;
  --night-2: #082520;
  --row: #12443A;
  --mint: #DCF8C6;
  --leaf: #B9E4C6;
  --on-night: #EEF5F2;
  --on-night-soft: #A9C2BA;

  --text: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --s-small: 15px;
  --s-body: 18px;
  --s-lead: clamp(20px, 1.7vw, 26px);
  --s-head: clamp(32px, 3.4vw, 52px);
  --s-name: clamp(110px, 11.6vw, 176px);

  --gap: 8px;
  --radius: 10px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 var(--s-body)/1.5 var(--text); -webkit-font-smoothing: antialiased; }
img, video { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: var(--mint); color: var(--night); }
:focus-visible { outline: 3px solid var(--forest); outline-offset: 3px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -60px; padding: 10px 16px; background: var(--night); color: var(--on-night); border-radius: var(--radius); z-index: 10; }
.skip:focus { top: 12px; }

.tile { border-radius: var(--radius); overflow: hidden; }

/* ---------- The board (first screen) ---------- */
.board {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: 170px 64px minmax(0, 1fr);
  gap: var(--gap); padding: var(--gap); height: 100svh; min-height: 760px;
}
.band { grid-column: 1 / -1; background: var(--night); display: grid; place-items: center; }
.band-name {
  font-family: var(--display); font-weight: 800; font-size: var(--s-name); line-height: 0.92;
  letter-spacing: -0.05em; color: var(--mint); white-space: nowrap; padding-bottom: 0.05em;
}
.links { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); }
.link {
  background: var(--tile); padding: 20px 22px; text-decoration: none; font-size: var(--s-body); font-weight: 600;
  transition: background-color 180ms ease, color 180ms ease;
}
.link:hover { background: var(--mint); }
.link:active { background: var(--leaf); }

.rail-left { grid-column: 1 / 3; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: var(--gap); min-height: 0; }
.screen-tile, .picture-tile { position: relative; background: var(--night); min-height: 0; }
.screen-tile video, .picture-tile img {
  position: absolute; inset: 14px; width: calc(100% - 28px); height: calc(100% - 28px); max-width: none; object-fit: contain;
}
.facts { background: var(--tile); padding: 18px 20px; display: grid; gap: 6px; font-size: var(--s-body); font-weight: 600; line-height: 1.3; }

.centre { grid-column: 3 / 11; display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: var(--gap); min-height: 0; }

.statement { background: var(--tile); padding: 24px 28px 26px; display: grid; gap: 12px; }
.statement h1 {
  font-family: var(--display); font-weight: 800; font-size: var(--s-head); line-height: 1; letter-spacing: -0.04em; color: var(--night);
}
.statement p { font-size: var(--s-lead); line-height: 1.35; max-width: 44ch; }

.rail-right { grid-column: 11 / 13; display: grid; grid-template-rows: repeat(5, minmax(0, 1fr)); gap: var(--gap); min-height: 0; }
.step { padding: 16px 18px; font-size: var(--s-body); font-weight: 600; line-height: 1.3; }
.s1 { background: var(--tile); }
.s2 { background: var(--mint); color: var(--night); }
.s3 { background: var(--leaf); color: var(--night); }
.s4 { background: var(--night); color: var(--mint); }
.s5 { background: var(--forest); padding: 0; }
.store {
  display: flex; align-items: flex-end; height: 100%; padding: 16px 18px; color: #fff; text-decoration: none;
  font-size: var(--s-lead); font-weight: 700; line-height: 1.15; letter-spacing: -0.01em;
  transition: background-color 180ms ease, transform 140ms var(--ease-out);
}
.store:hover { background: var(--night); }
.store:active { transform: scale(0.98); }

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; padding: 150px 0 clamp(60px, 7vw, 110px); }
.marquee-track { display: flex; width: max-content; }
.marquee-track span {
  flex: none; padding-right: 0.6em; font-family: var(--display); font-weight: 800; font-size: clamp(56px, 8vw, 128px);
  letter-spacing: -0.045em; line-height: 1; color: var(--forest); white-space: nowrap;
}
@media (prefers-reduced-motion: no-preference) {
  .marquee-track { animation: marquee 42s linear infinite; }
  .marquee:hover .marquee-track { animation-play-state: paused; }
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Features: staggered fragment cells ---------- */
.features { padding: 0 var(--gap); }
.features h2 { font-family: var(--display); font-size: var(--s-head); font-weight: 800; letter-spacing: -0.035em; line-height: 1.05; padding: 0 14px 40px; }
.cells {
  display: grid; gap: var(--gap); grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-areas:
    "map map map map map lock lock lock lock watch watch watch"
    "memory memory memory memory memory lock lock lock lock watch watch watch"
    "ai ai ai ai ai ai event event event event event event";
}
.a-map { grid-area: map; } .a-lock { grid-area: lock; } .a-watch { grid-area: watch; }
.a-memory { grid-area: memory; } .a-ai { grid-area: ai; } .a-event { grid-area: event; }
.a-ai { flex-direction: row; align-items: center; }
.a-ai .cell-ui { width: 46%; margin: 26px; }
.a-ai .cell-text { padding: 26px 26px 26px 0; }
.a-event { justify-content: center; }
.cell { background: var(--tile); border-radius: var(--radius); display: flex; flex-direction: column; justify-content: space-between; gap: 22px; padding: 0 0 0; overflow: hidden; }
.cell-text { padding: 24px 26px 0; }
.cell--down .cell-text { padding: 0 26px 26px; }
.cell h3 { font-size: var(--s-body); font-weight: 700; letter-spacing: -0.01em; margin-bottom: 6px; }
.cell p { font-size: var(--s-body); line-height: 1.5; color: var(--ink); max-width: 38ch; }
.cell-ui { width: calc(100% - 52px); margin: 0 26px 26px; border-radius: 12px; transition: transform 600ms var(--ease-soft); }
.cell--down .cell-ui { margin: 26px 26px 0; }
.cell:hover .cell-ui { transform: translateY(-4px); }
.cell-phone { width: min(300px, calc(100% - 52px)); margin: 0 auto 26px; border-radius: 26px; }
.watch-pair { display: grid; gap: 14px; justify-items: center; padding: 0 26px 26px; }
.watch-pair img { width: min(210px, 100%); border-radius: 44px; transition: transform 600ms var(--ease-soft); }
.cell:hover .watch-pair img { transform: translateY(-4px); }
.a-lock, .a-ai { background: var(--night); }
.a-watch { background: var(--mint); }
.a-lock h3, .a-ai h3 { color: var(--mint); }
.a-lock p, .a-ai p { color: var(--on-night); }

/* ---------- Who's here: the board of rows ---------- */
.nearby { margin-top: clamp(96px, 10vw, 160px); background: var(--night-2); padding: 12px; }
.rows { display: grid; gap: 4px; }
.row {
  display: grid; grid-template-columns: 5fr 2fr 2fr 2fr 1.4fr; align-items: center; gap: 16px;
  width: 100%; min-height: 72px; padding: 0 20px; border: 0; border-radius: 6px; background: var(--row); color: var(--on-night);
  text-align: left; cursor: pointer; font-variant-numeric: tabular-nums;
  transition: background-color 180ms ease;
}
.row:hover { background: #185046; }
.row-name { font-family: var(--display); font-size: clamp(22px, 2vw, 30px); font-weight: 700; letter-spacing: -0.02em; }
.row-fact { font-size: var(--s-body); color: var(--on-night-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-dist { font-size: var(--s-body); font-weight: 600; text-align: right; }
.row-status { justify-self: end; padding: 8px 12px; border-radius: 6px; font-size: var(--s-small); font-weight: 700; white-space: nowrap; }
.st-here { background: var(--mint); color: var(--night); }
.st-close { background: var(--leaf); color: var(--night); }
.st-near { background: var(--forest); color: #fff; }
.row.is-open {
  min-height: 216px; align-items: start; padding: 26px 24px; background: var(--forest); cursor: default;
  grid-template-columns: 5fr 6fr 1.4fr; grid-template-rows: auto 1fr;
}
.row.is-open .row-name { font-size: clamp(30px, 3.4vw, 52px); letter-spacing: -0.035em; color: #fff; }
.row.is-open .row-fact, .row.is-open .row-dist { display: none; }
.row-detail { display: none; }
.row.is-open .row-detail { display: grid; gap: 6px; grid-column: 2 / 3; grid-row: 1 / 3; font-size: var(--s-body); color: #E3F1EA; }
.row-detail strong { color: #fff; font-weight: 700; }
.row-role { display: none; }
.row.is-open .row-role { display: block; grid-column: 1 / 2; font-size: var(--s-body); color: var(--mint); align-self: end; }
@media (prefers-reduced-motion: no-preference) {
  .row.is-open .row-detail { animation: rise 420ms var(--ease-out) both; }
}

/* ---------- Questions ---------- */
.faq {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: start;
  padding: clamp(96px, 10vw, 160px) clamp(20px, 3vw, 44px) 0;
}
.faq-index { grid-column: 1 / 6; }
.faq h2 { font-size: var(--s-body); font-weight: 600; color: var(--ink-soft); margin-bottom: 18px; }
.faq-index ul { display: grid; gap: 4px; }
.faq-index button {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 9px 0; border: 0; background: none; cursor: pointer;
  text-align: left; font-size: var(--s-body); color: var(--ink-soft); transition: color 150ms ease;
}
.faq-index button::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: #B4C6BF; transition: background-color 150ms ease, transform 150ms var(--ease-out); }
.faq-index button:hover, .faq-index button[aria-selected="true"] { color: var(--ink); }
.faq-index button[aria-selected="true"]::before { background: var(--forest); transform: scale(1.3); }
.faq-answer {
  grid-column: 7 / 13; position: sticky; top: 120px; margin-top: 40px;
  font-size: var(--s-lead); line-height: 1.35; max-width: 30ch; transition: opacity 150ms ease;
}
.faq-inline { display: none; }

/* ---------- The close ---------- */
.close-wrap { overflow: hidden; margin-top: clamp(96px, 10vw, 160px); }
.close {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px;
  width: calc(100% + 80px); margin-left: -40px; height: 360px;
}
.close-side { height: 100%; }
.close-photo { grid-column: 1 / 3; background: var(--night); }
.close-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 80%; }
.close-flat { grid-column: 11 / 13; background: var(--mint); }
.close-main {
  grid-column: 3 / 11; background: var(--forest); color: #fff; padding: 40px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 14px;
}
.close-main h2 { font-family: var(--display); font-size: var(--s-head); font-weight: 800; letter-spacing: -0.035em; line-height: 1.02; max-width: 14em; }
.close-main p { color: #DDEDE6; }
.button {
  margin-top: 8px; display: inline-flex; align-items: center; min-height: 54px; padding: 0 26px; border-radius: var(--radius);
  background: var(--paper); color: var(--night); font-weight: 700; text-decoration: none;
  transition: background-color 180ms ease, transform 140ms var(--ease-out);
}
.button:hover { background: var(--mint); }
.button:active { transform: scale(0.97); }

/* ---------- Footer: the mark, built large ---------- */
.foot { padding: clamp(96px, 10vw, 160px) var(--gap) 28px; }
.blocks { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; height: 34svh; min-height: 200px; align-items: end; }
.blocks span {
  height: var(--h); display: grid; place-items: center; border-radius: var(--radius);
  font-family: var(--display); font-weight: 800; font-size: clamp(64px, 12vw, 200px); line-height: 1; color: var(--paper);
}
.blocks span:nth-child(1) { background: var(--night); }
.blocks span:nth-child(2) { background: var(--forest); }
.blocks span:nth-child(3) { background: var(--leaf); color: var(--night); }
.blocks span:nth-child(4) { background: var(--mint); color: var(--night); }
.blocks span:nth-child(5) { background: var(--forest); }
.blocks span:nth-child(6) { background: var(--night); }
.foot-row { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-top: 40px; padding: 0 14px; font-size: var(--s-small); }
.foot-links { display: flex; gap: 24px; flex-wrap: wrap; }
.foot-links a { font-weight: 600; text-decoration: none; transition: color 180ms ease; }
.foot-links a:hover { color: var(--forest); }
.foot-copy { color: var(--ink-soft); }

/* ---------- Motion ---------- */
.lines .line { display: block; overflow: hidden; padding-bottom: 0.1em; margin-bottom: -0.1em; white-space: nowrap; }
.lines [data-line] { display: block; }
@media (prefers-reduced-motion: no-preference) {
  .js .lines [data-line] { transform: translateY(105%); animation: line-up 900ms var(--ease-out) forwards; animation-delay: calc(var(--i) * 110ms + 150ms); }
  .js [data-rise] { opacity: 0; transform: translateY(14px); animation: rise 700ms var(--ease-out) forwards; animation-delay: calc(var(--i, 0) * 90ms + 300ms); }
  .js [data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity 700ms var(--ease-out), transform 900ms var(--ease-out); transition-delay: var(--d, 0ms); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
  .js .blocks span { transform: scaleY(0); transform-origin: bottom; transition: transform 900ms var(--ease-out); transition-delay: var(--d, 0ms); }
  .js .blocks.is-in span { transform: none; }
}
@keyframes line-up { to { transform: none; } }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- Phone and narrow tablet: its own board ---------- */
@media (max-width: 900px) {
  :root { --gap: 6px; --s-head: 9vw; }
  .board { grid-template-columns: 1fr 1fr; grid-template-rows: auto; height: auto; min-height: 0; }
  .band { height: auto; padding: 10px 0 4px; }
  .band-name { font-size: 22vw; line-height: 0.9; }
  .links { grid-template-columns: 1fr 1fr; }
  .link { padding: 16px; }
  .centre { grid-column: 1 / -1; grid-template-rows: auto auto; order: 1; }
  .statement { order: -1; }
  .rail-right { order: 3; }
  .rail-left { order: 2; }
  .picture-tile { aspect-ratio: 1400 / 985; }
  .screen-tile { aspect-ratio: 720 / 1564; }
  .statement { padding: 22px 18px; }
  .statement h1 { font-size: 9.4vw; }
  .rail-left { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .rail-right { grid-column: 1 / -1; grid-template-rows: auto; grid-template-columns: 1fr 1fr; }
  .step { min-height: 92px; }
  .s5 { grid-column: 1 / -1; min-height: 72px; }
  .cells { grid-template-columns: 1fr; grid-template-areas: "map" "lock" "memory" "ai" "event" "watch"; }
  .a-ai { flex-direction: column; align-items: stretch; }
  .a-ai .cell-ui { width: calc(100% - 44px); margin: 22px 22px 0; }
  .a-ai .cell-text { padding: 22px; }
  .cell, .cell--down { flex-direction: column; }
  .cell--down .cell-text { order: -1; padding: 22px 22px 0; }
  .cell-text { padding: 22px 22px 0; }
  .cell--down .cell-ui, .cell-ui { margin: 0 22px 22px; width: calc(100% - 44px); }
  .cell-phone { width: 70%; margin: 0 auto 22px; }
  .watch-pair { grid-template-columns: 1fr 1fr; }
  .row { grid-template-columns: 1fr auto; min-height: 64px; padding: 0 14px; }
  .row-fact, .row-dist { display: none; }
  .row-name { font-size: 20px; }
  .row.is-open { min-height: 200px; grid-template-columns: 1fr; grid-template-rows: auto; padding: 20px 16px; }
  .row.is-open .row-name { font-size: 28px; }
  .row.is-open .row-detail { grid-column: 1; grid-row: auto; }
  .row.is-open .row-role { grid-column: 1; }
  .row.is-open .row-status { display: none; }
  .faq { display: block; padding: 88px 18px 0; }
  .faq-answer { display: none; }
  .faq-inline { display: block; padding: 0 0 12px 22px; font-size: 19px; line-height: 1.4; }
  .close-wrap { margin-top: 88px; }
  .close { display: grid; grid-template-columns: 1fr 1fr; height: auto; width: auto; margin: 0; padding: 0 var(--gap); gap: 6px; }
  .close-main { grid-column: 1 / -1; order: -1; min-height: 300px; padding: 28px 22px; }
  .close-photo, .close-flat { grid-column: auto; height: 120px; }
  .blocks { height: 22svh; min-height: 140px; }
  .blocks span { font-size: 16vw; }
  .foot-row { flex-direction: column; gap: 8px; }
}
