/* =============================================================
   BESPOKE GAMING & ENTERTAINMENT — WEBSITE
   -------------------------------------------------------------
   The website is a second medium for the same design system, not
   a second design system. Color, space, typefaces and components
   are imported from design-system/ and never redefined here.

   What this file adds is the part a slide canvas cannot supply:
   fluid type, page-scale layout, navigation, forms and footer.

   Structure mirrors the deck: a page section carries a GROUND
   class, the ground re-points the semantic tokens, and every
   component reads those tokens rather than naming a color.
   ============================================================= */

@import url("../../../design-system/css/fonts.css");
@import url("../../../design-system/css/tokens.css");
@import url("../../../design-system/css/components.css");

/* -------------------------------------------------------------
   1. MEDIUM OVERRIDES
   The deck's type scale is sized for a fixed 1280x720 board. The
   web reflows, so the display steps become fluid. Same roles,
   same ratios, same token names — only the values change.
   ------------------------------------------------------------- */
:root {
  --size-display: clamp(2.75rem, 6.2vw, 5rem);
  --size-h1:      clamp(2.1rem, 4.2vw, 3.25rem);
  --size-h2:      clamp(1.5rem, 2.4vw, 2.05rem);
  --size-lead:    clamp(1.12rem, 1.6vw, 1.4rem);
  --size-stat:    clamp(2.75rem, 5vw, 4rem);
  --size-body:    1.0625rem;
  --size-small:   0.9375rem;

  --measure: 66ch;

  /* Page rhythm */
  --tbd-ink:    #ff6b82;   /* 5.40:1 on Apex Grey, higher on Black */

  --shell:      1200px;
  --pad-x:      clamp(20px, 5vw, 64px);
  --section-y:  clamp(64px, 9vw, 128px);
  --nav-h:      76px;
}

/* -------------------------------------------------------------
   2. RESET + BASE
   (design-system/css/base.css is deliberately not imported — it
   styles a slide pasteboard. The web needs its own base.)
   ------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: var(--size-body);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-variant-numeric: lining-nums;
}

h1, h2, h3, h4, p, ul, ol, figure, blockquote, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }

a { color: inherit; text-decoration-color: var(--hairline); text-underline-offset: .2em; }
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* -------------------------------------------------------------
   3. GROUNDS — the same mechanism as .slide--light / --brand.
   Sections carry these; components below inherit the tokens.
   ------------------------------------------------------------- */
.ground--light {
  --ground:    var(--bge-vintage-white);
  --ink:       var(--bge-apex-grey);
  --ink-muted: rgb(var(--bge-apex-grey-rgb) / 0.78);
  --ink-faint: rgb(var(--bge-apex-grey-rgb) / 0.50);
  --accent:     var(--bge-speed-cloth);   /* gold is 1.23:1 here — never text */
  --accent-ink: var(--bge-vintage-white);
  --hairline:   rgb(var(--bge-apex-grey-rgb) / 0.20);
  --panel:      rgb(var(--bge-apex-grey-rgb) / 0.04);
  --seq-1: var(--bge-speed-cloth);
  --seq-2: var(--bge-royal-carpet);
  --seq-3: var(--bge-monza-red);
  --seq-4: var(--bge-apex-grey);
  --seq-5: var(--bge-paddock);
  --tbd-ink: #b0233f;      /* 6.00:1 on Vintage White */
}
.ground--brand {
  --ground:    var(--bge-speed-cloth);
  --ink:       var(--bge-vintage-white);
  --ink-muted: rgb(var(--bge-vintage-white-rgb) / 0.80);
  --ink-faint: rgb(var(--bge-vintage-white-rgb) / 0.55);
  --accent:    var(--bge-winners-circle);
  --hairline:  rgb(var(--bge-vintage-white-rgb) / 0.28);
  --panel:     rgb(var(--bge-vintage-white-rgb) / 0.08);
  --tbd-ink: #ffc2cc;      /* 4.78:1 on Speed Cloth Green */
}
.ground--light, .ground--brand { background: var(--ground); color: var(--ink); }
.ground--light .lead { color: var(--ink-muted); }

/* -------------------------------------------------------------
   4. LAYOUT
   ------------------------------------------------------------- */
.shell { width: 100%; max-width: var(--shell); margin-inline: auto; padding-inline: var(--pad-x); }
.section { padding-block: var(--section-y); }
.section--tight { padding-block: calc(var(--section-y) * .6); }
.stack   { display: grid; gap: var(--space-5); }
.stack-6 { display: grid; gap: var(--space-6); }
.stack-8 { display: grid; gap: var(--space-8); }

.cols { display: grid; gap: var(--gutter); grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); }
.cols--3 { --cols: 3; }
.cols--4 { --cols: 4; }
.split-page { display: grid; gap: clamp(32px, 5vw, 80px); grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); align-items: start; }

@media (max-width: 900px) {
  .cols, .cols--3, .cols--4 { --cols: 2; }
  .split-page { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .cols, .cols--3, .cols--4 { --cols: 1; }
}

/* Section headers reuse the deck's eyebrow + headline pairing. */
.section__head { max-width: var(--measure); margin-bottom: var(--space-8); }
.section__head .headline { margin-bottom: var(--space-4); }

/* -------------------------------------------------------------
   5. NAVIGATION
   ------------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgb(var(--bge-apex-grey-rgb) / 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgb(var(--bge-vintage-white-rgb) / 0.14);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: var(--nav-h); gap: var(--space-6); }
.nav__logo { display: flex; align-items: center; }
.nav__logo img { height: 34px; width: auto; }
.nav__links { display: flex; align-items: center; gap: var(--space-6); }
.nav__links a {
  font-family: var(--font-feature);
  font-size: 11px; letter-spacing: var(--tracking-feature); text-transform: uppercase;
  color: rgb(var(--bge-vintage-white-rgb) / 0.66);
  text-decoration: none; padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color var(--duration-1) var(--ease), border-color var(--duration-1) var(--ease);
}
.nav__links a:hover { color: var(--bge-vintage-white); }
.nav__links a[aria-current="page"] { color: var(--bge-winners-circle); border-bottom-color: var(--bge-winners-circle); }
.nav__toggle { display: none; background: none; border: 1px solid rgb(var(--bge-vintage-white-rgb) / 0.3); color: var(--bge-vintage-white); padding: 8px 12px; font-family: var(--font-feature); font-size: 10px; letter-spacing: var(--tracking-feature); text-transform: uppercase; cursor: pointer; }

@media (max-width: 820px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: absolute; left: 0; right: 0; top: var(--nav-h);
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--bge-apex-grey);
    border-bottom: 1px solid rgb(var(--bge-vintage-white-rgb) / 0.14);
    padding: var(--space-3) var(--pad-x) var(--space-5);
  }
  .nav__links[hidden] { display: none; }
  .nav__links a { width: 100%; padding: 14px 0; border-bottom: 1px solid rgb(var(--bge-vintage-white-rgb) / 0.1); }
  .nav__links a[aria-current="page"] { border-bottom-color: var(--bge-winners-circle); }
}

/* -------------------------------------------------------------
   6. HERO
   ------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; padding-block: clamp(72px, 11vw, 148px); }
.hero__media { position: absolute; inset: 0; z-index: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__media::after { content: ""; position: absolute; inset: 0; background: var(--scrim-brand); }
.hero__media--dark::after { background: var(--scrim-dark); }
.hero > .shell { position: relative; z-index: 1; }
.hero .display { margin-bottom: var(--space-5); }
.hero .lead { max-width: 54ch; }

/* Page hero for interior pages — the deck's section-break, flattened. */
.pagehead { padding-block: clamp(56px, 8vw, 104px) clamp(40px, 5vw, 64px); border-bottom: 1px solid var(--hairline); }
.pagehead .headline { margin-bottom: var(--space-4); }

/* -------------------------------------------------------------
   7. COMPONENTS (web-only; deck components come from the import)
   ------------------------------------------------------------- */

/* Button */
.btn {
  display: inline-flex; align-items: center; gap: var(--space-3);
  font-family: var(--font-feature); font-size: 11px;
  letter-spacing: var(--tracking-feature); text-transform: uppercase;
  padding: 15px 26px; border: 1px solid var(--accent); color: var(--accent);
  background: none; text-decoration: none; cursor: pointer;
  transition: background var(--duration-1) var(--ease), color var(--duration-1) var(--ease);
}
.btn:hover { background: var(--accent); color: var(--accent-ink); }
.btn--solid { background: var(--accent); color: var(--accent-ink); }
.btn--solid:hover { background: none; color: var(--accent); }
.btn__arrow { width: 18px; height: 1px; background: currentColor; position: relative; }
.btn__arrow::after { content: ""; position: absolute; right: 0; top: -3px; width: 7px; height: 7px; border-top: 1px solid currentColor; border-right: 1px solid currentColor; transform: rotate(45deg); }

/* Row card — the template's stacked service rows, in brand form. */
.row-card {
  display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: var(--space-5);
  align-items: start; padding: var(--space-6) 0;
  border-top: 1px solid var(--hairline);
}
.row-card:last-child { border-bottom: 1px solid var(--hairline); }
.row-card__num { font-family: var(--font-feature); font-size: 12px; letter-spacing: var(--tracking-feature); color: var(--accent); padding-top: 4px; }
.row-card__title { font-family: var(--font-serif); font-size: var(--size-h2); line-height: var(--leading-snug); letter-spacing: var(--tracking-tight); margin-bottom: var(--space-3); }
.row-card__body { color: var(--ink-muted); max-width: var(--measure); }

/* Stat band */
.stats { display: grid; gap: var(--gutter); grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.stat-cell { border-top: var(--line-marker) solid var(--seq-1); padding-top: var(--space-4); }
.stat-cell:nth-child(2) { border-top-color: var(--seq-2); }
.stat-cell:nth-child(3) { border-top-color: var(--seq-3); }
.stat-cell:nth-child(4) { border-top-color: var(--seq-4); }
.stat-cell__value { font-family: var(--font-serif); font-size: var(--size-stat); line-height: 1; letter-spacing: var(--tracking-tight); color: var(--accent); }
.stat-cell__value--sm { font-family: var(--font-feature); font-size: clamp(1rem, 1.6vw, 1.25rem); letter-spacing: var(--tracking-feature); text-transform: uppercase; line-height: 1.3; }
.stat-cell__label { font-size: var(--size-small); color: var(--ink-muted); margin-top: var(--space-3); }

/* Person */
.person { display: grid; gap: var(--space-4); }
.person__portrait {
  aspect-ratio: 4 / 5; display: grid; place-items: center;
  background: var(--panel); border: 1px solid var(--hairline);
}
.person__monogram { font-family: var(--font-feature); font-size: clamp(1.5rem, 3vw, 2.1rem); letter-spacing: .06em; color: var(--accent); }
.person__name { font-family: var(--font-serif); font-size: 1.3rem; line-height: var(--leading-snug); }
.person__role { font-family: var(--font-feature); font-size: 10px; letter-spacing: var(--tracking-feature); text-transform: uppercase; color: var(--ink-muted); margin-top: var(--space-2); line-height: 1.6; }
.person__bio { font-size: var(--size-small); color: var(--ink-muted); margin-top: var(--space-3); }

/* Definition rows — contact details, facts */
.deflist { display: grid; gap: 0; }
.deflist > div { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: var(--space-5); padding: var(--space-5) 0; border-top: 1px solid var(--hairline); }
.deflist > div:last-child { border-bottom: 1px solid var(--hairline); }
.deflist dt { font-family: var(--font-feature); font-size: 10px; letter-spacing: var(--tracking-feature); text-transform: uppercase; color: var(--ink-faint); padding-top: 3px; }
.deflist dd { margin: 0; }
@media (max-width: 620px) { .deflist > div { grid-template-columns: 1fr; gap: var(--space-2); } }

/* Form */
.form { display: grid; gap: var(--space-5); max-width: 640px; }
.field { display: grid; gap: var(--space-2); }
.field label { font-family: var(--font-feature); font-size: 10px; letter-spacing: var(--tracking-feature); text-transform: uppercase; color: var(--ink-muted); }
.field input, .field textarea, .field select {
  background: var(--panel); border: 1px solid var(--hairline); color: var(--ink);
  padding: 13px 15px; border-radius: var(--radius-sm); font-size: var(--size-body);
  font-family: var(--font-serif); width: 100%;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-faint); }
.form__status { font-size: var(--size-small); color: var(--accent); min-height: 1.5em; }

/* TBD marker — content the execs still owe us. Deliberately
   visible so nothing placeholder ships by accident.
   Monza Red itself is only 3.10:1 on Apex Grey, which fails at
   this size, so each ground gets a tuned value instead. */
.tbd {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-feature); font-size: 9px;
  letter-spacing: var(--tracking-feature); text-transform: uppercase;
  color: var(--tbd-ink); vertical-align: 2px;
}
.tbd::before { content: ""; width: 12px; height: 3px; background: currentColor; }

/* Placeholder prose reads as placeholder through style, not through
   low contrast — dimming it far enough to look provisional would
   take it below AA. */
.is-lipsum { color: var(--ink-muted); font-style: italic; }

/* Pull quote / statement band */
.statement { font-family: var(--font-serif); font-size: clamp(1.35rem, 2.6vw, 2rem); line-height: var(--leading-snug); max-width: 30ch; }

/* -------------------------------------------------------------
   8. FOOTER
   ------------------------------------------------------------- */
.footer { background: var(--bge-black); color: var(--bge-vintage-white); padding-block: var(--space-10) var(--space-7); }
.footer a { color: rgb(var(--bge-vintage-white-rgb) / 0.72); text-decoration: none; }
.footer a:hover { color: var(--bge-winners-circle); }
.footer__grid { display: grid; gap: var(--space-8); grid-template-columns: 1.4fr 1fr 1fr; }
.footer__logo img { height: 40px; width: auto; margin-bottom: var(--space-5); }
.footer__tag { color: rgb(var(--bge-vintage-white-rgb) / 0.6); font-size: var(--size-small); max-width: 34ch; }
.footer h3 { font-family: var(--font-feature); font-size: 10px; letter-spacing: var(--tracking-feature); text-transform: uppercase; color: var(--bge-winners-circle); margin-bottom: var(--space-4); }
.footer ul { display: grid; gap: var(--space-3); font-size: var(--size-small); }
.footer__base {
  margin-top: var(--space-9); padding-top: var(--space-5);
  border-top: 1px solid rgb(var(--bge-vintage-white-rgb) / 0.16);
  display: flex; flex-wrap: wrap; gap: var(--space-4) var(--space-6); justify-content: space-between;
  font-family: var(--font-feature); font-size: 9.5px; letter-spacing: var(--tracking-feature);
  text-transform: uppercase; color: rgb(var(--bge-vintage-white-rgb) / 0.45);
}
@media (max-width: 820px) { .footer__grid { grid-template-columns: 1fr; gap: var(--space-7); } }
