/* Building Unity — shared site styles. Brand tokens mirror lib/core/theme/app_colors.dart */
:root {
  --primary: #5B2C82;
  --primary-strong: #47206a;
  --on-primary: #ffffff;
  --gold: #A66F1E;
  --accent: #D6145F;
  --bg: #F5EFFA;
  --surface: #ffffff;
  --surface-2: #FBF8FD;
  --text: #241226;
  --text-2: #6B5E75;
  --divider: #E5DCEF;
  --success: #4B9A6D;
  --error: #C1493F;
  --shadow: 0 1px 2px rgba(36, 18, 38, .06), 0 8px 24px rgba(91, 44, 130, .08);
  --radius: 18px;
  --maxw: 1120px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --primary: #E8A830;
    --primary-strong: #f3bd55;
    --on-primary: #241226;
    --gold: #E8A830;
    --accent: #F0447C;
    --bg: #1B0730;
    --surface: #271140;
    --surface-2: #331854;
    --text: #F8F3FF;
    --text-2: #C4AED9;
    --divider: #3D2456;
    --success: #5FBF87;
    --error: #E2574C;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-underline-offset: 2px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); font-weight: 750; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }

.skip-link { position: absolute; left: -9999px; top: 8px; background: var(--surface); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .container { padding: 0 28px; } }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--divider);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 800; font-size: 1.1rem; letter-spacing: -0.01em; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.nav-links { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a { display: block; padding: 8px 12px; border-radius: 10px; color: var(--text-2); text-decoration: none; font-weight: 550; font-size: .95rem; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); background: var(--surface); }
.nav-toggle { display: none; background: none; border: 1px solid var(--divider); border-radius: 10px; width: 42px; height: 42px; color: var(--text); cursor: pointer; }
.nav-toggle svg { margin: auto; }
@media (max-width: 760px) {
  .nav-toggle { display: grid; place-items: center; }
  .nav-links { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; background: var(--bg); border-bottom: 1px solid var(--divider); padding: 8px 16px 16px; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 12px 22px; border-radius: 999px; font-weight: 650; text-decoration: none; border: 1px solid transparent; font-size: 1rem; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-strong); color: var(--on-primary); }
.btn-ghost { border-color: var(--divider); color: var(--text); background: var(--surface); }
.btn-ghost:hover { color: var(--text); border-color: var(--primary); }
.store-btn {
  display: inline-flex; align-items: center; gap: 12px; padding: 10px 20px 10px 16px;
  background: #0f0a14; color: #fff; border-radius: 14px; text-decoration: none; border: 1px solid #3a2e44;
  cursor: default;
}
.store-btn svg { width: 26px; height: 26px; flex: none; }
.store-btn small { display: block; font-size: .72rem; opacity: .8; line-height: 1.1; }
.store-btn strong { display: block; font-size: 1.1rem; line-height: 1.2; font-weight: 650; }
@media (prefers-color-scheme: dark) { .store-btn { background: #fff; color: #0f0a14; border-color: #fff; } }

/* Hero */
.hero { padding: 56px 0 40px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40% -20% auto auto; width: 70vw; height: 70vw; max-width: 780px; max-height: 780px;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%);
  pointer-events: none; z-index: 0;
}
.hero-grid { display: grid; gap: 40px; align-items: center; position: relative; z-index: 1; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.1fr .9fr; } .hero { padding: 88px 0 64px; } }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); margin-bottom: 14px; }
.hero .lead { font-size: 1.2rem; color: var(--text-2); max-width: 36ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; align-items: center; }
.hero-note { font-size: .9rem; color: var(--text-2); margin-top: 16px; }
.hero-art { display: flex; justify-content: center; }
.hero-art .phone { max-width: 290px; transform: rotate(2deg); }

/* Sections */
section { padding: 64px 0; }
.section-head { max-width: 680px; margin-bottom: 36px; }
.section-head p { color: var(--text-2); font-size: 1.08rem; }
.alt { background: var(--surface-2); border-top: 1px solid var(--divider); border-bottom: 1px solid var(--divider); }

.grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 620px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--surface); border: 1px solid var(--divider); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card h3 { display: flex; align-items: center; gap: 10px; }
.card p { color: var(--text-2); margin: 0; font-size: .98rem; }
.icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none;
  background: color-mix(in srgb, var(--primary) 12%, transparent); color: var(--primary); font-size: 1.2rem; }
.card ul { margin: .5em 0 0; padding-left: 1.1em; color: var(--text-2); font-size: .95rem; }

/* Gallery */
.gallery { display: grid; gap: 28px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 900px) { .gallery { grid-template-columns: repeat(3, 1fr); gap: 40px; } }
@media (max-width: 420px) { .gallery { grid-template-columns: 1fr; padding: 0 24px; } }
.gallery figure { margin: 0; text-align: center; }
.gallery figcaption { margin-top: 14px; font-weight: 600; font-size: .98rem; color: var(--text); }
.phone {
  background: #120a18; border-radius: 42px; padding: 10px; box-shadow: 0 20px 50px rgba(36, 18, 38, .22), inset 0 0 0 2px #2c2233;
  aspect-ratio: 1320 / 2868; width: 100%; max-width: 280px; margin: 0 auto; position: relative;
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 33px; background: var(--surface-2); }
@media (max-width: 620px) { .phone { border-radius: 28px; padding: 6px; } .phone img { border-radius: 23px; } }

/* Notice / safety */
.notice { border-left: 4px solid var(--accent); background: var(--surface); border-radius: 12px; padding: 18px 20px; box-shadow: var(--shadow); }
.notice strong { color: var(--text); }
.crisis { display: grid; gap: 12px; grid-template-columns: 1fr; margin-top: 16px; }
@media (min-width: 720px) { .crisis { grid-template-columns: repeat(3, 1fr); } }
.crisis .card h3 { font-size: 1.05rem; }
.crisis a { font-weight: 700; }

/* FAQ */
.faq { display: grid; gap: 12px; max-width: 820px; }
.faq details { background: var(--surface); border: 1px solid var(--divider); border-radius: 14px; padding: 4px 20px; }
.faq summary { cursor: pointer; font-weight: 650; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.3rem; line-height: 1; color: var(--primary); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p, .faq details ol, .faq details ul { color: var(--text-2); }

/* Legal / document pages */
.doc { padding: 48px 0 72px; }
.doc .container { max-width: 820px; }
.doc h1 { font-size: clamp(2rem, 4.5vw, 2.8rem); }
.doc h2 { font-size: 1.45rem; margin-top: 2.2em; padding-top: .4em; }
.doc h3 { margin-top: 1.4em; }
.doc p, .doc li { color: var(--text); }
.doc li { margin-bottom: .4em; }
.doc .meta { color: var(--text-2); font-size: .95rem; }
.doc table { width: 100%; border-collapse: collapse; margin: 1em 0 1.5em; font-size: .95rem; display: block; overflow-x: auto; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--divider); }
.doc th { background: var(--surface-2); font-weight: 650; }
.toc { background: var(--surface); border: 1px solid var(--divider); border-radius: 14px; padding: 16px 22px; margin: 24px 0; }
.toc ol { margin: 0; padding-left: 1.2em; columns: 2 220px; }
.toc a { text-decoration: none; }
.steps { counter-reset: s; list-style: none; padding: 0; }
.steps li { counter-increment: s; position: relative; padding-left: 46px; margin-bottom: 14px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--primary); color: var(--on-primary); display: grid; place-items: center; font-weight: 700; font-size: .9rem; }
.path { font-weight: 650; background: var(--surface); border: 1px solid var(--divider); padding: 1px 8px; border-radius: 6px; white-space: normal; }

/* Footer */
.site-footer { border-top: 1px solid var(--divider); padding: 40px 0 48px; font-size: .95rem; color: var(--text-2); }
.footer-grid { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: flex-start; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; list-style: none; padding: 0; margin: 0; }
.footer-links a { color: var(--text-2); text-decoration: none; }
.footer-links a:hover { color: var(--text); text-decoration: underline; }
.site-footer .fine { margin-top: 20px; font-size: .85rem; }
.doc .lead { font-size: 1.15rem; color: var(--text-2); }
