/* Blind Drop — tokens are ported verbatim from the app's design system
   (blind-drop/docs/07-DESIGN-SYSTEM.md). Do not invent a value here; if the
   app's palette changes, change it there first and copy it across. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("fonts/BricolageGrotesque.ttf") format("truetype-variations");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
}

:root {
  /* Neutrals — cool, never warm. */
  --paper:        #EFF1F5;
  --paper-sunk:   #E7EAEF;
  --surface:      #FFFFFF;
  --edge:         #DCE0E7;
  --edge-strong:  #D3D8E0;
  --hairline:     #EAEDF1;

  --ink:          #14161A;
  --ink-dim:      #454B55;
  --ink-faint:    #767C88;

  /* Amber = sealed. Information is hidden. */
  --amber:        #B26A06;
  --amber-deep:   #96590A;
  --amber-text:   #8A5205;
  --amber-wash:   #F6EAD6;
  --amber-edge:   #E6CFA6;

  /* Ultramarine = revealed. Information is open. */
  --ultramarine:      #2233C4;
  --ultramarine-deep: #1B29A0;
  --ultramarine-wash: #E3E6FA;
  --ultramarine-edge: #C3C9F2;

  --measure: 34rem;
  --gutter: clamp(1.25rem, 5vw, 2.5rem);

  /* The display face, always at its widest cut — the expanded cut is what
     gives the numerals their character (docs/07 §3). */
  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "SF Pro Text", ui-sans-serif,
          system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;   /* 17px — the app's bodyL */
  line-height: 1.45;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* The display face is never set below 20px; at small sizes its personality
   reads as noise (docs/07 §3). */
.display {
  font-family: var(--display);
  font-variation-settings: "wdth" 100, "wght" 700;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.04;
  margin: 0;
}

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--ultramarine);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap {
  max-width: 50rem;
  margin: 0 auto;
  padding-inline: var(--gutter);
}

/* ── Masthead ─────────────────────────────────────────────────────────── */

.masthead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-block: clamp(1.5rem, 4vw, 2.25rem) 0;
}

.wordmark {
  font-family: var(--display);
  font-variation-settings: "wdth" 100, "wght" 800;
  font-weight: 800;
  font-size: 1.375rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}

/* ── Hero ─────────────────────────────────────────────────────────────── */

.hero { padding-block: clamp(2.5rem, 8vw, 4rem) 0; }

.hero h1 {
  font-size: clamp(2.5rem, 7.5vw, 3.5rem);
  max-width: 13ch;
}

.hero-copy > p {
  max-width: var(--measure);
  color: var(--ink-dim);
  margin: 1.125rem 0 0;
}

.hero-cta {
  margin: 1.75rem 0 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
}

.hero-cta-note {
  font-size: 0.875rem;
  color: var(--ink-faint);
}

/* ── Phases ───────────────────────────────────────────────────────────── */

.section { padding-block: clamp(3rem, 9vw, 4.5rem) 0; }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin: 0 0 1.25rem;
}

.section h2 { font-size: clamp(1.75rem, 5vw, 2.25rem); }

/* The four steps are the four phases of a round, in order, so the numbering
   carries real information and the accents are the legend — step 1 is the
   blind window (amber), steps 2–4 are what happens once the information is
   out (ultramarine). This is docs/07 §2's second carve-out, and it is the
   only place on this page the two accents sit together. */
.phases { list-style: none; margin: 1.5rem 0 0; padding: 0; }

.phase {
  display: grid;
  grid-template-columns: 5.25rem 1fr;
  gap: 0 1rem;
  padding-block: 1.125rem;
  border-top: 1px solid var(--edge);
}

.phase:last-child { border-bottom: 1px solid var(--edge); }

.phase .at {
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
  color: var(--ultramarine);
  padding-top: 0.15em;
}

.phase:first-child .at { color: var(--amber-text); }

.phase h3 {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.phase p { margin: 0.25rem 0 0; color: var(--ink-dim); max-width: var(--measure); }

/* The guessing screen introduces the game before the rules. */
.play-section { display: grid; gap: 2rem; }
.rules-note { font-size: 0.875rem; color: var(--ink-dim); margin: 1rem 0 0; }
.guess-preview { margin: 0; text-align: center; }
.guess-preview figcaption { margin-bottom: 1.25rem; }
.guess-preview img {
  display: block;
  width: min(100%, 18rem);
  height: auto;
  margin-inline: auto;
  border: 1px solid var(--edge);
  border-radius: 14px;
}
.insights-wrap { margin-top: 2rem; }
.insight-card {
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--edge);
  border-radius: 10px;
}
.insight-card h2 { margin: 0; font-size: 1.0625rem; }
.insight-card p { margin: 0.5rem 0 0; color: var(--ink-dim); }
.install-section { padding-top: 2rem; }
@media (min-width: 48rem) {
  .wrap { max-width: 64rem; }
  .hero h1 { max-width: 17ch; }
  .play-copy { max-width: 40rem; }
  .guess-preview { padding-top: 0.125rem; }
}

/* ── Install ──────────────────────────────────────────────────────────── */

/* Neutral on purpose. Installing is not a phase of a round, so it takes
   neither accent — that keeps amber and ultramarine strictly semantic. */
.install {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  text-decoration: none;
  background: var(--ink);
  color: var(--paper);
  padding: 0.8125rem 1.25rem;
  border-radius: 8px;
  transition: background 140ms ease;
}

.install:hover { background: #2A2E36; }

.install-note {
  margin: 0.875rem 0 0;
  font-size: 0.9375rem;
  color: var(--ink-dim);
  max-width: var(--measure);
}

/* ── Invite ───────────────────────────────────────────────────────────── */

.code-card {
  margin-top: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--edge);
  border-radius: 10px;
  padding: 1.5rem 1.25rem;
  text-align: center;
}

.code-card .label {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin: 0 0 0.75rem;
}

.code {
  font-family: var(--display);
  font-variation-settings: "wdth" 100, "wght" 800;
  font-weight: 800;
  font-size: clamp(2rem, 11vw, 2.75rem);
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
  margin: 0;
  color: var(--ink);
  word-break: break-all;
}

/* ── Footer ───────────────────────────────────────────────────────────── */

.foot {
  margin-top: clamp(3rem, 9vw, 4.5rem);
  padding-block: 1.5rem 2.5rem;
  border-top: 1px solid var(--edge);
  color: var(--ink-faint);
  font-size: 0.875rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  justify-content: space-between;
}

.foot a { color: var(--ink-dim); }

@media (max-width: 30rem) {
  .phase { grid-template-columns: 1fr; gap: 0.35rem; }
  .install { width: 100%; justify-content: center; }
  .hero-cta { align-items: stretch; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
    transition-duration: 1ms !important;
  }
}
