/* ===================================================================
   Readflow — landing styles
   Warm paper + terracotta, two-tone display headline, light/dark.
   =================================================================== */

:root {
  /* Brand */
  --accent:        #c24a1c;
  --accent-strong: #a93d14;
  --accent-soft:   rgba(194, 74, 28, 0.12);

  /* Light theme (default) — warm paper */
  --bg:        #f4ecdd;
  --bg-2:      #efe5d3;
  --surface:   #fbf6ec;
  --surface-2: #f6efe1;
  --ink:       #221f1c;
  --muted:     #6f6557;
  --line:      rgba(34, 31, 28, 0.10);
  --line-soft: rgba(34, 31, 28, 0.06);
  --shadow:    34, 31, 28;

  --radius:    18px;
  --radius-sm: 12px;
  --maxw:      1160px;

  --font-display: "Bricolage Grotesque", "Hanken Grotesk", system-ui, sans-serif;
  --font-body:    "Hanken Grotesk", system-ui, -apple-system, sans-serif;
}

[data-theme="dark"] {
  --accent:        #e0682f;
  --accent-strong: #f0824b;
  --accent-soft:   rgba(224, 104, 47, 0.16);

  --bg:        #181513;
  --bg-2:      #1f1b18;
  --surface:   #23201d;
  --surface-2: #2a2622;
  --ink:       #f3ebde;
  --muted:     #a89a87;
  --line:      rgba(243, 235, 222, 0.12);
  --line-soft: rgba(243, 235, 222, 0.07);
  --shadow:    0, 0, 0;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 0.4s ease, color 0.4s ease;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0;
}

p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 40px);
}

.accent { color: var(--accent); }

/* ---------- Buttons ---------- */
.btn {
  --pad-y: 0.7em;
  --pad-x: 1.25em;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: var(--pad-y) var(--pad-x);
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.98rem;
  line-height: 1;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform 0.18s ease, background-color 0.18s ease,
              box-shadow 0.18s ease, border-color 0.18s ease, color 0.18s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(0.99); }

.btn--small  { --pad-y: 0.6em;  --pad-x: 1.1em;  font-size: 0.92rem; }
.btn--large  { --pad-y: 0.95em; --pad-x: 1.6em;  font-size: 1.02rem; }

.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 24px -10px rgba(194, 74, 28, 0.7);
}
.btn--primary:hover {
  background: var(--accent-strong);
  transform: translateY(-2px);
  box-shadow: 0 16px 30px -12px rgba(194, 74, 28, 0.75);
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn--ghost:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background-color 0.3s ease;
}
.nav.is-scrolled { border-bottom-color: var(--line-soft); }

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand { display: inline-flex; align-items: center; gap: 0.6rem; }
.brand__mark {
  border-radius: 9px;
  box-shadow: 0 4px 12px -6px rgba(var(--shadow), 0.5);
}
.brand__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.nav__right { display: flex; align-items: center; gap: clamp(0.5rem, 2vw, 1.25rem); }
.nav__menu  { display: flex; align-items: center; gap: clamp(0.5rem, 2vw, 1.1rem); }
.nav__link  { font-weight: 600; font-size: 0.96rem; color: var(--muted); transition: color 0.18s ease; }
.nav__link:hover { color: var(--ink); }

/* Theme toggle */
.theme-toggle {
  position: relative;
  width: 64px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}
.theme-toggle__icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  color: var(--muted);
  transition: color 0.3s ease, opacity 0.3s ease;
}
.theme-toggle__icon svg { width: 16px; height: 16px; }
.theme-toggle__icon--sun  { left: 8px;  color: var(--accent); }
.theme-toggle__icon--moon { right: 8px; opacity: 0.55; }
[data-theme="dark"] .theme-toggle__icon--sun  { color: var(--muted); opacity: 0.55; }
[data-theme="dark"] .theme-toggle__icon--moon { color: var(--accent); opacity: 1; }

.theme-toggle__knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 2px 6px -2px rgba(var(--shadow), 0.6);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.3s ease;
}
[data-theme="dark"] .theme-toggle__knob { transform: translateX(32px); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(3rem, 7vw, 6rem) 0 clamp(3.5rem, 8vw, 7rem); }
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 50% at 78% 28%, var(--accent-soft), transparent 70%),
    radial-gradient(40% 40% at 12% 90%, color-mix(in srgb, var(--bg-2) 80%, transparent), transparent 70%);
  pointer-events: none;
}
.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
}
.eyebrow--center { background: none; border: none; padding: 0; color: var(--accent); }
.eyebrow__icon { display: inline-flex; color: var(--accent); }
.eyebrow__icon svg { width: 15px; height: 15px; }

.hero__title {
  font-size: clamp(3rem, 8vw, 5.25rem);
  margin: 1.4rem 0 0;
}
.hero__sub {
  margin-top: 1.4rem;
  max-width: 30ch;
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  color: var(--muted);
}

.hero__cta { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 2.2rem; }
.hero__cta--center { justify-content: center; }

.trust {
  list-style: none;
  margin: 1.6rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: 0.92rem;
  color: var(--muted);
}
.trust--center { justify-content: center; margin-top: 1.8rem; }
.trust li { display: inline-flex; align-items: center; gap: 0.4rem; }
.trust__check {
  color: var(--accent);
  font-weight: 700;
}

/* Hero art (photo of the app) */
.hero__art { position: relative; }
.hero__art-glow {
  position: absolute;
  inset: 6% 6% 6% 6%;
  background: radial-gradient(closest-side, var(--accent-soft), transparent);
  filter: blur(34px);
  transform: scale(1.1);
  z-index: 0;
}
.hero__art img {
  position: relative;
  z-index: 1;
  width: 100%;
  border-radius: 26px;
  box-shadow:
    0 2px 4px rgba(var(--shadow), 0.10),
    0 40px 80px -30px rgba(var(--shadow), 0.55);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.hero__art:hover img { transform: translateY(-6px); }

/* ---------- Sections ---------- */
.section { padding: clamp(3.5rem, 9vw, 7rem) 0; }
.section__head { text-align: center; max-width: 40ch; margin: 0 auto clamp(2.5rem, 5vw, 4rem); }
.section__head h2 { font-size: clamp(1.9rem, 4.5vw, 2.9rem); margin-top: 0.8rem; }

/* How it works */
.how { background: var(--bg-2); }
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.25rem, 3vw, 2rem);
}
.step {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
}
.step__num {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  margin-bottom: 1.1rem;
}
.step h3 { font-size: 1.3rem; margin-bottom: 0.5rem; }
.step p { color: var(--muted); font-size: 0.98rem; }

/* Showcase */
.showcase__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.showcase__art img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line-soft);
  box-shadow: 0 30px 60px -34px rgba(var(--shadow), 0.5);
}
.showcase__copy h2 { font-size: clamp(1.8rem, 4vw, 2.7rem); margin: 0.7rem 0 1rem; }
.showcase__lead { color: var(--muted); }

.ticks { list-style: none; margin: 1.6rem 0 0; padding: 0; display: grid; gap: 0.7rem; }
.ticks li { position: relative; padding-left: 1.9rem; font-weight: 500; }
.ticks li::before {
  content: "✓";
  position: absolute;
  left: 0; top: 0;
  width: 1.3rem; height: 1.3rem;
  display: grid; place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
}

/* Features grid */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2.5vw, 1.5rem);
}
.card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 1.9rem 1.6rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--line);
  box-shadow: 0 22px 44px -30px rgba(var(--shadow), 0.55);
}
.card__icon {
  font-size: 1.7rem;
  width: 52px; height: 52px;
  display: grid; place-items: center;
  background: var(--surface-2);
  border-radius: 14px;
  margin-bottom: 1.1rem;
}
.card h3 { font-size: 1.2rem; margin-bottom: 0.45rem; }
.card p { color: var(--muted); font-size: 0.97rem; }

/* Final CTA */
.cta { text-align: center; }
.cta__inner {
  background:
    radial-gradient(70% 120% at 50% -10%, var(--accent-soft), transparent 70%),
    var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: clamp(20px, 4vw, 34px);
  padding: clamp(2.75rem, 7vw, 5rem) clamp(1.5rem, 5vw, 3rem);
}
.cta__title { font-size: clamp(2.2rem, 6vw, 4rem); }
.cta__sub { color: var(--muted); margin: 1rem 0 0; font-size: 1.1rem; }
.cta .hero__cta { margin-top: 2rem; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line-soft); padding: 2.5rem 0; }
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer__tag { color: var(--muted); font-style: italic; }
.footer__copy { color: var(--muted); font-size: 0.9rem; }

/* ---------- Reveal animation ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.js .reveal.is-visible { opacity: 1; transform: none; }
.reveal--d1 { transition-delay: 0.08s; }
.reveal--d2 { transition-delay: 0.16s; }
.reveal--d3 { transition-delay: 0.24s; }
.reveal--d4 { transition-delay: 0.32s; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .hero__art img, .card, .btn { transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__copy  { order: 1; }
  .hero__art   { order: 0; max-width: 420px; }
  .hero__sub   { max-width: 46ch; }
  .showcase__inner { grid-template-columns: 1fr; }
  .showcase__art { order: 1; }
  .steps { grid-template-columns: 1fr; }
  .grid  { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .nav__link { display: none; }
  .grid { grid-template-columns: 1fr; }
  .footer__inner { flex-direction: column; text-align: center; }
}
