/* ---------------------------------------------------------------------------
   Arrow Collapse — marketing site
   ---------------------------------------------------------------------------
   Every colour below is copied from lib/design/ac_design_system.dart
   (ACPalette). Nothing is eyeballed: the site and the game are the same
   world, so the page uses the game's own tokens rather than approximations.

   The "lip" convention is the game's too — a solid darker edge under an
   object, a flat -37 per channel from its face, never a blurred glow. See
   ACPalette.lip().
--------------------------------------------------------------------------- */

@font-face {
  font-family: 'Baloo 2';
  src: url('/assets/fonts/baloo2-latin-var.woff2') format('woff2-variations');
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Surfaces */
  --page: #FEF7EC;
  --page-tint: #F9EFE1;
  --tray: #F3E6D0;
  --tray-edge: #E7D6C0;
  --plate: #FFFDF8;
  --plate-edge: #EFE3D2;
  --board: #6D4F3E;
  --board-edge: #5C4234;
  --board-socket: #503829;

  /* Ink */
  --ink-strong: #4A362A;
  --ink: #664B38;
  --ink-soft: #7E6656; /* ACPalette.inkSoft darkened for AA body text on cream */
  --on-accent: #FFFFFF;

  /* Tiles */
  --tile-red: #EB5A49;
  --tile-blue: #6CA6EE;
  --tile-green: #6ACFAB;
  --tile-yellow: #FFD14A;
  --tile-purple: #8B57CF;

  /* Accents */
  --positive: #57C04B;
  --positive-lip: #329B26;
  --info: #4D94EC;
  --info-lip: #286FC7;
  --accent: #7A4FC0;
  --accent-lip: #552A9B;
  --gold: #FFC531;
  --heart: #FB3738;

  /* Shadow */
  --shadow: rgba(58, 42, 30, .12);
  --shadow-strong: rgba(58, 42, 30, .20);

  --maxw: 1120px;
  --radius: 22px;
  --radius-sm: 14px;
}

/* --- reset ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: 'Baloo 2', 'Trebuchet MS', 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-weight: 600;
  font-size: clamp(16px, 1rem + .2vw, 18px);
  line-height: 1.55;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { color: var(--ink-strong); line-height: 1.1; margin: 0 0 .5em; font-weight: 800; }
h1 { font-size: clamp(2.1rem, 1.5rem + 3vw, 3.6rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.6rem, 1.2rem + 2vw, 2.5rem); }
h3 { font-size: clamp(1.15rem, 1.05rem + .5vw, 1.35rem); }
p  { margin: 0 0 1em; }
a  { color: var(--accent); text-decoration-thickness: .09em; text-underline-offset: .18em; }
a:hover { color: var(--accent-lip); }
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}
ul { padding-left: 1.15em; }
li { margin: 0 0 .45em; }

.skip {
  position: absolute; left: 8px; top: -60px; z-index: 100;
  background: var(--accent); color: #fff; padding: .6em 1em;
  border-radius: 10px; text-decoration: none; font-weight: 800;
  transition: top .15s ease;
}
.skip:focus { top: 8px; color: #fff; }

.wrap { width: min(100% - 2.5rem, var(--maxw)); margin-inline: auto; }
@media (max-width: 420px) { .wrap { width: min(100% - 1.6rem, var(--maxw)); } }

.eyebrow {
  font-size: .78rem; font-weight: 800; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-soft); margin: 0 0 .7em;
}

/* --- decorative page blobs ------------------------------------------------ */
.blobs { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.blobs span {
  position: absolute; border-radius: 50%; background: var(--page-tint);
}
.blobs span:nth-child(1) { width: 46vw; height: 46vw; top: -14vw; left: -13vw; }
.blobs span:nth-child(2) { width: 58vw; height: 58vw; top: 46vw; right: -22vw; }
.blobs span:nth-child(3) { width: 40vw; height: 40vw; top: 130vw; left: -14vw; }

/* --- header --------------------------------------------------------------- */
.site-head {
  position: sticky; top: 0; z-index: 20;
  background: rgba(254, 247, 236, .88);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 2px solid var(--plate-edge);
}
.site-head .wrap {
  display: flex; align-items: center; gap: 1rem;
  min-height: 66px; padding-block: .55rem;
}
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; flex-shrink: 0; }
.brand img.mark { width: 34px; height: 34px; border-radius: 9px; box-shadow: 0 2px 0 var(--shadow); }
.brand img.wm { width: 168px; height: 24px; object-fit: contain; }
@media (max-width: 560px) { .brand img.wm { width: 132px; height: 19px; } }

.orelia-tag {
  margin-left: .35rem; font-size: .74rem; font-weight: 800; letter-spacing: .09em;
  text-transform: uppercase; color: var(--ink-soft); text-decoration: none;
  border: 2px solid var(--tray-edge); border-radius: 999px;
  padding: .18em .7em; background: var(--plate); white-space: nowrap;
}
.orelia-tag:hover { color: var(--accent); border-color: var(--accent); }
.orelia-tag b { color: var(--accent); font-weight: 800; }
@media (max-width: 720px) { .orelia-tag { display: none; } }

/* Below 720px the sticky header has no room for the studio mark, so the hero
   carries it instead — "an Orelia game" is visible above the fold at every
   width, never in both places at once. */
.orelia-tag--hero { display: none; margin: 0 0 1rem; }
@media (max-width: 720px) { .orelia-tag--hero { display: inline-block; } }

.site-nav { margin-left: auto; display: flex; align-items: center; gap: .25rem; }
.site-nav a {
  color: var(--ink); text-decoration: none; font-weight: 700;
  padding: .4em .7em; border-radius: 10px; font-size: .95rem;
}
.site-nav a:hover { background: var(--tray); color: var(--ink-strong); }
@media (max-width: 640px) { .site-nav a.hide-sm { display: none; } }

/* --- chunky buttons (the game's own control language) --------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font: inherit; font-weight: 800; font-size: 1.05rem;
  padding: .82em 1.5em; border: 0; border-radius: 16px;
  text-decoration: none; cursor: pointer;
  background: var(--positive); color: var(--on-accent);
  box-shadow: 0 5px 0 var(--positive-lip);
  transition: transform .1s ease, box-shadow .1s ease;
}
.btn:hover { color: var(--on-accent); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--positive-lip); }
.btn--info { background: var(--info); box-shadow: 0 5px 0 var(--info-lip); }
.btn--accent { background: var(--accent); box-shadow: 0 5px 0 var(--accent-lip); }
.btn--ghost {
  background: var(--plate); color: var(--ink-strong);
  box-shadow: 0 5px 0 var(--plate-edge);
}
.btn--ghost:hover { color: var(--ink-strong); }
.btn--ghost:active { box-shadow: 0 1px 0 var(--plate-edge); }

/* --- store badges ---------------------------------------------------------- */
/* The Google Play badge is a live link (.badge--live). The App Store one stays
   a dashed non-link placeholder until that listing exists — a badge that 404s
   in front of a reviewer is worse than one that says "not yet". */
.badges { display: flex; flex-wrap: wrap; gap: .7rem; margin: 1.6rem 0 0; padding: 0; list-style: none; }
.badge {
  display: flex; align-items: center; gap: .7rem;
  background: var(--plate); border: 2px dashed var(--tray-edge);
  border-radius: 16px; padding: .6rem 1.05rem;
  /* Grows to 200px where there is room, but never wider than its line — a
     hard 200px floor pushed the pair off the right edge of a 360px screen. */
  flex: 1 1 200px; min-width: 0; max-width: 100%;
}
.badge svg { flex: 0 0 auto; fill: var(--ink-strong); }
a.badge--live {
  border: 2px solid var(--tray-edge);
  text-decoration: none;
  box-shadow: 0 2px 0 var(--plate-edge);
}
a.badge--live:hover { border-color: var(--accent); }
a.badge--live:active { box-shadow: none; transform: translateY(1px); }
.badge .t { display: block; font-weight: 800; color: var(--ink-strong); font-size: 1rem; line-height: 1.15; }
.badge .s { display: block; font-size: .74rem; font-weight: 800; letter-spacing: .1em;
            text-transform: uppercase; color: var(--ink-soft); line-height: 1.4; }

/* --- hero ----------------------------------------------------------------- */
.hero { padding: clamp(2.5rem, 1rem + 6vw, 5rem) 0 clamp(2rem, 1rem + 4vw, 3.5rem); }
.hero .wrap { display: grid; gap: clamp(2rem, 1rem + 4vw, 4rem); align-items: center; }
@media (min-width: 900px) { .hero .wrap { grid-template-columns: 1.08fr .92fr; } }

/* A grid/flex item defaults to min-width:auto, i.e. it refuses to shrink below
   its own min-content width. The hero wordmark is a 720px image, so the column
   inherited a 460px floor and the whole hero overflowed a 360px phone — the
   body's overflow-x:hidden then CLIPPED the text rather than wrapping it,
   which is the worst of both. Every track that holds content which can be
   wider than the viewport gets min-width:0 so it may actually shrink. */
.hero .wrap > *,
.band .wrap > *,
.orelia .wrap > *,
.site-foot .wrap > *,
.steps > li,
.features > li { min-width: 0; }

.hero-wordmark { width: 100%; max-width: 460px; height: auto; margin-bottom: .9rem; }
.hook {
  font-size: clamp(1.25rem, 1.05rem + 1.1vw, 1.6rem);
  color: var(--ink-strong); font-weight: 800; margin: 0 0 .55em;
}
.hero p.lede { max-width: 46ch; color: var(--ink); }

.hero-art { justify-self: center; }

/* Phone frame. CSS only — the image inside is a real device capture. */
.phone {
  width: min(270px, 74vw);
  border: 9px solid #2A1F17;
  border-radius: 44px;
  background: #2A1F17;
  box-shadow: 0 18px 40px var(--shadow-strong), 0 4px 0 rgba(58,42,30,.10);
  overflow: hidden;
  line-height: 0;
}
.phone img { border-radius: 35px; width: 100%; height: auto; }

/* --- generic section ------------------------------------------------------ */
.section { padding: clamp(2.5rem, 1.5rem + 4vw, 4.5rem) 0; }
.section > .wrap > .head { max-width: 60ch; margin-bottom: clamp(1.6rem, 1rem + 2vw, 2.6rem); }
.section > .wrap > .head p { color: var(--ink); }

/* --- steps ---------------------------------------------------------------- */
.steps { display: grid; gap: 1.1rem; padding: 0; margin: 0; list-style: none; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step {
  background: var(--plate); border-radius: var(--radius);
  box-shadow: 0 5px 0 var(--plate-edge); padding: 1.5rem 1.4rem;
}
.step .n {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 1.3rem; margin-bottom: .9rem;
}
.step:nth-child(1) .n { background: var(--tile-red);    box-shadow: 0 4px 0 #C63726; }
.step:nth-child(2) .n { background: var(--tile-yellow); box-shadow: 0 4px 0 #DAAC25; }
.step:nth-child(3) .n { background: var(--tile-green);  box-shadow: 0 4px 0 #45AA86; }
.step h3 { margin-bottom: .35em; }
.step p { margin: 0; color: var(--ink); }

/* --- feature grid --------------------------------------------------------- */
.features { display: grid; gap: 1.1rem; padding: 0; margin: 0; list-style: none; }
@media (min-width: 620px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .features { grid-template-columns: repeat(3, 1fr); } }
.feature {
  background: var(--plate); border-radius: var(--radius);
  box-shadow: 0 5px 0 var(--plate-edge); padding: 1.4rem;
  display: flex; gap: 1rem; align-items: flex-start;
}
.feature .ico {
  flex: 0 0 auto; width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center; color: #fff;
}
.feature .ico svg { width: 22px; height: 22px; fill: currentColor; }
.feature h3 { font-size: 1.08rem; margin-bottom: .25em; }
.feature p { margin: 0; font-size: .95rem; color: var(--ink); }
.c-red    { background: var(--tile-red);    box-shadow: 0 3px 0 #C63726; }
.c-blue   { background: var(--tile-blue);   box-shadow: 0 3px 0 #4781C9; }
.c-green  { background: var(--tile-green);  box-shadow: 0 3px 0 #45AA86; }
.c-yellow { background: var(--tile-yellow); box-shadow: 0 3px 0 #DAAC25; color: var(--ink-strong); }
.c-purple { background: var(--tile-purple); box-shadow: 0 3px 0 #6632AA; }
.c-gold   { background: var(--gold);        box-shadow: 0 3px 0 #DA9F0C; color: var(--ink-strong); }

/* --- screenshot rail ------------------------------------------------------ */
.rail {
  display: flex; gap: 1.1rem; overflow-x: auto; padding: .5rem .25rem 1.6rem;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  scrollbar-color: var(--tray-edge) transparent;
}
.rail figure { margin: 0; flex: 0 0 auto; scroll-snap-align: center; width: 232px; }
.rail .phone { width: 232px; }
.rail figcaption {
  margin-top: .85rem; text-align: center; font-size: .9rem;
  font-weight: 700; color: var(--ink-soft);
}
@media (min-width: 1024px) {
  .rail { justify-content: center; flex-wrap: wrap; overflow-x: visible; }
}

/* --- dark board band ------------------------------------------------------ */
.band {
  background: var(--board);
  border-top: 6px solid var(--board-edge);
  border-bottom: 6px solid var(--board-edge);
  color: #F6EADB;
  padding: clamp(2.5rem, 1.5rem + 4vw, 4.5rem) 0;
}
.band h2 { color: #FFFDF8; }
.band p { color: #EADBC8; }
.band .eyebrow { color: #C9AE96; }
.band .wrap { display: grid; gap: 2rem; }
@media (min-width: 880px) { .band .wrap { grid-template-columns: 1.05fr .95fr; align-items: center; } }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin: 0; padding: 0; }
.stats > div {
  background: var(--board-socket); border-radius: var(--radius-sm);
  padding: 1.1rem 1.2rem;
}
.stats dt { font-size: .78rem; font-weight: 800; letter-spacing: .1em;
            text-transform: uppercase; color: #C9AE96; }
.stats dd { margin: .15rem 0 0; font-size: 1.75rem; font-weight: 800; color: #FFFDF8; line-height: 1.1; }

/* --- orelia strip --------------------------------------------------------- */
.orelia {
  background: var(--tray); border-top: 2px solid var(--tray-edge);
  padding: clamp(2.2rem, 1.5rem + 3vw, 3.2rem) 0;
}
.orelia .wrap { display: flex; flex-wrap: wrap; gap: 1.4rem; align-items: center; justify-content: space-between; }
.orelia .copy { max-width: 52ch; }
.orelia h2 { font-size: clamp(1.35rem, 1.15rem + 1vw, 1.9rem); margin-bottom: .3em; }
.orelia p { margin: 0; }

/* --- footer --------------------------------------------------------------- */
.site-foot {
  background: var(--page); border-top: 2px solid var(--tray-edge);
  padding: 2.4rem 0 3rem; font-size: .95rem;
}
.site-foot .wrap { display: grid; gap: 1.6rem; }
@media (min-width: 760px) { .site-foot .wrap { grid-template-columns: 1.2fr 1fr 1fr; } }
.site-foot h2 { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase;
                color: var(--ink-soft); margin-bottom: .8em; font-weight: 800; }
.site-foot ul { list-style: none; padding: 0; margin: 0; }
.site-foot li { margin-bottom: .45em; }
.site-foot a { color: var(--ink); text-decoration: none; font-weight: 700; }
.site-foot a:hover { color: var(--accent); text-decoration: underline; }
.foot-brand img { width: 190px; height: 27px; margin-bottom: .9rem; }
.foot-brand p { color: var(--ink-soft); font-size: .9rem; margin: 0 0 .5em; }
.foot-brand a.co { color: var(--accent); font-weight: 800; text-decoration: none; }
.foot-brand a.co:hover { text-decoration: underline; }
.legal { color: var(--ink-soft); font-size: .85rem; margin-top: .4rem; }

/* --- legal / document pages ----------------------------------------------- */
.doc { padding: clamp(2.2rem, 1.5rem + 3vw, 3.6rem) 0 clamp(2.5rem, 2rem + 3vw, 4rem); }
.doc .wrap { width: min(100% - 2.5rem, 780px); }
.doc h1 { font-size: clamp(1.9rem, 1.5rem + 2vw, 2.8rem); margin-bottom: .25em; }
.doc .updated { color: var(--ink-soft); font-weight: 700; font-size: .92rem; margin-bottom: 2rem; }
.doc h2 {
  font-size: clamp(1.25rem, 1.1rem + .8vw, 1.55rem);
  margin-top: 2.2rem; padding-top: 1.6rem; border-top: 2px solid var(--tray-edge);
}
.doc h3 { font-size: 1.05rem; margin-top: 1.5rem; }
.doc p, .doc li { color: var(--ink); }
/* The policy quotes real identifiers — `com.google.android.gms.permission.AD_ID`
   is 38 unbreakable characters and overflowed a 320px screen by 55px. Long
   tokens wrap instead of pushing the page sideways. */
.doc p, .doc li, .doc td, .doc h1, .doc h2, .doc h3 { overflow-wrap: break-word; }
.doc code { overflow-wrap: anywhere; word-break: break-word; }
.doc .callout {
  background: var(--plate); border-radius: var(--radius-sm);
  box-shadow: 0 4px 0 var(--plate-edge); padding: 1.15rem 1.3rem; margin: 1.4rem 0;
}
.doc .callout p:last-child { margin-bottom: 0; }
.doc table { width: 100%; border-collapse: collapse; margin: 1.2rem 0; font-size: .93rem; }
.doc .table-scroll { overflow-x: auto; }
.doc th, .doc td { text-align: left; padding: .7rem .8rem; border-bottom: 2px solid var(--tray-edge); vertical-align: top; }
.doc th { color: var(--ink-strong); font-weight: 800; font-size: .8rem;
          letter-spacing: .07em; text-transform: uppercase; white-space: nowrap; }
.doc code {
  background: var(--tray); border-radius: 6px; padding: .1em .4em;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88em;
  color: var(--ink-strong);
}

/* --- 404 ------------------------------------------------------------------ */
.oops { text-align: center; padding: clamp(3rem, 2rem + 6vw, 6rem) 0; }
.oops .tiles { display: flex; gap: .6rem; justify-content: center; margin-bottom: 1.8rem; }
.oops .tiles i {
  width: 54px; height: 54px; border-radius: 15px; display: grid; place-items: center;
}
.oops .tiles i svg { width: 28px; height: 28px; fill: #fff; }
