/* ───────────────────────────────────────────────────────────────
   unusualdiscussion.com — soft, warm, unhurried
   ─────────────────────────────────────────────────────────────── */

:root {
  --bg: #fbf4f1;
  --bg-2: #f4e9e4;
  --surface: #fffaf8;
  --surface-2: #faeee9;
  --ink: #33222e;
  --ink-soft: #7b6470;
  --line: #ecdcd5;
  --peach: #d9695e;
  --peach-soft: #f6d3ca;
  --lav: #a4708c;
  --sage: #4f8a80;
  --gold: #dda23c;
  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 1px 2px rgba(60, 40, 30, .04), 0 12px 32px -12px rgba(90, 60, 45, .16);
  --shadow-lg: 0 2px 4px rgba(60, 40, 30, .05), 0 32px 64px -24px rgba(90, 60, 45, .28);
  --sans: "Figtree", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Newsreader", ui-serif, Georgia, "Times New Roman", serif;
  --gutter: 16px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #191219;
    --bg-2: #201820;
    --surface: #241b25;
    --surface-2: #2e2331;
    --ink: #f6ecea;
    --ink-soft: #b49fae;
    --line: #3a2d3c;
    --peach: #ef8d81;
    --peach-soft: #6d3a35;
    --lav: #c793ad;
    --sage: #7fb8ac;
    --gold: #e8b95f;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px -12px rgba(0, 0, 0, .5);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, .35), 0 32px 64px -24px rgba(0, 0, 0, .7);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .brand-name, .chat-name {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -.01em;
}

em { font-style: italic; }
p { margin: 0 0 1em; }
a { color: inherit; }

.link { color: var(--peach); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.link:hover { text-decoration-thickness: 2px; }

.linkish {
  background: none; border: 0; padding: 0; font: inherit; color: inherit;
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}

/* ── aurora ─────────────────────────────────────────────────── */
.aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .5; }
.b1 { width: 52vmax; height: 52vmax; background: var(--peach-soft); top: -18vmax; left: -12vmax; animation: drift 34s ease-in-out infinite; }
.b2 { width: 44vmax; height: 44vmax; background: var(--lav); top: 28vh; right: -16vmax; opacity: .28; animation: drift 44s ease-in-out infinite reverse; }
.b3 { width: 38vmax; height: 38vmax; background: var(--sage); bottom: -14vmax; left: 22vw; opacity: .22; animation: drift 52s ease-in-out infinite; }

@keyframes drift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  33% { transform: translate3d(6vw, 4vh, 0) scale(1.08); }
  66% { transform: translate3d(-4vw, -3vh, 0) scale(.95); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .blob { animation: none; }
  * { transition-duration: .01ms !important; }
}

/* ── buttons ────────────────────────────────────────────────── */
.btn {
  font: inherit; font-weight: 500; cursor: pointer;
  border-radius: 999px; border: 1px solid transparent;
  padding: 11px 22px; transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
  display: inline-flex; align-items: center; gap: .5em; text-decoration: none;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-lg { padding: 15px 30px; font-size: 1.05rem; }

.btn-primary { background: var(--peach); color: #fff; box-shadow: 0 10px 24px -12px var(--peach); }
.btn-primary:hover { box-shadow: 0 16px 32px -14px var(--peach); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-primary { color: #241812; } }

.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--ink); box-shadow: var(--shadow); }
.btn-quiet { background: transparent; color: var(--ink-soft); border-color: var(--line); }
.btn-quiet:hover { color: var(--ink); background: var(--surface); }

.icon-btn {
  width: 40px; height: 40px; flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink);
  font-size: 1rem; cursor: pointer; transition: background .16s ease, transform .16s ease;
}
.icon-btn:hover { background: var(--surface-2); transform: translateY(-1px); }
.icon-btn.danger:hover { background: var(--peach); color: #fff; border-color: var(--peach); }

:focus-visible { outline: 2.5px solid var(--lav); outline-offset: 3px; border-radius: 6px; }

/* ── layout ─────────────────────────────────────────────────── */
#landing { max-width: 1040px; margin: 0 auto; padding: 0 var(--gutter); }
body[data-view="chat"] #landing { display: none; }
body[data-view="landing"] #chat { display: none; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 22px 0; flex-wrap: wrap;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; font-size: 1.2rem;
  background: var(--peach); color: #fff; line-height: 1;
}
.brand-name { font-size: 1.22rem; }
.brand-name em { color: var(--peach); }

.topnav { display: flex; align-items: center; gap: 22px; font-size: .94rem; }
.topnav a { text-decoration: none; color: var(--ink-soft); }
.topnav a:hover { color: var(--ink); }
@media (max-width: 720px) { .topnav a { display: none; } }

/* ── hero ───────────────────────────────────────────────────── */
.hero { padding: 56px 0 72px; max-width: 760px; }
.eyebrow {
  text-transform: uppercase; letter-spacing: .14em; font-size: .72rem;
  font-weight: 600; color: var(--ink-soft); margin-bottom: 18px;
}
.hero h1 { font-size: clamp(2.3rem, 6.4vw, 4rem); margin: 0 0 20px; }
.hero h1 em { color: var(--peach); font-style: italic; }
.lede { font-size: clamp(1.04rem, 2.3vw, 1.2rem); color: var(--ink-soft); max-width: 62ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 30px 0 18px; }
.hero-fine { font-size: .86rem; color: var(--ink-soft); max-width: 54ch; }

.section-title { font-size: clamp(1.6rem, 3.6vw, 2.2rem); margin: 0 0 10px; }
.section-sub { color: var(--ink-soft); max-width: 60ch; margin-bottom: 26px; }
section { padding: 46px 0; }

/* ── cards ──────────────────────────────────────────────────── */
.card-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow);
}
.card-emoji { font-size: 1.7rem; display: block; margin-bottom: 10px; }
.card h3 { font-size: 1.12rem; margin: 0 0 8px; }
.card p { color: var(--ink-soft); font-size: .95rem; margin: 0; }

/* ── personas ───────────────────────────────────────────────── */
.persona-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.persona {
  text-align: left; font: inherit; cursor: pointer;
  background: var(--surface); border: 1.5px solid var(--line);
  border-radius: var(--radius); padding: 20px; color: var(--ink);
  transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.persona:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.persona[aria-pressed="true"] { border-color: var(--peach); background: var(--surface-2); box-shadow: var(--shadow); }
.persona-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.persona-emoji { font-size: 1.5rem; }
.persona-name { font-family: var(--serif); font-weight: 600; font-size: 1.08rem; }
.persona-tag { color: var(--sage); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }
.persona-blurb { color: var(--ink-soft); font-size: .9rem; margin: 0; }
.persona-grid.compact .persona { padding: 14px 16px; }
.persona-grid.compact .persona-blurb { display: none; }

/* ── chips ──────────────────────────────────────────────────── */
.chip-cloud { display: flex; flex-wrap: wrap; gap: 9px; }
.chip {
  font: inherit; font-size: .92rem; cursor: pointer;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 16px; transition: all .16s ease;
}
.chip:hover { border-color: var(--peach); transform: translateY(-1px); box-shadow: var(--shadow); }
.chip[aria-pressed="true"] { background: var(--peach); color: #fff; border-color: var(--peach); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .chip[aria-pressed="true"] { color: #241812; } }

/* ── privacy / support / faq ────────────────────────────────── */
.privacy-note .privacy-inner {
  display: flex; gap: 22px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow);
}
.privacy-emoji { font-size: 2rem; }
.privacy-note h2 { font-size: 1.4rem; margin: 0 0 14px; }
.privacy-note ul { margin: 0 0 16px; padding-left: 20px; color: var(--ink-soft); }
.privacy-note li { margin-bottom: 7px; }
.privacy-note li strong { color: var(--ink); }
@media (max-width: 600px) { .privacy-note .privacy-inner { flex-direction: column; padding: 22px; gap: 12px; } }

.support { text-align: center; }
.support .section-sub { margin-inline: auto; }

.faq details {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 16px 20px; margin-bottom: 10px;
}
.faq summary { cursor: pointer; font-weight: 500; }
.faq details[open] summary { margin-bottom: 10px; color: var(--peach); }
.faq p { color: var(--ink-soft); font-size: .94rem; margin: 0; }

/* ── footer ─────────────────────────────────────────────────── */
.footer { border-top: 1px solid var(--line); padding: 34px 0 54px; text-align: center; }
.footer-brand { font-family: var(--serif); font-size: 1.1rem; margin-bottom: 12px; }
.footer-brand em { color: var(--peach); }
.footer-fine { color: var(--ink-soft); font-size: .84rem; max-width: 62ch; margin: 0 auto 12px; }
.footer-links { font-size: .88rem; color: var(--ink-soft); }
.footer-links a, .footer-links button { color: var(--ink-soft); text-decoration: none; }
.footer-links a:hover, .footer-links button:hover { color: var(--peach); }

/* ── chat shell ─────────────────────────────────────────────── */
#chat {
  position: fixed; inset: 0; display: flex; flex-direction: column;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(8px);
}
.chat-top {
  display: flex; align-items: center; gap: 12px;
  padding: 12px max(var(--gutter), env(safe-area-inset-left)) 12px var(--gutter);
  border-bottom: 1px solid var(--line); background: var(--surface);
  flex: 0 0 auto;
}
.chat-who { display: flex; align-items: center; gap: 11px; min-width: 0; flex: 1; }
.chat-avatar {
  width: 42px; height: 42px; flex: 0 0 auto; border-radius: 50%;
  display: grid; place-items: center; font-size: 1.25rem; background: var(--surface-2);
  border: 1px solid var(--line);
}
.chat-name { font-size: 1.05rem; margin: 0; }
.chat-tag { margin: 0; font-size: .78rem; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-actions { display: flex; gap: 7px; flex: 0 0 auto; }
@media (max-width: 560px) { .chat-tag { display: none; } .chat-actions .icon-btn { width: 36px; height: 36px; } }

.demo-banner {
  background: var(--gold); color: #3a2a06; font-size: .84rem;
  padding: 9px 16px; text-align: center;
}

.chat-scroll { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding: 22px var(--gutter) 8px; }
.messages { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }

.msg { display: flex; gap: 10px; max-width: 100%; animation: rise .32s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.msg-avatar { width: 32px; height: 32px; flex: 0 0 auto; border-radius: 50%; display: grid; place-items: center; font-size: 1rem; background: var(--surface-2); border: 1px solid var(--line); }
.bubble {
  padding: 13px 18px; border-radius: 20px; max-width: min(78%, 60ch);
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.msg.them .bubble { background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 7px; box-shadow: var(--shadow); }
.msg.me { justify-content: flex-end; }
.msg.me .bubble { background: var(--peach); color: #fff; border-bottom-right-radius: 7px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .msg.me .bubble { color: #241812; } }
.msg.note { justify-content: center; }
.msg.note .bubble {
  background: transparent; border: 1px dashed var(--line); color: var(--ink-soft);
  font-size: .85rem; text-align: center; max-width: 46ch; border-radius: 16px;
}

.dots { display: inline-flex; gap: 5px; padding: 4px 0; }
.dots span { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-soft); opacity: .45; animation: bob 1.3s ease-in-out infinite; }
.dots span:nth-child(2) { animation-delay: .18s; }
.dots span:nth-child(3) { animation-delay: .36s; }
@keyframes bob { 0%, 60%, 100% { transform: translateY(0); opacity: .35; } 30% { transform: translateY(-5px); opacity: .9; } }

/* ── onboarding ─────────────────────────────────────────────── */
.onboard {
  max-width: 720px; margin: 0 auto 10px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow); animation: rise .4s ease both;
}
.onboard h2 { font-size: 1.35rem; margin: 0 0 6px; }
.onboard-sub { color: var(--ink-soft); font-size: .92rem; }
.field { display: block; border: 0; padding: 0; margin: 0 0 20px; }
.field > span, .field legend { display: block; font-weight: 500; font-size: .95rem; margin-bottom: 9px; padding: 0; }
.field input[type="text"] {
  width: 100%; font: inherit; padding: 12px 16px; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.onboard-cta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
@media (max-width: 560px) { .onboard { padding: 20px; } }

/* ── composer ───────────────────────────────────────────────── */
.chat-bottom {
  flex: 0 0 auto; border-top: 1px solid var(--line); background: var(--surface);
  padding: 10px var(--gutter) max(10px, env(safe-area-inset-bottom));
}
.suggestions { max-width: 720px; margin: 0 auto 9px; }
.suggestions:empty { display: none; }
.composer { max-width: 720px; margin: 0 auto; display: flex; gap: 9px; align-items: flex-end; }
.composer textarea {
  flex: 1; font: inherit; resize: none; max-height: 34vh;
  padding: 13px 17px; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line); border-radius: 22px;
}
.send {
  width: 46px; height: 46px; flex: 0 0 auto; border: 0; border-radius: 50%;
  background: var(--peach); color: #fff; font-size: 1.05rem; cursor: pointer;
  transition: transform .16s ease, opacity .16s ease;
}
.send:hover { transform: translateY(-1px) scale(1.04); }
.send:disabled { opacity: .45; cursor: default; transform: none; }
.chat-fine { max-width: 720px; margin: 8px auto 0; font-size: .74rem; color: var(--ink-soft); text-align: center; }

/* ── sheets & modals ───────────────────────────────────────── */
.sheet, .modal {
  position: fixed; inset: 0; z-index: 60; display: grid;
  background: rgba(30, 20, 26, .45); backdrop-filter: blur(4px);
  animation: fade .22s ease both; padding: var(--gutter);
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.sheet[hidden], .modal[hidden], .demo-banner[hidden] { display: none; }
.sheet { place-items: end center; }
.modal { place-items: center; }
.sheet-inner, .modal-inner {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 26px; width: 100%; max-height: 86vh; overflow-y: auto;
  animation: pop .26s cubic-bezier(.2, .9, .3, 1) both;
}
.sheet-inner { max-width: 760px; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.modal-inner { max-width: 470px; text-align: center; position: relative; }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }

.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.sheet-head h2 { font-size: 1.28rem; margin: 0; }
.sheet-sub { font-size: 1rem; margin: 26px 0 12px; }
.sheet-fine { font-size: .82rem; color: var(--ink-soft); margin: 16px 0 0; }

.toy-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.toy {
  font: inherit; text-align: left; cursor: pointer; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 16px; display: grid; gap: 4px;
  transition: transform .16s ease, border-color .16s ease;
}
.toy:hover { transform: translateY(-2px); border-color: var(--peach); }
.toy span { font-size: 1.4rem; }
.toy strong { font-family: var(--serif); font-weight: 600; }
.toy small { color: var(--ink-soft); }

.modal-emoji { font-size: 2.4rem; display: block; margin-bottom: 8px; }
.modal-inner h2 { font-size: 1.45rem; margin: 0 0 12px; }
.modal-inner p { color: var(--ink-soft); font-size: .95rem; }
.modal-inner .btn { margin: 6px 4px 0; }
.support-links { display: flex; flex-wrap: wrap; gap: 9px; justify-content: center; margin-top: 16px; }
.support-links:empty { display: none; }
.support-links .btn { margin: 0; }
.modal-fine { font-size: .78rem; margin-top: 14px; }
.modal-x { position: absolute; top: 12px; right: 12px; }

.breathe-circle {
  width: 150px; height: 150px; border-radius: 50%; margin: 18px auto;
  background: radial-gradient(circle at 34% 30%, var(--peach-soft), var(--lav));
  animation: breathe 19s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { transform: scale(.66); }
  21% { transform: scale(1); }
  58% { transform: scale(1); }
  79% { transform: scale(.66); }
}
.breathe-label { font-family: var(--serif); font-size: 1.15rem; }

.gratitude-inputs { display: grid; gap: 9px; margin: 16px 0; }
.gratitude-inputs input {
  font: inherit; padding: 11px 15px; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.dare-out {
  font-family: var(--serif); font-size: 1.2rem; margin: 18px 0;
  background: var(--bg); border: 1px dashed var(--line);
  border-radius: var(--radius-sm); padding: 20px;
}

#confetti { position: fixed; inset: 0; z-index: 90; pointer-events: none; }

/* ── standalone text pages ─────────────────────────────────── */
.prose { max-width: 720px; margin: 0 auto; padding: 0 var(--gutter) 70px; }
.prose h1 { font-size: clamp(2rem, 5vw, 2.8rem); margin: 30px 0 8px; }
.prose h2 { font-size: 1.28rem; margin: 34px 0 10px; }
.prose p, .prose li { color: var(--ink-soft); }
.prose strong { color: var(--ink); }
.prose .updated { font-size: .84rem; }
