/* ==========================================================================
   Leaf & Loom TCG — Broadsheet
   Newsprint editorial system. Structure with whitespace and hairlines,
   never boxes. One accent per component.
   ========================================================================== */

:root {
  /* Ground */
  /* Sampled from the store artwork, not invented: the brand blue is lighter
     than a printing navy, and the gradient runs to a real sky blue. */
  --navy:        #0e4a7b;
  --navy-deep:   #0b3c6b;
  --blue-mid:    #1c84b3;
  --blue-light:  #2897bc;
  --ice:         #e7edf2;
  --paper:       #f4f1e9;
  --paper-deep:  #eae4d6;

  /* Ink */
  --ink:         #14202e;
  --ink-soft:    #4a5765;

  /* Accent. Two cyans, and they are not interchangeable. On the real brand
     blue the mid cyan only reaches 2.90:1, so anything on blue takes the pale
     one (4.96:1) and anything on white or wash takes the deep one (7.09:1). */
  --cyan-on-navy:  #7fc9e0;
  --cyan-on-paper: #0a5f80;
  --cyan-quiet:    #a8dcec;

  /* Held in reserve. One section only: graded and notable listings. */
  --magenta:       #b81c66;

  /* Furniture */
  --rule-paper: rgba(14, 74, 123, 0.22);
  --rule-navy:  rgba(255, 255, 255, 0.30);

  /* Homepage ground. Mostly white, navy used as accent. */
  --white:      #ffffff;
  --white-cool: #f7f8f9;
  --ink-white:  #0f1c2b;
  --muted:      #5a6a7a;
  --rule-white: rgba(14, 74, 123, 0.15);

  /* Set-page ground. A cool wash — the element, cards sit on white above it. */
  --wash:      #eef3f8;
  --wash-deep: #e3ebf3;

  /* The one gradient the brand uses. One step of value, shallow diagonal. */
  --grad: linear-gradient(135deg, #0b3c6b 0%, #12608f 48%, #2897bc 100%);

  --measure: 34rem;
  --gutter: clamp(1.25rem, 4vw, 4.5rem);
  --bleed: 78rem;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

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

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: 'Source Serif 4', 'Source Serif Pro', Georgia, 'Times New Roman', serif;
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.12rem);
  line-height: 1.62;
  font-variant-numeric: oldstyle-nums;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* --------------------------------------------------------------- primitives */

.shell {
  width: 100%;
  max-width: var(--bleed);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* The dateline: quiet credentials, letterspaced caps, stated once. */
.dateline {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-variant-numeric: lining-nums;
  color: var(--cyan-on-paper);
}
.dateline--navy { color: var(--cyan-on-navy); }
.dateline--reserve { color: var(--magenta); }

.hairline { border: 0; border-top: 1px solid var(--rule-paper); margin: 0; }

h1, h2, h3 {
  font-weight: 400;           /* a masthead is not bold */
  letter-spacing: -0.014em;
  line-height: 1.02;
  margin: 0;
  text-wrap: balance;
}

/* Section headings are set as datelines, so they must keep the dateline's
   tracking and weight rather than inherit the display-heading rule above. */
h2.dateline, h3.dateline {
  font-weight: 600;
  letter-spacing: 0.24em;
  line-height: 1.4;
  text-wrap: wrap;
}

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--cyan-on-paper);
  outline-offset: 3px;
  border-radius: 1px;
}
.masthead :focus-visible, .folio :focus-visible, .colophon :focus-visible {
  outline-color: var(--cyan-quiet);
}

/* ---------------------------------------------------------------- masthead */
/* Sticky, quiet, mostly white. Shared by the home page and every set page:
   whatever element a set builds below it, the way out is always in the
   same place. The mark is small here; the leaf gets its room further down. */

.site-head {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule-white);
}
.site-head__inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 4.25rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: var(--navy-deep);
}
.brand__mark { width: 1.35rem; height: auto; fill: currentColor; flex: none; }
.brand__name { font-size: 1.16rem; letter-spacing: -0.01em; white-space: nowrap; }
.brand__name .amp { font-style: italic; }

/* The tagline sits on the masthead rule, not in the flow of the nav: it is
   voice, not navigation, so it never takes the eye before the links do. */
.tagline {
  margin: 0 auto 0 0;
  padding-left: 1.5rem;
  border-left: 1px solid var(--rule-white);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--muted);
  white-space: nowrap;
}
@media (max-width: 68rem) {
  .tagline { display: none; }
  .brand { margin-right: auto; }
}

.site-nav { display: flex; align-items: center; gap: 1.4rem; }
.site-nav a {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  padding-block: 0.35rem;
  border-bottom: 1px solid transparent;
  transition: color 0.22s var(--ease), border-color 0.22s var(--ease);
}
.site-nav a:hover { color: var(--navy); border-bottom-color: var(--navy); }
.site-nav a.is-strong { color: var(--navy-deep); }
.site-nav a.is-here { color: var(--navy-deep); border-bottom-color: var(--navy); }
@media (max-width: 46rem) {
  .site-nav { gap: 0.95rem; }
  .site-nav a { font-size: 0.68rem; letter-spacing: 0.12em; }
  .site-nav a.is-hideable { display: none; }
}

/* ---------------------------------------------------------------- colophon */

.colophon {
  background: var(--navy-deep);
  color: rgba(255, 255, 255, 0.82);
  padding-block: clamp(2.75rem, 5vw, 4rem);
  font-size: 0.92rem;
}
.colophon__grid {
  display: grid;
  grid-template-columns: auto minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(1.75rem, 4vw, 3.5rem);
  align-items: start;
}
@media (max-width: 58rem) { .colophon__grid { grid-template-columns: 1fr; } }

.colophon__mark { width: 3.25rem; height: auto; fill: #fff; }
.colophon h2 { color: #fff; font-size: 1.5rem; margin-bottom: 0.7rem; }
.colophon p { margin: 0 0 0.8rem; max-width: 42ch; }
.colophon p:last-child { margin-bottom: 0; }
.colophon a { color: var(--cyan-on-navy); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.colophon a:hover { color: #fff; }

.colophon__foot {
  margin-top: clamp(2rem, 4vw, 3rem);
  padding-top: 1rem;
  border-top: 1px solid var(--rule-navy);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-variant-numeric: lining-nums;
  color: rgba(255, 255, 255, 0.6);
}

/* ------------------------------------------------------------------ motion */
/* Quiet. One staggered settle on load, then reveals on scroll. */

.js .reveal { opacity: 0; transform: translateY(14px); }
.js .reveal.in {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.js .masthead__mark,
.js .masthead__title,
.js .masthead .dateline,
.js .masthead__tagline {
  animation: settle 0.9s var(--ease) both;
}
.js .masthead__mark  { animation-delay: 0.05s; }
.js .masthead__title { animation-delay: 0.14s; }
.js .masthead .dateline { animation-delay: 0.26s; }
.js .masthead__tagline  { animation-delay: 0.36s; }

@keyframes settle {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.001ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}

@media print {
  .grain, .folio { display: none; }
  body { background: #fff; }
}

/* Visually hidden, still announced. */
.u-sr {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
