/*
 * Not One More — website styles.
 *
 * Tokens mirror constants/Theme.ts. They are duplicated rather than imported
 * because this site has no build step by design; if a token changes in the app,
 * change it here too. That is the whole cost of the no-dependency choice and it
 * is deliberately cheap — there are eleven values.
 *
 * Dark-first, one accent. Hard and athletic, not soft and medical: the entire
 * category is pastel and illustrated, so restraint is the differentiator.
 */

/* Inter — the face the logo is drawn in.
 *
 * Self-hosted, not Google Fonts. privacy.html tells visitors this site makes no
 * third-party requests and the CSP enforces it; linking fonts.googleapis.com
 * would hand every visitor's IP to Google and contradict the page it is printed
 * on. One variable file, subset to Latin, is 60KB — see
 * scripts/generate-site-fonts.sh and assets/fonts/OFL-NOTICE.txt.
 *
 * A single face covers 100–900, so the heavy display weights and the body text
 * share one download. `swap` because the fallback metrics are close enough that
 * a flash beats blank headings.
 */
@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/inter-var.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #0a0b0a;
  --surface: #141614;
  --surface-raised: #1e211e;
  --border: #2a2e2a;

  --acid: #c6f833;
  --acid-dim: #9bc421;
  --acid-wash: rgba(198, 248, 51, 0.12);

  --text: #f4f6f2;
  --text-muted: #8b918a;
  --text-faint: #5a5f59;

  --amber: #ffb020;

  /* One family for both roles — the logo is Inter, so the page is Inter. The
     display/body split is now weight and tracking, not typeface. The fallback
     is the platform UI sans, which is metrically close enough that the swap is
     not jarring. */
  --font-display: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI',
    Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-body: var(--font-display);

  --measure: 34rem;
  --gutter: clamp(1.25rem, 5vw, 2.5rem);
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* Brand marks.
 *
 * Both are PNGs generated by scripts/generate-site-assets.py from the designer
 * exports in site/assets/source/. They ship pre-coloured acid on transparent,
 * so nothing here sets a colour — do not try, and do not reach for a style
 * attribute if you ever need to: the CSP sends `style-src 'self'`, which blocks
 * inline style attributes outright. Anything styled inline renders unstyled in
 * production while looking correct over a plain local file server.
 *
 * Every <img> carries width/height so the intrinsic ratio is known before the
 * bytes arrive and the page does not jump as the logo loads.
 */
.mark {
  display: block;
  width: auto;
  height: 100%;
}

/* The stacked NOT / ONE / MORE lockup. Hero only. */
.hero-wordmark {
  display: block;
  width: auto;
  height: clamp(7rem, 19vw, 11.5rem);
  margin-bottom: clamp(1.75rem, 5vw, 2.75rem);
}

a {
  color: var(--acid);
  text-decoration-color: var(--acid-dim);
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--text);
}

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

.wrap {
  width: 100%;
  max-width: 62rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.prose {
  max-width: var(--measure);
}

section {
  padding-block: clamp(3rem, 9vw, 6rem);
  border-top: 1px solid var(--border);
}

/* The header is sticky, so an anchor jump would otherwise park the section
   heading underneath it. Roughly the pill's height plus its padding. */
[id] {
  scroll-margin-top: 5.5rem;
}

section:first-of-type {
  border-top: 0;
}

/* ---------- type ---------- */

/* Weight 900 to match the logo, which is Inter Black. Uppercase Inter at that
   weight needs negative tracking or the counters close up and it reads as a
   block; the previous condensed stack did not, so every letter-spacing value
   below was retuned when the face changed. */
h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 900;
  font-optical-sizing: auto;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 1.02;
  margin: 0 0 0.6em;
  text-wrap: balance;
}

/* Sizes come down from the condensed values. Inter sets about 12% wider at the
   same point size, so the old clamps overflowed their columns. */
h1 {
  font-size: clamp(2.5rem, 7.5vw, 4.5rem);
  letter-spacing: -0.035em;
}

h2 {
  font-size: clamp(1.625rem, 4vw, 2.5rem);
  letter-spacing: -0.03em;
}

h3 {
  font-size: 1.0625rem;
  font-weight: 800;
  letter-spacing: 0;
}

p {
  margin: 0 0 1.1em;
  text-wrap: pretty;
}

.lede {
  font-size: clamp(1.0625rem, 2.2vw, 1.3125rem);
  color: var(--text-muted);
  max-width: var(--measure);
}

.label {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--acid);
  margin: 0 0 1.25rem;
}

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

.fine {
  font-size: 0.875rem;
  color: var(--text-faint);
  line-height: 1.5;
}

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

/* Sticky pill. The CTA has to stay reachable through a long page — the whole
   point of the extra length is more places to convert, and a nav that scrolls
   away throws that back. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  padding-block: 0.75rem;
}

.site-header .bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0.75rem 0.6rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(20, 22, 20, 0.82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

/* The document pages keep the plain header — no CTA, nothing sticky. A privacy
   policy that follows you down the page with a Download button reads badly. */
.site-header.plain {
  position: static;
  padding-block: 1.5rem;
}

.site-header.plain .bar {
  padding: 0;
  border: 0;
  background: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.site-header .btn {
  padding: 0.6rem 1.25rem;
  font-size: 0.8125rem;
}

@media (max-width: 40rem) {
  .site-header nav a:not(.btn) {
    display: none;
  }
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
}

.wordmark .mark {
  height: 1.5rem;
  flex: none;
}

.site-header nav {
  display: flex;
  gap: clamp(0.9rem, 3vw, 1.75rem);
  font-size: 0.875rem;
}

.site-header nav a {
  color: var(--text-muted);
  text-decoration: none;
}

.site-header nav a:hover {
  color: var(--text);
}

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

.hero {
  padding-block: clamp(3rem, 11vw, 7rem) clamp(3rem, 9vw, 6rem);
}

/* Smaller than the global h1 scale. That one is sized for a full-width line;
   here the headline shares the row with the phones and only gets about half
   the page, so the same clamp produces six wrapped lines. */
.hero h1 {
  font-size: clamp(1.875rem, 3.3vw, 2.625rem);
  max-width: 22ch;
}

.hero .lede {
  max-width: 38ch;
}

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

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 2.25rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.75rem;
  border-radius: 999px;
  background: var(--acid);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--acid);
}

.btn:hover {
  background: var(--acid-dim);
  border-color: var(--acid-dim);
  color: var(--ink);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-ghost:hover {
  background: var(--surface-raised);
  border-color: var(--text-faint);
  color: var(--text);
}

/* ---------- beats ---------- */

.beats {
  display: grid;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 22px;
  overflow: hidden;
  margin-top: 2.5rem;
}

@media (min-width: 46rem) {
  .beats {
    grid-template-columns: repeat(3, 1fr);
  }
}

.beat {
  background: var(--surface);
  padding: clamp(1.5rem, 4vw, 2.25rem);
}

.beat-n {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--text-faint);
  display: block;
  margin-bottom: 1rem;
}

.beat h3 {
  color: var(--acid);
  margin-bottom: 0.35em;
}

.beat .dur {
  font-size: 0.8125rem;
  color: var(--text-faint);
  margin-bottom: 1rem;
}

.beat p:last-child {
  margin-bottom: 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

/* ---------- promises ---------- */

.promises {
  list-style: none;
  padding: 0;
  margin: 2.5rem 0 0;
  display: grid;
  gap: 1px;
  background: var(--border);
  border-block: 1px solid var(--border);
}

@media (min-width: 46rem) {
  .promises {
    grid-template-columns: 1fr 1fr;
    border: 1px solid var(--border);
    border-radius: 22px;
    overflow: hidden;
  }
}

.promises li {
  background: var(--surface);
  padding: clamp(1.35rem, 3.5vw, 1.85rem);
}

.promises strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.promises span {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

/* ---------- evidence ---------- */

.evidence {
  border-left: 2px solid var(--acid);
  padding-left: clamp(1rem, 3vw, 1.75rem);
  margin: 2.5rem 0 0;
  max-width: var(--measure);
}

.evidence p {
  color: var(--text-muted);
}

.evidence p:last-child {
  margin-bottom: 0;
}

.notice {
  border: 1px solid var(--border);
  border-left: 2px solid var(--amber);
  background: var(--surface);
  border-radius: 0 14px 14px 0;
  padding: 1.25rem 1.5rem;
  margin: 2rem 0 0;
  max-width: var(--measure);
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.notice p:last-child {
  margin-bottom: 0;
}

/* ---------- legal / support documents ---------- */

.doc {
  padding-block: clamp(2.5rem, 7vw, 4.5rem);
}

.doc h1 {
  font-size: clamp(2.25rem, 6vw, 3.5rem);
}

.doc h2 {
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  margin-top: 2.75rem;
}

.doc h2:first-of-type {
  margin-top: 2rem;
}

.doc h3 {
  margin-top: 2rem;
  color: var(--text-muted);
}

/* Legal text is read, not scanned. Hold every paragraph to the same measure as
   the lede — without this, body copy runs to the 62rem wrap while the lede sits
   at 34rem, and the column edge visibly jumps mid-document. */
.doc p {
  max-width: var(--measure);
}

.doc ul,
.doc ol {
  max-width: var(--measure);
  padding-left: 1.25rem;
  margin: 0 0 1.1em;
  color: var(--text);
}

.doc li {
  margin-bottom: 0.55em;
}

.doc li::marker {
  color: var(--acid-dim);
}

.doc dt {
  font-weight: 700;
  margin-top: 1.5rem;
}

.doc dd {
  margin: 0.35rem 0 0;
  color: var(--text-muted);
  max-width: var(--measure);
}

.updated {
  font-size: 0.8125rem;
  color: var(--text-faint);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 2.5rem;
}

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

.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 2.5rem 3.5rem;
  color: var(--text-faint);
  font-size: 0.875rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.site-footer nav a {
  color: var(--text-muted);
  text-decoration: none;
}

.site-footer nav a:hover {
  color: var(--text);
}

.site-footer p {
  margin: 0 0 0.5em;
  max-width: var(--measure);
}

/* ---------- device frames ----------
 *
 * PLACEHOLDERS. Each .shot is an empty iPhone bezel at the real aspect ratio
 * (9:19.5). To drop in a real screenshot, replace the .shot-ph child with
 * <img class="shot-img" src="/assets/shot-home.png" alt="…"> — nothing else
 * needs to change, because the frame sizes the image rather than the reverse.
 * Capture at 1179x2556 (iPhone 15 Pro) so they stay sharp on a 2x display.
 */

.shot {
  position: relative;
  aspect-ratio: 9 / 19.5;
  border: 2px solid var(--border);
  border-radius: 2rem;
  background: var(--surface);
  padding: 0.4rem;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.9);
}

/* The notch. Decorative — it is what makes an empty rectangle read as a phone. */
.shot::before {
  content: '';
  position: absolute;
  top: 0.85rem;
  left: 50%;
  transform: translateX(-50%);
  width: 28%;
  height: 0.5rem;
  border-radius: 999px;
  background: var(--ink);
  z-index: 2;
}

.shot-img,
.shot-ph {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 1.7rem;
  object-fit: cover;
}

.shot-ph {
  display: grid;
  place-content: center;
  gap: 0.35rem;
  text-align: center;
  background: var(--ink);
  border: 1px dashed var(--border);
  color: var(--text-faint);
  padding: 1rem;
}

.shot-ph b {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.shot-ph span {
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Hero trio. The middle phone sits forward and larger, the outer two fall back
   — the arrangement every app landing page uses because one flat phone reads as
   a slide and three staggered ones read as a product. */
.shot-trio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  gap: clamp(0.5rem, 1.5vw, 1rem);
  margin-top: clamp(2.5rem, 6vw, 4rem);
}

.shot-trio .shot:nth-child(odd) {
  transform: scale(0.86);
  opacity: 0.55;
}

@media (min-width: 60rem) {
  .hero-grid {
    display: grid;
    grid-template-columns: 1fr 0.95fr;
    align-items: center;
    gap: clamp(2rem, 5vw, 4rem);
  }

  .hero-grid .shot-trio {
    margin-top: 0;
  }
}

/* Alternating feature rows. */
.feature-row {
  display: grid;
  gap: clamp(1.75rem, 5vw, 3.5rem);
  align-items: center;
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
}

@media (min-width: 54rem) {
  .feature-row {
    grid-template-columns: 1fr 0.62fr;
  }

  .feature-row.flip .feature-copy {
    order: 2;
  }
}

.feature-row .shot {
  max-width: 17rem;
  width: 100%;
  margin-inline: auto;
}

.feature-copy p:last-child {
  margin-bottom: 0;
}

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

/* Mechanism numbers, not outcome numbers. Every figure here is about how a
   craving behaves, and each is sourced in the evidence section. There are no
   user counts or success rates on this site by decision — ours would be
   invented, and the category is full of people inventing them. */
.stats {
  display: grid;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 22px;
  overflow: hidden;
  margin-top: clamp(2.5rem, 6vw, 4rem);
}

@media (min-width: 46rem) {
  .stats {
    grid-template-columns: repeat(3, 1fr);
  }
}

.stat {
  background: var(--surface);
  padding: clamp(1.5rem, 4vw, 2.25rem);
  text-align: center;
}

.stat b {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 6vw, 3.25rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--acid);
  margin-bottom: 0.5rem;
}

.stat span {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.statement {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 5vw, 3.25rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 1.08;
  max-width: 24ch;
  margin: 0;
  text-wrap: balance;
}

.statement em {
  font-style: normal;
  color: var(--acid);
}

/* Scroll-driven reveal, no JavaScript — the CSP sends `script-src 'none'`, so
   a JS-driven version could not run even if it were written. Default state is
   fully visible: browsers without scroll-driven animations get plain readable
   text rather than a paragraph stuck at 20% opacity. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .statement span {
      opacity: 0.22;
      animation: reveal linear both;
      animation-timeline: view();
      animation-range: cover 12% cover 58%;
    }
  }
}

@keyframes reveal {
  to {
    opacity: 1;
  }
}

/* ---------- trigger marquee ---------- */

/* The real TriggerTag values from types/index.ts. It says "we know when this
   happens to you" faster than a paragraph can. */
.marquee {
  overflow: hidden;
  border-block: 1px solid var(--border);
  padding-block: 1.25rem;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.marquee ul {
  display: flex;
  gap: 2.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
  width: max-content;
  animation: slide 38s linear infinite;
}

.marquee li {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.2vw, 1.375rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-faint);
  white-space: nowrap;
}

.marquee li::after {
  content: '·';
  margin-left: 2.5rem;
  color: var(--acid-dim);
}

@keyframes slide {
  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .marquee ul {
    animation: none;
    flex-wrap: wrap;
    width: auto;
    justify-content: center;
    gap: 1.25rem;
  }
}

/* ---------- faq ---------- */

/* <details> rather than a scripted accordion: keyboard accessible for free,
   findable with the browser's own in-page search, and it works under a CSP
   that forbids script entirely. */
.faq {
  margin-top: 2.5rem;
  border-top: 1px solid var(--border);
  max-width: 46rem;
}

.faq details {
  border-bottom: 1px solid var(--border);
}

.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 1.25rem 2.5rem 1.25rem 0;
  position: relative;
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--text);
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '+';
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1;
  color: var(--acid);
}

.faq details[open] summary::after {
  content: '–';
}

.faq summary:hover {
  color: var(--acid);
}

.faq .answer {
  padding: 0 2.5rem 1.5rem 0;
  color: var(--text-muted);
  max-width: var(--measure);
}

.faq .answer p:last-child {
  margin-bottom: 0;
}

/* ---------- closing cta ---------- */

.closer {
  text-align: center;
  border-top: 1px solid var(--border);
}

.closer h2 {
  max-width: 18ch;
  margin-inline: auto;
}

.closer .cta-row {
  justify-content: center;
}

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

.footer-cols {
  display: grid;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

@media (min-width: 40rem) {
  .footer-cols {
    grid-template-columns: 1.4fr repeat(3, 1fr);
  }
}

.footer-cols h3 {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  color: var(--text-faint);
  margin-bottom: 1rem;
}

.footer-cols ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}

.footer-cols a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
}

.footer-cols a:hover {
  color: var(--text);
}

.footer-brand .mark {
  height: 2rem;
  margin-bottom: 0.9rem;
}

/* ---------- accessibility ---------- */

:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: var(--gutter);
  top: 1rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--acid);
  color: var(--ink);
  border-radius: 8px;
  text-decoration: none;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
