/* Site design system: landing (index.php) + legal pages. Tokens from the app design (Figma 0114). */
@font-face { font-family: "Archivo"; src: url("fonts/Archivo.ttf") format("truetype"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: "Space Mono"; src: url("fonts/SpaceMono-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Space Mono"; src: url("fonts/SpaceMono-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --bg-primary: #F2EEE3;
  --surface-primary: #FFFDF7;
  --text-primary: #111111;
  --text-secondary: #423E33;
  --text-tertiary: #6B6555;
  --text-inverse: #FFFDF7;
  --text-link: #111111;
  --accent: #FFD21F;
  --accent-subtle: #FFD21F;
  --accent-text: #111111;
  --action-primary: #111111;
  --action-tertiary-hover: #FFD21F;
  --border-default: #111111;
  --border-subtle: #DCD6C5;
  --line-hours: #C7A6FF;
  --font-heading: "Archivo", -apple-system, system-ui, sans-serif;
  --font-body: "Archivo", -apple-system, system-ui, sans-serif;
  --font-mono: "Space Mono", ui-monospace, Menlo, monospace;
  --shadow-card: none;
  --radius-card: 0;
  --page: 1080px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
[id] { scroll-margin-top: 88px; }
body {
  margin: 0;
  background: var(--bg-primary);
  color: var(--text-primary);
  font: 400 16px/1.5 var(--font-body);
  min-height: 100vh;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1;
  background-color: var(--bg-primary);
  background-image: linear-gradient(to right, var(--border-subtle) 1px, transparent 1px), linear-gradient(to bottom, var(--border-subtle) 1px, transparent 1px);
  background-size: 24px 24px;
}
h1, h2, h3 { font-family: var(--font-heading); margin: 0; color: var(--text-primary); }
a { color: var(--text-link); }
a:hover { text-decoration-thickness: 2px; }
img { max-width: 100%; display: block; }

.wrap { width: 100%; max-width: var(--page); margin: 0 auto; padding: 0 16px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 10; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); background: rgba(242, 238, 227, 0.92); border-bottom: 2px solid var(--border-default); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text-primary); font: 600 19px/1.2 var(--font-heading); }
.brand img { width: 40px; height: 13px; image-rendering: pixelated; }
.site-nav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a { flex: none; }
.site-nav a { font: 600 13px/16px var(--font-body); color: var(--text-primary); text-decoration: none; padding: 9px 12px; border-radius: 0; border: 2px solid var(--border-default); background: var(--surface-primary); }
.site-nav a:hover, .site-nav a[aria-current="page"] { border: 2px solid var(--border-default); background: var(--accent-subtle); }

/* Receipt card */
.card { background: var(--surface-primary); border: 2px solid var(--border-default); border-radius: var(--radius-card); box-shadow: var(--shadow-card); padding: 20px; }
.perf { border: 0; border-top: 2px dashed var(--border-default); margin: 16px 0; }
.eyebrow { font: 600 13px/18px var(--font-body); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-tertiary); margin: 0 0 8px; }
.lead { font-size: 17px; line-height: 26px; color: var(--text-secondary); margin: 12px 0 0; }

/* Landing */
.hero { display: grid; gap: 24px; padding-block: 40px 24px; align-items: center; }
.hero h1 { font-size: clamp(34px, 7vw, 54px); line-height: 1.08; letter-spacing: -0.5px; font-weight: 700; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.btn { display: inline-flex; align-items: center; justify-content: center; height: 52px; padding: 0 22px; border-radius: 0; font: 600 16px/21px var(--font-body); text-decoration: none; }
.btn-primary { background: var(--action-primary); color: var(--text-inverse); }
.btn-secondary { border: 2px solid var(--action-primary); color: var(--action-primary); background: transparent; }
.hero-receipt { max-width: 380px; width: 100%; justify-self: center; }
.hero-receipt .amount-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.amount-label { font: 600 14px/19px var(--font-body); color: var(--text-tertiary); }
.amount { font: 700 40px/48px var(--font-mono); letter-spacing: -0.4px; }
.amount-note { font-size: 13px; line-height: 18px; color: var(--text-secondary); }
.hero-train { width: 120px; height: auto; flex: none; image-rendering: pixelated; }
.receipt-lines { margin: 0; padding: 0; list-style: none; }
.receipt-lines li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--border-subtle); font-size: 15px; line-height: 20px; }
.receipt-lines li span:first-child { color: var(--text-secondary); }
.receipt-lines li span:last-child { font-weight: 600; text-align: right; }

.section { padding-block: 32px; }
.section-head { max-width: 640px; margin-bottom: 20px; }
.section-head h2 { font-size: clamp(26px, 5vw, 34px); line-height: 1.2; letter-spacing: -0.4px; font-weight: 700; }
.steps { display: grid; gap: 12px; }
.step { display: flex; gap: 14px; align-items: flex-start; }
.step img { width: 64px; height: 64px; border-radius: 0; flex: none; }
.step h3 { font-size: 20px; line-height: 26px; font-weight: 700; }
.step p { margin: 4px 0 0; color: var(--text-secondary); font-size: 15px; line-height: 24px; }
.step-num { font: 600 12px/16px var(--font-body); color: var(--accent-text); background: var(--accent); border-radius: 0; padding: 2px 8px; display: inline-block; margin-bottom: 6px; }

.terms-grid { display: grid; gap: 12px; }
.terms-grid .card h3 { font: 600 14px/19px var(--font-body); color: var(--text-tertiary); }
.terms-grid .figure { font: 700 28px/34px var(--font-heading); letter-spacing: -0.4px; margin-top: 4px; }
.fine { font-size: 13px; line-height: 20px; color: var(--text-secondary); }

.notice { display: flex; gap: 16px; align-items: flex-start; background: var(--accent-subtle); border: 2px solid var(--border-default); border-radius: var(--radius-card); padding: 20px; }
.notice img { width: 56px; height: auto; margin-top: 6px; flex: none; image-rendering: pixelated; }
.notice h2 { font-size: 22px; line-height: 28px; font-weight: 700; }
.notice p { margin: 6px 0 0; color: var(--text-secondary); font-size: 15px; line-height: 24px; }

.faq { display: grid; gap: 8px; }
.faq-item { background: var(--surface-primary); border-radius: 0; border: 2px solid var(--border-default); }
.faq-item summary { cursor: pointer; list-style: none; padding: 16px 48px 16px 18px; font: 600 16px/21px var(--font-body); position: relative; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font: 600 22px/1 var(--font-body); color: var(--action-primary); }
.faq-item[open] summary::after { content: "–"; }
.faq-item[open] { border-color: var(--accent); }
.faq-item p { margin: 0; padding: 0 18px 16px; color: var(--text-secondary); font-size: 15px; line-height: 24px; }

.company { display: grid; gap: 12px; }
.company dl { margin: 0; display: grid; gap: 10px; }
.company dt { font: 600 13px/18px var(--font-body); color: var(--text-tertiary); }
.company dd { margin: 0; font-size: 15px; line-height: 22px; }

/* Legal pages */
.legal { padding: 24px 0 40px; }
.legal .card { max-width: 760px; margin: 0 auto; padding: 24px 20px 32px; }
.legal h1 { font-size: clamp(30px, 6vw, 40px); line-height: 1.15; letter-spacing: -0.4px; font-weight: 700; }
.legal h2 { font-size: 20px; line-height: 26px; font-weight: 700; margin: 28px 0 8px; padding-top: 20px; border-top: 1.5px dashed var(--border-subtle); }
.legal p { margin: 0 0 12px; font-size: 15px; line-height: 24px; color: var(--text-secondary); }
.legal p.legal-meta { font-size: 13px; line-height: 18px; color: var(--text-tertiary); margin-top: 8px; }
.legal-facts { list-style: none; margin: 0 0 12px; padding: 0; }
.legal-facts li { padding: 10px 0; border-bottom: 1px dashed var(--border-subtle); font-size: 15px; line-height: 22px; overflow-wrap: anywhere; }
.legal-facts li span { display: block; font: 600 13px/18px var(--font-body); color: var(--text-tertiary); }
.legal a { overflow-wrap: anywhere; }

/* Footer */
.site-footer { border-top: 1px dashed var(--border-subtle); margin-top: 24px; padding: 24px 0 40px; font-size: 13px; line-height: 20px; color: var(--text-secondary); }
.site-footer .wrap { display: grid; gap: 10px; }
.site-footer nav { display: flex; gap: 16px; flex-wrap: wrap; }

@media (min-width: 760px) {
  .hero { grid-template-columns: 1.15fr 1fr; padding-block: 64px 40px; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .step { flex-direction: column; }
  .terms-grid { grid-template-columns: repeat(3, 1fr); }
  .company { grid-template-columns: 1fr 1fr; }
  .legal .card { padding: 40px 48px 48px; }
}
