/* ============================================================
   Race-Day Guide Hamburg 2026 — Stylesheet
   A4 portrait, 6 pages, Rookie Projekt brand
   ============================================================ */

/* ---------- Fonts ---------- */
@font-face {
  font-family: "Clash Display";
  src: url("fonts/ClashDisplay-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Clash Display";
  src: url("fonts/ClashDisplay-Semibold.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Clash Display";
  src: url("fonts/ClashDisplay-Bold.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}

/* ---------- Inter (self-hosted: latin + latin-ext, weights 400-800) ---------- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/inter-latin-ext-400.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/inter-latin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/inter-latin-ext-500.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/inter-latin-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/inter-latin-ext-600.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/inter-latin-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/inter-latin-ext-700.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/inter-latin-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("fonts/inter-latin-ext-800.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("fonts/inter-latin-800.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens (briefing palette) ---------- */
:root {
  --deep-blue:  #1B40DC;
  --deep-blue-dark: #0F2A9E;
  --lime:       #7FEEB2;
  --lime-dim:   #5FD494;
  --navy:       #0A1128;
  --navy-2:     #050918;
  --white:      #FFFFFF;
  --paper:      #F4F2EC;          /* warm off-white for soft pages */
  --paper-2:    #E9E5D8;
  --ink:        #0A1128;
  --ink-soft:   #2D365B;
  --rule:       #D7D2C2;
  --box-fill:   rgba(255,255,255,0.6);
  --box-fill-strong: rgba(255,255,255,0.85);

  --font-display: "Clash Display", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-body:    "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;

  --page-w: 210mm;
  --page-h: 297mm;
  --margin: 14mm;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
html, body { margin: 0; padding: 0; }
body {
  background: #2A2E3A;
  font-family: var(--font-body);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
}
img { display: block; max-width: 100%; }

/* ---------- Screen wrapper: stack pages with dark gutter ---------- */
.doc {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16mm;
  padding: 16mm 8mm;
}

/* ---------- A4 page ---------- */
.page {
  position: relative;
  width: var(--page-w);
  height: var(--page-h);
  background: var(--white);
  overflow: hidden;
  color: var(--ink);
  box-shadow: 0 10px 40px rgb(0 0 0 / 0.35);
  break-after: page;
  page-break-after: always;
  font-size: 10.5pt;
  line-height: 1.5;
}
.page:last-child { break-after: auto; page-break-after: auto; }

/* ---------- Typography primitives ---------- */
.display { font-family: var(--font-display); letter-spacing: -0.025em; line-height: 0.92; font-weight: 700; }
.body    { font-family: var(--font-body); }

.eyebrow {
  font-family: var(--font-body);
  font-size: 8.5pt;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.lead {
  font-family: var(--font-body);
  font-size: 12pt;
  line-height: 1.45;
  font-weight: 500;
}

p { margin: 0; }
p + p { margin-top: 0.55em; }

/* Body text colour helpers */
.t-soft { color: var(--ink-soft); }
.t-white { color: var(--white); }
.t-lime { color: var(--lime); }
.t-blue { color: var(--deep-blue); }

/* Lime highlight marker behind text */
.mark-lime {
  position: relative;
  display: inline-block;
}
.mark-lime > span { position: relative; z-index: 1; }
.mark-lime::after {
  content: "";
  position: absolute;
  inset: auto -0.08em 0.06em -0.08em;
  height: 0.36em;
  background: var(--lime);
  z-index: 0;
  border-radius: 1px;
}

/* ---------- Page chrome (top bar + page number) ---------- */
.page-chrome {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.page-chrome .top {
  position: absolute;
  top: 8mm; left: var(--margin); right: var(--margin);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--ink-soft);
}
.page-chrome .top .mark {
  display: inline-flex; align-items: center; gap: 8px;
}
.page-chrome .top .mark .dot {
  width: 8px; height: 8px; border-radius: 999px;
  background: var(--lime);
  box-shadow: 0 0 0 3px rgba(127,238,178,0.18);
}
.page-chrome .pgnum {
  display: none;
}
.page-chrome.dark .top { color: rgba(255,255,255,0.7); }
.page-chrome.dark .pgnum { color: rgba(255,255,255,0.55); }

/* ---------- Speech bubble ---------- */
.bubble {
  position: relative;
  display: inline-block;
  padding: 10px 16px 11px;
  border-radius: 14px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 10.5pt;
  line-height: 1.35;
  background: var(--lime);
  color: var(--navy);
  box-shadow: 0 6px 18px rgba(10,17,40,0.18);
}
.bubble--white { background: var(--white); color: var(--navy); border: 1px solid #E6E2D6; }
.bubble--dark  { background: var(--navy); color: var(--white); }
.bubble--blue  { background: var(--deep-blue); color: var(--white); }
.bubble::after {
  content: "";
  position: absolute;
  left: 22px; bottom: -8px;
  width: 0; height: 0;
  border-top: 10px solid currentColor;
  border-right: 8px solid transparent;
  border-left: 0;
}
.bubble.tail-r::after { left: auto; right: 22px; }
.bubble.tail-up::after { top: -8px; bottom: auto; border-top: 0; border-bottom: 10px solid currentColor; }
.bubble.no-tail::after { display: none; }
.bubble { /* override the after color via current-color trick */ }
.bubble        { /* keep */ }
.bubble.b-lime::after  { color: var(--lime); }
.bubble.b-white::after { color: var(--white); }
.bubble.b-dark::after  { color: var(--navy); }
.bubble.b-blue::after  { color: var(--deep-blue); }

/* ---------- Numbered round marker ---------- */
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px;
  border-radius: 999px;
  background: var(--lime);
  color: var(--navy);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12pt;
  line-height: 1;
  flex-shrink: 0;
}
.step-num--lg { width: 34px; height: 34px; font-size: 15pt; }
.step-num--blue { background: var(--deep-blue); color: var(--white); }

/* ---------- Lime arrow (curl) ---------- */
.arrow-curl {
  color: var(--lime);
  width: 60px; height: 60px;
  display: inline-block;
}
.arrow-curl svg { width: 100%; height: 100%; fill: currentColor; }

/* ---------- Util ---------- */
.flex { display: flex; }
.row  { display: flex; flex-direction: row; }
.col  { display: flex; flex-direction: column; }
.gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; }
.gap-4 { gap: 16px; } .gap-5 { gap: 20px; } .gap-6 { gap: 24px; }
.gap-8 { gap: 32px; }
.center { align-items: center; justify-content: center; }
.between { justify-content: space-between; }
.items-start { align-items: flex-start; }
.items-center{ align-items: center; }

/* ---------- Print ---------- */
@page {
  size: A4 portrait;
  margin: 0;
}
@media print {
  html, body { background: #fff; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .doc { display: block; padding: 0; gap: 0; }
  .page {
    box-shadow: none;
    margin: 0 auto;
    break-after: page;
    page-break-after: always;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .page:last-child { break-after: auto; page-break-after: auto; }
  /* Apple Preview (Quartz) renders the blurred box-shadows from the Chrome PDF
     as opaque grey rectangles behind the elements. Drop the outer shadows on
     the shadowed components for print/PDF only; the screen keeps them. The
     spread-only lime rings (0 0 0) are unaffected - they cause no artifact. */
  .bubble,
  .pan-photo-bubble,
  .p4-wz-warn { box-shadow: none; }
}
