/* ==========================================================================
   Oaken Antler Games — oakenantler.com
   Built to the Oaken Antler Brand Guidelines v0.1 (August 2026)
   ========================================================================== */

/* --- Typeface: EB Garamond, self-hosted (no third-party font requests) ---- */

@font-face {
  font-family: 'EB Garamond';
  src: url('fonts/EBGaramond-latin.woff2') format('woff2-variations');
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'EB Garamond';
  src: url('fonts/EBGaramond-Italic-latin.woff2') format('woff2-variations');
  font-weight: 400 800;
  font-style: italic;
  font-display: swap;
}

/* --- Tokens --------------------------------------------------------------- */

:root {
  /* Surfaces */
  --vellum: #FBF6EA;
  --parchment: #F4EBDA;
  --parchment-deep: #E8DCC4;
  --forest-night: #1A150E;

  /* Antler */
  --bone: #EDE1C5;
  --antler: #CEBA94;
  --burr: #B3996E;

  /* Oak */
  --oak-leaf: #88784D;
  --deep-oak: #645633;
  --acorn: #5B4A2A;

  /* Ink */
  --bark: #3B2B15;

  /* Applied roles — reversed scheme (light artwork on Forest Night) */
  --surface: var(--forest-night);
  --surface-raised: #211B12;
  --ink: var(--vellum);
  --ink-secondary: var(--antler);
  --ink-quiet: var(--burr);
  --rule: rgba(206, 186, 148, 0.18);
  --rule-strong: rgba(206, 186, 148, 0.34);

  --serif: 'EB Garamond', 'Adobe Garamond Pro', Garamond, Georgia, 'Times New Roman', serif;

  --measure: 66ch;
  --gutter: clamp(1.5rem, 5vw, 6rem);
  --section-gap: clamp(4.5rem, 10vw, 8.5rem);
}

/* --- Reset ---------------------------------------------------------------- */

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

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--serif);
  /* Body/Base — 16 / 160% / Regular, oldstyle figures in running text */
  font-size: 1.0625rem;
  line-height: 1.6;
  font-variant-numeric: oldstyle-figures proportional-nums;
  font-feature-settings: 'kern' 1, 'liga' 1, 'onum' 1;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  /* Range left, never justify, never hyphenate. */
  text-align: left;
  hyphens: none;
}

img, svg { max-width: 100%; height: auto; display: block; }

/* --- Type ramp ------------------------------------------------------------ */

h1, h2, h3 {
  font-weight: 400;
  margin: 0;
  text-wrap: balance;
  color: var(--ink);
}

/* Heading/H1 — 56 / 120% / +1% */
h1 {
  font-size: clamp(2.25rem, 5.5vw, 3.5rem);
  line-height: 1.2;
  letter-spacing: 0.01em;
}

/* Heading/H2 — 30 / 130% / SemiBold */
h2 {
  font-size: clamp(1.5rem, 3.2vw, 1.875rem);
  line-height: 1.3;
  font-weight: 600;
}

/* Heading/H3 — 20 / 140% / Medium */
h3 {
  font-size: 1.25rem;
  line-height: 1.4;
  font-weight: 500;
}

p { margin: 0 0 1.15em; max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

/* Body/Large — 20 / 155% / Regular */
.lede {
  font-size: clamp(1.15rem, 2.2vw, 1.3125rem);
  line-height: 1.55;
  color: var(--ink);
  max-width: 58ch;
}

/* Body/Caption — 14 / 150% / Italic */
.caption {
  font-size: 0.9375rem;
  line-height: 1.5;
  font-style: italic;
  color: var(--ink-quiet);
}

/* Label/Eyebrow — 13 / 120% / +22% / caps */
.eyebrow {
  font-size: 0.8125rem;
  line-height: 1.2;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-secondary);
  font-variant-numeric: lining-nums;
  margin: 0 0 0.9rem;
}

/* Label/Spec — 12 / 145% / +6% / caps */
.spec {
  font-size: 0.75rem;
  line-height: 1.45;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-quiet);
  font-variant-numeric: lining-nums;
}

strong, b { font-weight: 600; }

/* --- Links ---------------------------------------------------------------- */

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--rule-strong);
  text-underline-offset: 0.22em;
  text-decoration-thickness: 1px;
  transition: color 160ms ease, text-decoration-color 160ms ease;
}

a:hover {
  color: var(--bone);
  text-decoration-color: var(--antler);
}

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

/* --- Layout --------------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: 1160px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--vellum);
  color: var(--bark);
  padding: 0.75rem 1.25rem;
  z-index: 100;
  text-decoration: none;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* --- Site header ---------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(26, 21, 14, 0.86);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--rule);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 76px;
  padding-block: 0.75rem;
}

/* Horizontal lockup — site headers, footers, email signatures. */
.lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: var(--ink);
  /* Clear space: 1x the cap height of the O in OAKEN, all four sides. */
  padding: 0.35rem 0.15rem;
}
.lockup:hover { color: var(--ink); }

.lockup__mark {
  width: 56px;
  height: auto;
  flex: none;
}

.lockup__type {
  display: block;
  line-height: 1;
}

.lockup__name {
  display: block;
  font-size: 1.0625rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--vellum);
}

.lockup__suffix {
  display: block;
  font-size: 0.6875rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-secondary);
  margin-top: 0.28rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.6vw, 2rem);
  flex-wrap: wrap;
}

.site-nav a {
  font-size: 0.8125rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-secondary);
  padding-block: 0.35rem;
  border-bottom: 1px solid transparent;
}

.site-nav a:hover {
  color: var(--vellum);
  border-bottom-color: var(--antler);
}

@media (max-width: 560px) {
  .site-header__inner { flex-direction: column; align-items: flex-start; gap: 0.9rem; }
  .site-nav { gap: 1.1rem; }
  .site-nav a { font-size: 0.75rem; }
}

/* --- Hero ----------------------------------------------------------------- */

.hero {
  position: relative;
  padding-block: clamp(4rem, 11vw, 8rem) clamp(3.5rem, 9vw, 6.5rem);
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--rule-strong) 22%, var(--rule-strong) 78%, transparent);
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}

@media (max-width: 860px) {
  .hero__inner { grid-template-columns: 1fr; text-align: left; }
  .hero__art { order: -1; width: min(100%, 340px); }
}

/* --- Lockup / Reversed -----------------------------------------------------
   Transparent mark over the wordmark set in EB Garamond, per the guidelines:
   "EB Garamond as drawn — not a substitute face." Small caps with full-height
   initials, tracked +8% (Display/Wordmark). Both lines sit in Antler on Forest
   Night — 9.6:1, AAA.

   Sizes are container units so the wordmark always tracks the mark's width
   rather than the viewport; the clamp() above each is the fallback.
   -------------------------------------------------------------------------- */

.hero__art {
  width: min(100%, 460px);
  margin-inline: auto;
  container-type: inline-size;
}

.hero__mark {
  width: 100%;
  margin-inline: auto;
}

.hero__wordmark,
.hero__games {
  margin: 0;
  max-width: none;
  text-align: center;
  color: var(--ink-secondary);
  font-weight: 500;
  font-variant-numeric: lining-nums;
  white-space: nowrap;
}

/* Display/Wordmark — small caps, +8% tracking. */
.hero__wordmark {
  margin-top: 0.3em;
  font-size: clamp(1.25rem, 6.6vw, 3.2rem);
  font-size: 11.1cqw;
  line-height: 1.1;
  letter-spacing: 0.08em;
  text-indent: 0.08em;
  font-variant-caps: small-caps;
}

.hero__games {
  margin-top: 0.35em;
  font-size: clamp(0.6rem, 3.1vw, 1.5rem);
  font-size: 5.2cqw;
  line-height: 1.2;
  letter-spacing: 0.4em;
  text-indent: 0.4em;
  font-variant-caps: all-small-caps;
}

.hero h1 { margin-bottom: 1.25rem; }

.hero__rule {
  width: 96px;
  height: 1px;
  background: var(--rule-strong);
  border: 0;
  margin: 2rem 0;
}

/* --- Sections ------------------------------------------------------------- */

.section {
  padding-block: var(--section-gap);
  border-bottom: 1px solid var(--rule);
}

.section:last-of-type { border-bottom: 0; }

.section__head { margin-bottom: 2.5rem; }
.section__head h2 { max-width: 22ch; }

.section--split {
  display: grid;
  grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
}

.section--split .section__head { margin-bottom: 0; }

@media (max-width: 800px) {
  .section--split { grid-template-columns: 1fr; gap: 1.75rem; }
}

/* --- Cards / panels ------------------------------------------------------- */

.panel {
  background: var(--surface-raised);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: clamp(1.5rem, 3.5vw, 2.25rem);
}

.grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-top: 2rem;
}

.grid p { max-width: none; }

.card__title {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}

/* --- Definition rows (spec rows from the guidelines) ---------------------- */

.rows { margin: 1.75rem 0 0; }

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
  align-items: baseline;
  padding-block: 0.85rem;
  border-bottom: 1px solid var(--rule);
}
.row:first-child { border-top: 1px solid var(--rule); }

.row__label { color: var(--ink); }
.row__value { color: var(--ink-secondary); font-variant-numeric: lining-nums; }

/* --- Buttons -------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  border: 1px solid var(--burr);
  border-radius: 2px;
  background: transparent;
  color: var(--vellum);
  font-family: inherit;
  font-size: 0.8125rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.btn:hover {
  background: var(--antler);
  border-color: var(--antler);
  color: var(--bark);
}

.btn--quiet { border-color: var(--rule-strong); color: var(--ink-secondary); }
.btn--quiet:hover { color: var(--bark); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.75rem;
}

/* --- Status pill ---------------------------------------------------------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.3rem 0.85rem 0.34rem;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-secondary);
  font-variant-numeric: lining-nums;
}

.pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--oak-leaf);
  flex: none;
}

/* --- Lists ---------------------------------------------------------------- */

.plain-list {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  max-width: var(--measure);
}

.plain-list li {
  position: relative;
  padding-left: 1.4rem;
  margin-bottom: 0.6rem;
}

.plain-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border: 1px solid var(--burr);
  border-radius: 1px;
}

.inline-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
  margin: 1.25rem 0 0;
  padding: 0;
}

/* --- Prose pages (privacy, terms) ---------------------------------------- */

.prose {
  max-width: calc(72ch + 2 * var(--gutter));
  margin-inline: auto;
  padding-block: clamp(3rem, 8vw, 5rem) var(--section-gap);
}
.prose h2 { margin-top: 2.75rem; margin-bottom: 0.85rem; }
.prose h3 { margin-top: 2rem; margin-bottom: 0.5rem; }
.prose ul { padding-left: 1.25rem; margin: 0 0 1.15em; }
.prose li { margin-bottom: 0.45rem; }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 3rem 0; }

.toc {
  border-left: 1px solid var(--rule-strong);
  padding: 0.25rem 0 0.25rem 1.25rem;
  margin: 2rem 0 0;
  list-style: none;
}
.toc li { margin-bottom: 0.4rem; }
.toc a { text-decoration-color: transparent; }
.toc a:hover { text-decoration-color: var(--antler); }

/* --- Footer --------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--rule);
  padding-block: clamp(2.5rem, 6vw, 4rem);
  color: var(--ink-quiet);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 3rem;
  justify-content: space-between;
  align-items: flex-start;
}

.site-footer a { color: var(--ink-secondary); text-decoration-color: transparent; }
.site-footer a:hover { color: var(--vellum); text-decoration-color: var(--antler); }

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-footer small {
  display: block;
  font-size: 0.8125rem;
  font-variant-numeric: lining-nums;
}

/* --- Print ---------------------------------------------------------------- */

@media print {
  body { background: #fff; color: #000; }
  .site-header, .site-footer, .btn-row { display: none; }
  a { color: #000; }
}
