/* Bunari website: one stylesheet for every page. Colours match src/theme/tokens.ts (Warm light and Dark);
   the page follows the visitor's light or dark setting. No inline styles anywhere (the CSP in _headers forbids them). */

@font-face { font-family: 'Bricolage Grotesque'; font-weight: 500; font-display: swap; src: url('/fonts/BricolageGrotesque_500Medium.ttf') format('truetype'); }
@font-face { font-family: 'Bricolage Grotesque'; font-weight: 600; font-display: swap; src: url('/fonts/BricolageGrotesque_600SemiBold.ttf') format('truetype'); }
@font-face { font-family: 'Hanken Grotesk'; font-weight: 400; font-display: swap; src: url('/fonts/HankenGrotesk_400Regular.ttf') format('truetype'); }
@font-face { font-family: 'Hanken Grotesk'; font-weight: 500; font-display: swap; src: url('/fonts/HankenGrotesk_500Medium.ttf') format('truetype'); }
@font-face { font-family: 'Hanken Grotesk'; font-weight: 600; font-display: swap; src: url('/fonts/HankenGrotesk_600SemiBold.ttf') format('truetype'); }
@font-face { font-family: 'Hanken Grotesk'; font-weight: 700; font-display: swap; src: url('/fonts/HankenGrotesk_700Bold.ttf') format('truetype'); }

:root {
  --bg: #f3eadc;
  --band: #ede2d2;
  --surface: #eadfce;
  --line: rgba(63, 43, 26, 0.13);
  --line-strong: rgba(63, 43, 26, 0.22);
  --text: #2b2118;
  --soft: #4a3b2d;
  --dim: #675440;
  --accent: #874512;
  --accent-hover: #6b360d;
  --accent-soft: rgba(168, 100, 39, 0.14);
  --on-accent: #fffaf2;
  --select: rgba(168, 100, 39, 0.28);
  --scroll-thumb: #c9b497;
  --scroll-hover: #a8742f;
  --scrim: rgba(43, 33, 24, 0.45);
  --heading: 'Bricolage Grotesque', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --body: 'Hanken Grotesk', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --page: 1160px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0a09;
    --band: #0f0d0b;
    --surface: #161310;
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.14);
    --text: #f3efe8;
    --soft: #b9b0a3;
    --dim: #8b8378;
    --accent: #d99a52;
    --accent-hover: #f0b877;
    --accent-soft: rgba(217, 154, 82, 0.15);
    --on-accent: #1a120a;
    --select: rgba(217, 154, 82, 0.38);
    --scroll-thumb: #3d3226;
    --scroll-hover: #8a6236;
    --scrim: rgba(0, 0, 0, 0.65);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scrollbar-color: var(--scroll-thumb) var(--bg); -webkit-text-size-adjust: 100%; }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--scroll-thumb); border: 3px solid var(--bg); border-radius: 12px; }
::-webkit-scrollbar-thumb:hover { background: var(--scroll-hover); }
::selection { background: var(--select); color: var(--text); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }

.skip-link { position: absolute; left: 16px; top: -48px; padding: 8px 14px; border-radius: 10px; background: var(--accent); color: var(--on-accent); font-weight: 600; text-decoration: none; z-index: 10; }
.skip-link:focus { top: 12px; color: var(--on-accent); }

.wrap { max-width: var(--page); margin: 0 auto; padding-inline: 24px; }
.kicker { color: var(--accent); font-size: 12px; font-weight: 600; letter-spacing: 1.6px; text-transform: uppercase; }
.display { font-family: var(--heading); font-weight: 600; }
.placeholder { color: var(--accent); font-weight: 600; }

/* Header and footer */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 18px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand:hover { color: var(--text); }
.brand img { width: 38px; height: 38px; }
.brand span { font-family: var(--heading); font-weight: 600; font-size: 21px; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a { color: var(--dim); font-size: 15px; text-decoration: none; }
.nav a:hover, .nav a[aria-current='page'] { color: var(--text); }

.site-footer { border-top: 1px solid var(--line); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; padding-block: 32px; color: var(--dim); font-size: 14px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 24px; }
.site-footer a { color: var(--dim); text-decoration: none; }
.site-footer a:hover { color: var(--text); }

/* Sections */
.section { border-top: 1px solid var(--line); }
.section.band { background: var(--band); }
.section > .wrap { padding-block: 88px; }
.stack { display: flex; flex-direction: column; gap: 20px; }
.intro { display: flex; flex-direction: column; gap: 12px; max-width: 640px; }
.h2 { font-family: var(--heading); font-weight: 600; font-size: 40px; line-height: 1.1; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px; align-items: center; }
.two > * { min-width: 0; }

/* Hero */
.hero .wrap { padding-block: 88px 72px; }
.hero h1 { font-family: var(--heading); font-weight: 600; font-size: 64px; line-height: 1.04; letter-spacing: -1px; }
.hero .lede { color: var(--soft); font-size: 19px; max-width: 30em; }
.store-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.store-badge { text-decoration: none; display: inline-flex; align-items: center; gap: 10px; min-height: 54px; padding: 0 22px; border-radius: 14px; background: var(--text); color: var(--bg); font-weight: 600; font-size: 15px; }
.store-badge:hover { color: var(--bg); opacity: 0.88; }
.cta .store-badge:hover { color: var(--on-accent); }
.store-note { color: var(--dim); font-size: 14px; }
.hero-phone { display: flex; justify-content: center; }

/* Phone frames around screenshots */
.phone { width: 100%; max-width: 300px; border-radius: 46px; border: 1px solid var(--line-strong); background: var(--surface); padding: 12px; }
.phone picture, .phone img { border-radius: 34px; overflow: hidden; width: 100%; }
.shot { width: 100%; max-width: 280px; border-radius: 38px; border: 1px solid var(--line-strong); overflow: hidden; background: var(--bg); }
.shot img { width: 100%; }

/* How it works */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; }
.steps li { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.steps .number { font-family: var(--heading); font-weight: 600; font-size: 15px; color: var(--accent); }
.steps .title { font-family: var(--heading); font-weight: 600; font-size: 22px; }
.steps .text { color: var(--dim); font-size: 15px; }

/* Feature cards */
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.card { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 24px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); }
.card svg { color: var(--accent); }
.card h3 { font-size: 18px; font-weight: 600; }
.card p { color: var(--dim); font-size: 15px; }

/* Private section */
.points { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; list-style: none; }
.point { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); }
.point .icon { flex-shrink: 0; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); }
.point strong { display: block; font-weight: 600; }
.point span.text { display: block; color: var(--dim); font-size: 15px; }
.private-shot { display: flex; justify-content: center; }
.private-shot picture { width: 100%; max-width: 440px; border-radius: 28px; border: 1px solid var(--line-strong); overflow: hidden; }
.soft { color: var(--soft); }
.dim { color: var(--dim); font-size: 15px; }

/* A look inside */
.shots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.shots figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.shots figcaption { color: var(--dim); font-size: 15px; text-align: center; }

/* Closing call to action */
.cta .wrap { max-width: 760px; display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center; }
.cta img { width: 88px; height: 88px; }
.cta .h2 { font-size: 44px; }
.cta .store-badge { background: var(--accent); color: var(--on-accent); }

/* Text pages: privacy, support, terms */
.doc { max-width: 720px; margin: 0 auto; padding: 72px 24px 96px; display: flex; flex-direction: column; gap: 40px; }
.doc header { display: flex; flex-direction: column; gap: 14px; }
.doc h1 { font-family: var(--heading); font-weight: 600; font-size: 48px; line-height: 1.08; }
.doc h2 { font-family: var(--heading); font-weight: 600; font-size: 24px; line-height: 1.2; }
.doc section { display: flex; flex-direction: column; gap: 12px; }
.doc p, .doc ul { color: var(--soft); }
.doc ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.doc strong { color: var(--text); }
.doc .meta { color: var(--dim); font-size: 15px; }

.contact { display: flex; flex-direction: column; gap: 8px; padding: 24px; border-radius: 20px; border: 1px solid var(--accent); background: var(--surface); }
.contact .address { font-family: var(--heading); font-weight: 500; font-size: 26px; overflow-wrap: anywhere; }
.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 18px; color: var(--text); }
.faq details p { margin-top: 12px; }

/* Popups for privacy, support and terms: each opens at its own address (/#privacy, /#support, /#terms)
   with CSS :target, so they work without JavaScript; modal.js only moves focus and closes on Escape. */
.modal { display: none; position: fixed; inset: 0; z-index: 50; padding: 16px; align-items: center; justify-content: center; }
.modal:target { display: flex; }
html:has(.modal:target) { overflow: hidden; }
.modal-backdrop { position: absolute; inset: 0; background: var(--scrim); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.modal-card.doc { position: relative; width: 100%; max-width: 720px; max-height: calc(100dvh - 32px); margin: 0; padding: 24px 32px 40px; gap: 32px; overflow-y: auto; overscroll-behavior: contain; border-radius: 24px; border: 1px solid var(--line-strong); background: var(--bg); box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35); }
.modal-close { position: sticky; top: 0; z-index: 1; align-self: flex-end; flex-shrink: 0; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-bottom: -76px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.modal-close:hover { color: var(--accent); }
.modal-close:focus-visible { border-radius: 50%; }
.modal-head { padding-right: 56px; }
.modal h1:focus { outline: none; }

.not-found { min-height: 60vh; display: flex; flex-direction: column; justify-content: center; }

/* Phones and small tablets */
@media (max-width: 860px) {
  .two, .steps, .features, .shots { grid-template-columns: minmax(0, 1fr); }
  .section > .wrap { padding-block: 64px; }
  .hero .wrap { padding-block: 56px 48px; }
  .hero h1 { font-size: 44px; }
  .h2, .cta .h2 { font-size: 32px; }
  .doc h1 { font-size: 38px; }
  .modal { padding: 8px; }
  .modal-card.doc { max-height: calc(100dvh - 16px); padding: 16px 20px 32px; border-radius: 20px; }
  .modal-card.doc h1 { font-size: 32px; }
  .nav .optional { display: none; }
  .nav { gap: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
