/* Same tokens as apps/app/src/palette.ts, so the site and the app read as one product. */
:root {
  color-scheme: light dark;
  --background: #FCF8F4;
  --surface: #FFFFFF;
  --text: #1D1C2C;
  --text-secondary: #5A586C;
  --line: #E5E5EE;
  --primary: #6346C7;
  --primary-pressed: #5335AD;
  --on-primary: #FFFFFF;
  --primary-soft: #ECEBFF;
  --hero-from: #E8E3FF;
  --hero-to: #FFE6D5;
  --todo-bg: #FFEDE1;
  --todo-text: #7A2E12;
  --rounded: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #16131E;
    --surface: #1F1B29;
    --text: #EFEDF6;
    --text-secondary: #C6C1D3;
    --line: #34303F;
    --primary: #B6AAFF;
    --primary-pressed: #A495F0;
    --on-primary: #161229;
    --primary-soft: #332C54;
    --hero-from: #2F274B;
    --hero-to: #3C1E2A;
    --todo-bg: #412429;
    --todo-text: #FFD9C7;
  }
}

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

.logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
  .logo-light { display: none; }
  .logo-dark { display: block; }
}

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

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font: 17px/1.6 var(--body);
}

a { color: var(--primary); text-underline-offset: 2px; }
a:hover { color: var(--primary-pressed); }

:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 4px; }

.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }

header.site {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
header.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  flex-wrap: wrap;
}
.brand { display: block; line-height: 0; }
.brand img { height: 34px; width: auto; }

nav.site { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 15px; font-weight: 600; }
nav.site a { color: var(--text-secondary); text-decoration: none; padding: 6px 0; }
nav.site a:hover, nav.site a[aria-current="page"] { color: var(--primary); }

/* main also carries .wrap: the selector must outrank .wrap's padding or the vertical space is lost. */
main.wrap { padding-top: 56px; padding-bottom: 80px; }
@media (max-width: 600px) { main.wrap { padding-top: 36px; padding-bottom: 56px; } }

h1, h2, h3 { font-family: var(--rounded); line-height: 1.25; }
h1 { font-size: 34px; font-weight: 800; margin: 0 0 8px; letter-spacing: -0.4px; }
h2 { font-size: 22px; font-weight: 700; margin: 40px 0 8px; }
h3 { font-size: 18px; font-weight: 700; margin: 24px 0 4px; }
p, ul, ol, table { margin: 0 0 16px; }
li + li { margin-top: 6px; }

.lead { font-size: 19px; color: var(--text-secondary); }
.updated { color: var(--text-secondary); font-size: 15px; margin-bottom: 32px; }


.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 16px;
  background: var(--primary);
  color: var(--on-primary);
  font: 700 16px/1 var(--rounded);
  text-decoration: none;
}
.button:hover { background: var(--primary-pressed); color: var(--on-primary); }
.button.secondary { background: var(--surface); color: var(--text); border: 1px solid var(--line); }
.button.secondary:hover { background: var(--primary-soft); color: var(--text); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 16px; }
.card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
}
.card h2, .card h3 { margin-top: 0; font-size: 18px; }
.card p { margin: 0; color: var(--text-secondary); font-size: 16px; }

.note {
  padding: 16px 20px;
  border-radius: 16px;
  background: var(--primary-soft);
}

/* Placeholders the owner must fill in before going live: impossible to miss. */
.todo {
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--todo-bg);
  color: var(--todo-text);
  font-weight: 600;
}

.table-scroll { overflow-x: auto; margin-bottom: 16px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { font-weight: 700; }

footer.site { border-top: 1px solid var(--line); padding: 24px 0 40px; font-size: 14px; color: var(--text-secondary); }
footer.site nav { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-bottom: 8px; }
footer.site a { color: var(--text-secondary); }

/* Landing */
.wrap.wide { max-width: 1080px; }
.landing main.wrap { padding-top: 0; padding-bottom: 0; }

.hero {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  align-items: center;
  gap: 48px;
  margin: 48px 0 0;
  padding: 56px 56px 0;
  border-radius: 32px;
  background: linear-gradient(135deg, var(--hero-from), var(--hero-to));
  overflow: hidden;
}
.hero > div:first-child { padding-bottom: 56px; }
.eyebrow {
  display: inline-block;
  margin: 0 0 16px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--primary);
  font-size: 14px;
  font-weight: 700;
}
.hero h1 { font-size: clamp(34px, 5vw, 52px); line-height: 1.1; margin-bottom: 16px; }
.hero .lead { max-width: 500px; margin: 0 0 32px; color: var(--text); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
/* The phone rises from the bottom edge of the hero card, cropped like a device in hand. */
.hero-art { display: flex; justify-content: center; align-self: end; height: 460px; }
.hero-art .phone { margin: 0; align-self: flex-start; }

/* Device frame around the screenshots. */
.phone {
  width: min(100%, 290px);
  margin: 0 auto;
  padding: 10px;
  border-radius: 46px;
  background: #1D1C2C;
  box-shadow: 0 2px 0 1px rgba(255, 255, 255, 0.08) inset, 0 30px 60px rgba(29, 28, 44, 0.22);
}
.phone img { display: block; width: 100%; height: auto; border-radius: 36px; }
@media (prefers-color-scheme: dark) {
  .phone { background: #0B0A10; box-shadow: 0 0 0 1px #34303F, 0 30px 60px rgba(0, 0, 0, 0.5); }
}

.kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  color: var(--primary);
  font: 700 15px/1.3 var(--rounded);
}

.section { padding: 96px 0 0; }
.section-head { max-width: 640px; margin: 0 0 32px; }
.section-head h2 { margin: 0; font-size: clamp(26px, 3.4vw, 34px); }

.problem .section-head { max-width: 720px; }
.pains { list-style: none; padding: 0; margin: 0 0 32px; display: grid; gap: 16px; grid-template-columns: repeat(3, 1fr); }
.pains li {
  margin: 0;
  padding: 24px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 18px;
  line-height: 1.5;
}
.pains li::before { content: "“"; display: block; height: 28px; color: var(--primary); font: 800 48px/1 var(--rounded); }
.bridge { max-width: 640px; font-size: 19px; font-weight: 600; }

.chapter {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 64px;
  padding: 96px 0 0;
}
.chapter.reverse .chapter-text { order: 2; }
.chapter-text { position: relative; z-index: 1; max-width: 460px; }
.chapter-text h2 { margin: 0 0 16px; font-size: clamp(28px, 3.6vw, 38px); line-height: 1.15; }
.chapter-text > p:not(.kicker) { font-size: 18px; color: var(--text-secondary); }
.chapter .phone {
  width: min(100%, 300px);
  transform: rotate(2deg);
}
.chapter.reverse .phone { transform: rotate(-2deg); }
/* A soft colour field behind each phone ties the screenshots to the brand gradient. */
.stage { position: relative; isolation: isolate; }
.stage::before {
  content: "";
  position: absolute;
  inset: 12% -6%;
  z-index: -1;
  border-radius: 48px;
  background: linear-gradient(135deg, var(--hero-from), var(--hero-to));
  transform: rotate(-4deg);
}

.step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
  font: 800 16px/1 var(--rounded);
}

.ticks { list-style: none; padding: 0; margin: 24px 0 0; }
.ticks li { position: relative; padding-left: 30px; }
.ticks li + li { margin-top: 10px; }
.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary-soft);
}
.ticks li::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 9px;
  width: 4px;
  height: 8px;
  border: solid var(--primary);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.checklist li { margin: 0; padding: 20px 24px; border-radius: 22px; background: var(--primary-soft); }
.checklist strong { display: block; margin-bottom: 4px; font-family: var(--rounded); }

.cta {
  margin: 96px 0;
  padding: 64px 24px;
  border-radius: 32px;
  background: linear-gradient(135deg, var(--hero-from), var(--hero-to));
  text-align: center;
}
.cta .kicker { justify-content: center; }
.cta h2 { margin: 0 0 12px; font-size: clamp(30px, 4vw, 42px); }
.cta p:not(.kicker, .soon) { margin: 0 auto 28px; max-width: 460px; }

/* Pre-launch status in place of the links to the app: shaped like a button, but plainly not one. */
.soon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  margin: 0;
  padding: 0 22px;
  border: 1.5px dashed var(--primary);
  border-radius: 16px;
  background: var(--surface);
  color: var(--primary);
  font: 700 16px/1 var(--rounded);
}
.soon-dot { position: relative; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); }
.soon-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--primary);
  animation: soon-pulse 1.8s ease-out infinite;
}
@keyframes soon-pulse {
  from { transform: scale(1); opacity: 0.6; }
  to { transform: scale(2.6); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .soon-dot::after { animation: none; } }

.platforms { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; padding: 0; margin: 24px 0 0; }
.platforms li {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 156px;
  margin: 0;
  padding: 12px 20px 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  text-align: left;
}
.platforms svg { flex: none; width: 40px; height: 40px; padding: 8px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); }
.platforms span { font: 700 17px/1.2 var(--rounded); }
.platforms small { display: block; color: var(--text-secondary); font: 600 13px/1.3 var(--body); }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 8px; margin-top: 24px; padding: 40px 24px 0; text-align: center; }
  .hero > div:first-child { padding-bottom: 24px; }
  .hero .lead { margin-left: auto; margin-right: auto; }
  .actions { justify-content: center; }
  .hero-art { height: 340px; }
  .hero-art .phone { width: 240px; }
  .section { padding-top: 72px; }
  .pains { grid-template-columns: 1fr; }
  .chapter { grid-template-columns: 1fr; gap: 40px; padding-top: 72px; }
  .chapter.reverse .chapter-text { order: 0; }
  .chapter-text { max-width: none; }
  .chapter .phone { width: min(78%, 280px); }
  .stage::before { inset: 10% 2%; }
  .cta { margin: 72px 0; padding: 48px 20px; }
}

@media (max-width: 480px) {
  .nav-optional { display: none; }
  /* Three compact tiles in one row rather than a tall stack. */
  .platforms { flex-wrap: nowrap; gap: 8px; }
  .platforms li { flex: 1 1 0; min-width: 0; flex-direction: column; gap: 8px; padding: 14px 6px; text-align: center; }
}
