/* openingbet.com — "The Small Print" design system (v2, 2026-08-28)
   A contract under examination: legal paper, ink, one marker-yellow
   highlighter, a red pen for margin notes. Fraunces display, typewriter
   mono for clause excerpts, quiet system body. Buttons are solid ink;
   the yellow belongs to the highlighter, never to the CTA.
   Signature move: the annotation system (highlight + red pen + stamps). */

:root {
  --paper: #f7f5ee;
  --paper-deep: #efece1;
  --ink: #1c1a16;
  --ink-soft: #4d483d;
  --ink-faint: #837c6c;
  --rule: #d9d4c4;
  --marker: #ffe33d;
  --marker-soft: #fff3a8;
  --redpen: #c8321e;

  --s-1: 0.25rem; --s-2: 0.5rem; --s-3: 0.75rem; --s-4: 1rem;
  --s-5: 1.5rem; --s-6: 2rem; --s-7: 3rem; --s-8: 4.5rem;

  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --mono: "Courier Prime", "Courier New", monospace;
  --wrap: 62rem;
  --prose: 44rem;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }

html { overflow-x: clip; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem; line-height: 1.7;
  color: var(--ink); background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.08; color: var(--ink); letter-spacing: -0.01em; }
h1 { font-size: clamp(2.2rem, 5.6vw, 3.6rem); }
h2 { font-size: clamp(1.55rem, 3.4vw, 2.2rem); }
h3 { font-size: 1.3rem; }
h1 em, h2 em { font-style: italic; font-weight: 400; }
a { color: var(--ink); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--redpen); outline-offset: 2px; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--s-5); }
.prose { max-width: var(--prose); }
.eyebrow {
  font-family: var(--mono); font-size: 0.78rem; text-transform: uppercase;
  letter-spacing: 0.22em; color: var(--redpen);
}

/* The highlighter (signature) */
.hl {
  background: linear-gradient(104deg, transparent 0.5%, var(--marker) 3%, var(--marker) 97%, transparent 99.5%);
  padding: 0.05em 0.25em; margin-inline: -0.05em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.hl-soft { background: linear-gradient(100deg, transparent 1%, var(--marker-soft) 4%, var(--marker-soft) 96%, transparent 99%); padding: 0.05em 0.2em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }

/* Red pen margin notes */
.pen {
  font-family: var(--display); font-style: italic; font-weight: 400;
  color: var(--redpen); font-size: 1.02rem; line-height: 1.35;
}
.stamp {
  display: inline-block; font-family: var(--mono); text-transform: uppercase;
  font-size: 0.78rem; letter-spacing: 0.14em; color: var(--redpen);
  border: 2.5px solid var(--redpen); border-radius: 4px; padding: 5px 12px;
  transform: rotate(-2.5deg); opacity: 0.9;
}

/* Header — case-file masthead */
.site-header { background: var(--paper); border-bottom: 3px double var(--ink); }
.site-header .bar { display: flex; align-items: center; gap: var(--s-4); padding-block: var(--s-4); }
.logo {
  font-family: var(--display); font-weight: 600; font-size: 1.4rem; color: var(--ink);
  text-decoration: none; white-space: nowrap; line-height: 1;
}
.logo .swipe {
  background: linear-gradient(104deg, transparent 1%, var(--marker) 5%, var(--marker) 95%, transparent 99%);
  padding: 0.08em 0.18em;
}
.site-nav { margin-left: auto; display: flex; align-items: center; gap: var(--s-5); }
.site-nav a { font-weight: 600; font-size: 0.9rem; color: var(--ink-soft); text-decoration: none; }
.site-nav a:hover { color: var(--ink); }
.site-nav a.nav-cta {
  background: var(--ink); color: var(--paper); padding: 10px 18px;
  border-radius: 6px; white-space: nowrap; font-weight: 700;
}
.site-nav a.nav-cta:hover { background: #34302a; }
.age-chip {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.05em;
  border: 2px solid var(--ink-soft); border-radius: 999px; padding: 2px 9px;
  color: var(--ink-soft); flex: none;
}
@media (max-width: 720px) {
  .site-nav a:not(.nav-cta) { display: none; }
  .site-header .bar, .site-nav { gap: var(--s-3); }
  .logo { font-size: 1.15rem; }
}

/* Hero — editorial front page with Exhibit A */
.hero { padding-block: var(--s-7) var(--s-8); border-bottom: 1px solid var(--rule); background: var(--paper); }
.hero .top { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; margin-bottom: var(--s-5); }
.hero .caseno { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-faint); }
.hero h1 { max-width: 22ch; margin-bottom: var(--s-4); }
.hero .sub { color: var(--ink-soft); max-width: 54ch; font-size: 1.12rem; margin-bottom: var(--s-5); }
.hero .grid { display: grid; gap: var(--s-6); align-items: start; }
@media (min-width: 880px) { .hero .grid { grid-template-columns: 1.05fr 0.95fr; } }
.hero .btn { margin-top: var(--s-4); }
.hero .micro { display: block; margin-top: var(--s-3); font-family: var(--mono); font-size: 0.8rem; color: var(--ink-faint); }

/* Exhibit document */
.exhibit {
  background: #fffdf6; border: 1px solid var(--rule); border-radius: 3px;
  box-shadow: 0 14px 30px rgba(28, 26, 22, 0.10), 0 2px 4px rgba(28, 26, 22, 0.08);
  padding: var(--s-5) var(--s-6); position: relative;
}
.exhibit .ex-label {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--ink-faint);
  border-bottom: 1px solid var(--rule); padding-bottom: var(--s-2); margin-bottom: var(--s-4);
  display: flex; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap;
}
.exhibit .clause { font-family: var(--mono); font-size: 0.92rem; line-height: 1.85; color: var(--ink-soft); }
.exhibit .clause + .clause { margin-top: var(--s-3); }
.exhibit .note { margin-top: var(--s-4); transform: rotate(-1.2deg); }
.exhibit .note .arrow { font-family: var(--display); font-style: italic; }

/* Buttons — solid ink, the yellow never competes */
.btn {
  display: inline-block; background: var(--ink); color: var(--paper);
  font-weight: 700; font-size: 1rem; text-decoration: none;
  padding: 13px 30px; border-radius: 6px; border: none; cursor: pointer; min-height: 44px;
}
.btn:hover { background: #34302a; }

/* Sections */
.section { padding-block: var(--s-8); }
.section.alt { background: var(--paper-deep); border-block: 1px solid var(--rule); }
.section-head { max-width: var(--prose); margin-bottom: var(--s-6); }
.section-head h2 { margin-top: var(--s-2); }
.section-head p { margin-top: var(--s-3); color: var(--ink-soft); }

/* Case files — stacked annotated documents, not a card row */
.casefile {
  display: grid; gap: var(--s-5); align-items: start;
  background: #fffdf6; border: 1px solid var(--rule); border-radius: 3px;
  box-shadow: 0 10px 24px rgba(28, 26, 22, 0.08), 0 1px 3px rgba(28, 26, 22, 0.08);
  padding: var(--s-5) var(--s-6); margin-bottom: var(--s-6);
}
@media (min-width: 800px) { .casefile { grid-template-columns: 1fr 15rem; } }
.casefile .doc .ex-label {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--ink-faint);
  border-bottom: 1px solid var(--rule); padding-bottom: var(--s-2); margin-bottom: var(--s-3);
}
.casefile h3 { font-size: 1.5rem; margin-bottom: var(--s-2); }
.casefile .deal { font-family: var(--mono); font-size: 0.9rem; color: var(--ink-soft); margin-bottom: var(--s-3); }
.casefile .clause { font-family: var(--mono); font-size: 0.9rem; line-height: 1.8; color: var(--ink-soft); }
.casefile aside { display: grid; gap: var(--s-4); justify-items: start; }
@media (min-width: 800px) { .casefile aside { border-left: 1px dashed var(--rule); padding-left: var(--s-5); } }
.casefile aside .pen { transform: rotate(-1.5deg); }
.casefile .btn { width: 100%; text-align: center; }
@media (max-width: 799px) { .casefile .btn { width: auto; } }

/* Clause school — numbered margin-note layout, not cards */
.clauses { display: grid; gap: 0; padding: 0; margin: 0; list-style: none; counter-reset: c; }
.clauses li {
  counter-increment: c; display: grid; gap: var(--s-2) var(--s-5);
  padding-block: var(--s-5); border-top: 1px solid var(--rule);
  grid-template-columns: 3.4rem 1fr;
}
.clauses li:last-child { border-bottom: 1px solid var(--rule); }
.clauses li::before {
  content: "§" counter(c);
  font-family: var(--display); font-style: italic; font-size: 1.9rem; color: var(--redpen);
  grid-row: span 2; line-height: 1;
}
.clauses h3 { font-size: 1.25rem; }
.clauses p { color: var(--ink-soft); font-size: 0.98rem; max-width: 58ch; }

/* Article pages */
.article { padding-block: var(--s-7) var(--s-8); }
.article .prose > * + * { margin-top: var(--s-4); }
.article .prose h2 { margin-top: var(--s-7); }
.article .prose h3 { margin-top: var(--s-5); }
.article .lede { font-family: var(--display); font-size: 1.35rem; font-weight: 400; color: var(--ink-soft); line-height: 1.4; }
.article .updated { font-family: var(--mono); font-size: 0.82rem; color: var(--ink-faint); }
.callout { background: #fffdf6; border: 1px solid var(--rule); border-left: 4px solid var(--marker); border-radius: 3px; padding: var(--s-4) var(--s-5); box-shadow: 0 6px 16px rgba(28,26,22,0.06); }
.callout.warn { border-left-color: var(--redpen); }

.disclosure { font-size: 0.85rem; color: var(--ink-faint); font-style: italic; }
.rg-band { background: var(--ink); color: #cfc9bb; }
.rg-band .wrap { display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-5); align-items: center; padding-block: var(--s-5); font-size: 0.9rem; }
.rg-band a { color: var(--paper); }
.rg-band .age-chip { border-color: #cfc9bb; color: #cfc9bb; }

.site-footer { background: var(--ink); color: #a49d8d; font-size: 0.9rem; }
.site-footer .wrap { padding-block: var(--s-6); display: grid; gap: var(--s-4); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: var(--s-4); }
.site-footer a { color: #cfc9bb; font-weight: 600; font-size: 0.85rem; text-decoration: none; }
.site-footer a:hover { color: var(--paper); text-decoration: underline; }
.site-footer p a { font-weight: 400; text-decoration: underline; font-size: inherit; }

/* Motion moment: the hero highlight sweeps in once */
@media (prefers-reduced-motion: no-preference) {
  .hl.sweep {
    background-size: 0% 100%; background-repeat: no-repeat;
    animation: sweep 900ms 300ms ease-out forwards;
  }
  @keyframes sweep { to { background-size: 100% 100%; } }
  a.btn, .site-nav a.nav-cta { transition: background-color 180ms ease-out; }
}
