/* TourGuid intro. Tokens follow the app's own design system (Inter, the brand
   blue, navy and orange); buttons are rectangular everywhere, by standing rule. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/inter-var.woff2") format("woff2");
}

:root {
  --blue: #155EEF;
  --blue-text: #0F4FCC;
  --navy: #14213D;
  --orange: #FF8A00;
  --orange-text: #B54708;

  --splash-top: #1E88E5;
  --splash-bottom: #0D47A1;
  --night: #0B1B3F;
  --night-deep: #071230;

  --bg: #F7F9FC;
  --surface: #FFFFFF;
  --ink: #14213D;
  --muted: #55627A;
  --line: #DCE3EE;
  --table: #E4ECFA;
  --table-line: #C9D7F0;

  --radius-card: 14px;
  --shadow-card: 0 1px 2px rgba(10, 20, 50, .18), 0 14px 30px -8px rgba(10, 20, 50, .34);
  --shadow-lift: 0 2px 4px rgba(10, 20, 50, .2), 0 26px 46px -10px rgba(10, 20, 50, .5);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --blue-text: #7FAEFF;
    --orange-text: #FFB454;
    --bg: #0A1224;
    --surface: #111B33;
    --ink: #EAF0FB;
    --muted: #9FB0CC;
    --line: #23314F;
    --table: #101B34;
    --table-line: #1B2A4A;
  }
}
:root[data-theme="dark"] {
  --blue-text: #7FAEFF;
  --orange-text: #FFB454;
  --bg: #0A1224;
  --surface: #111B33;
  --ink: #EAF0FB;
  --muted: #9FB0CC;
  --line: #23314F;
  --table: #101B34;
  --table-line: #1B2A4A;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; background: var(--bg); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body.noscroll { overflow: hidden; }

img { max-width: 100%; }
a { color: inherit; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.wrap {
  width: min(1240px, 100% - 48px);
  margin-inline: auto;
}

:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}

/* ───────── Buttons: rectangular, always ───────── */
.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border: 2px solid transparent;
  border-radius: 4px;
  font: inherit;
  font-weight: 700;
  font-size: .98rem;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s, transform .15s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-light { background: #fff; color: var(--splash-bottom); }
.btn-light:hover { background: #E8F1FF; }
.btn-line { background: transparent; color: var(--blue-text); border-color: var(--blue-text); min-height: 42px; }
.btn-line:hover { background: color-mix(in srgb, var(--blue-text) 10%, transparent); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .55); }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); border-color: #fff; }

.link {
  appearance: none;
  background: none;
  border: 0;
  padding: 6px 0;
  font: inherit;
  font-weight: 700;
  color: var(--blue-text);
  cursor: pointer;
  text-align: left;
  justify-self: start;
}
.link::after { content: "\2192"; margin-left: 8px; display: inline-block; transition: transform .2s var(--ease); }
.link:hover::after { transform: translateX(4px); }

/* ───────── Hero ───────── */
.hero {
  position: relative;
  color: #fff;
  background: linear-gradient(180deg, var(--splash-top) 0%, var(--splash-bottom) 100%);
  overflow: clip;
  padding-bottom: clamp(48px, 8vw, 96px);
}
.hero-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: max(20px, env(safe-area-inset-top)) 12px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -.02em;
}
.brand-mark { width: 44px; height: 44px; }
.hero-nav { display: flex; gap: 28px; font-weight: 600; font-size: .95rem; }
.hero-nav a { text-decoration: none; opacity: .9; padding: 8px 0; }
.hero-nav a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 6px; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
  padding-top: clamp(20px, 5vw, 56px);
}
.eyebrow {
  margin: 0 0 18px;
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #FFD08A;
}
.hero h1 {
  margin: 0 0 22px;
  font-weight: 800;
  font-size: clamp(2.5rem, 6.2vw, 5.4rem);
  line-height: .98;
  letter-spacing: -.035em;
  text-wrap: balance;
}
.lead { margin: 0 0 30px; font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.55; max-width: 34em; opacity: .94; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 34px; }

.stores { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.stores li {
  display: grid;
  gap: 1px;
  padding: 10px 18px 11px;
  border: 1.5px solid rgba(255, 255, 255, .5);
  border-radius: 4px;
  min-width: 168px;
}
.store-name { font-weight: 800; font-size: 1.05rem; letter-spacing: -.01em; }
.store-when { font-size: .78rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; opacity: .8; }

/* The fan of cards in the hero */
.fan { position: relative; width: min(100%, 540px); margin-inline: auto; aspect-ratio: 4 / 5.15; }
.fan .card { position: absolute; }
.fan .card.front { z-index: 3; }

/* ───────── Cards (the scattered playcards) ───────── */
.card {
  appearance: none;
  display: block;
  margin: 0;
  padding: 6px 6px 0;
  border: 0;
  border-radius: var(--radius-card);
  background: #fff;
  color: #14213D;
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  touch-action: manipulation;
  translate: var(--dx, 0px) var(--dy, 0px);
  rotate: calc(var(--r, 0) * 1deg);
  scale: 1;
  transition: translate .5s var(--ease), rotate .5s var(--ease), scale .25s var(--ease), box-shadow .25s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.card img { display: block; width: 100%; height: auto; border-radius: 9px; background: #EEF2F8; user-select: none; -webkit-user-drag: none; }
.tag {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 4px 10px;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #14213D;
}
.tag::before {
  content: "";
  width: 11px;
  height: 9px;
  background: var(--orange);
  clip-path: polygon(0 0, 100% 22%, 78% 100%, 0 100%);
  flex: none;
}
.card:hover, .card:focus-visible {
  rotate: 0deg;
  scale: 1.05;
  box-shadow: var(--shadow-lift);
  z-index: 9000 !important;
}
.card.dragging {
  transition: box-shadow .25s var(--ease), scale .25s var(--ease);
  scale: 1.07;
  box-shadow: var(--shadow-lift);
  cursor: grabbing;
  z-index: 9500 !important;
}

/* JS positions each card by its data-* values, as percentages of the stage */
.is-scatter .card {
  position: absolute;
  left: calc(var(--x) * 1%);
  top: calc(var(--y) * 1%);
  width: calc(var(--w) * 1%);
}

/* ───────── Deck ───────── */
.section-head { max-width: 46rem; margin-bottom: 28px; }
.kicker {
  margin: 0 0 12px;
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--orange-text);
}
h2 {
  margin: 0 0 14px;
  font-weight: 800;
  font-size: clamp(1.9rem, 4vw, 3.1rem);
  line-height: 1.05;
  letter-spacing: -.03em;
  text-wrap: balance;
}
.section-lede { margin: 0; color: var(--muted); font-size: 1.15rem; max-width: 36em; }

.deck { padding: clamp(56px, 8vw, 112px) 0 clamp(48px, 7vw, 96px); }
.deck-tools { display: flex; gap: 10px; margin-bottom: 18px; }

.stage-wrap {
  position: relative;
  border: 1px solid var(--table-line);
  border-radius: 6px;
  background:
    linear-gradient(var(--table-line) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, var(--table-line) 1px, transparent 1px) 0 0 / 48px 48px,
    radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--table) 60%, #fff) 0%, var(--table) 70%);
  background-blend-mode: soft-light, soft-light, normal;
  overflow: hidden;
}
.stage {
  position: relative;
  width: 100%;
  container-type: inline-size;
}
/* Without JS the cards simply wrap into a grid. */
.stage:not(.is-scatter) { display: flex; flex-wrap: wrap; gap: 24px; padding: 24px; justify-content: center; }
.stage:not(.is-scatter) .card { width: 220px; }
.stage.is-scatter { aspect-ratio: 1200 / 1150; }
.stage.is-scatter .card { touch-action: none; cursor: grab; }
.swipe-hint { display: none; margin: 10px 0 0; color: var(--muted); font-size: .9rem; }

/* ───────── Features ───────── */
.features { padding: clamp(40px, 6vw, 80px) 0 clamp(64px, 9vw, 120px); }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
  gap: 22px;
  margin-top: 36px;
}
.feature {
  display: grid;
  grid-template-rows: auto auto auto 1fr auto;
  align-content: start;
  padding: 0 0 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}
.feature > :not(.f-thumb) { padding-inline: 20px; }
.f-thumb {
  height: 190px;
  overflow: hidden;
  background: var(--table);
  cursor: pointer;
  margin-bottom: 18px;
}
.f-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; display: block; transition: transform .5s var(--ease); }
.feature:hover .f-thumb img { transform: scale(1.04); }
.tag-line {
  margin: 0 0 6px;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--orange-text);
}
.feature h3 { margin: 0 0 8px; font-size: 1.25rem; line-height: 1.2; letter-spacing: -.015em; text-wrap: balance; }
.feature p:not(.tag-line) { margin: 0 0 12px; color: var(--muted); font-size: .98rem; line-height: 1.55; }

/* ───────── Under the hood ───────── */
.hood { background: var(--night); color: #fff; padding: clamp(56px, 8vw, 104px) 0; }
.section-head.on-dark .kicker { color: #FFB454; }
.hood-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0;
  margin-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, .18);
}
.hood-grid article { padding: 26px 28px 8px 0; }
.hood-grid article + article { padding-left: 28px; border-left: 1px solid rgba(255, 255, 255, .14); }
.hood-grid h3 { margin: 14px 0 10px; font-size: 1.3rem; letter-spacing: -.015em; }
.hood-grid p { margin: 0; color: #C3D0E8; font-size: 1rem; }
.pennant { display: block; width: 26px; height: 20px; clip-path: polygon(0 0, 100% 22%, 78% 100%, 0 100%); }
.p-orange { background: #FF9800; }
.p-red { background: #E53935; }
.p-green { background: #66BB6A; }

/* ───────── Partners ───────── */
.partners {
  color: #fff;
  background: linear-gradient(180deg, var(--splash-top) 0%, var(--splash-bottom) 100%);
  padding: clamp(56px, 8vw, 104px) 0;
}
.partners-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.partners h2 { color: #fff; }
.partners .lead { margin-bottom: 18px; }
.fineprint { margin: 0; font-size: .95rem; opacity: .85; }
.chips { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.chips li {
  padding: 14px 18px;
  border: 1.5px solid rgba(255, 255, 255, .5);
  border-radius: 4px;
  font-weight: 700;
  font-size: 1.1rem;
}

/* ───────── Footer ───────── */
.foot { background: var(--night-deep); color: #C3D0E8; padding: 40px 0 44px; }
.foot-grid { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 36px; }
.foot .brand { color: #fff; font-size: 1.25rem; }
.foot .brand-mark { width: 36px; height: 36px; }
.foot-line { margin: 0; flex: 1 1 260px; }
.foot-links { display: flex; gap: 22px; font-weight: 600; }
.foot-links a { text-decoration: none; }
.foot-links a:hover { text-decoration: underline; text-underline-offset: 5px; }
.foot-note { margin: 26px 0 0; font-size: .82rem; line-height: 1.55; color: #8FA0C0; max-width: 60em; }

/* ───────── Viewer ───────── */
.viewer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  color: #fff;
  background: rgba(6, 13, 33, .95);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.viewer[hidden] { display: none; }
.v-top { display: flex; align-items: center; justify-content: space-between; padding: max(14px, env(safe-area-inset-top)) 24px 8px; }
.v-count { margin: 0; font-size: .85rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #9FB0CC; font-variant-numeric: tabular-nums; }
.v-main {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 440px);
  gap: clamp(20px, 4vw, 56px);
  align-items: stretch;
  min-height: 0;
  padding: 0 clamp(16px, 4vw, 56px);
}
.v-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  align-self: stretch;
  min-width: 0;
  min-height: 0;
  padding-block: 8px;
}
.v-card {
  position: relative;
  padding: 8px;
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 30px 70px -16px rgba(0, 0, 0, .7);
  cursor: zoom-in;
  touch-action: pan-y;
  flex: none;
  display: grid;
}
.v-card img {
  display: block;
  width: 320px;
  height: auto;
  max-width: none;
  border-radius: 10px;
  transform-origin: var(--ox, 50%) var(--oy, 50%);
  transition: transform .35s var(--ease);
  user-select: none;
  -webkit-user-drag: none;
}
.v-card.zoomed { cursor: zoom-out; }
.v-card.zoomed img { transform: scale(2.4); }
.v-nav {
  appearance: none;
  flex: none;
  width: 46px;
  height: 46px;
  border: 2px solid rgba(255, 255, 255, .55);
  border-radius: 4px;
  background: rgba(8, 16, 38, .7);
  color: #fff;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}
.v-nav:hover { background: rgba(255, 255, 255, .16); border-color: #fff; }

.v-panel { max-width: 440px; align-self: center; }
.v-kicker { margin: 0 0 10px; font-size: .78rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: #FFB454; }
.v-panel h2 { color: #fff; font-size: clamp(1.7rem, 3vw, 2.5rem); margin-bottom: 14px; }
.v-text { margin: 0 0 20px; color: #D5DFF2; font-size: 1.05rem; line-height: 1.6; }
.v-tech { margin: 0 0 24px; padding: 4px 0 4px 16px; border-left: 3px solid var(--splash-top); }
.v-tech-label { margin: 0 0 4px; font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #8EC5FF; }
.v-tech p:last-child { margin: 0; color: #C3D0E8; font-size: .97rem; line-height: 1.55; }
.v-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.v-prev2 { display: none; }

.v-strip {
  display: flex;
  gap: 10px;
  padding: 12px 24px max(16px, env(safe-area-inset-bottom));
  overflow-x: auto;
  scrollbar-width: thin;
  scroll-snap-type: x proximity;
}
.v-thumb {
  appearance: none;
  flex: none;
  height: 64px;
  padding: 3px;
  border: 2px solid transparent;
  border-radius: 6px;
  background: rgba(255, 255, 255, .1);
  cursor: pointer;
  scroll-snap-align: center;
  opacity: .7;
  transition: opacity .15s, border-color .15s;
}
.v-thumb img { display: block; height: 100%; width: auto; border-radius: 4px; }
.v-thumb:hover { opacity: 1; }
.v-thumb[aria-current="true"] { border-color: var(--orange); opacity: 1; }

/* ───────── Small screens ───────── */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .fan { width: min(86%, 400px); }
  .partners-grid { grid-template-columns: 1fr; }
  .hero-nav { gap: 18px; }
}

@media (max-width: 760px) {
  .wrap { width: calc(100% - 32px); }
  .hero-nav a:first-child { display: none; }

  /* The scattered table becomes a swipeable row of cards. */
  .stage-wrap { border: 0; background: none; overflow: visible; }
  .stage.is-scatter {
    aspect-ratio: auto;
    display: flex;
    gap: 18px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 24px max(16px, 8vw) 34px;
    margin-inline: -16px;
    background: var(--table);
    border-block: 1px solid var(--table-line);
  }
  .stage.is-scatter .card { position: relative; left: auto; top: auto; flex: none; width: min(64vw, 260px); scroll-snap-align: center; cursor: pointer; touch-action: pan-x pan-y; }
  .stage.is-scatter .card.detail { width: min(78vw, 320px); align-self: center; }
  .deck-tools { display: none; }
  .swipe-hint { display: block; }

  .v-main { grid-template-columns: minmax(0, 1fr); grid-template-rows: max-content max-content; align-content: start; gap: 10px; overflow-y: auto; }
  .v-stage { align-self: auto; gap: 10px; min-height: auto; }
  .v-nav { display: none; }
  .v-prev2 { display: inline-flex; }
  .v-panel { padding-bottom: 8px; }
  .v-top, .v-strip { padding-inline: 16px; }
  .v-thumb { height: 52px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
