/* =========================================================================
   BBQ Cook Log — smokehouse editorial
   Charcoal & ember. Fraunces / Archivo / IBM Plex Mono.
   ========================================================================= */

:root {
  /* Charcoal substrate (warm-black) */
  --char-900: #100c09;
  --char-850: #15100c;
  --char-800: #1b1510;
  --char-700: #241c16;
  --char-600: #30251d;
  --char-500: #3d3025;

  /* Ember + smoke */
  --ember:     #ff6a1f;
  --ember-hot: #ff9436;
  --ember-deep:#d23a17;
  --bbq-red:   #9c2417;
  --coal-blue: #2f4858; /* the steak's cool blue in the logo */

  /* Paper / smoke text */
  --paper:   #f6ecdd;
  --paper-2: #e7d8c3;
  --ash:     #b6a692;
  --ash-dim: #877565;

  --line: rgba(246, 236, 221, 0.10);
  --line-strong: rgba(246, 236, 221, 0.18);

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Archivo", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --shadow-deep: 0 40px 80px -30px rgba(0, 0, 0, 0.85);
  --shadow-ember: 0 20px 60px -20px rgba(255, 106, 31, 0.45);

  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  background-color: var(--char-900);
  color: var(--paper);
  line-height: 1.6;
  font-size: 17px;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Ember glow field + grain overlay -------------------------------------- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1100px 700px at 80% -10%, rgba(255, 106, 31, 0.16), transparent 60%),
    radial-gradient(900px 600px at 10% 110%, rgba(156, 36, 23, 0.20), transparent 55%),
    radial-gradient(700px 500px at 50% 50%, rgba(47, 72, 88, 0.10), transparent 70%);
  pointer-events: none;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.045;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Layout helpers --------------------------------------------------------- */
.wrap { width: min(var(--maxw), 92vw); margin-inline: auto; }
section { position: relative; padding: clamp(80px, 12vw, 160px) 0; }
.rule { height: 1px; background: var(--line); border: 0; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ember-hot);
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 1px;
  background: linear-gradient(90deg, var(--ember), transparent);
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.02; letter-spacing: -0.015em; }
h2 { font-size: clamp(2.1rem, 5vw, 3.6rem); }
h2 .em { font-style: italic; font-weight: 500; color: var(--ember-hot); }

p { color: var(--paper-2); }
.lede { font-size: clamp(1.05rem, 2vw, 1.3rem); color: var(--ash); max-width: 56ch; }
a { color: inherit; }

.ember-text {
  background: linear-gradient(100deg, var(--ember-hot) 0%, var(--ember) 40%, var(--ember-deep) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* Buttons ---------------------------------------------------------------- */
.btn {
  --bg: var(--ember);
  display: inline-flex; align-items: center; gap: 0.6em;
  font-family: var(--font-body); font-weight: 600; font-size: 0.95rem;
  letter-spacing: 0.01em;
  padding: 0.95em 1.5em;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s;
  will-change: transform;
}
.btn--primary {
  background: linear-gradient(180deg, var(--ember-hot), var(--ember-deep));
  color: #1a0e06;
  box-shadow: var(--shadow-ember);
}
.btn--primary:hover { transform: translateY(-3px); box-shadow: 0 26px 70px -18px rgba(255, 106, 31, 0.6); }
.btn--ghost {
  background: rgba(246, 236, 221, 0.04);
  border-color: var(--line-strong);
  color: var(--paper);
}
.btn--ghost:hover { background: rgba(246, 236, 221, 0.09); transform: translateY(-3px); }
.btn svg { width: 18px; height: 18px; }

/* Nav -------------------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: linear-gradient(180deg, rgba(16, 12, 9, 0.85), rgba(16, 12, 9, 0.4));
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
.nav.is-stuck { border-color: var(--line); background: rgba(16, 12, 9, 0.92); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 0.6em; text-decoration: none; color: var(--paper); }
.brand__mark { width: 30px; height: 30px; filter: drop-shadow(0 2px 8px rgba(255, 106, 31, 0.5)); }
.brand__name { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; letter-spacing: -0.01em; }
.brand__name b { color: var(--ember-hot); font-weight: 600; }
.nav__links { display: flex; align-items: center; gap: 2rem; }
.nav__links a:not(.btn) {
  font-size: 0.82rem; font-family: var(--font-mono); letter-spacing: 0.12em;
  text-transform: uppercase; text-decoration: none; color: var(--ash);
  transition: color 0.2s; position: relative;
}
.nav__links a:not(.btn):hover { color: var(--paper); }
.nav__cta { padding: 0.6em 1.2em; }
.nav__toggle { display: none; }

/* Hero ------------------------------------------------------------------- */
.hero { padding-top: clamp(48px, 7vw, 88px); padding-bottom: clamp(60px, 9vw, 120px); }
.hero__grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
.hero h1 {
  font-size: clamp(3rem, 8.5vw, 6.6rem);
  font-weight: 600;
  margin: 1.1rem 0 0;
}
.hero h1 .line { display: block; }
.hero h1 .ital { font-style: italic; font-weight: 400; }
.hero__sub { margin-top: 1.7rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2.2rem; }
.hero__meta {
  margin-top: 2.6rem; display: flex; flex-wrap: wrap; gap: 1.6rem 2.4rem;
  font-family: var(--font-mono); font-size: 0.78rem; color: var(--ash-dim);
  letter-spacing: 0.06em;
}
.hero__meta b { color: var(--paper); font-weight: 600; display: block; font-size: 1.5rem; font-family: var(--font-display); letter-spacing: -0.01em; }

/* Phone device ----------------------------------------------------------- */
.phone {
  position: relative;
  border-radius: 42px;
  padding: 11px;
  background: linear-gradient(160deg, #2a221b, #0c0907);
  box-shadow: var(--shadow-deep), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.phone::after { /* side glint */
  content: ""; position: absolute; inset: 0; border-radius: 42px; pointer-events: none;
  background: linear-gradient(115deg, rgba(255, 148, 54, 0.10), transparent 40%);
}
.phone__screen { border-radius: 32px; overflow: hidden; display: block; background: #161310; }
.phone__screen img { width: 100%; height: auto; display: block; }
.hero__device { position: relative; max-width: 340px; margin-inline: auto; }
.hero__device::before { /* ember halo */
  content: ""; position: absolute; inset: -14% -10% -22%;
  background: radial-gradient(60% 55% at 50% 60%, rgba(255, 106, 31, 0.35), transparent 70%);
  filter: blur(20px); z-index: -1;
}
.hero__device .float-tag {
  position: absolute; z-index: 3;
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.08em;
  background: rgba(20, 15, 11, 0.85); border: 1px solid var(--line-strong);
  color: var(--paper); padding: 0.55em 0.9em; border-radius: 12px;
  backdrop-filter: blur(8px); box-shadow: var(--shadow-deep);
  display: flex; align-items: center; gap: 0.5em;
}
.float-tag .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ember); box-shadow: 0 0 10px var(--ember); animation: pulse 1.8s var(--ease) infinite; }
.float-tag--a { top: 12%; left: -16%; }
.float-tag--b { bottom: 16%; right: -14%; }
.float-tag b { color: var(--ember-hot); }

@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.4; transform: scale(0.7); } }

/* Marquee strip ---------------------------------------------------------- */
.strip { border-block: 1px solid var(--line); padding: 1.1rem 0; overflow: hidden; background: rgba(0,0,0,0.2); }
.strip__track { display: flex; gap: 3.5rem; white-space: nowrap; width: max-content; animation: marquee 38s linear infinite; }
.strip__track span {
  font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.2em;
  font-size: 0.8rem; color: var(--ash-dim); display: inline-flex; align-items: center; gap: 3.5rem;
}
.strip__track span::after { content: "✶"; color: var(--ember); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Section heading -------------------------------------------------------- */
.shead { max-width: 60ch; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.shead p { margin-top: 1.2rem; }

/* Modes (3 cards) -------------------------------------------------------- */
.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.mode {
  position: relative; border: 1px solid var(--line); border-radius: 24px;
  background: linear-gradient(180deg, var(--char-800), var(--char-850));
  padding: 2rem 1.8rem 2.2rem; overflow: hidden;
  transition: transform 0.4s var(--ease), border-color 0.4s;
}
.mode:hover { transform: translateY(-6px); border-color: var(--line-strong); }
.mode__no { font-family: var(--font-mono); font-size: 0.75rem; color: var(--ember); letter-spacing: 0.2em; }
.mode h3 { font-size: 1.7rem; margin: 0.6rem 0 0.7rem; }
.mode p { font-size: 0.95rem; color: var(--ash); }
.mode__glow { position: absolute; top: -40%; right: -30%; width: 70%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,106,31,0.18), transparent 65%); opacity: 0; transition: opacity 0.4s; }
.mode:hover .mode__glow { opacity: 1; }

/* Showcase (alternating screenshot + copy) ------------------------------- */
.show { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.show + .show { margin-top: clamp(5rem, 9vw, 9rem); }
.show--flip .show__media { order: 2; }
.show__media { position: relative; }
.show__media .phone { max-width: 300px; margin-inline: auto; }
.show__media::before {
  content: ""; position: absolute; inset: -8% -6%;
  background: radial-gradient(55% 50% at 50% 50%, rgba(156,36,23,0.30), transparent 70%);
  filter: blur(24px); z-index: -1;
}
.show h3 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); }
.show__list { list-style: none; margin-top: 1.6rem; display: grid; gap: 0.9rem; }
.show__list li { display: flex; gap: 0.8rem; align-items: flex-start; color: var(--paper-2); font-size: 0.98rem; }
.show__list svg { flex: none; width: 20px; height: 20px; margin-top: 2px; color: var(--ember); }

/* Feature grid ----------------------------------------------------------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.feature {
  border: 1px solid var(--line); border-radius: 20px; padding: 1.8rem 1.6rem;
  background: rgba(246, 236, 221, 0.018); transition: background 0.3s, transform 0.3s var(--ease);
}
.feature:hover { background: rgba(246, 236, 221, 0.05); transform: translateY(-4px); }
.feature__icon {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  background: linear-gradient(160deg, rgba(255,148,54,0.18), rgba(156,36,23,0.18));
  border: 1px solid var(--line-strong); margin-bottom: 1.2rem;
}
.feature__icon svg { width: 22px; height: 22px; color: var(--ember-hot); }
.feature h3 { font-family: var(--font-body); font-weight: 700; font-size: 1.12rem; letter-spacing: 0; }
.feature p { font-size: 0.92rem; color: var(--ash); margin-top: 0.5rem; }

/* Gallery ---------------------------------------------------------------- */
.gallery { display: flex; gap: 1.4rem; overflow-x: auto; padding-bottom: 1.5rem; scroll-snap-type: x mandatory; }
.gallery::-webkit-scrollbar { height: 8px; }
.gallery::-webkit-scrollbar-thumb { background: var(--char-600); border-radius: 99px; }
.gallery .phone { flex: 0 0 auto; width: 248px; scroll-snap-align: center; }

/* Privacy band ----------------------------------------------------------- */
.privacy-band {
  border: 1px solid var(--line-strong); border-radius: 28px;
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(47, 72, 88, 0.22), transparent 55%),
    linear-gradient(180deg, var(--char-800), var(--char-850));
  padding: clamp(2.4rem, 5vw, 4rem);
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 2.5rem; align-items: center;
}
.privacy-band h2 { font-size: clamp(1.9rem, 4vw, 3rem); }
.privacy-band .lede { margin-top: 1.1rem; }
.privacy-points { list-style: none; display: grid; gap: 1rem; }
.privacy-points li { display: flex; gap: 0.75rem; align-items: flex-start; font-size: 0.95rem; color: var(--paper-2); }
.privacy-points svg { flex: none; width: 22px; height: 22px; color: var(--ember); margin-top: 1px; }

/* CTA -------------------------------------------------------------------- */
.cta { text-align: center; }
.cta__card {
  border: 1px solid var(--line-strong); border-radius: 32px; padding: clamp(3rem, 7vw, 6rem) 2rem;
  background:
    radial-gradient(80% 120% at 50% 0%, rgba(255, 106, 31, 0.18), transparent 60%),
    linear-gradient(180deg, var(--char-800), var(--char-900));
  position: relative; overflow: hidden;
}
.cta h2 { font-size: clamp(2.4rem, 6vw, 4.4rem); }
.cta .lede { margin: 1.4rem auto 0; }
.cta__cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-top: 2.4rem; }

/* Footer ----------------------------------------------------------------- */
.footer { border-top: 1px solid var(--line); padding: clamp(3rem, 6vw, 5rem) 0 3rem; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem; }
.footer p { font-size: 0.92rem; color: var(--ash-dim); margin-top: 1rem; max-width: 38ch; }
.footer h4 { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.2em; font-size: 0.72rem; color: var(--ash); font-weight: 500; margin-bottom: 1.1rem; }
.footer ul { list-style: none; display: grid; gap: 0.7rem; }
.footer a { text-decoration: none; color: var(--paper-2); font-size: 0.92rem; transition: color 0.2s; }
.footer a:hover { color: var(--ember-hot); }
.footer__bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; margin-top: 3.5rem; padding-top: 1.8rem; border-top: 1px solid var(--line); font-family: var(--font-mono); font-size: 0.74rem; color: var(--ash-dim); letter-spacing: 0.06em; }

/* Reveal animation ------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
[data-delay="1"] { transition-delay: 0.08s; }
[data-delay="2"] { transition-delay: 0.16s; }
[data-delay="3"] { transition-delay: 0.24s; }
[data-delay="4"] { transition-delay: 0.32s; }

/* Hero intro stagger */
.hero [data-rise] { opacity: 0; transform: translateY(24px); animation: rise 0.9s var(--ease) forwards; }
.hero [data-rise="1"] { animation-delay: 0.05s; }
.hero [data-rise="2"] { animation-delay: 0.15s; }
.hero [data-rise="3"] { animation-delay: 0.25s; }
.hero [data-rise="4"] { animation-delay: 0.35s; }
.hero [data-rise="5"] { animation-delay: 0.5s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ===== Legal / privacy page ===== */
.legal { padding-top: 4rem; }
.legal__head { border-bottom: 1px solid var(--line); padding-bottom: 2.4rem; margin-bottom: 3rem; }
.legal__head h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); margin-top: 1rem; }
.legal__head .updated { font-family: var(--font-mono); font-size: 0.78rem; color: var(--ash-dim); letter-spacing: 0.08em; margin-top: 1.2rem; }
.legal__layout { display: grid; grid-template-columns: 230px 1fr; gap: 4rem; align-items: start; }
.toc { position: sticky; top: 96px; }
.toc h4 { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.7rem; color: var(--ash); margin-bottom: 1rem; }
.toc ul { list-style: none; display: grid; gap: 0.55rem; }
.toc a { text-decoration: none; color: var(--ash); font-size: 0.86rem; transition: color 0.2s; border-left: 2px solid transparent; padding-left: 0.8rem; margin-left: -0.8rem; display: block; }
.toc a:hover, .toc a.active { color: var(--ember-hot); border-color: var(--ember); }
.legal__body { max-width: 70ch; }
.legal__body section { padding: 0; margin-bottom: 2.8rem; scroll-margin-top: 90px; }
.legal__body h2 { font-family: var(--font-body); font-weight: 700; font-size: 1.4rem; letter-spacing: -0.005em; margin-bottom: 0.9rem; display: flex; align-items: baseline; gap: 0.7rem; }
.legal__body h2 .n { font-family: var(--font-mono); font-size: 0.8rem; color: var(--ember); font-weight: 500; }
.legal__body h3 { font-family: var(--font-body); font-weight: 600; font-size: 1.05rem; margin: 1.4rem 0 0.5rem; }
.legal__body p, .legal__body li { color: var(--paper-2); font-size: 0.98rem; }
.legal__body p + p { margin-top: 0.9rem; }
.legal__body ul { margin: 0.8rem 0 0.8rem 1.2rem; display: grid; gap: 0.55rem; }
.legal__body a:not(.btn) { color: var(--ember-hot); text-decoration: underline; text-underline-offset: 3px; }
.callout {
  border: 1px solid var(--line-strong); border-radius: 18px; padding: 1.6rem 1.8rem; margin: 1.2rem 0 2rem;
  background: radial-gradient(120% 160% at 0% 0%, rgba(255,106,31,0.10), transparent 60%), rgba(246,236,221,0.02);
}
.callout strong { color: var(--paper); }
.perm-table { display: grid; gap: 0.8rem; margin-top: 1rem; }
.perm {
  border: 1px solid var(--line); border-radius: 14px; padding: 1.1rem 1.3rem;
  background: rgba(246,236,221,0.018);
}
.perm b { color: var(--paper); font-size: 1rem; }
.perm span { display: block; color: var(--ash); font-size: 0.92rem; margin-top: 0.3rem; }

/* Responsive ------------------------------------------------------------- */
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; gap: 3.5rem; }
  .hero__device { max-width: 280px; }
  .modes, .features { grid-template-columns: 1fr; }
  .show, .show--flip .show__media { grid-template-columns: 1fr; order: 0; }
  .show__media { order: -1 !important; }
  .privacy-band { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .legal__layout { grid-template-columns: 1fr; gap: 2rem; }
  .toc { position: static; }
  .nav__links { display: none; }
  .nav__links.open {
    display: flex; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column;
    gap: 1.4rem; padding: 1.8rem 4vw 2.2rem; background: var(--char-850); border-bottom: 1px solid var(--line);
  }
  .nav__toggle { display: inline-flex; background: none; border: 1px solid var(--line-strong); border-radius: 10px; padding: 0.5em 0.7em; cursor: pointer; }
  .nav__toggle svg { width: 22px; height: 22px; color: var(--paper); }
  .hero__meta { gap: 1.2rem 1.8rem; }
}
@media (max-width: 560px) {
  .footer__grid { grid-template-columns: 1fr; }
  .hero__cta .btn { flex: 1 1 auto; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
