/* Benza website. Palette mirrors App/Theme.swift and the BenzaBackground colour set. */
:root {
  color-scheme: light dark;
  --bg: #f8f7f4;
  --paper: #ffffff;
  --ink: #202023;
  --secondary: #626169;
  --line: #e5e3df;
  --soft: #efeeeb;
  --accent: #b94020;
  --accent-ink: #ffffff;
  --saving: #18723d;
  --cost: #b42332;
  --shadow: 0 1px 2px rgba(32, 32, 35, .06), 0 12px 32px rgba(32, 32, 35, .08);
  --radius: 22px;
  --rounded: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --text: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171719;
    --paper: #222225;
    --ink: #f4f2ed;
    --secondary: #b3b0b7;
    --line: #3c3b40;
    --soft: #303034;
    --accent: #ff9b76;
    --accent-ink: #261a16;
    --saving: #79d99b;
    --cost: #ff929a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px rgba(0, 0, 0, .35);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 var(--text);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--rounded); line-height: 1.12; letter-spacing: -.02em; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 6vw, 3.9rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.3rem); font-weight: 750; }
h3 { font-size: 1.2rem; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); padding: 8px 14px; border-radius: 10px; z-index: 10; }
.skip:focus { left: 16px; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); margin-inline: auto; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); position: sticky; top: 0; z-index: 5; }
.site-header .wrap { display: flex; align-items: center; gap: 12px 24px; min-height: 64px; flex-wrap: wrap; padding-block: 8px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 800 1.35rem/1 var(--rounded); letter-spacing: -.02em; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.site-nav { display: flex; gap: 4px 18px; margin-left: auto; flex-wrap: wrap; align-items: center; font-size: .95rem; }
.site-nav a { color: var(--secondary); text-decoration: none; padding: 6px 2px; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }
.site-nav a[aria-current="page"] { font-weight: 600; }
.lang-switch { border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px !important; }

/* Hero */
.hero { padding: clamp(40px, 8vw, 96px) 0 clamp(40px, 6vw, 72px); }
.hero .wrap { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
.eyebrow { font: 700 .78rem/1.2 var(--text); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.lead { font-size: clamp(1.1rem, 2.2vw, 1.3rem); color: var(--secondary); max-width: 34em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 28px 0 22px; }
.pill { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 22px; border-radius: 999px; font-weight: 650; text-decoration: none; }
.pill.primary { background: var(--accent); color: var(--accent-ink); }
.pill.ghost { color: var(--ink); border: 1px solid var(--line); background: var(--paper); }
.pill svg { width: 20px; height: 20px; flex: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; list-style: none; }
.chips li { font-size: .88rem; color: var(--secondary); background: var(--soft); border-radius: 999px; padding: 5px 12px; }

/* Phones */
.phone { margin: 0; justify-self: center; width: min(300px, 78vw); border-radius: 44px; padding: 9px; background: #1d1d20; box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 255, 255, .08); }
.phone img { border-radius: 36px; width: 100%; aspect-ratio: 640 / 1391; background: var(--soft); }
.phone figcaption { display: none; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 3vw, 36px); margin-top: 36px; }
.gallery figure { margin: 0; }
.gallery .phone { width: 100%; max-width: 280px; }
.gallery figcaption.below { margin-top: 16px; text-align: center; color: var(--secondary); font-size: .95rem; padding-inline: 6px; }

/* Sections */
section.band { padding: clamp(48px, 8vw, 96px) 0; }
section.band.alt { background: var(--paper); border-block: 1px solid var(--line); }
.section-head { max-width: 42em; margin-bottom: 36px; }
.section-head p:not(.eyebrow) { color: var(--secondary); font-size: 1.1rem; }

.formula { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: stretch; gap: 14px; }
.term { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
section.band:not(.alt) .term { background: var(--paper); }
.term strong { display: block; font: 750 1.15rem/1.25 var(--rounded); margin-bottom: 6px; }
.term span { color: var(--secondary); font-size: .95rem; }
.term.result { border-color: color-mix(in srgb, var(--saving) 45%, var(--line)); }
.term.result strong { color: var(--saving); }
.op { display: grid; place-items: center; font: 800 2rem/1 var(--rounded); color: var(--secondary); }

.example { margin-top: 28px; border-radius: var(--radius); border: 1px dashed var(--line); padding: 22px 24px; }
.example h3 { margin-bottom: 12px; }
.example table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.example td { padding: 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.example td:last-child { text-align: right; white-space: nowrap; padding-left: 16px; font-weight: 600; }
.example tr:last-child td { border-bottom: 0; font-weight: 750; }
.example .plus { color: var(--saving); }
.example .minus { color: var(--cost); }
.example small { display: block; color: var(--secondary); margin-top: 10px; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 0; margin: 0; list-style: none; }
.features li { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
section.band.alt .features li { background: var(--bg); }
.features .icon { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); margin-bottom: 16px; }
.features .icon svg { width: 22px; height: 22px; }
.features p { color: var(--secondary); margin: 0; font-size: .97rem; }

.callout { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: 28px; padding: clamp(24px, 4vw, 40px); }
.callout .shield { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); }
.callout .shield svg { width: 32px; height: 32px; }
.callout h2 { margin-bottom: .3em; }
.callout p { color: var(--secondary); margin: 0; }

/* Text pages */
.doc { padding: clamp(36px, 6vw, 72px) 0 clamp(48px, 8vw, 96px); }
.doc h1 { font-size: clamp(2rem, 5vw, 3rem); }
.doc .meta { color: var(--secondary); font-size: .95rem; margin-bottom: 28px; }
.doc h2 { font-size: clamp(1.35rem, 3vw, 1.65rem); margin-top: 2em; padding-top: .2em; scroll-margin-top: 90px; }
.doc h3 { margin-top: 1.6em; }
.doc ul, .doc ol { padding-left: 1.3em; margin: 0 0 1em; }
.doc li { margin-bottom: .45em; }
.doc li::marker { color: var(--secondary); }
.summary { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin: 8px 0 28px; }
.summary ul { margin: 0; }
.summary li:last-child { margin-bottom: 0; }
.toc { border-left: 3px solid var(--line); padding: 2px 0 2px 18px; margin: 0 0 8px; }
.toc ol { margin: 0; }
.toc a { color: var(--ink); text-decoration: none; }
.toc a:hover { color: var(--accent); }
.table-scroll { overflow-x: auto; margin: 0 0 1.2em; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); }
.doc table { width: 100%; border-collapse: collapse; font-size: .95rem; min-width: 560px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.doc th { font-weight: 650; background: var(--soft); }
.doc tr:last-child td { border-bottom: 0; }
.contact-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin: 8px 0 32px; }
.contact-card p { margin: 0; color: var(--secondary); }
.contact-card strong { display: block; color: var(--ink); font: 700 1.15rem/1.3 var(--rounded); }
details { border-bottom: 1px solid var(--line); padding: 4px 0; }
details:first-of-type { border-top: 1px solid var(--line); }
summary { cursor: pointer; list-style: none; padding: 14px 32px 14px 0; font-weight: 650; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 4px; top: 10px; font: 400 1.5rem/1 var(--rounded); color: var(--secondary); }
details[open] summary::after { content: "−"; }
details > :not(summary) { color: var(--secondary); }
details > p:last-child, details > ul:last-child { margin-bottom: 16px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0 44px; color: var(--secondary); font-size: .92rem; }
.site-footer .wrap { display: grid; grid-template-columns: 1fr auto; gap: 18px 32px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 20px; justify-content: flex-end; }
.site-footer a { color: var(--secondary); }
.site-footer a:hover { color: var(--ink); }
.site-footer p { margin: 0; }
.site-footer .source { grid-column: 1 / -1; font-size: .85rem; }

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .formula { grid-template-columns: 1fr; }
  .op { padding: 0; font-size: 1.6rem; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .site-header { position: static; }
  .site-nav { margin-left: 0; width: 100%; gap: 2px 16px; }
  .features { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; justify-items: center; }
  .gallery figure { width: min(280px, 82vw); }
  .callout { grid-template-columns: 1fr; }
  .site-footer .wrap { grid-template-columns: 1fr; }
  .site-footer nav { justify-content: flex-start; }
}
.note { margin-top: 28px; color: var(--secondary); }
@media (max-width: 640px) {
  .doc table { min-width: 0; }
  .doc thead { display: none; }
  .doc table, .doc tbody, .doc tr, .doc td { display: block; }
  .doc tr { border-bottom: 1px solid var(--line); padding: 6px 0; }
  .doc tr:last-child { border-bottom: 0; }
  .doc td { border: 0; padding: 6px 16px; }
  .doc td[data-label]::before { content: attr(data-label); display: block; font-size: .78rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--secondary); }
}
