/* ============================================================
   Anyone — shared design system
   Warm editorial minimalism, voice-first, judgment-free.
   ============================================================ */

:root {
  /* Type */
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Hanken Grotesk", ui-sans-serif, system-ui, -apple-system, sans-serif;

  /* Warm paper light theme */
  --paper: #f7f2ea;
  --paper-2: #f1e9dd;
  --surface: #fffdf9;
  --surface-sunk: #efe7db;
  --ink: #241f1b;
  --ink-soft: #5c534a;
  --ink-faint: #8a7f72;
  --line: #e2d7c6;
  --line-strong: #d2c4ae;

  /* Warm ember accent + supporting hues */
  --ember: #d9542f;
  --ember-deep: #b8401f;
  --ember-soft: #f6e3d8;
  --moss: #46785a;          /* live / available-now positive */
  --moss-soft: #dce8dd;
  --gold: #c08a2d;
  --plum: #7d4f6d;          /* accent for variety in taxonomy chips */

  --shadow-sm: 0 1px 2px rgba(40, 30, 20, .06), 0 2px 8px rgba(40, 30, 20, .05);
  --shadow-md: 0 4px 14px rgba(40, 30, 20, .09), 0 12px 40px rgba(40, 30, 20, .07);
  --shadow-lg: 0 20px 60px rgba(40, 30, 20, .16);

  --radius: 16px;
  --radius-lg: 26px;
  --radius-pill: 999px;

  --maxw: 1080px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

:root[data-theme="dark"], .theme-dark {
  --paper: #16110d;
  --paper-2: #1c1611;
  --surface: #221b15;
  --surface-sunk: #120d09;
  --ink: #f1e7da;
  --ink-soft: #c4b6a4;
  --ink-faint: #8f8071;
  --line: #322820;
  --line-strong: #443729;
  --ember: #f0724e;
  --ember-deep: #d9542f;
  --ember-soft: #33211a;
  --moss: #7fb491;
  --moss-soft: #22302a;
  --gold: #d6a748;
  --plum: #c58fb2;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.3), 0 2px 8px rgba(0,0,0,.28);
  --shadow-md: 0 6px 18px rgba(0,0,0,.4), 0 14px 44px rgba(0,0,0,.34);
  --shadow-lg: 0 24px 70px rgba(0,0,0,.5);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #16110d;
    --paper-2: #1c1611;
    --surface: #221b15;
    --surface-sunk: #120d09;
    --ink: #f1e7da;
    --ink-soft: #c4b6a4;
    --ink-faint: #8f8071;
    --line: #322820;
    --line-strong: #443729;
    --ember: #f0724e;
    --ember-deep: #d9542f;
    --ember-soft: #33211a;
    --moss: #7fb491;
    --moss-soft: #22302a;
    --gold: #d6a748;
    --plum: #c58fb2;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.3), 0 2px 8px rgba(0,0,0,.28);
    --shadow-md: 0 6px 18px rgba(0,0,0,.4), 0 14px 44px rgba(0,0,0,.34);
    --shadow-lg: 0 24px 70px rgba(0,0,0,.5);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

/* subtle warm grain / mesh atmosphere */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(60% 50% at 12% 0%, rgba(217,84,47,.07), transparent 60%),
    radial-gradient(50% 45% at 100% 8%, rgba(125,79,109,.06), transparent 60%),
    radial-gradient(45% 40% at 88% 100%, rgba(70,120,90,.06), transparent 60%);
}

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 460; line-height: 1.06; letter-spacing: -.01em; margin: 0; }
h1 { font-size: clamp(2.6rem, 7vw, 5.2rem); font-optical-sizing: auto; }
p { margin: 0 0 1rem; }
a { color: inherit; }
img { max-width: 100%; display: block; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }
.eyebrow {
  font-family: var(--font-body);
  font-weight: 600; font-size: .72rem; letter-spacing: .22em;
  text-transform: uppercase; color: var(--ember);
}
.mono-num { font-variant-numeric: tabular-nums; }

/* ---- buttons ---- */
.btn {
  font-family: var(--font-body);
  font-weight: 600; font-size: 1rem;
  border: none; cursor: pointer;
  padding: 15px 26px; border-radius: var(--radius-pill);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .2s, opacity .2s;
  text-decoration: none;
}
.btn-primary { background: var(--ember); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--ember-deep); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line-strong); }
.btn-ghost:hover { border-color: var(--ink); transform: translateY(-2px); }
.btn-soft { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.btn-soft:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-block { width: 100%; }

/* ---- cards ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

/* ---- form fields ---- */
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: .85rem; margin-bottom: 7px; color: var(--ink-soft); }
input[type=text], input[type=email], input[type=tel], textarea, select {
  width: 100%; font-family: var(--font-body); font-size: 1rem;
  padding: 14px 16px; border-radius: var(--radius);
  border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
}
textarea { resize: vertical; min-height: 90px; line-height: 1.5; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--ember); box-shadow: 0 0 0 4px var(--ember-soft); }

/* ---- taxonomy chips (judgment-free connection types) ---- */
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 15px; border-radius: var(--radius-pill);
  border: 1.5px solid var(--line-strong); background: var(--surface);
  font-size: .9rem; font-weight: 500; cursor: pointer; user-select: none;
  transition: all .2s var(--ease);
}
.chip:hover { border-color: var(--ink-soft); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; opacity: .7; }

/* ---- live pulse ---- */
.pulse-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--moss); position: relative; }
.pulse-dot::after { content:""; position:absolute; inset:-4px; border-radius:50%; border:2px solid var(--moss); animation: pulse 1.8s var(--ease) infinite; }
@keyframes pulse { 0% { transform: scale(.7); opacity:.8;} 100% { transform: scale(1.9); opacity:0; } }

/* ---- record button + waveform ---- */
.rec-btn {
  width: 92px; height: 92px; border-radius: 50%;
  border: none; cursor: pointer; position: relative;
  background: var(--ember); color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 10px 30px rgba(217,84,47,.35);
  transition: transform .25s var(--ease), background .25s;
}
.rec-btn:hover { transform: scale(1.05); }
.rec-btn.recording { background: var(--ember-deep); }
.rec-btn.recording::before,
.rec-btn.recording::after {
  content:""; position:absolute; inset:0; border-radius:50%;
  border:2px solid var(--ember); animation: ring 2s var(--ease) infinite;
}
.rec-btn.recording::after { animation-delay: 1s; }
@keyframes ring { 0%{transform:scale(1);opacity:.7;} 100%{transform:scale(1.7);opacity:0;} }
.rec-icon { width: 30px; height: 30px; border-radius: 8px; background: #fff; transition: all .25s var(--ease); }
.rec-btn.recording .rec-icon { border-radius: 6px; width: 26px; height: 26px; }

.waveform { display: flex; align-items: center; gap: 3px; height: 34px; }
.waveform span { width: 3px; border-radius: 3px; background: var(--ember); height: 20%; transition: height .12s linear; }

/* ---- misc ---- */
.muted { color: var(--ink-soft); }
.faint { color: var(--ink-faint); }
.center { text-align: center; }
.stack > * + * { margin-top: 14px; }
.row { display: flex; gap: 12px; align-items: center; }
.wrap-gap { flex-wrap: wrap; }
.hidden { display: none !important; }
.divider { height:1px; background: var(--line); border:0; margin: 24px 0; }
.badge { display:inline-flex; align-items:center; gap:6px; padding:4px 11px; border-radius: var(--radius-pill); font-size:.75rem; font-weight:600; }
.badge-live { background: var(--moss-soft); color: var(--moss); }
.badge-soon { background: var(--surface-sunk); color: var(--ink-faint); }

/* theme toggle */
.theme-toggle {
  position: fixed; top: 18px; right: 18px; z-index: 40;
  width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
  border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--ink);
  display: grid; place-items: center; font-size: 1.05rem; box-shadow: var(--shadow-sm);
}

/* entrance animation */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.rise { animation: rise .8s var(--ease) both; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .01ms !important; }
}
