@import url("fonts/fonts.css");

/* Havely brand (PLAN.md §11): colours of "Nest, calm", Gabarito for headings, Onest for text.
   Coral is the brand (logo, big shapes), never text, buttons or alerts. Siren is for emergencies only. */
:root {
  --bg: #FFF6F0;          /* Shell */
  --peach: #FFE7DC;       /* soft panels */
  --surface: #FFFFFF;
  --surface-2: #FFF0E8;
  --ink: #2E1838;         /* Plum: text, buttons, "now" */
  --on-ink: #FFF6F0;      /* text on a Plum button */
  --muted: #6B5570;
  --line: #EBDDD5;
  --coral: #FF7759;
  --butter: #FFE08A;
  --on-butter: #2E1838;
  --butter-label: #6B4A00;
  --mint: #C7EBD9;
  --on-mint: #2E1838;
  --siren: #B3261E;
  --siren-soft: #FBE1DE;
  --frame: #2E1838;       /* phone mock-up frame */
  --shadow: 0 1px 2px rgba(46,24,56,.05), 0 10px 30px rgba(46,24,56,.07);
  --shadow-lg: 0 2px 6px rgba(46,24,56,.06), 0 30px 70px rgba(46,24,56,.16);
  --f-display: "Gabarito", "Avenir Next", system-ui, sans-serif;
  --f-body: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1A0F20; --peach: #2A1A31; --surface: #241629; --surface-2: #2E1E35;
    --ink: #FFF1E8; --on-ink: #1A0F20; --muted: #BCA9C2; --line: #3A2842;
    --coral: #FF8C72; --butter: #FFE08A; --on-butter: #1A0F20; --butter-label: #6B4A00;
    --mint: #8FD9B6; --on-mint: #1A0F20; --siren: #C62E26; --siren-soft: #3A1A1E; --frame: #0F0812;
    --shadow: 0 1px 0 rgba(255,255,255,.03), 0 10px 30px rgba(0,0,0,.25);
    --shadow-lg: 0 1px 0 rgba(255,255,255,.04), 0 30px 70px rgba(0,0,0,.5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1A0F20; --peach: #2A1A31; --surface: #241629; --surface-2: #2E1E35;
  --ink: #FFF1E8; --on-ink: #1A0F20; --muted: #BCA9C2; --line: #3A2842;
  --coral: #FF8C72; --butter: #FFE08A; --on-butter: #1A0F20; --butter-label: #6B4A00;
  --mint: #8FD9B6; --on-mint: #1A0F20; --siren: #C62E26; --siren-soft: #3A1A1E; --frame: #0F0812;
  --shadow: 0 1px 0 rgba(255,255,255,.03), 0 10px 30px rgba(0,0,0,.25);
  --shadow-lg: 0 1px 0 rgba(255,255,255,.04), 0 30px 70px rgba(0,0,0,.5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--f-body); font-size: 17px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--ink); text-underline-offset: 3px; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; border-radius: 8px; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 900; margin: 0; text-wrap: balance; letter-spacing: -0.025em; line-height: 1.02; }
h3 { font-weight: 800; letter-spacing: -0.015em; line-height: 1.15; }
p { margin: 0; text-wrap: pretty; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: 1160px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.narrow { max-width: 680px; }

/* logo: a soft house with a smile */
.logo { width: 34px; height: 34px; flex: none; }
.logo .house { fill: var(--coral); }
.logo .smile { fill: none; stroke: #2E1838; stroke-width: 4.5; stroke-linecap: round; }

/* top bar */
header.bar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s; }
header.bar.scrolled { border-bottom-color: var(--line); }
header.bar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 12px; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; font-family: var(--f-display); font-weight: 900; font-size: 25px; letter-spacing: -0.03em; }
.bar-actions { display: flex; align-items: center; gap: 8px; }
.lang { border: 1.5px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 11px; font-size: 13px; font-weight: 700; min-width: 44px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 16px; padding: 13px 22px; font-weight: 700; font-size: 16px; text-decoration: none; white-space: nowrap; min-height: 48px; transition: transform .15s ease, box-shadow .15s ease; }
.btn.primary { background: var(--ink); color: var(--on-ink); }
.btn.butter { background: var(--butter); color: var(--on-butter); }
.btn.ghost { background: var(--surface); color: var(--ink); border: 1.5px solid var(--line); }
.btn.small { padding: 8px 16px; font-size: 14.5px; min-height: 40px; border-radius: 13px; }
.btn:hover { transform: translateY(-1px); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn[disabled] { opacity: .65; cursor: progress; transform: none; }

.eyebrow { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 700; }

/* plain content pages (confirm, unsubscribe, privacy) */
.page { padding-block: 48px 72px; min-height: calc(100svh - 160px); }
.card { background: var(--surface); border-radius: 28px; box-shadow: var(--shadow); padding: 32px 28px; display: grid; gap: 14px; }
.card h1 { font-size: clamp(30px, 6vw, 40px); }
.card p { color: var(--muted); }
.card .btn { justify-self: start; }
.card .err { color: var(--siren); font-weight: 600; }
.card h1:focus { outline: none; }
.status-icon { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: var(--mint); color: var(--on-mint); }
.status-icon.warn { background: var(--butter); color: var(--on-butter); }
.status-icon svg { width: 28px; height: 28px; }

.prose { display: grid; gap: 14px; }
.prose h1 { font-size: clamp(32px, 6vw, 46px); }
.prose h2 { font-size: 23px; margin-top: 18px; }
.prose p, .prose li { color: var(--ink); }
.prose ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.prose .muted { color: var(--muted); font-size: 15px; }
.prose a { font-weight: 600; }

/* footer */
footer.site { padding-block: 32px calc(32px + env(safe-area-inset-bottom, 0px)); color: var(--muted); font-size: 14px; }
footer.site .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; }
footer.site nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
footer.site a { color: var(--muted); }
footer.site .brand { font-size: 20px; }
footer.site .brand .logo { width: 26px; height: 26px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
.foot-brand { display: flex; flex-direction: column; gap: 4px; }
