/* ---------------------------------------------------------
   Quitracker — landing page
   Palette: warm charcoal ground, ember spark, sage growth
--------------------------------------------------------- */

:root {
  --bg: #16130f;
  --bg-alt: #1c1811;
  --paper: #f4ede1;
  --paper-dim: #e7ded0;
  --ink: #f4ede1;
  --ink-dim: #b6a894;
  --ink-faint: #8a7d6a;
  --ember: #e8623d;
  --ember-bright: #f0805a;
  --ember-dim: #c94f26;
  --sage: #93ab7e;
  --sage-dim: #6f8a5e;
  --line: rgba(244, 237, 225, 0.12);
  --line-soft: rgba(244, 237, 225, 0.07);

  --font-display: "Fraunces", serif;
  --font-body: "Work Sans", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;

  --wrap: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  background-image:
    radial-gradient(ellipse 70% 50% at 15% 0%, rgba(232, 98, 61, 0.10), transparent 60%),
    radial-gradient(ellipse 60% 40% at 90% 8%, rgba(147, 171, 126, 0.08), transparent 60%);
  background-repeat: no-repeat;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 32px;
}

/* grain overlay */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.045;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.01em;
}

em { font-style: italic; color: var(--ember-bright); }

a { color: inherit; text-decoration: none; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  color: var(--sage);
  margin: 0 0 14px;
  text-transform: uppercase;
}

.section-sub {
  color: var(--ink-dim);
  max-width: 46ch;
  font-size: 17px;
  margin: 16px 0 0;
}

/* ---------------- reveal-on-scroll ---------------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------------- buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  letter-spacing: 0.03em;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), background 0.25s, border-color 0.25s;
}
.btn-ember {
  background: var(--ember);
  color: #1a1410;
}
.btn-ember:hover { background: var(--ember-bright); transform: translateY(-2px); }
.btn-ghost {
  border-color: var(--line);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--sage); color: var(--sage); transform: translateY(-2px); }
.btn-small { padding: 10px 20px; font-size: 12.5px; }

.play-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--paper);
  color: #1a1410;
  padding: 11px 22px 11px 18px;
  border-radius: 14px;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s;
  box-shadow: 0 1px 0 rgba(0,0,0,0.2);
}
.play-badge:hover { transform: translateY(-3px); box-shadow: 0 12px 24px rgba(0,0,0,0.28); }
.play-badge span { display: flex; flex-direction: column; font-family: var(--font-mono); font-size: 15px; font-weight: 600; line-height: 1.25; }
.play-badge small { font-size: 10px; font-weight: 500; letter-spacing: 0.1em; color: #6b5f4f; }
.play-badge-light { background: var(--bg-alt); color: var(--paper); border: 1px solid var(--line); }
.play-badge-light small { color: var(--ink-faint); }

/* ---------------- header ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  background: rgba(22, 19, 15, 0.72);
  border-bottom: 1px solid var(--line-soft);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  padding-top: 18px;
  padding-bottom: 18px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  margin-right: auto;
}
.wordmark-mark { color: var(--ember); display: inline-flex; }
.site-nav { display: flex; gap: 28px; font-size: 14.5px; color: var(--ink-dim); }
.site-nav a:hover { color: var(--ink); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span { width: 20px; height: 1.5px; background: var(--ink); display: block; }

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 8px 32px 22px;
  border-top: 1px solid var(--line-soft);
}
.mobile-nav a { padding: 10px 0; font-size: 15px; color: var(--ink-dim); }
.mobile-nav .btn { margin-top: 10px; width: fit-content; }
.mobile-nav.is-open { display: flex; }

@media (max-width: 860px) {
  .site-nav, .header-inner > .btn { display: none; }
  .nav-toggle { display: flex; }
}

/* ---------------- hero ---------------- */
.hero { padding: 96px 0 70px; position: relative; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: center;
}
.hero-title {
  font-size: clamp(40px, 5.6vw, 68px);
  line-height: 1.04;
  margin-bottom: 22px;
}
.hero-sub {
  font-size: 18.5px;
  color: var(--ink-dim);
  max-width: 46ch;
  margin: 0 0 34px;
}
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-bottom: 26px; }
.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-faint);
  margin: 0;
  padding: 0;
  list-style: none;
}
.hero-trust span { position: relative; padding-left: 14px; }
.hero-trust span::before {
  content: "";
  position: absolute; left: 0; top: 50%;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--sage);
  transform: translateY(-50%);
}

/* --- phone mockup --- */
.hero-visual { position: relative; display: flex; justify-content: center; align-items: center; min-height: 480px; }
.orbit {
  position: absolute;
  width: 420px; height: 420px;
  border: 1px dashed rgba(244,237,225,0.14);
  border-radius: 50%;
  animation: spin 46s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.phone {
  width: 268px;
  padding: 14px;
  border-radius: 44px;
  background: linear-gradient(160deg, #2a241c, #1a1610);
  box-shadow: 0 30px 70px rgba(0,0,0,0.55), inset 0 0 0 1px rgba(244,237,225,0.06);
  position: relative;
  z-index: 2;
  animation: float 7s ease-in-out infinite;
  transform: rotate(-3deg);
}
@keyframes float { 0%, 100% { transform: rotate(-3deg) translateY(0); } 50% { transform: rotate(-3deg) translateY(-14px); } }

.phone-notch {
  position: absolute;
  top: 26px; left: 50%; transform: translateX(-50%);
  width: 54px; height: 6px; border-radius: 4px;
  background: rgba(244,237,225,0.14);
}
.phone-screen {
  background: var(--paper);
  border-radius: 32px;
  padding: 46px 22px 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.phone-topline {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--font-mono);
}
.phone-day { font-size: 11px; letter-spacing: 0.1em; color: var(--ember-dim); font-weight: 600; }
.phone-date { font-size: 11px; color: #8a7d6a; }

.ring-wrap { position: relative; width: 152px; height: 152px; }
.ring-wrap svg { width: 100%; height: 100%; }
.ring-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-family: var(--font-mono); color: #241d15;
}
.ring-center strong { font-size: 34px; line-height: 1; font-weight: 600; }
.ring-center small { font-size: 10.5px; color: #6b5f4f; margin-top: 4px; }

.phone-log {
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--ember);
  color: #241d15;
  border: none;
  border-radius: 14px;
  padding: 13px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: default;
}
.phone-stats {
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid rgba(36,29,21,0.1);
}
.phone-stats div { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.phone-stats strong { font-family: var(--font-mono); font-size: 15px; color: #241d15; }
.phone-stats small { font-family: var(--font-mono); font-size: 9.5px; color: #8a7d6a; text-transform: uppercase; letter-spacing: 0.06em; }

.float-chip {
  position: absolute;
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 12.5px;
  color: var(--ink-dim);
  box-shadow: 0 14px 30px rgba(0,0,0,0.35);
  z-index: 3;
  animation: float2 8s ease-in-out infinite;
}
.float-chip b { color: var(--ink); font-weight: 600; }
.chip-trigger { top: 6%; right: -4%; animation-delay: 0.4s; }
.chip-timer { bottom: 10%; left: -8%; animation-delay: 1.6s; }
@keyframes float2 { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

@media (max-width: 640px) {
  .float-chip { display: none; }
  .orbit { display: none; }
}

/* ---------------- marquee ---------------- */
.marquee {
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  background: var(--bg-alt);
  padding: 16px 0;
  overflow: hidden;
  white-space: nowrap;
}
.marquee-track {
  display: inline-flex;
  gap: 18px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  animation: marquee 32s linear infinite;
}
.marquee-track span:nth-child(odd) { color: var(--sage); }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------------- section head ---------------- */
.section-head { max-width: 640px; margin-bottom: 56px; }
.section-head h2, .patterns h2, .privacy h2 { font-size: clamp(30px, 3.6vw, 44px); line-height: 1.1; }

/* ---------------- how it works ---------------- */
.how { padding: 110px 0; }
.how-item {
  display: grid;
  grid-template-columns: 90px 1fr 1fr;
  gap: 30px;
  align-items: center;
  padding: 46px 0;
  border-top: 1px solid var(--line-soft);
}
.how-item:last-child { border-bottom: 1px solid var(--line-soft); }
.how-index {
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--ember);
  letter-spacing: 0.05em;
}
.how-text h3 { font-size: 26px; margin-bottom: 12px; }
.how-text p { color: var(--ink-dim); max-width: 42ch; margin: 0; }
.how-item-reverse .how-text { order: 3; }
.how-item-reverse .how-visual { order: 2; }

.how-visual { display: flex; justify-content: center; }

.tag-row { display: flex; flex-wrap: wrap; gap: 10px; }
.tag {
  font-family: var(--font-mono);
  font-size: 12.5px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--ink-dim);
}
.tag-on { background: var(--ember); border-color: var(--ember); color: #1a1410; font-weight: 600; }

.taper-bars { display: flex; align-items: flex-end; gap: 8px; height: 100px; }
.taper-bars div {
  width: 16px;
  height: var(--h);
  background: linear-gradient(180deg, var(--sage), var(--sage-dim));
  border-radius: 5px 5px 2px 2px;
}

.timer-ring { position: relative; width: 96px; height: 96px; display: flex; align-items: center; justify-content: center; }
.timer-ring span { position: absolute; font-family: var(--font-mono); font-size: 16px; color: var(--ink); }

@media (max-width: 760px) {
  .how-item, .how-item-reverse .how-text, .how-item-reverse .how-visual {
    grid-template-columns: 1fr;
    order: initial;
  }
  .how-item { grid-template-columns: 1fr; text-align: left; }
  .how-visual { justify-content: flex-start; margin-top: 6px; }
}

/* ---------------- progress ---------------- */
.progress { padding: 110px 0; background: var(--bg-alt); }
.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-bottom: 70px;
}
.stat {
  border-top: 2px solid var(--ember);
  padding-top: 20px;
}
.stat:nth-child(2) { border-color: var(--sage); }
.stat:nth-child(3) { border-color: var(--ink-faint); }
.stat strong {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(36px, 4.4vw, 52px);
  font-weight: 600;
  color: var(--ink);
}
.stat span { display: block; font-size: 16px; color: var(--ink-dim); margin-top: 6px; }
.stat small { display: block; font-size: 13px; color: var(--ink-faint); margin-top: 6px; }

.receipt-wrap { display: flex; justify-content: center; }
.receipt {
  background: var(--paper);
  color: #241d15;
  width: 100%;
  max-width: 460px;
  padding: 30px 28px 20px;
  border-radius: 4px;
  position: relative;
  box-shadow: 0 30px 60px rgba(0,0,0,0.35);
}
.receipt::before {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -8px; height: 16px;
  background:
    linear-gradient(135deg, var(--paper) 50%, transparent 50%) 0 0 / 16px 16px repeat-x;
}
.receipt-head { margin-bottom: 18px; }
.receipt-head h3 { font-family: var(--font-display); font-size: 19px; margin-bottom: 6px; color: #241d15; }
.receipt-head p { font-size: 13.5px; color: #6b5f4f; margin: 0; }
.receipt-day {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ember-dim);
  margin: 18px 0 8px;
  padding-top: 12px;
  border-top: 1px dashed rgba(36,29,21,0.18);
}
.receipt-day:first-of-type { border-top: none; }
.receipt-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  font-family: var(--font-mono);
  font-size: 13.5px;
}
.receipt-time { color: #8a7d6a; width: 52px; }
.receipt-tag { flex: 1; font-family: var(--font-body); font-size: 15px; }
.receipt-del { background: none; border: none; cursor: pointer; color: #b8a892; padding: 4px; }
.receipt-del:hover { color: var(--ember-dim); }

@media (max-width: 760px) { .stat-row { grid-template-columns: 1fr; gap: 40px; } }

/* ---------------- patterns ---------------- */
.patterns { padding: 110px 0; }
.patterns-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 60px; align-items: center; }
.patterns h2 { margin-top: 4px; }

.patterns-visuals { display: flex; flex-direction: column; gap: 44px; }
.hour-chart { background: var(--bg-alt); border: 1px solid var(--line); border-radius: 18px; padding: 26px 24px 18px; }
.hour-bars { display: flex; align-items: flex-end; gap: 4px; height: 110px; }
.hour-bars div { flex: 1; height: var(--h); background: var(--ink-faint); opacity: 0.5; border-radius: 3px 3px 0 0; }
.hour-bars div.peak { background: var(--ember); opacity: 1; }
.hour-labels { display: flex; justify-content: space-between; margin-top: 10px; font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-faint); }

.trigger-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  align-items: baseline;
}
.trigger-cloud span {
  font-family: var(--font-display);
  font-style: italic;
  font-size: calc(20px * var(--s));
  color: var(--sage);
}
.trigger-cloud span:nth-child(1) { color: var(--ember); }

@media (max-width: 860px) { .patterns-grid { grid-template-columns: 1fr; } }

/* ---------------- privacy ---------------- */
.privacy { padding: 110px 0; background: var(--bg-alt); }
.privacy-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
.privacy-list { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-direction: column; gap: 12px; }
.privacy-list li { display: flex; align-items: center; gap: 10px; font-size: 15.5px; color: var(--ink-dim); }

.lang-row { display: flex; align-items: center; gap: 10px; margin-top: 30px; font-size: 14px; color: var(--ink-faint); }
.lang-badge {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 5px 9px;
  color: var(--ink);
}
.lock-visual { display: flex; justify-content: center; }

@media (max-width: 860px) { .privacy-grid { grid-template-columns: 1fr; } .lock-visual { order: -1; } }

/* ---------------- disclaimer ---------------- */
.disclaimer {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px 26px;
  margin: 70px auto;
  max-width: 760px;
  background: var(--bg-alt);
}
.disclaimer p { margin: 0; font-size: 14px; color: var(--ink-faint); line-height: 1.6; }
.disclaimer strong { color: var(--ink-dim); }

/* ---------------- closing ---------------- */
.closing { padding: 60px 0 130px; text-align: center; }
.closing-inner { display: flex; flex-direction: column; align-items: center; gap: 26px; }
.closing h2 { font-size: clamp(30px, 4.2vw, 48px); line-height: 1.15; }
.closing-sub { font-family: var(--font-mono); font-size: 13px; color: var(--ink-faint); margin: 0; }

/* ---------------- footer ---------------- */
.site-footer { border-top: 1px solid var(--line-soft); padding: 50px 0 34px; }
.footer-inner { display: grid; grid-template-columns: 1fr auto; gap: 20px 40px; align-items: start; }
.footer-brand p { margin: 8px 0 0; color: var(--ink-faint); font-size: 14px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 22px; font-size: 14px; color: var(--ink-dim); grid-column: 2; grid-row: 1; }
.footer-links a:hover { color: var(--ink); }
.footer-fine { grid-column: 1 / -1; margin: 24px 0 0; padding-top: 24px; border-top: 1px solid var(--line-soft); font-size: 12.5px; color: var(--ink-faint); }

@media (max-width: 640px) {
  .footer-inner { grid-template-columns: 1fr; }
  .footer-links { grid-column: 1; grid-row: 2; }
}
