/* ==========================================================================
   Game Nook — site styles. Loads AFTER tokens.css.
   Never hard-code a color here; always use a role token so both themes work.
   ========================================================================== */

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; text-wrap: balance; line-height: 1.2; }
p { margin: 0; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 3px; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: var(--accent-on);
  padding: var(--sp-3) var(--sp-4); border-radius: 0 0 var(--radius) 0;
}
.skip:focus { left: 0; }

.wrap { width: min(72rem, 100% - 2.5rem); margin-inline: auto; }
/* Constrain the LINES to a readable measure, not the container — otherwise
   .wrap.prose shrinks to 65ch and centres, breaking alignment with every
   other section on the page. */
.prose { display: flex; flex-direction: column; gap: var(--sp-4); }
.prose > * { max-width: 65ch; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }


/* --- header ------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex; align-items: center; gap: var(--sp-4);
  padding-block: var(--sp-3);
}
.brand { display: flex; align-items: center; gap: var(--sp-3); flex-shrink: 0; text-decoration: none; }
.brand img { width: 3rem; }
.brand .name { font-family: var(--font-display); font-size: var(--step-1); color: var(--text); line-height: 1; }
.brand .sub { font-size: 0.72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }

.nav { margin-left: auto; display: flex; align-items: center; gap: var(--sp-4); }
.nav a { color: var(--text); text-decoration: none; font-weight: 500; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--accent); text-decoration: underline; }
.nav .call {
  font-family: var(--font-mono); font-weight: 500;
  padding: var(--sp-2) var(--sp-4); border: 2px solid var(--accent);
  border-radius: var(--radius); color: var(--accent); white-space: nowrap;
}
.nav .call:hover { background: var(--accent); color: var(--accent-on); text-decoration: none; }

.nav-toggle { display: none; }
/* Collapses at 68rem, not 60rem like the layout grids: with the Discord chip
   and the phone chip both in the bar, the desktop nav needs more room than the
   page layout does. Keep these two breakpoints independent. */
@media (max-width: 68rem) {
  .nav-toggle {
    display: inline-flex; margin-left: auto; align-items: center; gap: var(--sp-2);
    background: transparent; border: 2px solid var(--border-strong); color: var(--text);
    font-family: var(--font-body); font-size: var(--step--1); font-weight: 600;
    padding: var(--sp-2) var(--sp-3); border-radius: var(--radius); cursor: pointer;
  }
  .nav {
    display: none; order: 3; width: 100%; margin-left: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding-bottom: var(--sp-3);
  }
  .nav.open { display: flex; }
  .nav a { padding: var(--sp-3) 0; border-top: 1px solid var(--border); }
  .nav .call { text-align: center; margin-top: var(--sp-3); border-top-width: 2px; }
}
@media (max-width: 68rem) {
  .nav .discord { justify-content: center; margin-top: var(--sp-3); border-top-width: 2px; }
}

/* --- open/closed pill --------------------------------------------------- */
.status {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  font-size: var(--step--1); font-weight: 600;
  padding: var(--sp-1) var(--sp-3); border-radius: 999px;
  border: 1px solid var(--chip-line); background: var(--chip-bg);
}
.status .dot { width: .55rem; height: .55rem; border-radius: 50%; background: var(--text-muted); }
.status[data-open="yes"] { color: var(--accent-2-text); }
.status[data-open="yes"] .dot { background: var(--accent-2); }
.status[data-open="no"] { color: var(--text-muted); }

/* --- hero --------------------------------------------------------------- */
.hero { padding-block: var(--sp-7) var(--sp-6); }
.hero .grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: var(--sp-7); align-items: center; }
@media (max-width: 60rem) { .hero .grid { grid-template-columns: 1fr; gap: var(--sp-5); } }
.hero .eyebrow {
  font-family: var(--font-display); font-size: var(--step--1);
  letter-spacing: .12em; color: var(--accent-2-text);
}
.hero h1 { font-size: clamp(2rem, 5vw, 3rem); margin-top: var(--sp-3); }
.hero .tagline {
  font-family: var(--font-display); font-size: var(--step-2);
  color: var(--accent); margin-top: var(--sp-4);
}
.hero p.lede { margin-top: var(--sp-4); font-size: var(--step-1); color: var(--text-muted); max-width: 40ch; }
.hero .actions { margin-top: var(--sp-5); display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.hero figure { margin: 0; }
.hero figure img { border-radius: var(--radius-lg); box-shadow: var(--shadow-lift); }
.hero figcaption { margin-top: var(--sp-3); font-size: var(--step--1); color: var(--text-muted); }

/* --- buttons ------------------------------------------------------------ */
.btn {
  display: inline-block; font-family: var(--font-body); font-size: var(--step-0);
  font-weight: 600; text-decoration: none; cursor: pointer;
  padding: var(--sp-3) var(--sp-5); border-radius: var(--radius);
  border: 2px solid transparent;
  transition: background-color .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease);
}
.btn-primary { background: var(--accent); color: var(--accent-on); }
.btn-primary:hover { background: var(--accent-hover); color: var(--accent-on); }
.btn-secondary { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn-secondary:hover { background: var(--chip-bg); color: var(--accent); }

/* --- board rule: the logo's checkerboard, reused as a divider ------------ */
.board-rule {
  height: 10px; border-radius: 2px;
  background: repeating-linear-gradient(90deg,
    var(--gn-purple) 0 28px, var(--gn-green-light) 28px 56px,
    var(--gn-green) 56px 84px, var(--gn-purple-light) 84px 112px);
}

/* --- sections ----------------------------------------------------------- */
.section { padding-block: var(--sp-7); }
.section.tint { background: var(--surface-sunken); }
.section > .wrap > header { display: flex; flex-direction: column; gap: var(--sp-3); margin-bottom: var(--sp-5); }
.section h2 { font-family: var(--font-display); font-size: var(--step-3); }
.section .sub { color: var(--text-muted); max-width: 60ch; }

/* --- category cards ----------------------------------------------------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: var(--sp-4); }
.cat {
  display: flex; flex-direction: column; gap: var(--sp-3);
  padding: var(--sp-5); text-decoration: none; color: inherit;
  background: var(--surface-raised); border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease), transform .18s var(--ease);
}
.cat:hover { border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-2px); color: inherit; }
.cat .gn-icon { color: var(--accent); --icon-size: 2.75rem; }
.cat h3 { font-size: var(--step-1); }
.cat p { font-size: var(--step--1); color: var(--text-muted); }

/* --- visit / NAP -------------------------------------------------------- */
.visit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-6); align-items: start; }
@media (max-width: 60rem) { .visit-grid { grid-template-columns: 1fr; } }
.visit-grid figure { margin: 0; }
.visit-grid figure img { border-radius: var(--radius); }
.visit-grid figcaption { margin-top: var(--sp-3); font-size: var(--step--1); color: var(--text-muted); }

.nap { display: flex; flex-direction: column; gap: var(--sp-4); }
.nap .addr { font-style: normal; display: flex; flex-direction: column; gap: var(--sp-1); }
.nap .addr .street { font-size: var(--step-1); font-weight: 600; }
.nap .addr .where { color: var(--text-muted); }
.hours { width: 100%; border-collapse: collapse; }
.hours caption { text-align: left; font-weight: 600; padding-bottom: var(--sp-2); }
.hours th, .hours td { text-align: left; padding: var(--sp-2) 0; border-bottom: 1px solid var(--border); }
.hours th { font-weight: 500; color: var(--text-muted); }
.hours td { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.hours tr:last-child th, .hours tr:last-child td { border-bottom: none; }
.note { font-size: var(--step--1); color: var(--text-muted); }

/* --- feature list (parking, I-95, accessibility) ------------------------ */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: var(--sp-4); }
.feature {
  padding: var(--sp-4) var(--sp-5); background: var(--surface-raised);
  border: 1px solid var(--border); border-left: 4px solid var(--accent-2);
  border-radius: 0 var(--radius) var(--radius) 0;
  display: flex; flex-direction: column; gap: var(--sp-2);
}
.feature h3 { font-size: var(--step-0); }
.feature p { font-size: var(--step--1); color: var(--text-muted); }

/* --- events ------------------------------------------------------------- */
.events { display: flex; flex-direction: column; gap: var(--sp-3); }
.event {
  display: grid; grid-template-columns: 10rem 1fr auto; gap: var(--sp-4); align-items: center;
  padding: var(--sp-4) var(--sp-5); background: var(--surface-raised);
  border: 1px solid var(--border); border-left: 5px solid var(--accent-2);
  border-radius: 0 var(--radius) var(--radius) 0;
}
@media (max-width: 48rem) {
  .event { grid-template-columns: 1fr; gap: var(--sp-2); }
}
.event .when { font-family: var(--font-mono); font-size: var(--step--1); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.event h3 { font-size: var(--step-1); }
.event .desc { font-size: var(--step--1); color: var(--text-muted); }
.event .fee { font-family: var(--font-mono); font-weight: 600; white-space: nowrap; }
/* Occurrence status, not event status. A cancelled NEXT night does not mean the
   event is dead — striking through the name would say the opposite of the note
   underneath it. Flag the row, keep the title intact. */
.event[data-status="cancelled"] { border-left-color: var(--critical); }
.event[data-status="postponed"],
.event[data-status="rescheduled"] { border-left-color: var(--warn); }
.event[data-status="cancelled"] .when { text-decoration: line-through; }
.badge {
  display: inline-flex; align-items: center; gap: var(--sp-2); align-self: start;
  padding: var(--sp-1) var(--sp-3); border-radius: 999px;
  background: var(--chip-bg); border: 1px solid var(--chip-line);
  font-size: 0.78rem; font-weight: 600; color: var(--accent-2-text);
}

/* --- split panels (buy/trade, event space) ------------------------------ */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-7); align-items: center; }
@media (max-width: 60rem) { .split { grid-template-columns: 1fr; gap: var(--sp-5); } }
.split figure { margin: 0; }
.split figure img { border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.split .body { display: flex; flex-direction: column; gap: var(--sp-4); align-items: start; }
.split h2 { font-family: var(--font-display); font-size: var(--step-3); }
.split ul { margin: 0; padding-left: 1.15rem; display: flex; flex-direction: column; gap: var(--sp-2); color: var(--text-muted); }
.split li::marker { color: var(--accent-2); }
.split figcaption { margin-top: var(--sp-3); font-size: var(--step--1); color: var(--text-muted); }

/* --- forms -------------------------------------------------------------- */
.form { display: flex; flex-direction: column; gap: var(--sp-4); max-width: 34rem; }
.field { display: flex; flex-direction: column; gap: var(--sp-2); }
.field label { font-weight: 600; font-size: var(--step--1); }
.field input, .field textarea, .field select {
  font-family: var(--font-body); font-size: var(--step-0); color: var(--text);
  background: var(--surface-raised); border: 2px solid var(--border-strong);
  border-radius: var(--radius); padding: var(--sp-3);
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); outline: none; }
.field textarea { min-height: 9rem; resize: vertical; }

/* --- channel cards (contact) -------------------------------------------- */
.channels { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: var(--sp-4); }
.channel {
  padding: var(--sp-5); background: var(--surface-raised); border: 1px solid var(--border);
  border-radius: var(--radius); display: flex; flex-direction: column; gap: var(--sp-2);
}
.channel h3 { font-size: var(--step-0); }
.channel .val { font-family: var(--font-mono); font-size: var(--step-1); }
.channel p { font-size: var(--step--1); color: var(--text-muted); }

/* --- footer ------------------------------------------------------------- */
.site-footer { margin-top: var(--sp-8); background: var(--surface-sunken); border-top: 1px solid var(--border); }
.site-footer .cols {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: var(--sp-6);
  padding-block: var(--sp-7) var(--sp-6);
}
@media (max-width: 60rem) { .site-footer .cols { grid-template-columns: 1fr 1fr; gap: var(--sp-5); } }
@media (max-width: 34rem) { .site-footer .cols { grid-template-columns: 1fr; } }
.site-footer h2 { font-size: var(--step--1); text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); margin-bottom: var(--sp-3); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-2); }
.site-footer a { color: var(--text); text-decoration: none; }
.site-footer a:hover { color: var(--accent); text-decoration: underline; }
.site-footer .brandcol { display: flex; flex-direction: column; gap: var(--sp-3); }
.site-footer .brandcol img { width: 11rem; }
.legal {
  border-top: 1px solid var(--border); padding-block: var(--sp-4);
  display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-5);
  font-size: var(--step--1); color: var(--text-muted);
}

/* --- page header for interior pages ------------------------------------- */
.page-head { padding-block: var(--sp-7) var(--sp-5); }
.page-head h1 { font-family: var(--font-display); font-size: clamp(1.9rem, 4vw, 2.6rem); }
.page-head p { margin-top: var(--sp-4); color: var(--text-muted); max-width: 60ch; font-size: var(--step-1); }
.crumbs { font-size: var(--step--1); color: var(--text-muted); margin-bottom: var(--sp-3); }
.crumbs a { color: var(--text-muted); }
.crumbs a:hover { color: var(--accent); }

/* --- brand marquee ------------------------------------------------------
   A continuous scroll of the lines we carry, each linking to its category.
   TEXT, not logos, deliberately: we don't hold licensed logo files, and
   drawing lookalikes would be worse than typography. Swap in publisher-
   supplied retailer logos when they arrive — the markup takes <img> without
   any other change.
   Honors prefers-reduced-motion: the animation stops and the row becomes a
   normal horizontal scroller. */
.marquee {
  position: relative;
  overflow: hidden;
  padding-block: var(--sp-5);
  border-block: 1px solid var(--border);
  background: var(--surface-raised);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.marquee-track {
  display: flex;
  width: max-content;
  gap: var(--sp-6);
  animation: marquee-scroll 46s linear infinite;
}
.marquee:hover .marquee-track,
.marquee:focus-within .marquee-track { animation-play-state: paused; }
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.marquee-item {
  display: inline-flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-4);
  font-family: var(--font-display);
  font-size: var(--step-1);
  white-space: nowrap;
  color: var(--text);
  text-decoration: none;
  border-radius: var(--radius);
  transition: color .15s var(--ease), background-color .15s var(--ease);
}
.marquee-item:hover, .marquee-item:focus-visible { color: var(--accent); background: var(--chip-bg); }
.marquee-item .pip { width: .5rem; height: .5rem; border-radius: 50%; background: var(--accent-2); flex: none; }
.marquee-item:nth-child(even) .pip { background: var(--accent); }
@media (prefers-reduced-motion: reduce) {
  .marquee { overflow-x: auto; }
  .marquee-track { animation: none; }
  .marquee-dupe { display: none; }
}

/* --- Discord chip in the header -----------------------------------------
   The owner's preferred channel and the one he actively staffs, so it sits
   beside the phone number rather than being buried in the footer. */
.nav .discord {
  font-weight: 600;
  padding: var(--sp-2) var(--sp-4);
  border: 2px solid var(--accent-2);
  border-radius: var(--radius);
  color: var(--accent-2-text);
  white-space: nowrap;
  display: inline-flex; align-items: center; gap: var(--sp-2);
}
.nav .discord:hover { background: var(--accent-2); color: var(--surface-raised); text-decoration: none; }
[data-theme="dark"] .nav .discord:hover,
:root:not([data-theme="light"]) .nav .discord:hover { color: #14101B; }
.nav .discord svg { width: 1.05em; height: 1.05em; fill: currentColor; flex: none; }
@media (max-width: 60rem) {
  .nav .discord { justify-content: center; margin-top: var(--sp-3); border-top-width: 2px; }
}

/* --- community band ------------------------------------------------------ */
.community {
  background: var(--surface-sunken);
  border-block: 1px solid var(--border);
  padding-block: var(--sp-7);
}
.community .inner {
  display: grid; grid-template-columns: 1.3fr 1fr; gap: var(--sp-6); align-items: center;
}
@media (max-width: 60rem) { .community .inner { grid-template-columns: 1fr; gap: var(--sp-5); } }
.community h2 { font-family: var(--font-display); font-size: var(--step-3); }
.community p { color: var(--text-muted); margin-top: var(--sp-3); }
.community ul { margin: var(--sp-4) 0 0; padding-left: 1.15rem; display: flex; flex-direction: column; gap: var(--sp-2); color: var(--text-muted); }
.community li::marker { color: var(--accent-2); }
.community .cta-col { display: flex; flex-direction: column; gap: var(--sp-3); align-items: flex-start; }
.btn-discord {
  background: var(--accent-2-text); color: var(--surface-raised);
  display: inline-flex; align-items: center; gap: var(--sp-3);
}
.btn-discord:hover { background: var(--accent); color: var(--accent-on); }
.btn-discord svg { width: 1.25em; height: 1.25em; fill: currentColor; }

/* Rocky Mount forecast (homepage, filled by site.js from weather.gov) */
.wx { margin-top: var(--sp-5); }
.wx[hidden] { display: none; }
.wx-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap; }
.wx-head h3 { font-size: var(--step-0); }
.wx-head a { font-size: var(--step--1); color: var(--text-muted); }
.wx-days { list-style: none; padding: 0; margin: var(--sp-3) 0 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-3); }
.wx-day { background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius);
  padding: var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-1); }
.wx-day::before { content: none; }
.wx-day svg { width: 2rem; height: 2rem; margin: var(--sp-1) 0; color: var(--accent);
  fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.wx-name { font-weight: 600; }
.wx-temp { font-family: var(--font-mono); font-size: var(--step-1); }
.wx-temp .lo { color: var(--text-muted); font-size: var(--step-0); }
.wx-text, .wx-pop { font-size: var(--step--1); color: var(--text-muted); }
@media (max-width: 48rem) { .wx-days { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Hero: three buttons on one row on desktop (owner preference) */
.hero .btn { padding-left: .875rem; padding-right: .875rem; }

/* Category pages: department icon beside the heading (fills the empty right side) */
.page-head-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--sp-6); }
.page-head-icon { color: var(--accent); --icon-size: clamp(7rem, 13vw, 10.5rem); opacity: .9; }
@media (max-width: 48rem) { .page-head-grid { grid-template-columns: 1fr; } .page-head-icon { display: none; } }

/* Three-across card grid (2 rows of 3) — used on the Rocky Mount guide */
.features.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 60rem) { .features.three { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 40rem) { .features.three { grid-template-columns: 1fr; } }
