/* Notch — neo-brutalist site. Mirrors the app: "neo" (paper and ink) and "mono" (black and lime). */

:root {
  --lime: #c6ff3d;
  --pink: #fe4ea2;
  --pink-soft: #ffd9e4;
  --yellow: #ffe600;
  --ice: #bde8ff;
  --black: #111111;

  /* neo */
  --bg: #fcf9f8;
  --card: #ffffff;
  --subtle: #f3f0ee;
  --ink: #111111;
  --muted: #5c5f55;
  --border: #111111;
  --shadow: #111111;
  --pink-ink: #c2186b; /* pink text that passes AA on paper */

  --radius: 18px;
  --display: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Roboto Mono", monospace;

  --step--1: clamp(0.8rem, 0.76rem + 0.2vw, 0.9rem);
  --step-0: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --step-1: clamp(1.25rem, 1.1rem + 0.6vw, 1.6rem);
  --step-2: clamp(1.75rem, 1.4rem + 1.6vw, 2.75rem);
  --step-3: clamp(2.6rem, 1.8rem + 4vw, 5.25rem);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="neo"]) {
    --bg: #0a0a0a;
    --card: #181818;
    --subtle: #242424;
    --ink: #ffffff;
    --muted: #a3a3a3;
    --border: var(--lime);
    --shadow: var(--lime);
    --pink-ink: var(--pink);
    color-scheme: dark;
  }
}

:root[data-theme="mono"] {
  --bg: #0a0a0a;
  --card: #181818;
  --subtle: #242424;
  --ink: #ffffff;
  --muted: #a3a3a3;
  --border: var(--lime);
  --shadow: var(--lime);
  --pink-ink: var(--pink);
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--display);
  font-size: var(--step-0);
  line-height: 1.55;
  overflow-x: hidden;
}

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

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--pink);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 10;
  padding: 10px 14px;
  background: var(--lime);
  color: var(--black);
  font-family: var(--mono);
  font-weight: 800;
  border: 2px solid var(--black);
  border-radius: 10px;
}
.skip:focus { top: 12px; }

.wrap {
  width: min(1120px, 100%);
  margin-inline: auto;
  padding-inline: 16px;
}
@media (min-width: 720px) { .wrap { padding-inline: 28px; } }

/* ---------- Building blocks ---------- */

.card {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 5px 5px 0 var(--shadow);
}

.label {
  font-family: var(--mono);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: var(--step--1);
  color: var(--muted);
}

.sticker {
  display: inline-block;
  padding: 5px 11px;
  font-family: var(--mono);
  font-weight: 800;
  font-size: 0.82rem;
  color: var(--black);
  background: var(--lime);
  border: 1.5px solid var(--border);
  border-radius: 5px;
  transform: rotate(-3deg);
}
.sticker--pink { background: var(--pink); }
.sticker--yellow { background: var(--yellow); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 22px;
  font-family: var(--mono);
  font-weight: 800;
  font-size: 1rem;
  text-decoration: none;
  color: var(--black);
  background: var(--lime);
  border: 2px solid var(--border);
  border-radius: 14px;
  box-shadow: 4px 4px 0 var(--shadow);
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--shadow); }
.btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--shadow); }
.btn--ghost { background: var(--card); color: var(--ink); }
.btn small { font-weight: 600; opacity: 0.75; }

/* The notch X. Stroke basics sit on the <svg> too, so the X still shows without JS. */
.mark { width: 100%; height: 100%; fill: none; stroke: var(--black); stroke-width: 11; stroke-linecap: round; }
.mark path {
  fill: none;
  stroke: var(--black);
  stroke-width: 11;
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  transition: stroke-dashoffset 180ms ease;
}
.mark path:last-child { transition-delay: 110ms; }
[aria-pressed="true"] .mark path,
.mark--on path { stroke-dashoffset: 0; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--bg);
  border-bottom: 2px solid transparent;
  transition: border-color 200ms ease;
}
.site-header.is-scrolled { border-bottom-color: var(--border); }

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 900;
  font-size: 1.7rem;
  letter-spacing: -0.03em;
}
.brand__x {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  background: var(--lime);
  border: 2px solid var(--border);
  border-radius: 10px;
  box-shadow: 2px 2px 0 var(--shadow);
}
.brand__x svg { width: 26px; height: 26px; }

.nav {
  display: none;
  margin-left: auto;
  gap: 4px;
}
.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  border-radius: 10px;
}
.nav a:hover { background: var(--subtle); }
@media (min-width: 820px) { .nav { display: flex; } }

.theme-btn {
  margin-left: auto;
  min-height: 44px;
  padding: 0 14px;
  font-family: var(--mono);
  font-weight: 800;
  font-size: 0.8rem;
  color: var(--black);
  background: var(--lime);
  border: 2px solid var(--border);
  border-radius: 10px;
  box-shadow: 3px 3px 0 var(--shadow);
  cursor: pointer;
}
:root[data-theme="mono"] .theme-btn { background: #000; color: var(--lime); }
@media (prefers-color-scheme: dark) { :root:not([data-theme]) .theme-btn { background: #000; color: var(--lime); } }
@media (min-width: 820px) { .theme-btn { margin-left: 8px; } }
.theme-btn:active { transform: translate(3px, 3px); box-shadow: none; }

/* ---------- Hero ---------- */

.hero { padding-block: clamp(32px, 6vw, 88px) clamp(48px, 8vw, 112px); }

.hero .wrap {
  display: grid;
  gap: clamp(40px, 6vw, 72px);
  align-items: center;
}
@media (min-width: 940px) { .hero .wrap { grid-template-columns: 1.05fr 0.95fr; } }

.hero h1 {
  margin: 18px 0 18px;
  font-size: var(--step-3);
  line-height: 0.95;
  font-weight: 900;
  letter-spacing: -0.045em;
}
.hero h1 .hl {
  background: var(--lime);
  color: var(--black);
  padding: 0 0.12em;
  border-radius: 0.12em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.hero__lede {
  max-width: 34ch;
  margin: 0 0 30px;
  font-size: var(--step-1);
  line-height: 1.4;
  color: var(--muted);
}
.hero__ctas { display: flex; flex-wrap: wrap; gap: 14px; }
.hero__note {
  margin: 16px 0 0;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--muted);
}

/* Interactive demo card */
.demo { position: relative; padding: 32px 18px 18px; }
.demo .sticker { position: absolute; top: -14px; right: 18px; transform: rotate(2deg); }
.demo__hero { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.demo__flame { font-size: 2.3rem; line-height: 1; }
.demo__num { font-size: 3.4rem; font-weight: 900; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.demo__pill {
  padding: 5px 11px;
  font-family: var(--mono);
  font-weight: 800;
  font-size: 0.78rem;
  color: var(--black);
  background: var(--pink);
  border: 1.5px solid var(--border);
  border-radius: 999px;
  white-space: nowrap;
}
.demo__pct {
  margin-left: auto;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  text-align: center;
  font-family: var(--mono);
  font-weight: 800;
  line-height: 1.1;
  color: var(--black);
  background: var(--lime);
  border: 2px solid var(--border);
  border-radius: 12px;
  box-shadow: 3px 3px 0 var(--shadow);
}
.demo__pct small { display: block; font-size: 0.65rem; font-weight: 700; }
.demo__msg { margin: 10px 0 18px; font-family: var(--mono); font-weight: 700; font-size: 0.85rem; color: var(--muted); }

.habits { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.habit {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 16px;
  box-shadow: 4px 4px 0 var(--shadow);
}
.habit__badge {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  font-size: 1.3rem;
  border: 1.5px solid var(--border);
  border-radius: 13px;
  background: color-mix(in srgb, var(--c) 22%, transparent);
}
.habit__text { min-width: 0; flex: 1; }
.habit__name { margin: 0; font-weight: 800; font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.habit__streak { margin: 0; font-family: var(--mono); font-weight: 700; font-size: 0.78rem; color: var(--muted); }
.box {
  flex: none;
  width: 48px;
  height: 48px;
  padding: 3px;
  background: var(--subtle);
  border: 2px solid var(--border);
  border-radius: 12px;
  box-shadow: 3px 3px 0 var(--shadow);
  cursor: pointer;
  transition: transform 110ms ease, box-shadow 110ms ease, background-color 160ms ease;
}
.box[aria-pressed="true"] { background: var(--c); }
.box:active { transform: translate(3px, 3px); box-shadow: none; }

/* ---------- Sections ---------- */

section { scroll-margin-top: 80px; }
.section { padding-block: clamp(56px, 8vw, 104px); }
.section__head { max-width: 640px; margin-bottom: clamp(28px, 4vw, 44px); }
.section__head h2 {
  margin: 14px 0 10px;
  font-size: var(--step-2);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.035em;
}
.section__head p { margin: 0; color: var(--muted); font-size: var(--step-0); }

/* Screens */
.screens {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(240px, 280px);
  gap: 24px;
  overflow-x: auto;
  padding: 10px 10px 22px;
  margin-inline: -10px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}
.screen { margin: 0; scroll-snap-align: start; }
.screen img {
  width: 100%;
  height: auto;
  aspect-ratio: 414 / 900;
  object-fit: cover;
  border: 2px solid var(--border);
  border-radius: 26px;
  box-shadow: 6px 6px 0 var(--shadow);
  background: var(--subtle);
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.2s ease;
}
.screen:hover img {
  transform: translateY(-4px);
  box-shadow: 9px 9px 0 var(--shadow);
}
.screen figcaption {
  margin-top: 14px;
  font-family: var(--mono);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.screen figcaption strong {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.screen figcaption span {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.4;
}

/* Features */
.features {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}
.feature { padding: 22px; }
.feature__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 14px;
  font-size: 1.35rem;
  background: var(--tint, var(--subtle));
  border: 2px solid var(--border);
  border-radius: 12px;
  color: var(--black);
}
.feature h3 { margin: 0 0 6px; font-size: var(--step-1); font-weight: 900; letter-spacing: -0.02em; }
.feature p { margin: 0; color: var(--muted); }

/* Steps */
.steps { display: grid; gap: 20px; counter-reset: step; padding: 0; margin: 0; list-style: none; }
@media (min-width: 820px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { padding: 22px; }
.step::before {
  counter-increment: step;
  content: "0" counter(step);
  display: block;
  margin-bottom: 10px;
  font-family: var(--mono);
  font-weight: 800;
  color: var(--pink-ink);
}
.step h3 { margin: 0 0 6px; font-size: var(--step-1); font-weight: 900; }
.step p { margin: 0; color: var(--muted); }

/* Privacy band */
.band {
  background: var(--black);
  color: #fff;
  border-block: 2px solid var(--black);
}
:root[data-theme="mono"] .band { border-color: var(--lime); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="neo"]) .band { border-color: var(--lime); } }
.band .wrap { display: grid; gap: 28px; align-items: center; }
@media (min-width: 900px) { .band .wrap { grid-template-columns: 1.2fr 1fr; } }
.band h2 { margin: 14px 0 12px; font-size: var(--step-2); font-weight: 900; letter-spacing: -0.035em; line-height: 1.05; }
.band p { margin: 0; color: #c9c9c9; }
.promises { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.promises li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  font-family: var(--mono);
  font-weight: 800;
  border: 2px solid var(--lime);
  border-radius: 14px;
}
.promises svg { flex: none; width: 26px; height: 26px; }
.promises .mark,
.promises .mark path { stroke: var(--lime); stroke-dashoffset: 0; }

/* FAQ */
.faq { display: grid; gap: 14px; max-width: 820px; }
.faq details { padding: 0; }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
  padding: 14px 20px;
  font-weight: 800;
  font-size: 1.05rem;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  flex: none;
  font-family: var(--mono);
  font-weight: 800;
  font-size: 1.4rem;
  transition: transform 160ms ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0; padding: 0 20px 18px; color: var(--muted); }

/* CTA + footer */
.cta { text-align: center; }
.cta h2 { margin: 16px auto 22px; max-width: 18ch; font-size: var(--step-2); font-weight: 900; letter-spacing: -0.035em; line-height: 1.05; }
.cta .hero__ctas { justify-content: center; }

.site-footer {
  padding-block: 32px 40px;
  border-top: 2px solid var(--border);
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--muted);
}
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; }
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }

/* Long-form (privacy) */
.prose { max-width: 720px; padding-block: clamp(32px, 6vw, 72px); }
.prose h1 { font-size: var(--step-2); font-weight: 900; letter-spacing: -0.035em; line-height: 1.05; margin: 16px 0 6px; }
.prose h2 { font-size: var(--step-1); font-weight: 900; margin: 34px 0 8px; }
.prose p, .prose li { color: var(--ink); }
.prose .lead { padding: 18px 20px; margin: 22px 0; }
.prose .meta { font-family: var(--mono); color: var(--muted); font-size: 0.9rem; }

/* Confetti (demo) */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 20; }

/* Reveal on scroll (only when JS + motion allowed) */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity 500ms ease, transform 500ms ease; }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}
