/* Reasons to Keep Building standalone brand
   Warm dawn palette: paper + ink + ember. Light and dark. */

:root {
  --paper: #f7f1e6;         /* warm paper */
  --paper-2: #fbf7ee;       /* lighter card paper */
  --ink: #2a2622;           /* near-black warm ink */
  --ink-soft: #5c554c;      /* muted body */
  --ink-faint: #8a8175;
  --ember: #d9722b;         /* sunrise ember accent */
  --ember-deep: #b4551a;
  --gold: #e8a13a;
  --line: #e4dbcb;
  --line-strong: #d8cdb8;
  --glow-a: rgba(232,161,58,0.35);
  --glow-b: rgba(217,114,43,0.16);
  --shadow: 0 18px 50px -22px rgba(60,40,20,0.45);
  --radius: 18px;
  --maxw: 760px;
  --font-serif: "Lora", Georgia, "Times New Roman", serif;
  --font-ui: "Inter", system-ui, -apple-system, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #16130f;
    --paper-2: #201b15;
    --ink: #f2e9db;
    --ink-soft: #c3b6a4;
    --ink-faint: #8b8070;
    --ember: #f0894a;
    --ember-deep: #d9722b;
    --gold: #f0b757;
    --line: #322a20;
    --line-strong: #40362a;
    --glow-a: rgba(240,137,74,0.22);
    --glow-b: rgba(240,183,87,0.10);
    --shadow: 0 22px 60px -26px rgba(0,0,0,0.7);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-ui);
  color: var(--ink);
  background:
    radial-gradient(120% 80% at 50% -10%, var(--glow-a), transparent 55%),
    radial-gradient(90% 60% at 85% 10%, var(--glow-b), transparent 60%),
    var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--paper); padding: .6rem 1rem; border-radius: 0 0 8px 0;
  z-index: 100;
}
.skip:focus { left: 0; }

/* ---------- Header ---------- */
.site-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  max-width: 1080px; margin: 0 auto; padding: 1.4rem 1.5rem;
}
.brand { display: flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--ink); }
.brand-mark { width: 30px; height: 30px; display: block; }
.mark-inline { width: 1.15em; height: 1.15em; vertical-align: -0.2em; }
.brand-name { font-family: var(--font-serif); font-weight: 600; font-size: 1.12rem; letter-spacing: .1px; }
.nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.nav a {
  color: var(--ink-soft); text-decoration: none; font-size: .93rem; font-weight: 500;
  padding: .2rem 0; border-bottom: 1.5px solid transparent; transition: color .2s, border-color .2s;
}
.nav a:hover { color: var(--ember); border-color: var(--ember); }

/* ---------- Hero ---------- */
.hero {
  max-width: var(--maxw); margin: 0 auto; padding: 2.2rem 1.5rem 3rem;
  text-align: center;
}
.eyebrow {
  font-size: .82rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ember-deep); font-weight: 600; margin: 1rem 0 .8rem;
}
.hero-title {
  font-family: var(--font-serif); font-weight: 600;
  font-size: clamp(2.6rem, 8vw, 4.6rem); line-height: 1.02;
  margin: 0 0 1.1rem; letter-spacing: -0.5px;
}
.hero-sub {
  max-width: 560px; margin: 0 auto 2.2rem; color: var(--ink-soft);
  font-size: 1.08rem;
}

/* ---------- Filters ---------- */
.filters { margin-bottom: 1.6rem; }
.filters-label {
  display: block; font-size: .82rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-faint); margin-bottom: .7rem;
}
.chips { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }
.chip {
  font-family: var(--font-ui); font-size: .9rem; font-weight: 500;
  color: var(--ink-soft); background: transparent;
  border: 1.5px solid var(--line-strong); border-radius: 999px;
  padding: .42rem .95rem; cursor: pointer; transition: all .18s;
}
.chip:hover { border-color: var(--ember); color: var(--ember); }
.chip.is-active {
  background: var(--ember); border-color: var(--ember); color: #fff;
  box-shadow: 0 6px 18px -8px var(--ember);
}

/* ---------- Letter card ---------- */
.letter {
  position: relative; margin: 0 auto; text-align: left;
}
.letter-paper {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2.4rem 2.2rem 2rem;
  position: relative; overflow: hidden;
}
.letter-paper::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: linear-gradient(180deg, var(--gold), var(--ember));
}
.letter-open {
  font-family: var(--font-serif); font-style: italic; color: var(--ink-faint);
  margin: 0 0 .8rem; font-size: 1.02rem;
}
.letter-body {
  font-family: var(--font-serif); font-weight: 400;
  font-size: clamp(1.18rem, 2.7vw, 1.42rem); line-height: 1.62;
  color: var(--ink); margin: 0 0 1.4rem;
  transition: opacity .35s ease;
}
.letter-sign {
  font-family: var(--font-serif); font-style: italic; font-weight: 500;
  color: var(--ember-deep); margin: 0; font-size: 1.05rem; text-align: right;
}
.letter.is-loading .letter-body { opacity: .25; }

.letter-actions {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  margin-top: 1.4rem; justify-content: center;
}

/* ---------- Buttons ---------- */
.btn {
  font-family: var(--font-ui); font-weight: 600; font-size: .96rem;
  border: none; border-radius: 999px; padding: .8rem 1.6rem; cursor: pointer;
  transition: transform .15s, box-shadow .2s, background .2s;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--ink); color: var(--paper);
  box-shadow: 0 10px 26px -12px rgba(0,0,0,.5);
}
.btn-primary:hover { background: var(--ember-deep); }
.btn-lg { padding: .95rem 1.9rem; font-size: 1rem; }

/* ---------- Feedback ---------- */
.feedback { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.feedback-q { color: var(--ink-faint); font-size: .9rem; margin-right: .2rem; }
.react {
  font-family: var(--font-ui); font-size: .9rem; font-weight: 500;
  background: transparent; border: 1.5px solid var(--line-strong); color: var(--ink-soft);
  border-radius: 999px; padding: .4rem .85rem; cursor: pointer; transition: all .18s;
}
.react:hover { border-color: var(--ember); color: var(--ember); transform: translateY(-1px); }
.feedback-thanks { color: var(--ember-deep); font-weight: 500; margin: 0; font-size: .95rem; }

/* ---------- Stats ---------- */
.stats {
  margin-top: 2.2rem; color: var(--ink-faint); font-size: .9rem;
  letter-spacing: .02em;
}
.stats strong { color: var(--ember-deep); font-weight: 600; }

/* Single quiet help link on the home page */
.help-note {
  margin: 1.4rem auto 0; max-width: 460px;
  font-size: .92rem; color: var(--ink-faint); line-height: 1.55;
}
.help-note a {
  color: var(--ember-deep); font-weight: 600; text-decoration: none;
  border-bottom: 1.5px solid transparent; white-space: nowrap;
}
.help-note a:hover { border-color: var(--ember-deep); }

/* ---------- Sections ---------- */
.section-title {
  font-family: var(--font-serif); font-weight: 600;
  font-size: clamp(1.7rem, 4.5vw, 2.4rem); line-height: 1.12; margin: 0 0 .9rem;
  letter-spacing: -0.3px;
}
.section-lead { color: var(--ink-soft); font-size: 1.05rem; margin: 0 0 1.8rem; }

.write { background: transparent; padding: 3rem 1.5rem; border-top: 1px solid var(--line); }
.write-inner { max-width: var(--maxw); margin: 0 auto; }

.letter-form { display: flex; flex-direction: column; gap: 1.3rem; }
.field { display: flex; flex-direction: column; gap: .5rem; }
.field-label { font-weight: 600; font-size: .92rem; color: var(--ink); }
.field-hint { font-size: .82rem; color: var(--ink-faint); }
.input {
  font-family: var(--font-ui); font-size: 1rem; color: var(--ink);
  background: var(--paper-2); border: 1.5px solid var(--line-strong);
  border-radius: 12px; padding: .8rem .95rem; width: 100%;
  transition: border-color .18s, box-shadow .18s;
}
textarea.input { font-family: var(--font-serif); font-size: 1.08rem; line-height: 1.55; resize: vertical; }
.input:focus {
  outline: none; border-color: var(--ember);
  box-shadow: 0 0 0 3px var(--glow-a);
}
.form-note { min-height: 1.2em; font-size: .95rem; margin: 0; }
.form-note.ok { color: var(--ember-deep); font-weight: 500; }
.form-note.err { color: #c0392b; }

/* ---------- Help ---------- */
.help { padding: 3rem 1.5rem; border-top: 1px solid var(--line); }
.help-page { border-top: none; padding-top: 2rem; min-height: 60vh; }
.help-inner { max-width: 1000px; margin: 0 auto; }
.back-link {
  display: inline-block; margin-bottom: 1.4rem; color: var(--ink-soft);
  text-decoration: none; font-size: .93rem; font-weight: 500;
}
.back-link:hover { color: var(--ember); }
.help-fine { margin-top: 2rem; color: var(--ink-faint); font-size: .95rem; }
.help-fine a { color: var(--ember-deep); font-weight: 600; text-decoration: none; }
.help-fine a:hover { text-decoration: underline; }
.help-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem; margin-top: 1.5rem;
}
.help-card {
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: 14px; padding: 1.3rem 1.4rem;
}
.help-card.urgent { border-color: var(--ember); box-shadow: 0 0 0 3px var(--glow-b); }
.help-card h3 { font-family: var(--font-serif); font-weight: 600; margin: 0 0 .5rem; font-size: 1.15rem; }
.help-card p { color: var(--ink-soft); margin: 0 0 .9rem; font-size: .95rem; }
.help-link {
  display: inline-block; color: var(--ember-deep); font-weight: 600; text-decoration: none;
  font-size: .95rem; border-bottom: 1.5px solid transparent;
}
.help-link:hover { border-color: var(--ember-deep); }

/* ---------- About ---------- */
.about { padding: 3rem 1.5rem; border-top: 1px solid var(--line); }
.about-inner { max-width: var(--maxw); margin: 0 auto; }
.about p { color: var(--ink-soft); font-size: 1.05rem; margin: 0 0 1.1rem; }
.about-fine { font-size: .95rem; color: var(--ink-faint); }
.about-fine a, .about a { color: var(--ember-deep); }

/* ---------- Footer ---------- */
.site-foot {
  text-align: center; padding: 2.6rem 1.5rem 3rem; border-top: 1px solid var(--line);
  margin-top: 1rem;
}
.foot-mark { font-family: var(--font-serif); font-weight: 600; font-size: 1.05rem; margin: 0 0 .4rem; }
.foot-note { color: var(--ink-faint); font-size: .92rem; margin: 0 0 1.1rem; }
.foot-links { display: flex; gap: 1.1rem; justify-content: center; flex-wrap: wrap; }
.foot-links a {
  color: var(--ink-faint); text-decoration: none; font-size: .86rem; font-weight: 500;
  border-bottom: 1.5px solid transparent;
}
.foot-links a:hover { color: var(--ember); border-color: var(--ember); }

/* ---------- Legal pages ---------- */
.legal { max-width: 760px; margin: 0 auto; padding: 2rem 1.5rem 3rem; }
.legal h1 {
  font-family: var(--font-serif); font-weight: 600; letter-spacing: -0.3px;
  font-size: clamp(1.9rem, 5vw, 2.6rem); margin: .6rem 0 .3rem;
}
.legal .legal-meta { color: var(--ink-faint); font-size: .9rem; margin: 0 0 1.6rem; }
.legal h2 {
  font-family: var(--font-serif); font-weight: 600; font-size: 1.28rem;
  margin: 2.1rem 0 .6rem; padding-top: 1.2rem; border-top: 1px solid var(--line);
}
.legal h3 { font-weight: 600; font-size: 1.02rem; margin: 1.3rem 0 .4rem; color: var(--ink); }
.legal p, .legal li { color: var(--ink-soft); font-size: 1rem; line-height: 1.68; }
.legal p { margin: 0 0 .9rem; }
.legal ul { margin: 0 0 1rem; padding-left: 1.3rem; }
.legal li { margin: 0 0 .45rem; }
.legal strong { color: var(--ink); }
.legal a { color: var(--ember-deep); }
.legal-summary {
  background: var(--paper-2); border: 1px solid var(--line); border-left: 4px solid var(--gold);
  border-radius: 12px; padding: 1.1rem 1.3rem; margin: 0 0 1.8rem;
}
.legal-summary p { margin: 0; font-size: .96rem; color: var(--ink-soft); }
.legal-alert {
  background: var(--paper-2); border: 1px solid var(--ember);
  box-shadow: 0 0 0 3px var(--glow-b); border-radius: 12px;
  padding: 1.15rem 1.35rem; margin: 1.4rem 0;
}
.legal-alert p { margin: 0 0 .5rem; color: var(--ink); }
.legal-alert p:last-child { margin: 0; }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
