/* BetterWord — brand tokens taken from the app (DESIGN.md) */
:root {
  --purple: #561bd5;
  --purple-deep: #3b0fa3;
  --lilac: #dac8ff;
  --yellow: #ffc93c;
  --green: #129b00;
  --ink: #1e1a2b;
  --body: #4b4b4b;
  --cream: #fff8f1;
  --line: rgba(30, 26, 43, 0.12);

  --font: "Plus Jakarta Sans", system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
em { font-style: italic; }
b { font-weight: inherit; }
::selection { background: var(--lilac); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--gutter);
  background: rgba(255, 248, 241, 0.75);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 19px; letter-spacing: -.02em; }
.brand img { border-radius: 10px; }
.brand b, .hero__title b, .section-title b, .cta__title b { color: var(--yellow); }

.btn {
  display: inline-block; padding: 12px 22px; border-radius: 999px;
  background: var(--purple); color: #fff; text-decoration: none; font-weight: 700;
}
.btn--small { padding: 9px 16px; font-size: 14px; }

/* ---------- Shared type ---------- */
.line { display: block; overflow: hidden; padding: 0 .06em .06em 0; }
.split { display: inline-block; }
.hero__title, .section-title, .cta__title, .step__word {
  margin: 0; font-weight: 800; letter-spacing: -.035em; line-height: 1.02;
}
.hero__title em, .section-title em, .cta__title em, .step__word em { color: var(--purple); }
.eyebrow {
  margin: 0 0 32px; font-size: 14px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--purple);
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh;
  display: grid; grid-template-columns: 1.25fr 1fr; align-items: center; gap: 48px;
  padding: 110px var(--gutter) 64px;
  background: url("assets/ambient.jpg") center / cover no-repeat;
}
.hero__title { font-size: clamp(38px, 4.6vw, 72px); }
.hero__sub { max-width: 36ch; margin: 28px 0 0; color: var(--body); font-size: clamp(17px, 1.4vw, 20px); }

.stores { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.store {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 18px; border-radius: 16px;
  background: var(--ink); color: #fff; font-weight: 700;
}
.store svg { width: 22px; height: 22px; fill: currentColor; }
.store small { font-weight: 500; font-size: 12px; opacity: .65; margin-left: 4px; }

/* ---------- Phone demo ---------- */
.phone {
  justify-self: center;
  width: min(100%, 330px); aspect-ratio: 9 / 18.5;
  padding: 10px; border-radius: 48px; background: var(--ink);
  box-shadow: 0 40px 80px -30px rgba(59, 15, 163, .45);
}
.phone__screen {
  height: 100%; border-radius: 38px; overflow: hidden;
  background: url("assets/ambient.jpg") center / cover;
}
.demo { position: relative; height: 100%; display: flex; flex-direction: column; gap: 14px; padding: 18px 16px; }
.demo__scene {
  flex: 1 1 auto; min-height: 0;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 8px;
  padding: 18px; border-radius: 26px;
  background: linear-gradient(160deg, #7b4ef0, var(--purple-deep));
  color: #fff;
}
.demo__tag {
  align-self: flex-start; padding: 3px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, .2); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.demo__situation { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.35; }
.demo__question { margin: 0; font-size: 16px; font-weight: 800; letter-spacing: -.01em; line-height: 1.3; }
.demo__options { display: flex; flex-direction: column; gap: 8px; }
.demo__option {
  padding: 11px 16px; border-radius: 999px;
  border: 1px solid #ead4c2; background: rgba(255, 255, 255, .55);
  color: #595560; font-size: 14px; font-weight: 700; text-align: center;
  transition: background .3s ease, color .3s ease, border-color .3s ease;
}
.demo__option.is-correct { background: var(--green); border-color: var(--green); color: #fff; }
.demo__notsure { margin: 0; text-align: center; font-size: 13px; font-weight: 600; color: #4e4e4e; }

/* Word detail slides up over the question once the answer is shown */
.demo__detail {
  position: absolute; inset: auto 10px 10px 10px;
  padding: 20px; border-radius: 28px;
  background: #fff; box-shadow: 0 -10px 30px rgba(0, 0, 0, .12);
  opacity: 0; transform: translateY(24px); pointer-events: none;
  transition: opacity .4s ease, transform .4s ease;
}
.demo__detail.is-open { opacity: 1; transform: none; }
.demo__word { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.02em; color: var(--purple); }
.demo__ipa { margin: 2px 0 10px; font-size: 14px; color: #8a8a8a; }
.demo__why { margin: 0; font-size: 14px; color: var(--body); line-height: 1.45; }
.demo__why b { display: inline-block; margin-right: 6px; padding: 2px 10px; border-radius: 999px; background: #ffe6d1; color: #000; font-size: 12px; font-weight: 800; }

/* ---------- How it works ---------- */
.how { padding: clamp(96px, 12vw, 160px) var(--gutter); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.step { border-top: 2px solid var(--ink); padding-top: 20px; }
.step__num { font-size: 14px; font-weight: 800; color: var(--purple); }
.step__word { margin: 8px 0 14px; font-size: clamp(40px, 3.6vw, 64px); overflow: hidden; padding-bottom: .06em; white-space: nowrap; }
.step p { margin: 0; color: var(--body); }

/* ---------- Features ---------- */
.features { padding: 0 var(--gutter) clamp(96px, 12vw, 160px); }
.section-title { font-size: clamp(40px, 6vw, 92px); margin-bottom: 48px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card {
  padding: 28px; border-radius: 28px;
  background: #fff; border: 1px solid var(--line);
  transition: transform .35s ease, border-color .35s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--lilac); }
.card h3 { margin: 0 0 8px; font-size: 21px; font-weight: 800; letter-spacing: -.02em; }
.card p { margin: 0; color: var(--body); }

/* ---------- CTA ---------- */
.cta {
  padding: clamp(96px, 12vw, 180px) var(--gutter);
  background: var(--purple); color: #fff; text-align: center;
}
.cta__title { font-size: clamp(48px, 9vw, 150px); }
.cta__title em { color: var(--lilac); }
.cta p { margin: 24px auto 0; max-width: 34ch; font-size: clamp(17px, 1.6vw, 21px); opacity: .85; }

/* ---------- Footer ---------- */
.footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  padding: 28px var(--gutter); font-size: 14px; color: var(--body);
}
.footer p { margin: 0; }
.footer a { font-weight: 700; color: var(--ink); }

/* ---------- Tablet & phone ---------- */
@media (max-width: 960px) {
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 48px; }
  .grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; padding-top: 96px; }
  .phone { width: min(78vw, 300px); }
  .steps, .grid { grid-template-columns: 1fr; }
}
