/* Quits — quitsapp.co
   Palette and type mirror the app (app/lib/app/theme.dart). */

:root {
  --ground: #f7f7f5;
  --card: #ffffff;
  --ink: #1a1d1b;
  --subtle: #6e756f;
  --outline: #e6e7e3;
  --accent: #1e6b4f;
  --accent-ink: #ffffff;
  --accent-tint: #e3efe9;
  --receipt: #fffdf6;
  --shadow: 0 24px 60px -24px rgba(26, 29, 27, 0.25);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #121513;
    --card: #1c201d;
    --ink: #e9ece8;
    --subtle: #97a09a;
    --outline: #313632;
    --accent: #6bc79e;
    --accent-ink: #0b2a1e;
    --accent-tint: #1e2a24;
    --receipt: #20241f;
    --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.6);
  }
}
:root[data-theme="light"] {
  --ground: #f7f7f5;
  --card: #ffffff;
  --ink: #1a1d1b;
  --subtle: #6e756f;
  --outline: #e6e7e3;
  --accent: #1e6b4f;
  --accent-ink: #ffffff;
  --accent-tint: #e3efe9;
  --receipt: #fffdf6;
  --shadow: 0 24px 60px -24px rgba(26, 29, 27, 0.25);
}
:root[data-theme="dark"] {
  --ground: #121513;
  --card: #1c201d;
  --ink: #e9ece8;
  --subtle: #97a09a;
  --outline: #313632;
  --accent: #6bc79e;
  --accent-ink: #0b2a1e;
  --accent-tint: #1e2a24;
  --receipt: #20241f;
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.6);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  background: var(--ground);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.mono {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ---- header ---- */
header {
  padding: 28px 0;
}
header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.brand:hover { text-decoration: none; }
.brand svg { display: block; }
nav { display: flex; gap: 24px; align-items: center; font-weight: 600; font-size: 0.95rem; }
nav a { color: var(--subtle); }
nav a:hover { color: var(--accent); text-decoration: none; }

/* ---- hero ---- */
.hero { padding: 48px 0 88px; }
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 64px;
  align-items: center;
}
.kicker {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-tint);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 20px;
}
h1 {
  font-size: clamp(2.4rem, 5.2vw, 3.6rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.035em;
  text-wrap: balance;
  margin-bottom: 20px;
}
h1 em { font-style: normal; color: var(--accent); }
.lede {
  font-size: 1.15rem;
  color: var(--subtle);
  max-width: 34em;
  margin-bottom: 32px;
}
.cta-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.btn {
  display: inline-block;
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 26px;
  border-radius: 14px;
  border: 1px solid transparent;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { text-decoration: none; filter: brightness(1.08); }
.btn-ghost { border-color: var(--outline); color: var(--ink); }
.btn-ghost:hover { text-decoration: none; border-color: var(--accent); color: var(--accent); }
.cta-note { font-size: 0.85rem; color: var(--subtle); width: 100%; }

/* ---- receipt mockup ---- */
.receipt {
  background: var(--receipt);
  border: 1px solid var(--outline);
  border-radius: 6px 6px 18px 18px;
  box-shadow: var(--shadow);
  padding: 26px 24px 30px;
  font-size: 0.86rem;
  transform: rotate(1.5deg);
  position: relative;
}
.receipt::before {
  content: "";
  position: absolute;
  top: -1px; left: 0; right: 0;
  height: 8px;
  background:
    linear-gradient(-45deg, transparent 33.333%, var(--receipt) 33.333%, var(--receipt) 66.667%, transparent 66.667%),
    linear-gradient(45deg, transparent 33.333%, var(--receipt) 33.333%, var(--receipt) 66.667%, transparent 66.667%);
  background-size: 12px 16px;
  background-position: 0 -8px;
  transform: translateY(-7px);
}
.receipt-head {
  text-align: center;
  color: var(--subtle);
  letter-spacing: 0.08em;
  border-bottom: 1px dashed var(--outline);
  padding-bottom: 12px;
  margin-bottom: 14px;
}
.receipt-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 5px 0;
}
.receipt-line .qty { color: var(--subtle); min-width: 2ch; }
.receipt-line .name { flex: 1; min-width: 0; }
.receipt-line .price { color: var(--subtle); }
.chip {
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-tint);
  border-radius: 999px;
  padding: 2px 9px;
  white-space: nowrap;
}
.receipt-total {
  display: flex;
  justify-content: space-between;
  border-top: 1px dashed var(--outline);
  margin-top: 12px;
  padding-top: 12px;
  font-weight: 700;
}
.voice-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--card);
  border: 1px solid var(--outline);
  border-radius: 16px;
  padding: 14px 18px;
  margin: -26px 8px 0 32px;
  position: relative;
  box-shadow: var(--shadow);
  font-size: 0.92rem;
}
.voice-note .mic { color: var(--accent); flex-shrink: 0; margin-top: 2px; }
.voice-note q { font-style: italic; color: var(--subtle); quotes: "\201C" "\201D"; }

/* ---- sections ---- */
section { padding: 72px 0; }
.section-alt { background: var(--card); border-top: 1px solid var(--outline); border-bottom: 1px solid var(--outline); }
h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  text-wrap: balance;
  margin-bottom: 12px;
}
.section-lede { color: var(--subtle); max-width: 40em; margin-bottom: 44px; }

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  counter-reset: step;
}
.step { counter-increment: step; }
.step::before {
  content: counter(step, decimal-leading-zero);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  display: block;
  margin-bottom: 10px;
}
.step h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; letter-spacing: -0.01em; }
.step p { color: var(--subtle); font-size: 0.95rem; }

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature {
  background: var(--card);
  border: 1px solid var(--outline);
  border-radius: 16px;
  padding: 24px;
}
.section-alt .feature { background: var(--ground); }
.feature h3 { font-size: 1.02rem; font-weight: 700; margin-bottom: 6px; letter-spacing: -0.01em; }
.feature p { color: var(--subtle); font-size: 0.92rem; }

/* ---- beta band ---- */
.beta { text-align: center; }
.beta .wrap { max-width: 620px; }
.beta p { color: var(--subtle); margin-bottom: 28px; }

/* ---- footer ---- */
footer {
  border-top: 1px solid var(--outline);
  padding: 36px 0 48px;
  font-size: 0.88rem;
  color: var(--subtle);
}
footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
footer nav { gap: 20px; font-weight: 500; }
footer nav a { color: var(--subtle); }

/* ---- subpages ---- */
.page { padding: 40px 0 96px; }
.page .wrap { max-width: 720px; }
.page h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin-bottom: 12px; }
.page .updated { color: var(--subtle); font-size: 0.88rem; margin-bottom: 40px; }
.page h2 { font-size: 1.25rem; margin: 40px 0 10px; }
.page p, .page li { color: var(--ink); }
.page ul { padding-left: 22px; margin: 10px 0; }
.page li { margin: 6px 0; }
.deflist {
  border: 1px solid var(--outline);
  border-radius: 16px;
  background: var(--card);
  overflow: hidden;
  margin: 28px 0;
}
.deflist > div {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 16px;
  padding: 16px 22px;
}
.deflist > div + div { border-top: 1px solid var(--outline); }
.deflist dt { font-weight: 700; font-size: 0.92rem; }
.deflist dd { color: var(--subtle); font-size: 0.95rem; overflow-wrap: anywhere; }

/* ---- responsive ---- */
@media (max-width: 640px) {
  header nav a:not(.btn) { display: none; }
}
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 56px; }
  .receipt { max-width: 420px; margin: 0 auto; }
  .steps, .features { grid-template-columns: 1fr; }
  .deflist > div { grid-template-columns: 1fr; gap: 4px; }
}
