:root {
  --background: #fbfaff;
  --surface: #ffffff;
  --surface-tint: #f2f0f7;
  --text: #1c1a3a;
  --text-secondary: #5f5b7a;
  --border: rgba(28, 26, 58, 0.08);
  --violet: #7a4fd8;
  --primary: #6c5fe0;
  --primary-hover: #5b4ed0;
  --button: #6553dc;
  --button-hover: #5544cc;
  --coral: #f28b7a;
  --berry: #d83e81;
  --shadow: 0 1px 2px rgba(28, 26, 58, 0.04), 0 12px 40px rgba(28, 26, 58, 0.07);
  --radius-large: 32px;
  --radius: 24px;
  --content-width: 1120px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #0e1122;
    --surface: #1a1f38;
    --surface-tint: #161b2e;
    --text: #f4f2ff;
    --text-secondary: #a9a6c4;
    --border: rgba(255, 255, 255, 0.08);
    --violet: #a98bff;
    --primary: #a197f5;
    --primary-hover: #b6aef8;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 40px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }

h1, h2, h3 {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  letter-spacing: -0.02em;
  margin: 0;
}

h1 { font-size: clamp(40px, 6.4vw, 72px); line-height: 1.04; font-weight: 700; }
h2 { font-size: clamp(32px, 4.6vw, 52px); line-height: 1.08; font-weight: 700; }
h3 { font-size: 21px; line-height: 1.25; font-weight: 600; }

p { margin: 0; }

.gradient-text {
  background: linear-gradient(100deg, var(--violet), var(--berry) 60%, var(--coral));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  color: var(--violet);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 14px;
}

.lead {
  color: var(--text-secondary);
  font-size: clamp(18px, 2vw, 21px);
  line-height: 1.5;
}

.fine-print { color: var(--text-secondary); font-size: 14px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 26px;
  border: 0;
  border-radius: 999px;
  background: var(--button);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.button:hover { background: var(--button-hover); color: #fff; transform: translateY(-1px); }

.button-quiet { background: transparent; color: var(--primary); }
.button-quiet:hover { background: var(--surface-tint); }

.button-small { min-height: 36px; padding: 0 16px; font-size: 15px; }

/* Navigation */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 14px 24px;
  background: color-mix(in srgb, var(--background) 80%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}

.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.brand img { border-radius: 22%; }

.nav-links { display: flex; align-items: center; gap: 24px; font-size: 15px; }
.nav-links a:not(.button) { color: var(--text-secondary); }
.nav-links a:not(.button):hover { color: var(--text); }

/* Sections */

.section {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 96px 24px 0;
  text-align: center;
}

.section > h2 { margin-bottom: 48px; }

.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 48px;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 56px 24px 24px;
}

.hero-text { display: flex; flex-direction: column; gap: 22px; }
.hero-text .eyebrow { margin-bottom: 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-art img { width: 100%; max-width: 520px; margin-left: auto; }

/* Steps */

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

.step {
  padding: 32px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.step img { width: 72px; height: 72px; object-fit: contain; margin-bottom: 24px; }
.step h3 { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.step p { color: var(--text-secondary); }

.step-number {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--surface-tint);
  color: var(--violet);
  font-size: 14px;
}

/* Feature cards */

.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
  text-align: left;
}

.card {
  grid-column: span 3;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 36px;
  border-radius: var(--radius-large);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card p { color: var(--text-secondary); }

.card > img:first-child {
  height: 220px;
  width: 100%;
  object-fit: contain;
  margin-bottom: 18px;
}

.card-wide {
  grid-column: span 6;
  flex-direction: row;
  align-items: center;
  gap: 40px;
  background: linear-gradient(135deg, var(--surface), var(--surface-tint));
}

.card-wide .card-text { flex: 1; display: flex; flex-direction: column; gap: 12px; }
.card-wide h3 { font-size: clamp(28px, 3.4vw, 38px); letter-spacing: -0.02em; }
.card-wide p { font-size: 19px; }
.card-wide picture { flex: 0 0 38%; }

.card-small { grid-column: span 2; }
.card-small > img.card-icon:first-child { width: 64px; height: 64px; margin-bottom: 12px; }

/* Feeling */

.feeling { padding-top: 120px; max-width: 760px; }
.feeling h2 { margin-bottom: 20px; }

/* Beta */

.beta { padding-bottom: 96px; }

.beta-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 56px 32px;
  border-radius: var(--radius-large);
  background:
    radial-gradient(circle at 20% 0%, color-mix(in srgb, var(--violet) 14%, transparent), transparent 55%),
    radial-gradient(circle at 90% 100%, color-mix(in srgb, var(--coral) 14%, transparent), transparent 50%),
    var(--surface);
  box-shadow: var(--shadow);
}

.beta-card h2 { margin: 0; }
.beta-card .lead { max-width: 560px; }
.beta-art { width: 180px; }

.signup {
  width: 100%;
  max-width: 520px;
  margin-top: 28px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.signup p { color: var(--text-secondary); }

.signup-form { display: flex; gap: 10px; margin-top: 12px; }

.signup-form input {
  flex: 1;
  min-width: 0;
  min-height: 50px;
  padding: 0 20px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--background);
  color: var(--text);
  font: inherit;
}

.signup-form input:focus { outline: 2px solid var(--primary); outline-offset: 1px; }

/* Footer */

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 32px 24px 48px;
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 14px;
}

.footer nav { display: flex; gap: 24px; }
.footer a:hover { color: var(--text); }

/* Smaller screens */

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; text-align: center; padding-top: 32px; }
  .hero-text { align-items: center; }
  .hero-actions { justify-content: center; }
  .hero-art img { margin: 0 auto; max-width: 380px; }
  .steps { grid-template-columns: 1fr; }
  .bento { grid-template-columns: 1fr; }
  .card, .card-wide, .card-small { grid-column: auto; }
  .card-wide { flex-direction: column-reverse; align-items: flex-start; }
  .card-wide picture { width: 70%; align-self: center; }
  .nav-links a:not(.button) { display: none; }
  .section { padding-top: 72px; }
}

@media (max-width: 480px) {
  .signup-form { flex-direction: column; }
  .card, .step { padding: 28px; }
}

/* Retention curve */

.retention { margin: 0 0 18px; }
.retention svg { width: 100%; height: auto; overflow: visible; }
.retention .grid line { stroke: var(--border); stroke-width: 1.5; }
.retention .labels text { fill: var(--text-secondary); font-size: 15px; font-weight: 600; }
.retention path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.curve-memory { stroke: url(#memory); stroke-width: 5; stroke-dasharray: 1; stroke-dashoffset: 1; }
.curve-forgetting { stroke: var(--coral); stroke-width: 3; stroke-dasharray: 0.012 0.014; opacity: 0.85; }
.retention.is-visible .curve-memory { animation: draw 2.4s ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .curve-memory { stroke-dashoffset: 0; } .retention.is-visible .curve-memory { animation: none; } }

.retention figcaption { display: flex; gap: 20px; margin-top: 10px; font-size: 14px; color: var(--text-secondary); }
.legend { display: inline-flex; align-items: center; gap: 8px; }
.legend::before { content: ""; width: 22px; height: 0; border-top: 4px solid var(--violet); border-radius: 2px; }
.legend-forgetting::before { border-top: 3px dashed var(--coral); }


/* iPhone showcase */

.card-showcase {
  grid-column: span 6;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  padding: 48px 40px 40px;
  background:
    radial-gradient(circle at 25% 0%, color-mix(in srgb, var(--violet) 12%, transparent), transparent 60%),
    radial-gradient(circle at 80% 100%, color-mix(in srgb, var(--coral) 10%, transparent), transparent 55%),
    var(--surface);
}

.showcase-item { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.showcase-item p { max-width: 300px; }
.showcase-item h3 { display: flex; align-items: center; gap: 10px; }
#how .card-showcase { border-radius: var(--radius-large); box-shadow: var(--shadow); text-align: center; }

.iphone {
  width: min(200px, 78%);
  margin-bottom: 18px;
  padding: 6px;
  border-radius: 38px;
  background: linear-gradient(145deg, #c9c6cf, #6d6a74 40%, #a8a5ae 70%, #e2e0e6);
  box-shadow: 0 30px 60px rgba(28, 26, 58, 0.22), 0 6px 14px rgba(28, 26, 58, 0.12);
}

.iphone picture, .iphone img {
  display: block;
  border-radius: 32px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 0 0 3px #0b0b0f;
}

@media (prefers-color-scheme: dark) {
  .iphone { background: linear-gradient(145deg, #5a5763, #24222a 40%, #4a4752 70%, #77747f); }
}

@media (max-width: 860px) {
  .card-showcase { grid-template-columns: 1fr; grid-column: auto; padding: 36px 24px; }
}
.signup-message { margin-top: 12px; color: var(--violet); font-weight: 600; }

/* Bottom row: same-height visual area so every title lines up */

.card-visual { height: 190px; display: flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.card-visual .retention { width: 100%; margin: 0; }
.card-visual .card-icon { width: 76px; height: 76px; }
.card-visual .card-art { height: 170px; width: auto; }

/* Document pages (privacy, terms, support) */

.doc { max-width: 720px; margin: 0 auto; padding: 56px 24px 96px; }
.doc h1 { font-size: clamp(36px, 5vw, 52px); margin-bottom: 12px; }
.doc .updated { color: var(--text-secondary); font-size: 15px; margin-bottom: 40px; }
.doc h2 { font-size: 26px; margin: 44px 0 12px; }
.doc h3 { font-size: 19px; margin: 28px 0 8px; }
.doc p, .doc li { color: var(--text-secondary); }
.doc p + p { margin-top: 12px; }
.doc ul { padding-left: 22px; margin: 12px 0; }
.doc li + li { margin-top: 8px; }
.doc a { color: var(--primary); }
.doc strong { color: var(--text); }
.doc .summary { padding: 24px 28px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.doc .summary li { color: var(--text); }
.contact-card h2 { margin: 0; }
.contact-card { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 32px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.faq details { padding: 18px 0; border-bottom: 1px solid var(--border); }
.faq summary { cursor: pointer; font-weight: 600; color: var(--text); list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--violet); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin-top: 10px; }
.doc a.button, .doc a.button:hover { color: #fff; }
