/* Doomscroll Detox website — the app's "calm & warm" palette, light and dark. */

:root {
  --bg: #fbf7f1;
  --surface: #f2ece3;
  --card: #ffffff;
  --text-high: #2a2420;
  --text: #3a332e;
  --muted: #7d726a;
  --border: rgba(60, 45, 35, 0.1);
  --accent: #4f7b5e;
  --accent-soft: #e3ede5;
  --on-accent: #ffffff;
  --warn: #c2694a;
  --warn-soft: #f6e2d8;
  --highlight: #d9a43a;
  --highlight-soft: #f8edd2;
  --shadow: 0 1px 2px rgba(60, 45, 35, 0.06), 0 12px 32px rgba(60, 45, 35, 0.08);
  --phone-shadow: 0 30px 60px rgba(60, 45, 35, 0.18), 0 8px 18px rgba(60, 45, 35, 0.08);
  --radius: 22px;
  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171412;
    --surface: #221e1a;
    --card: #2a2521;
    --text-high: #f5efe7;
    --text: #e6ded4;
    --muted: #a0958b;
    --border: rgba(245, 239, 231, 0.1);
    --accent: #8fbf9d;
    --accent-soft: rgba(143, 191, 157, 0.16);
    --on-accent: #14211a;
    --warn: #e0926e;
    --warn-soft: rgba(224, 146, 110, 0.16);
    --highlight: #eec86a;
    --highlight-soft: rgba(238, 200, 106, 0.16);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px rgba(0, 0, 0, 0.3);
    --phone-shadow: 0 30px 60px rgba(0, 0, 0, 0.5), 0 8px 18px rgba(0, 0, 0, 0.3);
    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(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

h1,
h2,
h3 {
  color: var(--text-high);
  margin: 0;
  line-height: 1.2;
}

h1,
h2 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.08rem;
  font-weight: 600;
}

p {
  margin: 0;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 16px;
  top: 12px;
  z-index: 10;
  background: var(--card);
  padding: 8px 14px;
  border-radius: 10px;
}

/* ——— Header ——— */

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-high);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.02rem;
  white-space: nowrap;
}

.brand img {
  width: 34px;
  height: 34px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  padding: 8px 12px;
  border-radius: 999px;
}

.site-nav a:hover,
.site-nav a[aria-current='page'] {
  background: var(--surface);
  color: var(--text-high);
}

/* ——— Buttons ——— */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 0;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text-high);
}

/* Apple's badge artwork must not be altered — only sized (40px+ tall). */
.store-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 12px;
}

.store-badge img {
  height: 52px;
  width: auto;
}

/* ——— Hero ——— */

.hero {
  padding: 72px 0 56px;
  overflow: hidden;
}

.hero .container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 48px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 22px;
}

.hero h1 {
  font-size: clamp(2.5rem, 5.4vw, 4rem);
  line-height: 1.05;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.lead {
  font-size: 1.2rem;
  color: var(--muted);
  margin-top: 20px;
  max-width: 34rem;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.hero-note {
  margin-top: 16px;
  font-size: 0.9rem;
  color: var(--muted);
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero-visual::before {
  content: '';
  position: absolute;
  width: 62%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--highlight-soft);
  top: 2%;
  left: 2%;
}

.hero-visual::after {
  content: '';
  position: absolute;
  width: 48%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--accent-soft);
  bottom: 4%;
  right: 0;
}

/* ——— Phone frame ——— */

.phone {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 300px;
  padding: 10px;
  border-radius: 48px;
  background: #1f1b18;
  box-shadow: var(--phone-shadow);
}

.phone img {
  width: 100%;
  border-radius: 39px;
  aspect-ratio: 1206 / 2622;
  object-fit: cover;
  background: #fbf7f1;
}

/* ——— Sections ——— */

.section {
  padding: 88px 0;
}

.section-alt {
  background: var(--surface);
}

.section-head {
  max-width: 40rem;
  margin: 0 auto 48px;
  text-align: center;
}

.section-head h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.6rem);
}

.section-head p {
  color: var(--muted);
  margin-top: 14px;
  font-size: 1.08rem;
}

.kicker {
  display: block;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

/* Features */

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

.section-alt .card {
  box-shadow: none;
}

.icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  background: var(--accent-soft);
  color: var(--accent);
}

.icon svg {
  width: 22px;
  height: 22px;
}

.icon.warm {
  background: var(--highlight-soft);
  color: var(--highlight);
}

.icon.clay {
  background: var(--warn-soft);
  color: var(--warn);
}

.card p {
  color: var(--muted);
  margin-top: 8px;
  font-size: 0.98rem;
}

/* Screens */

.screens {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 300px));
  justify-content: center;
  gap: 56px;
  justify-items: center;
}

.screen {
  text-align: center;
  max-width: 280px;
}

.screen .phone {
  max-width: 260px;
}

.screen h3 {
  margin-top: 26px;
}

.screen p {
  color: var(--muted);
  margin-top: 6px;
  font-size: 0.95rem;
}

/* Steps */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  counter-reset: step;
}

.step {
  position: relative;
  padding-top: 80px;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: 28px;
  left: 28px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  font-size: 0.95rem;
}

/* Privacy band */

.privacy-band {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
  background: var(--accent-soft);
  border-radius: 28px;
  padding: 40px;
}

.privacy-band .icon {
  width: 64px;
  height: 64px;
  margin: 0;
  background: var(--card);
}

.privacy-band .icon svg {
  width: 28px;
  height: 28px;
}

.privacy-band h2 {
  font-size: clamp(1.5rem, 2.8vw, 2rem);
}

.privacy-band p {
  margin-top: 8px;
  color: var(--text);
}

/* FAQ */

.faq {
  max-width: 760px;
  margin: 0 auto;
  display: grid;
  gap: 12px;
}

details {
  background: var(--card);
  border-radius: 18px;
  padding: 4px 24px;
  box-shadow: var(--shadow);
}

.section-alt details {
  box-shadow: none;
}

summary {
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  color: var(--text-high);
  padding: 18px 28px 18px 0;
  position: relative;
}

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

summary::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--muted);
}

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

details p,
details ul {
  color: var(--muted);
  padding-bottom: 20px;
  margin: 0;
}

details ul {
  padding-left: 20px;
}

/* ——— Footer ——— */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 40px;
  font-size: 0.95rem;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 28px;
}

.site-footer .tagline {
  color: var(--muted);
  margin-top: 10px;
  max-width: 22rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  align-items: flex-start;
}

.footer-links a {
  color: var(--text);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--accent);
}

.copyright {
  width: 100%;
  color: var(--muted);
  font-size: 0.88rem;
}

/* ——— Documents (privacy, terms, support) ——— */

.doc {
  max-width: 760px;
  margin: 0 auto;
  padding: 64px 24px 96px;
}

.doc h1 {
  font-size: clamp(2.2rem, 4.6vw, 3rem);
}

.doc .updated {
  color: var(--muted);
  margin-top: 10px;
  font-size: 0.95rem;
}

.doc h2 {
  font-family: var(--body);
  font-weight: 600;
  font-size: 1.3rem;
  margin-top: 44px;
  scroll-margin-top: 84px;
}

.doc h3 {
  margin-top: 24px;
}

.doc p,
.doc ul,
.doc ol {
  margin-top: 12px;
}

.doc ul,
.doc ol {
  padding-left: 22px;
}

.doc li + li {
  margin-top: 6px;
}

.doc strong {
  color: var(--text-high);
}

.summary {
  background: var(--accent-soft);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-top: 32px;
}

.summary h2 {
  margin-top: 0;
  font-size: 1.1rem;
}

.summary ul {
  margin-bottom: 0;
}

.toc {
  margin-top: 28px;
  padding: 20px 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.toc ol {
  margin: 8px 0 0;
  columns: 2;
  column-gap: 32px;
}

.toc a {
  color: var(--text);
  text-decoration: none;
}

.toc a:hover {
  color: var(--accent);
}

.contact-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  margin-top: 32px;
}

.contact-card p {
  margin: 4px 0 0;
  color: var(--muted);
}

.path {
  font-weight: 600;
  color: var(--text-high);
}

.center {
  text-align: center;
}

/* ——— Responsive ——— */

@media (max-width: 900px) {
  .hero {
    padding-top: 48px;
  }
  .hero .container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .lead {
    margin-left: auto;
    margin-right: auto;
  }
  .cta {
    justify-content: center;
  }
  .phone {
    max-width: 270px;
  }
  .features,
  .steps {
    grid-template-columns: 1fr 1fr;
  }
  .screens {
    grid-template-columns: 1fr 1fr;
  }
  .privacy-band {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }
  .container {
    padding: 0 16px;
  }
  .site-nav .hide-sm {
    display: none;
  }
  .section {
    padding: 64px 0;
  }
  .features,
  .steps,
  .screens {
    grid-template-columns: 1fr;
  }
  .privacy-band {
    padding: 32px 22px;
  }
  .doc {
    padding: 44px 16px 72px;
  }
  .toc ol {
    columns: 1;
  }
}

@media (max-width: 400px) {
  .brand {
    font-size: 0.95rem;
    gap: 8px;
  }
  .brand img {
    width: 30px;
    height: 30px;
  }
  .site-nav a {
    padding: 8px 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
