/* ==========================================================================
   Your Hearth LLC — stylesheet
   Self-hosted display face, system sans for body copy. No third-party
   requests, no cookies, no script required for anything but progressive
   nicety. Light and dark are both first-class.
   ========================================================================== */

@font-face {
  font-family: 'Fraunces';
  src: url('/fonts/fraunces-latin-var.woff2') format('woff2-variations');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC,
                 U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- tokens ------------------------------------------------------------- */

:root {
  --bg:            #f6e7d3;
  --bg-sunk:       #eedcc2;
  --surface:       #fdf6ec;
  --text:          #3b1f14;
  --text-muted:    #6e4a36;
  --hairline:      #e0c9ab;
  --hairline-firm: #c8ab87;
  --ember:         #a83d08;
  --on-ember:      #fff;
  --ember-deep:    #8a3006;
  --flame:         #e85a0c;
  --ember-wash:    #f7dfc8;
  --ring:          rgb(232 90 12 / 0.12);

  --font-display: 'Fraunces', ui-serif, 'New York', 'Iowan Old Style',
                  'Palatino Linotype', Palatino, Georgia, serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
               'Helvetica Neue', Arial, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas,
               'Liberation Mono', monospace;

  --measure: 34rem;
  --wrap: 70rem;
  --radius: 14px;
  --step: clamp(3.5rem, 7vw, 6.5rem);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg:            #1c120c;
    --bg-sunk:       #150e09;
    --surface:       #271a11;
    --text:          #f6e7d3;
    --text-muted:    #b5977f;
    --hairline:      #3b281b;
    --hairline-firm: #553b28;
    --ember:         #fd7f15;
    --on-ember:      #1c120c;
    --ember-deep:    #fea94d;
    --flame:         #fd7f15;
    --ember-wash:    #2e1a0e;
    --ring:          rgb(253 127 21 / 0.10);
  }
}

:root[data-theme='dark'] {
    --bg:            #1c120c;
  --bg-sunk:       #150e09;
  --surface:       #271a11;
  --text:          #f6e7d3;
  --text-muted:    #b5977f;
  --hairline:      #3b281b;
  --hairline-firm: #553b28;
  --ember:         #fd7f15;
  --on-ember:      #1c120c;
  --ember-deep:    #fea94d;
  --flame:         #fd7f15;
  --ember-wash:    #2e1a0e;
  --ring:          rgb(253 127 21 / 0.10);
}

/* --- reset -------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: var(--ember); color: var(--on-ember); }

:where(a, button, summary, input, [tabindex]):focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 3px;
  border-radius: 3px;
}

/* --- typography --------------------------------------------------------- */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.021em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.45rem, 6.1vw, 4.4rem);
  font-variation-settings: 'SOFT' 28, 'opsz' 110;
  line-height: 1.02;
  letter-spacing: -0.028em;
}
h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-variation-settings: 'SOFT' 22, 'opsz' 60;
}
h3 {
  font-size: clamp(1.2rem, 1.9vw, 1.42rem);
  font-variation-settings: 'SOFT' 16, 'opsz' 30;
  letter-spacing: -0.014em;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ember);
  margin-bottom: 1.15rem;
  display: flex;
  align-items: center;
  gap: .7rem;
}
.eyebrow::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--hairline);
  max-width: 7rem;
}

.lede {
  font-size: clamp(1.1rem, 1.55vw, 1.3rem);
  line-height: 1.58;
  color: var(--text-muted);
  max-width: 38rem;
  text-wrap: pretty;
}

.muted { color: var(--text-muted); }
.display { font-family: var(--font-display); }

/* --- layout ------------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4.5vw, 2.75rem);
}
.wrap--narrow { max-width: 50rem; }

main { flex: 1 0 auto; }
section { padding-block: var(--step); }
section + section { border-top: 1px solid var(--hairline); }

.rule {
  border: 0;
  height: 1px;
  background: var(--hairline);
  margin-block: 2.5rem;
}

/* --- top bar ------------------------------------------------------------ */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(170%) blur(14px);
  -webkit-backdrop-filter: saturate(170%) blur(14px);
  border-bottom: 1px solid var(--hairline);
}
.topbar__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 1.5rem;
  padding-block: .95rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .62rem;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.14rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variation-settings: 'SOFT' 20, 'opsz' 20;
  white-space: nowrap;
}
.brand { color: var(--text); }
.brand svg { display: block; flex: none; }
.brand .logo-mark { height: 34px; width: auto; }
.brand .logo-wordmark { height: 13px; width: auto; margin-bottom: 1px; }
@media (max-width: 26rem) {
  .brand .logo-mark { height: 29px; }
  .brand .logo-wordmark { height: 11px; }
}
.footer .logo-mark { height: 26px; width: auto; opacity: .85; }
.brand__suffix {
  font-family: var(--font-mono);
  font-size: .62rem;
  letter-spacing: .13em;
  color: var(--text-muted);
  text-transform: uppercase;
  padding: .18rem .36rem;
  border: 1px solid var(--hairline-firm);
  border-radius: 4px;
  margin-left: .1rem;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .15rem .3rem;
  font-size: .925rem;
}
.nav a {
  text-decoration: none;
  color: var(--text-muted);
  padding: .4rem .62rem;
  border-radius: 7px;
  transition: color .16s ease, background-color .16s ease;
}
.nav a:hover { color: var(--text); background: var(--bg-sunk); }
.nav a[aria-current='page'] { color: var(--text); font-weight: 550; }

/* --- buttons ------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font: inherit;
  font-weight: 550;
  font-size: .97rem;
  padding: .72rem 1.3rem;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: transform .14s ease, background-color .16s ease, border-color .16s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--ember); color: var(--on-ember); }
.btn--primary:hover { background: var(--ember-deep); }
.btn--ghost { border-color: var(--hairline-firm); color: var(--text); }
.btn--ghost:hover { background: var(--bg-sunk); border-color: var(--text-muted); }

.btn-row { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 2.1rem; }

.textlink {
  color: var(--ember);
  text-decoration-thickness: 1px;
  text-underline-offset: .22em;
  font-weight: 500;
}
.textlink:hover { color: var(--ember-deep); }

/* --- hero --------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(4rem, 11vw, 8.5rem) var(--step);
  border-top: 0;
}
.hero__glow {
  position: absolute;
  inset: auto 0 0 0;
  height: 140%;
  pointer-events: none;
  background: repeating-radial-gradient(circle at 50% 118%,
              transparent 0 54px, var(--ring) 54px 55px);
  mask-image: radial-gradient(ellipse 72% 85% at 50% 118%, #000 0%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse 72% 85% at 50% 118%, #000 0%, transparent 72%);
  z-index: 0;
}
.hero > .wrap { position: relative; z-index: 1; }
.hero h1 { max-width: 23ch; }
.hero .lede { margin-top: 1.6rem; }

/* --- statement panel ---------------------------------------------------- */

.statement {
  border-left: 3px solid var(--flame);
  background: var(--ember-wash);
  padding: 1.7rem clamp(1.15rem, 3vw, 2.2rem);
  border-radius: 0 var(--radius) var(--radius) 0;
  max-width: 46rem;
}
.statement p { font-size: 1.1rem; }
.statement p + p { margin-top: .85rem; }
.statement strong { font-weight: 650; }

/* --- two-track grid ----------------------------------------------------- */

.tracks {
  display: grid;
  gap: 1.15rem;
  grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
  margin-top: 2.9rem;
}
.track {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: clamp(1.4rem, 2.6vw, 2.1rem);
  display: flex;
  flex-direction: column;
  gap: .85rem;
}
.track__tag {
  font-family: var(--font-mono);
  font-size: .66rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.track h3 { color: var(--text); }
.track p { color: var(--text-muted); font-size: 1rem; }
.track ul { margin: .2rem 0 0; padding-left: 1.1rem; color: var(--text-muted); font-size: .97rem; }
.track li + li { margin-top: .4rem; }
.track > :last-child { margin-top: auto; }

/* --- numbered list ------------------------------------------------------ */

.numbered { list-style: none; padding: 0; margin-top: 2.9rem; display: grid; gap: 0; }
.numbered > li {
  display: grid;
  grid-template-columns: 3.4rem 1fr;
  gap: 0 1.4rem;
  padding-block: 1.75rem;
  border-top: 1px solid var(--hairline);
  align-items: start;
}
.numbered > li:last-child { border-bottom: 1px solid var(--hairline); }
.numbered .n {
  font-family: var(--font-display);
  font-variation-settings: 'SOFT' 30, 'opsz' 90;
  font-size: 2.1rem;
  line-height: .95;
  color: var(--ember);
  font-weight: 500;
}
.numbered h3 { margin-bottom: .45rem; }
.numbered p { color: var(--text-muted); max-width: 46rem; }

/* --- facts table -------------------------------------------------------- */

.facts {
  margin-top: 2.5rem;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.facts__row {
  display: grid;
  grid-template-columns: minmax(10rem, 15rem) 1fr;
  gap: .25rem 1.5rem;
  padding: 1.02rem clamp(1.05rem, 2.4vw, 1.6rem);
}
.facts__row + .facts__row { border-top: 1px solid var(--hairline); }
.facts dt {
  font-family: var(--font-mono);
  font-size: .715rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-top: .22rem;
}
.facts dd { margin: 0; font-weight: 500; }
@media (max-width: 34rem) {
  .facts__row { grid-template-columns: 1fr; }
}

/* --- product entries ---------------------------------------------------- */

.product {
  display: grid;
  gap: 1.25rem 2.5rem;
  grid-template-columns: minmax(0, 1fr);
  padding-block: 2.6rem;
  border-top: 1px solid var(--hairline);
}
.product:last-of-type { border-bottom: 1px solid var(--hairline); }
@media (min-width: 52rem) {
  .product { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
}
.product__head { display: flex; align-items: baseline; flex-wrap: wrap; gap: .75rem; }
.product p { color: var(--text-muted); }
.product p + p { margin-top: .85rem; }
.product__aside {
  font-size: .95rem;
  border-left: 1px solid var(--hairline);
  padding-left: 1.5rem;
}
.product__aside dt {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: .2rem;
}
.product__aside dd { margin: 0 0 1.05rem; }
.product__aside dd:last-child { margin-bottom: 0; }
@media (max-width: 52rem) {
  .product__aside { border-left: 0; padding-left: 0; border-top: 1px solid var(--hairline); padding-top: 1.25rem; }
}

.pill {
  font-family: var(--font-mono);
  font-size: .66rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: .26rem .6rem;
  border-radius: 999px;
  border: 1px solid currentColor;
  color: var(--text-muted);
  white-space: nowrap;
  flex: none;
}
.pill--ember { color: var(--ember); }

/* --- call to action band ------------------------------------------------ */

.cta {
  background: var(--bg-sunk);
}
.cta h2 { max-width: 28ch; }
.cta .lede { margin-top: 1.1rem; }

/* --- prose (legal + long-form pages) ------------------------------------ */

.prose { max-width: var(--measure); font-size: 1.0125rem; }
.prose > * + * { margin-top: 1.15rem; }
.prose h2 {
  font-size: clamp(1.32rem, 2.2vw, 1.62rem);
  margin-top: 3.1rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--hairline);
  font-variation-settings: 'SOFT' 18, 'opsz' 40;
  scroll-margin-top: 6rem;
}
.prose h3 {
  font-size: 1.08rem;
  margin-top: 2rem;
  font-variation-settings: 'SOFT' 14, 'opsz' 22;
}
.prose ul, .prose ol { padding-left: 1.35rem; }
.prose li + li { margin-top: .5rem; }
.prose li > ul, .prose li > ol { margin-top: .5rem; }
.prose a { color: var(--ember); text-underline-offset: .2em; }
.prose strong { font-weight: 650; }
.prose code {
  font-family: var(--font-mono);
  font-size: .88em;
  background: var(--bg-sunk);
  padding: .1em .35em;
  border-radius: 4px;
}
.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.prose th, .prose td {
  text-align: left;
  vertical-align: top;
  padding: .7rem .8rem;
  border-bottom: 1px solid var(--hairline);
}
.prose th {
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 400;
}
.callout {
  background: var(--bg-sunk);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 1.15rem 1.35rem;
  font-size: .97rem;
  max-width: 46rem;
}
.callout > * + * { margin-top: .7rem; }

.doc-head { padding-block: clamp(3rem, 7vw, 4.6rem) 0; }
.doc-head h1 { font-size: clamp(2.1rem, 4.6vw, 3.1rem); }
.doc-meta {
  font-family: var(--font-mono);
  font-size: .745rem;
  letter-spacing: .07em;
  color: var(--text-muted);
  margin-top: 1.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: .3rem 1.4rem;
}

.toc {
  margin-top: 2.6rem;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1.2rem 1.4rem;
  font-size: .95rem;
}
.toc summary {
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.toc ol { margin: 1rem 0 0; padding-left: 1.4rem; columns: 2; column-gap: 2rem; }
@media (max-width: 40rem) { .toc ol { columns: 1; } }
.toc li { margin-bottom: .4rem; break-inside: avoid; }
.toc a { color: var(--text); text-decoration: none; }
.toc a:hover { color: var(--ember); text-decoration: underline; }

/* --- footer ------------------------------------------------------------- */

.footer {
  border-top: 1px solid var(--hairline);
  background: var(--bg-sunk);
  padding-block: 3.2rem 2.4rem;
  font-size: .93rem;
  margin-top: auto;
}
.footer__grid {
  display: grid;
  gap: 2.4rem;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
}
.footer h2 {
  font-family: var(--font-mono);
  font-size: .7rem;
  font-weight: 400;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: .95rem;
  letter-spacing: .14em;
}
.footer ul { list-style: none; padding: 0; }
.footer li + li { margin-top: .5rem; }
.footer a { color: var(--text-muted); text-decoration: none; }
.footer a:hover { color: var(--ember); text-decoration: underline; }
.footer__legal {
  margin-top: 2.9rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--hairline);
  display: flex;
  flex-wrap: wrap;
  gap: .45rem 1.6rem;
  color: var(--text-muted);
  font-size: .855rem;
  align-items: center;
}
.footer__legal .name { color: var(--text); font-weight: 550; }

/* --- utility ------------------------------------------------------------ */

.stack-sm > * + * { margin-top: .75rem; }
.stack > * + * { margin-top: 1.35rem; }
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ember);
  color: var(--on-ember);
  padding: .7rem 1.1rem;
  z-index: 100;
  border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }

.center-narrow { max-width: 42rem; }

/* --- page head / prose joins ------------------------------------------- */

.doc-head + section { border-top: 0; }
.doc-head .lede { margin-top: 1.5rem; }
.prose > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

.product__head h2 {
  margin: 0;
  font-size: clamp(1.5rem, 2.7vw, 1.95rem);
  font-variation-settings: 'SOFT' 20, 'opsz' 48;
}
.track h3 a { text-decoration: none; }
.track h3 a:hover { text-decoration: underline; }

.mt-lg { margin-top: 2rem; }
