/* Site design system: landing (index.php) + legal pages. Tokens from the app design (Figma). */
@font-face { font-family: "DM Sans"; src: url("fonts/DMSans.ttf") format("truetype"); font-weight: 100 1000; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("fonts/Fraunces.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }

:root {
  --bg-primary: #F6ECDB;
  --surface-primary: #FFFCF6;
  --text-primary: #1E140E;
  --text-secondary: #48372A;
  --text-tertiary: #76604B;
  --text-inverse: #FFFCF6;
  --text-link: #873217;
  --accent: #E3A23B;
  --accent-subtle: #F8E5BE;
  --accent-text: #261A13;
  --action-primary: #AD4422;
  --action-tertiary-hover: #F6DCCB;
  --border-default: #866D54;
  --border-subtle: #E5D5BC;
  --font-heading: "Fraunces", Georgia, serif;
  --font-body: "DM Sans", -apple-system, system-ui, sans-serif;
  --shadow-card: 0 6px 10px rgba(38, 26, 18, 0.08);
  --radius-card: 20px;
  --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);
  font-variation-settings: "opsz" 14;
  min-height: 100vh;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1;
  background: linear-gradient(rgba(246, 236, 219, 0.3), rgba(246, 236, 219, 0.3)), url("form/background.jpg") center top / cover no-repeat;
}
h1, h2, h3 { font-family: var(--font-heading); font-variation-settings: "SOFT" 0, "WONK" 1; 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(246, 236, 219, 0.72); border-bottom: 1px dashed var(--border-subtle); }
.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; }
.site-head-start { display: flex; align-items: center; gap: 12px; min-width: 0; }
.site-back { flex: none; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; padding: 0; border: 1px solid var(--action-primary); border-radius: 16px; background: transparent; cursor: pointer; }
.site-back[hidden] { display: none; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text-primary); font: 600 19px/1.2 var(--font-heading); font-variation-settings: "SOFT" 0, "WONK" 1; }
.brand img { width: 36px; height: 36px; border-radius: 10px; }
.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: 10px; border: 1px dashed var(--border-default); background: var(--surface-primary); }
.site-nav a:hover, .site-nav a[aria-current="page"] { border: 1px solid var(--accent); background: var(--accent-subtle); }

/* Receipt card */
.card { background: var(--surface-primary); border-radius: var(--radius-card); box-shadow: var(--shadow-card); padding: 20px; }
.perf { border: 0; border-top: 1.5px dashed var(--border-subtle); 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: 16px; font: 600 16px/21px var(--font-body); text-decoration: none; }
.btn-primary { background: var(--action-primary); color: var(--text-inverse); }
.btn-secondary { border: 1px 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-heading); letter-spacing: -0.4px; font-variation-settings: "SOFT" 0, "WONK" 1; }
.amount-note { font-size: 13px; line-height: 18px; color: var(--text-secondary); }
.bills { position: relative; width: 124px; height: 108px; flex: none; }
.bills img { position: absolute; width: 112px; height: 60px; object-fit: cover; box-shadow: 0 2px 2px rgba(44, 25, 18, 0.06), 0 0 1px rgba(44, 25, 18, 0.07); }
.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: 16px; 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: 8px; 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; font-variation-settings: "SOFT" 0, "WONK" 1; }
.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-radius: var(--radius-card); padding: 20px; }
.notice img { width: 56px; height: 56px; border-radius: 14px; flex: none; }
.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: 14px; border: 1px solid var(--border-subtle); }
.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; }
}
