/* Dime Drop — booth stylesheet.
   The palette is lifted from the game: the menu's striped red, the awning's
   cream, the dime's brass, and the cabinet navy the board is played on. */

:root {
  --booth:      #7e1519;
  --booth-lo:   #490a0f;
  --booth-hi:   #9c1d22;
  --cream:      #f4ebd9;
  --paper:      #fbf5e8;
  --brass:      #f2b22e;
  --brass-hi:   #ffd777;
  --brass-lo:   #a96c0b;
  --cabinet:    #161e3c;
  --cabinet-2:  #28325e;
  --lit:        #a9c8f5;
  --ink:        #2a1409;
  --ink-soft:   #6a4a34;

  --display: "Rye", "Bookman Old Style", Georgia, serif;
  --body: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: "Space Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --gutter: clamp(1.25rem, 5vw, 4rem);
  --measure: 62ch;
  --shell: 1140px;
}

*, *::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: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.075rem);
  line-height: 1.6;
  color: var(--cream);
  background: var(--booth-lo);
  -webkit-font-smoothing: antialiased;
}

/* The booth ground: broad vertical stripes, the same beat as the menu. */
.ground {
  background-image:
    linear-gradient(180deg, rgba(0,0,0,0.28), rgba(0,0,0,0) 22%, rgba(0,0,0,0.35)),
    repeating-linear-gradient(90deg,
      var(--booth) 0 5.5%, var(--booth-hi) 5.5% 11%);
  background-color: var(--booth);
}

/* Scalloped awning, tiled. Each band ends in a half-ellipse with a bulb on it. */
.awning {
  height: 34px;
  background-repeat: repeat-x;
  background-position: top center;
  background-size: 88px 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='34' viewBox='0 0 88 34'%3E%3Cg%3E%3Cpath d='M0 0h22v22H0z' fill='%23b01e24'/%3E%3Cpath d='M0 22a11 10 0 0 0 22 0z' fill='%23b01e24'/%3E%3Ccircle cx='11' cy='29' r='2.2' fill='%23ffd777'/%3E%3Cpath d='M22 0h22v22H22z' fill='%23f4ebd9'/%3E%3Cpath d='M22 22a11 10 0 0 0 22 0z' fill='%23f4ebd9'/%3E%3Ccircle cx='33' cy='29' r='2.2' fill='%23e8a11f'/%3E%3Cpath d='M44 0h22v22H44z' fill='%23b01e24'/%3E%3Cpath d='M44 22a11 10 0 0 0 22 0z' fill='%23b01e24'/%3E%3Ccircle cx='55' cy='29' r='2.2' fill='%23ffd777'/%3E%3Cpath d='M66 0h22v22H66z' fill='%23f4ebd9'/%3E%3Cpath d='M66 22a11 10 0 0 0 22 0z' fill='%23f4ebd9'/%3E%3Ccircle cx='77' cy='29' r='2.2' fill='%23e8a11f'/%3E%3C/g%3E%3C/svg%3E");
  filter: drop-shadow(0 6px 10px rgba(0,0,0,0.45));
}

.shell {
  width: min(100% - (var(--gutter) * 2), var(--shell));
  margin-inline: auto;
}

a { color: var(--brass-hi); }
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--brass-hi);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- masthead ---------- */

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 0 0.4rem;
  flex-wrap: wrap;
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--display);
  font-size: 1.15rem;
  letter-spacing: 0.01em;
  color: var(--cream);
  text-decoration: none;
}
.mark img { width: 34px; height: 34px; border-radius: 9px; display: block; }

.masthead nav {
  display: flex;
  gap: 1.4rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.masthead nav a { color: rgba(244,235,217,0.8); text-decoration: none; }
.masthead nav a:hover { color: var(--brass-hi); }

/* ---------- hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(3rem, 7vw, 6rem);
}
@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brass);
  margin: 0 0 1.1rem;
}

.wordmark {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(3.1rem, 10vw, 6.2rem);
  line-height: 0.92;
  margin: 0 0 1.4rem;
  color: var(--brass-hi);
  text-shadow:
    0 2px 0 var(--brass-lo),
    0 5px 0 rgba(0,0,0,0.35),
    0 14px 26px rgba(0,0,0,0.5);
}

.lede {
  font-size: clamp(1.25rem, 1.05rem + 0.9vw, 1.7rem);
  line-height: 1.32;
  margin: 0 0 1rem;
  max-width: 20ch;
  color: var(--cream);
}
.hero p.sub { margin: 0 0 2rem; max-width: 44ch; color: rgba(244,235,217,0.82); }

.cta-row { display: flex; flex-wrap: wrap; gap: 1.25rem 1.5rem; align-items: center; }

.cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.7rem;
  border-radius: 999px;
  border: 2px solid var(--brass-lo);
  background: linear-gradient(180deg, var(--brass-hi), var(--brass));
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 0 6px 0 rgba(0,0,0,0.28), 0 12px 22px rgba(0,0,0,0.35);
  transition: transform 140ms ease, box-shadow 140ms ease;
}
.cta:hover { transform: translateY(-2px); box-shadow: 0 8px 0 rgba(0,0,0,0.28), 0 16px 26px rgba(0,0,0,0.4); }
.cta:active { transform: translateY(3px); box-shadow: 0 3px 0 rgba(0,0,0,0.28); }

.cta-note {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(244,235,217,0.62);
}

/* ---------- the playable board ---------- */

.cabinet {
  background: linear-gradient(180deg, #3a2413, #24150a);
  border: 1px solid rgba(255,215,119,0.28);
  border-radius: 22px;
  padding: 0.9rem;
  box-shadow: 0 24px 50px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.08);
}

.cabinet-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.15rem 0.4rem 0.7rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brass);
}

#board {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 320 / 430;
  border-radius: 14px;
  background: var(--cabinet);
  touch-action: none;
  cursor: grab;
}
#board.dragging { cursor: grabbing; }

.cabinet-foot {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.85rem 0.25rem 0.15rem;
  flex-wrap: wrap;
}

.btn {
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.62rem 1.25rem;
  border-radius: 999px;
  cursor: pointer;
  border: 2px solid var(--brass-lo);
  background: linear-gradient(180deg, var(--brass-hi), var(--brass));
  color: var(--ink);
  box-shadow: 0 4px 0 rgba(0,0,0,0.3);
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0,0,0,0.3); }
.btn[disabled] { opacity: 0.42; cursor: not-allowed; transform: none; box-shadow: 0 4px 0 rgba(0,0,0,0.3); }
.btn.ghost {
  background: transparent;
  color: rgba(244,235,217,0.85);
  border-color: rgba(244,235,217,0.3);
  box-shadow: none;
}

.readout {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  color: rgba(244,235,217,0.72);
  margin-left: auto;
  text-align: right;
  flex: 1 1 12ch;
}
.readout.win { color: var(--lit); }

.cabinet-note {
  margin: 0.9rem 0.25rem 0;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(244,235,217,0.45);
}

/* ---------- the fall: three beats, laid out the way a coin travels ---------- */

.fall { padding: 0 0 clamp(3rem, 7vw, 5rem); }
.beats { position: relative; }
.beats::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 1.4rem;
  bottom: 3.2rem;
  width: 2px;
  background: repeating-linear-gradient(180deg, rgba(255,215,119,0.55) 0 5px, transparent 5px 13px);
}
@media (min-width: 760px) {
  .beats::before { left: 50%; transform: translateX(-1px); }
}

.beat { position: relative; padding-left: 3.2rem; margin-bottom: 2.2rem; max-width: 34ch; }
.beat::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.55rem;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--brass-hi), var(--brass-lo));
  box-shadow: 0 0 0 4px var(--booth-lo), 0 0 16px rgba(255,215,119,0.55);
}
@media (min-width: 760px) {
  .beat { padding-left: 0; width: 42%; margin-bottom: 2.8rem; }
  .beat:nth-child(odd) { margin-left: 0; text-align: right; }
  .beat:nth-child(odd)::before { left: auto; right: -13.5%; }
  .beat:nth-child(even) { margin-left: 58%; }
  .beat:nth-child(even)::before { left: -13.5%; }
  .beat:last-child { margin-bottom: 0; }
}

.beat h3 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.3rem);
  margin: 0 0 0.4rem;
  color: var(--cream);
}
.beat p { margin: 0; color: rgba(244,235,217,0.8); }

/* ---------- sections ---------- */

.band { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.band.paper { background: var(--paper); color: var(--ink); }
.band.cabinet-band { background: linear-gradient(180deg, #10162e, #1b2444); }

.section-head { margin: 0 0 clamp(1.8rem, 4vw, 3rem); }
.section-head .eyebrow { color: var(--brass-lo); }
.band.cabinet-band .section-head .eyebrow,
.ground .section-head .eyebrow { color: var(--brass); }

h2.title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2rem, 1.4rem + 2.4vw, 3.2rem);
  line-height: 1.05;
  margin: 0;
  max-width: 18ch;
}
.band.paper h2.title { color: var(--ink); }

/* ---------- mode cards ---------- */

.modes { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.mode {
  position: relative;
  border-radius: 18px;
  padding: 1.5rem 1.4rem 1.6rem;
  border: 2px solid rgba(255,215,119,0.55);
  box-shadow: 0 14px 30px rgba(0,0,0,0.35);
  overflow: hidden;
}
/* the bulb strip along the top edge of every panel in the game */
.mode::before {
  content: "";
  position: absolute;
  inset: 10px 14px auto 14px;
  height: 5px;
  background-image: radial-gradient(circle, rgba(255,215,119,0.95) 45%, transparent 46%);
  background-size: 22px 5px;
  background-repeat: repeat-x;
  opacity: 0.85;
}
.mode h3 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.8rem;
  margin: 1.1rem 0 0.5rem;
  color: #fff;
}
.mode p { margin: 0 0 0.9rem; color: rgba(255,255,255,0.86); }
.mode .tag {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass-hi);
}
.mode.story   { background: linear-gradient(160deg, #2f6fd0, #1b47a0); }
.mode.endless { background: linear-gradient(160deg, #6a34c4, #431c86); }
.mode.daily   { background: linear-gradient(160deg, #f2c33e, #d99516); }
.mode.daily h3 { color: var(--ink); text-shadow: none; }
.mode.daily p { color: rgba(42,20,9,0.86); }
.mode.daily .tag { color: #6b3f05; }

/* ---------- promise ---------- */

.promises { display: grid; gap: clamp(1.6rem, 4vw, 2.6rem) clamp(2rem, 5vw, 4rem); grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
@media (min-width: 860px) { .promises { grid-template-columns: 1fr 1fr; } }
.promise h3 {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brass-lo);
  margin: 0 0 0.6rem;
  padding-top: 0.9rem;
  border-top: 2px solid rgba(42,20,9,0.18);
}
.promise p { margin: 0; color: rgba(42,20,9,0.82); }

/* ---------- gallery ---------- */

.gallery {
  display: grid;
  gap: 1.4rem;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}
.gallery figure { margin: 0; }
.gallery img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 16px;
  border: 1px solid rgba(255,215,119,0.28);
  box-shadow: 0 16px 34px rgba(0,0,0,0.45);
}
.gallery figcaption {
  margin-top: 0.7rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(244,235,217,0.6);
}

/* ---------- prose pages (support, privacy) ---------- */

.doc { padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(3rem, 7vw, 5rem); }
.doc .prose { max-width: var(--measure); }
.doc h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.2rem, 1.6rem + 2.6vw, 3.4rem);
  line-height: 1.05;
  margin: 0 0 0.6rem;
  color: var(--ink);
}
.doc .stamp {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 2.4rem;
}
.doc h2 {
  font-family: var(--body);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  margin: 2.4rem 0 0.6rem;
  color: var(--ink);
}
.doc h3 {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 1.6rem 0 0.4rem;
  color: var(--ink-soft);
}
.doc p, .doc li { color: rgba(42,20,9,0.86); }
.doc ul { padding-left: 1.15rem; }
.doc li { margin-bottom: 0.45rem; }
.doc a { color: #9c1d22; text-underline-offset: 3px; }
.doc hr { border: 0; border-top: 2px solid rgba(42,20,9,0.14); margin: 2.6rem 0; }

.callout {
  border-left: 4px solid var(--brass);
  background: rgba(242,178,46,0.13);
  padding: 1rem 1.2rem;
  border-radius: 0 10px 10px 0;
  margin: 1.6rem 0;
}
.callout p { margin: 0; }
.callout p + p { margin-top: 0.7rem; }

.faq { border-top: 2px solid rgba(42,20,9,0.14); }
.faq details {
  border-bottom: 2px solid rgba(42,20,9,0.14);
  padding: 0.35rem 0;
}
.faq summary {
  cursor: pointer;
  padding: 0.95rem 0;
  font-weight: 600;
  color: var(--ink);
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); color: var(--brass-lo); }
.faq details[open] summary::after { content: "\2013"; }
.faq details > *:not(summary) { margin-top: 0; padding-bottom: 0.9rem; }

/* ---------- footer ---------- */

.footer { background: var(--booth-lo); padding: clamp(2.5rem, 5vw, 3.5rem) 0 3rem; }
.footer .rows { display: flex; flex-wrap: wrap; gap: 1.4rem 2.5rem; justify-content: space-between; align-items: flex-start; }
.footer a { color: rgba(244,235,217,0.85); text-decoration: none; }
.footer a:hover { color: var(--brass-hi); text-decoration: underline; }
.footer .links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.6rem; font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; }
.footer .fine { font-size: 0.85rem; color: rgba(244,235,217,0.5); margin: 0; }

/* Secondary CTA: same shape as .cta, without the brass fill, so the App Store
   link is unmistakably the primary action on the page. */
.cta-ghost {
  background: none;
  color: var(--brass-hi);
  border-color: var(--brass-lo);
  box-shadow: none;
}
.cta-ghost:hover { box-shadow: none; transform: translateY(-2px); }

/* Apple's official App Store badge, used unmodified per Apple's marketing
   guidelines: scaled proportionally only, and given the required clear space of
   at least one quarter of the badge height on every side. */
.badge { display: inline-block; line-height: 0; }
.badge img { height: 80px; width: auto; max-width: 100%; display: block; }
@media (max-width: 380px) { .badge img { height: 64px; } }
.badge:focus-visible { outline: 3px solid var(--brass-hi); outline-offset: 20px; border-radius: 6px; }
.store { margin: 0; }
