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

:root {
  --bg-primary: #FAF8F6;
  --bg-inverse: #141210;
  --surface-primary: #FFFFFF;
  --surface-secondary: #F5F5F4;
  --surface-tertiary: #E7E5E4;
  --text-primary: #141210;
  --text-secondary: #44403C;
  --text-tertiary: #716A65;
  --text-disabled: #716A65;
  --text-inverse: #FFFFFF;
  --text-link: #B84300;
  --text-error: #C13434;
  --accent: #F05A14;
  --accent-subtle: #FFF1E6;
  --accent-text: #FFFFFF;
  --action-primary: #F05A14;
  --action-disabled: #E7E5E4;
  --action-tertiary-hover: #FFF1E6;
  --border-default: #D6D3D1;
  --border-subtle: #E7E5E4;
  --border-action: #F05A14;
  --border-error: #C13434;
  --glow: linear-gradient(#FFE9D8 0, #FCF3EC 276px, #FAF8F6 460px);
  --font-heading: "Inter", -apple-system, system-ui, sans-serif;
  --font-body: "Inter", -apple-system, system-ui, sans-serif;
  --shadow-card: 0 4px 12px rgba(27, 15, 8, 0.08);
  --radius-card: 12px;
  --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;
}
/* Background / Glow from the design: top of the page, blends into the page colour */
body::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 460px; z-index: -1;
  background: var(--glow);
}
h1, h2, h3 { font-family: var(--font-heading); letter-spacing: -0.3px; 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(250, 248, 246, 0.8); border-bottom: 1px solid 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; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text-primary); font: 600 19px/1.2 var(--font-heading); }
.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; font: 600 13px/16px var(--font-body); color: var(--text-tertiary); text-decoration: none; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--border-subtle); background: var(--surface-primary); }
.site-nav a:hover, .site-nav a[aria-current="page"] { border-color: var(--border-action); background: var(--action-tertiary-hover); color: var(--text-link); }

/* Icon Tile (design): peach tile, orange 20px icon; .s = estimate rows */
.icon-tile { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--accent-subtle); }
.icon-tile.s { width: 32px; height: 32px; border-radius: 10px; }
.icon-tile .icon { position: relative; width: 20px; height: 20px; overflow: hidden; }
.icon-tile .icon img { position: absolute; max-width: none; }

/* Plan sheet (design): white card pinned with two strips of masking tape */
.card { background: var(--surface-primary); border-radius: var(--radius-card); box-shadow: var(--shadow-card); padding: 20px; }
.sheet { position: relative; padding: 24px 20px; }
.sheet::before, .sheet::after { content: ""; position: absolute; width: 72px; height: 22px; background: var(--surface-tertiary); }
.sheet::before { left: 19px; top: -9px; transform: rotate(6deg); }
.sheet::after { right: 21px; top: -17px; transform: rotate(-5deg); }
.perf { border: 0; border-top: 1px solid 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: 32px; 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: 12px; flex-wrap: wrap; margin-top: 24px; }
.btn { display: inline-flex; align-items: center; justify-content: center; height: 56px; padding: 0 24px; border-radius: 16px; font: 600 16px/21px var(--font-body); letter-spacing: -0.15px; text-decoration: none; }
.btn-primary { background: var(--action-primary); color: var(--text-inverse); }
.btn-secondary { background: var(--surface-secondary); color: var(--text-primary); }
.hero-receipt { max-width: 380px; width: 100%; justify-self: center; display: grid; gap: 24px; }
.amount-summary { background: var(--surface-secondary); border-radius: 16px; padding: 16px; display: grid; gap: 4px; }
.amount-label { font: 500 14px/19px var(--font-body); letter-spacing: -0.1px; color: var(--text-secondary); }
.amount { font: 700 34px/41px var(--font-heading); letter-spacing: -0.3px; }
.amount-note { font-size: 12px; line-height: 16px; color: var(--text-tertiary); }
.receipt-lines { margin: 0; padding: 16px; list-style: none; border: 1px solid var(--border-subtle); border-radius: 12px; display: grid; gap: 12px; }
.receipt-lines li { display: flex; align-items: center; gap: 12px; font-size: 16px; line-height: 21px; letter-spacing: -0.15px; }
.receipt-lines li span.label { flex: 1; color: var(--text-secondary); }
.receipt-lines li span.value { 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 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: 20px; letter-spacing: -0.1px; }
.step-num { font: 600 12px/16px var(--font-body); color: var(--text-inverse); background: var(--bg-inverse); border-radius: 8px; padding: 4px 8px; display: inline-block; margin-bottom: 8px; }

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

.notice { display: flex; gap: 16px; align-items: flex-start; background: var(--surface-primary); border: 1px solid var(--border-subtle); border-radius: var(--radius-card); padding: 20px; }
.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: 12px; 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(--border-action); }
.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; }
/* Back Button M (design 2016:5226): 44×44, orange outline, radius 16, Chevron Left 20 */
.legal-nav { max-width: 760px; margin: 0 auto 12px; }
.back-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--border-action); border-radius: 16px; }
.back-btn:hover { background: var(--action-tertiary-hover); }
.back-btn img { width: 20px; height: 20px; }
.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: 25px; font-weight: 600; letter-spacing: -0.25px; margin: 28px 0 8px; padding-top: 20px; border-top: 1px solid 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 solid 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, .legal p, .legal li { overflow-wrap: anywhere; }

/* Footer */
.site-footer { border-top: 1px solid 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; }
}
