/* ==========================================================================
   nesteggfire.com — design system
   Mobile first. min-width queries only.
   Palette is taken from the app itself (warm cream ground, ember accent,
   pine for anything that means "you made it"), so the site and the first
   app screen look like the same product.
   ========================================================================== */

:root {
  --paper:      #FBF3E7;
  --paper-warm: #F7E7D0;
  --surface:    #FFFCF7;
  --surface-2:  #F2E6D5;
  --ink:        #1A1512;
  --ink-2:      #4A403A;
  --mist:       #857868;
  --rule:       #E4D6C2;
  --rule-soft:  #EFE4D4;

  --ember:      #B4501C;
  --ember-2:    #92400F;
  --ember-soft: #FBE6D6;
  --pine:       #1E6B4E;
  --pine-soft:  #DCEDE3;
  --sky:        #2E6FE0;
  --brass:      #8A6A1E;

  --f-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --f-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, system-ui, sans-serif;
  --f-mono: ui-monospace, "SF Mono", Menlo, monospace;

  --shadow-sm: 0 1px 2px rgba(26,21,18,.05);
  --shadow:    0 1px 2px rgba(26,21,18,.05), 0 10px 30px -18px rgba(26,21,18,.45);
  --shadow-lg: 0 2px 4px rgba(26,21,18,.06), 0 24px 60px -30px rgba(26,21,18,.55);

  --r-sm: 8px;
  --r:    14px;
  --r-lg: 22px;

  --wrap: 68rem;
  --measure: 42rem;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:      #14110E;
    --paper-warm: #1B1712;
    --surface:    #1E1915;
    --surface-2:  #29221B;
    --ink:        #F3EBE1;
    --ink-2:      #C6B9AB;
    --mist:       #948779;
    --rule:       #362C23;
    --rule-soft:  #2A221B;
    --ember:      #E8834F;
    --ember-2:    #F0A077;
    --ember-soft: #38211480;
    --pine:       #5FBF92;
    --pine-soft:  #16301F;
    --sky:        #7CA9F5;
    --brass:      #C9A44E;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
    --shadow:    0 1px 2px rgba(0,0,0,.4), 0 10px 30px -18px rgba(0,0,0,.9);
    --shadow-lg: 0 2px 6px rgba(0,0,0,.5), 0 30px 70px -30px rgba(0,0,0,1);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

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

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

img { max-width: 100%; height: auto; display: block; }

a { color: var(--ember); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--ember-2); }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 3px;
  border-radius: 3px;
}

h1, h2, h3, h4 { line-height: 1.14; letter-spacing: -.02em; margin: 0 0 .6rem; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 7vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 4.6vw, 2.3rem); font-weight: 750; }
h3 { font-size: clamp(1.2rem, 3vw, 1.4rem); font-weight: 700; letter-spacing: -.01em; }
p  { margin: 0 0 1.05rem; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.15rem; }
.measure { max-width: var(--measure); }
.center { text-align: center; margin-left: auto; margin-right: auto; }

.eyebrow {
  font-family: var(--f-mono);
  font-size: .69rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--mist);
  margin: 0 0 .85rem;
  font-weight: 500;
}

/* ---- header ------------------------------------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--rule-soft);
}
.site-header .wrap { display: flex; align-items: center; gap: 1rem; height: 58px; }

.brand { display: flex; align-items: center; gap: .55rem; font-weight: 750; color: var(--ink); text-decoration: none; letter-spacing: -.02em; font-size: 1.06rem; }
.brand img { width: 27px; height: 27px; border-radius: 7px; }
.brand span i { font-style: normal; color: var(--ember); }

.nav { margin-left: auto; display: flex; align-items: center; gap: .25rem; }
.nav a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: .92rem;
  font-weight: 550;
  padding: .45rem .6rem;
  border-radius: var(--r-sm);
  /* Without this the CTA breaks onto three lines at 375px and pushes the
     header to triple height. */
  white-space: nowrap;
}
.nav a:hover { color: var(--ink); background: var(--surface-2); }
.nav a.cta {
  background: var(--ember); color: #fff; padding: .5rem .95rem; margin-left: .4rem;
}
.nav a.cta:hover { background: var(--ember-2); color: #fff; }
.nav .desk { display: none; }
@media (min-width: 800px) { .nav .desk { display: inline-block; } }

/* Narrow phones: everything still has to fit on one 58px row. */
@media (max-width: 430px) {
  .site-header .wrap { gap: .35rem; padding-inline: .85rem; }
  .brand { font-size: .98rem; gap: .4rem; }
  .brand img { width: 24px; height: 24px; }
  .nav { gap: 0; }
  .nav a { font-size: .84rem; padding: .4rem .4rem; }
  .nav a.cta { padding: .45rem .75rem; margin-left: .25rem; }
}
@media (max-width: 359px) {
  .nav a.cta .long { display: none; }
}

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

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: inherit; font-size: 1rem; font-weight: 650;
  padding: .8rem 1.4rem;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: transform .12s ease, background .15s ease, box-shadow .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ember); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--ember-2); color: #fff; }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--rule); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn-lg { font-size: 1.06rem; padding: .95rem 1.7rem; }

/* ---- store badges ------------------------------------------------------ */

.badges { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; }
.badge-link {
  display: inline-flex; align-items: center; gap: .6rem;
  background: var(--ink); color: var(--paper);
  border-radius: 12px; padding: .58rem 1rem .6rem;
  text-decoration: none; line-height: 1.1;
  box-shadow: var(--shadow-sm);
  transition: transform .12s ease, opacity .15s ease;
}
.badge-link:hover { color: var(--paper); opacity: .88; transform: translateY(-1px); }
.badge-link svg { width: 21px; height: 21px; flex: none; fill: currentColor; }
.badge-link small { display: block; font-size: .6rem; letter-spacing: .06em; text-transform: uppercase; opacity: .78; }
.badge-link b { display: block; font-size: .95rem; font-weight: 650; letter-spacing: -.01em; }

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

.hero {
  position: relative;
  padding: 3rem 0 1rem;
  background:
    radial-gradient(120% 80% at 78% -8%, var(--paper-warm) 0%, transparent 62%),
    radial-gradient(90% 60% at 5% 0%, var(--ember-soft) 0%, transparent 55%);
}
.hero h1 { margin-bottom: .9rem; }
.hero h1 em { font-style: normal; color: var(--ember); }
.hero .lede { font-size: 1.13rem; color: var(--ink-2); max-width: 34rem; margin-bottom: 1.6rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-bottom: 1.1rem; }
.hero-note { font-size: .86rem; color: var(--mist); margin: 0; }

.hero-grid { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 900px) {
  .hero { padding: 4.5rem 0 2rem; }
  .hero-grid { grid-template-columns: 1.05fr .95fr; gap: 3rem; }
}

.phone {
  position: relative; margin: 0 auto; max-width: 268px; width: 100%;
  border-radius: 34px;
  background: var(--ink);
  padding: 7px;
  box-shadow: var(--shadow-lg);
  rotate: -1.4deg;
}
.phone img { border-radius: 28px; }
.phone::after {
  content: ""; position: absolute; inset: 0; border-radius: 34px;
  border: 1px solid rgba(255,255,255,.12); pointer-events: none;
}

/* ---- sections ---------------------------------------------------------- */

section { padding: 3.2rem 0; }
.section-head { max-width: 36rem; margin-bottom: 1.8rem; }
.section-head p { color: var(--ink-2); margin-bottom: 0; }
.alt { background: var(--surface); border-block: 1px solid var(--rule-soft); }

/* ---- cards ------------------------------------------------------------- */

.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-2, .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  padding: 1.35rem 1.4rem 1.45rem;
  box-shadow: var(--shadow-sm);
}
.card h3 { margin-bottom: .35rem; }
.card p { color: var(--ink-2); font-size: .95rem; margin-bottom: 0; }
.card .ico { font-size: 1.5rem; line-height: 1; display: block; margin-bottom: .7rem; }

a.card { text-decoration: none; color: inherit; display: block; transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease; }
a.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--ember); color: inherit; }
a.card .more { color: var(--ember); font-weight: 600; font-size: .9rem; display: inline-block; margin-top: .8rem; }

/* ---- style pills (FIRE flavors) ---------------------------------------- */

.styles { display: grid; gap: .8rem; }
@media (min-width: 700px) { .styles { grid-template-columns: repeat(2, 1fr); } }
.style-row {
  display: grid; grid-template-columns: 2.6rem 1fr; gap: .2rem .9rem;
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--r); padding: 1rem 1.15rem;
}
.style-row .n { font-size: 1.5rem; grid-row: 1 / span 2; line-height: 1.1; }
.style-row b { font-size: 1rem; letter-spacing: -.01em; }
.style-row span { color: var(--ink-2); font-size: .91rem; }

/* ---- calculator UI ----------------------------------------------------- */

.calc {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  padding: 1.3rem 1.2rem 1.5rem;
  box-shadow: var(--shadow);
}
@media (min-width: 700px) { .calc { padding: 1.8rem 1.9rem 2rem; } }

.calc-grid { display: grid; gap: 1.15rem; }
@media (min-width: 780px) { .calc-grid { grid-template-columns: 1fr 1fr; gap: 1.15rem 2rem; } }

.field { display: block; }
.field > label, .field > .lbl {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  font-size: .88rem; font-weight: 600; color: var(--ink-2); margin-bottom: .4rem;
}
.field .val { font-family: var(--f-mono); font-size: .95rem; color: var(--ember); font-weight: 600; font-variant-numeric: tabular-nums; }
.field input[type="number"], .field input[type="text"], .field select {
  width: 100%; font: inherit; font-size: 1rem;
  padding: .6rem .75rem;
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--rule); border-radius: var(--r-sm);
}
.field input[type="range"] { width: 100%; accent-color: var(--ember); margin: .25rem 0 0; }
.field .hint { font-size: .78rem; color: var(--mist); margin: .35rem 0 0; }

.readout {
  margin-top: 1.5rem; padding-top: 1.4rem; border-top: 1px solid var(--rule);
}
.readout-main { text-align: center; margin-bottom: 1.2rem; }
.readout-main .k { font-family: var(--f-mono); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--mist); display: block; margin-bottom: .4rem; }
.readout-main .v {
  font-size: clamp(2.4rem, 9vw, 3.6rem); font-weight: 800; letter-spacing: -.03em;
  line-height: 1; color: var(--ember); font-variant-numeric: tabular-nums; display: block;
}
.readout-main .sub { color: var(--ink-2); font-size: .96rem; margin: .6rem 0 0; }

.stat-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: var(--r-sm); overflow: hidden; }
@media (min-width: 620px) { .stat-row { grid-template-columns: repeat(3, 1fr); } }
.stat-row .s { background: var(--surface); padding: .8rem .9rem; }
.stat-row .s .k { font-family: var(--f-mono); font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; color: var(--mist); display: block; margin-bottom: .3rem; }
.stat-row .s .v { font-size: 1.22rem; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat-row .s .v.good { color: var(--pine); }
.stat-row .s .v.warn { color: var(--ember); }

.chart-wrap { margin-top: 1.3rem; border: 1px solid var(--rule); border-radius: var(--r-sm); background: var(--paper); padding: .9rem .5rem .4rem; }
.chart-wrap svg { display: block; width: 100%; height: auto; }

.disclosure {
  margin-top: 1.2rem; font-size: .82rem; color: var(--mist);
  border-left: 2px solid var(--rule); padding-left: .9rem;
}

/* ---- callout / note ---------------------------------------------------- */

.note {
  border-left: 3px solid var(--ember);
  background: var(--ember-soft);
  padding: .95rem 1.15rem;
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  margin: 1.5rem 0;
  font-size: .95rem;
}
.note b { display: block; font-family: var(--f-mono); font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ember); margin-bottom: .3rem; }

/* ---- app CTA band ------------------------------------------------------ */

.cta-band {
  background: linear-gradient(135deg, var(--paper-warm), var(--ember-soft));
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  padding: 1.9rem 1.4rem 2rem;
  text-align: center;
  margin: 2.5rem 0 0;
}
.cta-band h2 { margin-bottom: .5rem; }
.cta-band p { color: var(--ink-2); max-width: 32rem; margin: 0 auto 1.3rem; }
.cta-band .badges { justify-content: center; }

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

.site-footer {
  border-top: 1px solid var(--rule);
  background: var(--surface);
  padding: 2.4rem 0 2.8rem;
  margin-top: 3.5rem;
  font-size: .92rem;
}
.foot-grid { display: grid; gap: 1.6rem; }
@media (min-width: 700px) { .foot-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.foot-grid h4 { font-size: .7rem; font-family: var(--f-mono); letter-spacing: .13em; text-transform: uppercase; color: var(--mist); margin-bottom: .7rem; font-weight: 500; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.foot-grid a { color: var(--ink-2); text-decoration: none; }
.foot-grid a:hover { color: var(--ember); }
.foot-legal { margin-top: 2rem; padding-top: 1.3rem; border-top: 1px solid var(--rule-soft); color: var(--mist); font-size: .82rem; }
.foot-legal p { margin: 0 0 .5rem; max-width: 46rem; }

/* ---- mobile sticky download bar ---------------------------------------- */

.dlbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: flex; align-items: center; gap: .8rem;
  padding: .6rem .9rem calc(.6rem + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--rule);
  transform: translateY(110%); transition: transform .25s ease;
}
.dlbar.on { transform: translateY(0); }
.dlbar img { width: 34px; height: 34px; border-radius: 8px; }
.dlbar .t { flex: 1; min-width: 0; line-height: 1.25; }
.dlbar .t b { display: block; font-size: .9rem; }
.dlbar .t span { font-size: .76rem; color: var(--mist); }
.dlbar .btn { padding: .5rem 1rem; font-size: .9rem; }
@media (min-width: 800px) { .dlbar { display: none; } }
