/* ==========================================================================
   "Gridiron" look (the college football site). Loaded after site.css on sites
   whose Look is Gridiron, so it only changes the shared variables and restyles
   the shared pieces. Same class and variable names as site.css, so games pick
   it up with no changes.
   Field green with yard lines, chalk-cream pages, chunky Work Sans everywhere
   (extra-bold for headings), gold highlights. No team logos or school colours.
   (0.1.12: Henry swapped the Graduate varsity serif for Work Sans.)
   ========================================================================== */

/* Headings: Work Sans ExtraBold at every weight, so a game that asks for its
   heading font at weight 400 still gets the chunky one. */
@font-face {
  font-family: "Gridiron Display";
  src: url("fonts/work-sans-latin-800-normal.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Work Sans";
  src: url("fonts/work-sans-latin-500-normal.woff2") format("woff2");
  font-weight: 100 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Work Sans";
  src: url("fonts/work-sans-latin-700-normal.woff2") format("woff2");
  font-weight: 601 900; font-style: normal; font-display: swap;
}

:root {
  /* Palette */
  --paper: #f4f1e8;        /* chalk cream page */
  --card: #ffffff;
  --ink: #123a20;          /* deep field green: text, outlines, shadows */
  --ink-soft: #35553f;
  --ink-faint: #4f6b57;
  --line: #123a20;
  --accent: #123a20;       /* primary buttons: green with white text */
  --accent-ink: #ffffff;
  --good: #1d7a3a;
  --bad: #a83a14;
  --good-bg: #cdeccb;
  --bad-bg: #f6d2c2;

  /* Gridiron extras, for games that want them */
  --field: #1e5e34;        /* grass */
  --field-dark: #174a29;
  --chalk: #ffffff;        /* yard lines */
  --gold: #f2c14e;         /* first-down line, highlights (ink text on it) */
  --rust: #b5481b;         /* the big number */

  /* Bright game colours, toned to sit on cream */
  --pink: #f6c9c0; --blue: #c4dcef; --green: #cdeccb; --orange: #f7d6a6; --purple: #d8cdea; --yellow: #f8e6a0;

  /* Type */
  --font-display: "Gridiron Display", "Work Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: "Work Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Shape */
  --border: 3px;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 6px 0 var(--ink);
  --shadow-sm: 0 4px 0 var(--ink);

  /* Field background: mowing stripes + yard lines */
  --stripes: repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.07) 0 120px, transparent 120px 240px);
  --yardlines: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.5) 0 3px, transparent 3px 120px);
}

h1, h2, h3 { letter-spacing: -0.02em; line-height: 1.05; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

/* ---------- Header: a full-width strip of field ---------- */
/* The band reaches the window edges with border-image-outset, which (unlike a
   wide pseudo-element) never makes the page scroll sideways. */
.site-header {
  position: relative;
  color: var(--chalk);
  border-image: linear-gradient(to top, var(--chalk) 5px, var(--field) 5px) fill 0 / 0 / 0 100vmax;
  padding-top: 0.9rem; padding-bottom: 0.9rem;
}
.wordmark {
  display: inline-flex; align-items: center; gap: 0.55rem;
  background: none; color: var(--chalk); padding: 0; border-radius: 0;
  font-size: 1.35rem; letter-spacing: 0.01em;
  transform: none;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.25);
}
.wordmark::before {
  content: ""; flex: none; width: 1.6em; height: 1.05em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 46 30'%3E%3Cellipse cx='23' cy='15' rx='21' ry='13' fill='%237A3E1D' stroke='%23FFFFFF' stroke-width='2'/%3E%3Cpath d='M8.5 7.5 Q11 15 8.5 22.5 M37.5 7.5 Q35 15 37.5 22.5' stroke='%23FFFFFF' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3Cpath d='M28.20 9.90 C27.00 7.90 25.20 7.30 23.00 7.30 C20.00 7.30 18.20 9.00 18.20 11.00 C18.20 13.40 20.40 14.20 23.00 14.90 C26.00 15.60 28.00 16.60 28.00 19.00 C28.00 21.20 26.00 22.70 23.00 22.70 C20.60 22.70 18.80 21.80 17.80 20.00 M23.00 5.00 V25.00' stroke='%23F2C14E' stroke-width='3.2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.wordmark:hover { transform: none; color: var(--gold); }
.header-link {
  background: var(--gold); color: var(--ink); border: 0; border-radius: 999px;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.3); white-space: nowrap;
}
.header-link:hover { transform: translateY(-1px); box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3); }
.header-link:active { transform: translateY(3px); box-shadow: 0 0 0 rgba(0, 0, 0, 0.3); }

/* ---------- Footer: dark green strip ---------- */
.site-footer {
  position: relative;
  border-top: 0; color: #d6e6d9;
  border-image: linear-gradient(to bottom, var(--chalk) 5px, var(--field-dark) 5px) fill 0 / 0 / 0 100vmax;
  margin-top: 4rem;
}
.site-footer .wordmark { color: var(--chalk); }
.site-footer__fine { color: #b5cdb9; }
.site-footer a { color: var(--chalk); }

/* ---------- Grid page (all games): on the field ---------- */
body.home { background: var(--field-dark); background-image: var(--stripes); color: var(--chalk); }
body.home .hero__title { color: var(--chalk); text-shadow: 0 4px 0 rgba(0, 0, 0, 0.25); letter-spacing: -0.02em; }
body.home .hero__tagline { color: #e2eee4; }

.tile {
  background: var(--paper); color: var(--ink);
  border: 4px solid var(--chalk); border-radius: var(--radius);
  box-shadow: 0 8px 0 var(--ink);
}
a.tile:hover { transform: translateY(-3px); box-shadow: 0 11px 0 var(--ink); }
a.tile:active { transform: translateY(5px); box-shadow: 0 3px 0 var(--ink); }
.tile__art { background: var(--tile-bg); border-radius: 10px; margin-bottom: 0.2rem; }
.tile__emoji { transform: none; }
.tile__title { letter-spacing: -0.01em; }
.tile--soon { border-style: dashed; box-shadow: none; }
.pill { background: var(--gold); color: var(--ink); border: 0; z-index: 1; }
.pill--new { background: var(--rust); color: var(--chalk); transform: none; }

/* ---------- Pages and games ---------- */
.kicker { background: var(--gold); color: var(--ink); font-family: var(--font-body); letter-spacing: 0.1em; }
.card { border-radius: var(--radius); box-shadow: var(--shadow); }

.choice {
  border-radius: var(--radius-sm);
  box-shadow: 0 5px 0 var(--ink);
}
.choice:hover { transform: translateY(-1px); box-shadow: 0 6px 0 var(--ink); }
.choice:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.choice.is-right { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.choice.is-wrong { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }

.btn {
  border-radius: 999px;
  box-shadow: 0 4px 0 #0a2413;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 5px 0 #0a2413; filter: brightness(1.12); }
.btn:active { transform: translateY(4px); box-shadow: 0 0 0 #0a2413; }
.btn--ghost { background: var(--card); color: var(--ink); box-shadow: 0 4px 0 var(--ink); }
.btn--ghost:hover { box-shadow: 0 5px 0 var(--ink); filter: none; }

.stat { letter-spacing: -0.03em; color: var(--rust); }

.toast { background: var(--ink); color: var(--paper); border-color: var(--ink); box-shadow: 0 4px 0 var(--gold); }

@media (max-width: 560px) {
  :root { --shadow: 0 5px 0 var(--ink); }
  .wordmark { font-size: 1.1rem; }
}

/* Before/after switch on extension pages (0.1.18): pulse in gold, green when picked. */
[data-look="gridiron"] .ext-pics__radio--off:checked ~ .ext-pics__switch label[for$="-on"] { animation-name: ext-pics-nudge-gold; }
@keyframes ext-pics-nudge-gold { 0%, 100% { background: transparent; } 50% { background: var(--gold); color: var(--ink); } }
[data-look="gridiron"] .ext-pics__radio--off:checked ~ .ext-pics__switch label[for$="-off"],
[data-look="gridiron"] .ext-pics__radio--on:checked ~ .ext-pics__switch label[for$="-on"] { background: var(--field); color: #fff; }

/* Closing call to action on extension pages (0.1.19): a slab of field with a gold button. */
[data-look="gridiron"] .ext-final { background: var(--field); color: #fff; }
[data-look="gridiron"] .ext-final p { color: #d6e6da; }
[data-look="gridiron"] .ext-final .btn { background: var(--gold); color: var(--ink); }
[data-look="gridiron"] .ext-final .btn--soon { background: transparent; color: #fff; border-color: #fff; }
/* Email signup box (0.1.26): field green with a gold button. */
[data-look="gridiron"] .gd-signup { background: var(--field); color: #fff; }
[data-look="gridiron"] .gd-signup__text p { color: #d6e6da; }
[data-look="gridiron"] .gd-signup__form input { background: #fff; }
[data-look="gridiron"] .gd-signup__form .btn { background: var(--gold); color: var(--ink); }
[data-look="gridiron"] .gd-signup__done { color: var(--gold); }
