/* The public home page at / (site/home.html). Plain CSS so it shows instantly,
   without loading the app. Colours match src/constants/theme.ts. */

/* Signed-in visitors get the app instead of the home page (see scripts/build-home.mjs).
   These are the app's own full-height rules, only switched on for them. */
html.app,
html.app body {
  height: 100%;
}
html.app body {
  overflow: hidden;
}
html.app #root {
  display: flex;
  height: 100%;
  flex: 1;
}
html.app #home,
html:not(.app) #root {
  display: none;
}

:root {
  --text: #0f172a;
  --bg: #f4f6fb;
  --el: #ffffff;
  --sec: #5b6475;
  --border: #e2e7f0;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-soft: #eaf0fe;
  --success: #166534;
  --hero: #0b2a55;
  --hero-text: #ffffff;
  --hero-muted: #c9d6ec;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 6px 16px rgba(15, 23, 42, 0.06);
  --font: Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --text: #f1f5f9;
    --bg: #0b1220;
    --el: #131c2e;
    --sec: #97a3b6;
    --border: #24314a;
    --accent: #60a5fa;
    --accent-hover: #93c5fd;
    --accent-soft: #172a4a;
    --success: #4ade80;
    --hero: #13284a;
    --hero-text: #f1f5f9;
    --hero-muted: #a9b8d0;
    --shadow: none;
  }
}

* {
  box-sizing: border-box;
}
html:not(.app) {
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html:not(.app) {
    scroll-behavior: auto;
  }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
#home img {
  max-width: 100%;
  height: auto;
}
#home a {
  color: var(--accent);
}
h1,
h2,
h3 {
  line-height: 1.15;
  margin: 0;
  letter-spacing: -0.02em;
}
p {
  margin: 0;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}
@media (min-width: 640px) {
  .wrap {
    padding: 0 28px;
  }
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 16px;
  top: 12px;
  z-index: 10;
  background: var(--el);
  padding: 8px 12px;
  border-radius: 8px;
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* Header */
.top {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.top-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 12px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 19px;
  color: var(--text) !important;
  text-decoration: none;
}
.brand img {
  border-radius: 9px;
}
.top nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-link {
  color: var(--text) !important;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  padding: 8px 10px;
  border-radius: 8px;
  white-space: nowrap;
}
.nav-link:hover {
  background: var(--accent-soft);
}
@media (max-width: 639px) {
  .hide-sm {
    display: none;
  }
}
@media (max-width: 420px) {
  .brand {
    font-size: 17px;
    gap: 8px;
  }
  .nav-link {
    padding: 8px 6px;
  }
}
@media (max-width: 359px) {
  .brand span {
    display: none;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff !important;
  font-weight: 800;
  text-decoration: none;
  border-radius: 12px;
  padding: 12px 20px;
  border: 2px solid var(--accent);
  white-space: nowrap;
}
@media (prefers-color-scheme: dark) {
  .btn {
    color: #0b1220 !important;
  }
}
.btn:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}
.btn-sm {
  padding: 8px 14px;
  font-size: 15px;
  margin-left: 6px;
}
.btn-lg {
  padding: 14px 26px;
  font-size: 17px;
}
.btn-ghost {
  background: transparent;
  color: var(--accent) !important;
}
.btn-ghost:hover {
  background: var(--accent-soft);
}
.btn-light {
  background: #fff;
  border-color: #fff;
  color: #0b2a55 !important;
}
.btn-light:hover {
  background: #eaf0fe;
  border-color: #eaf0fe;
}
.btn-outline-light {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.7);
  color: #fff !important;
}
.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #fff;
}

/* Hero */
.hero {
  padding: 40px 0 48px;
}
.hero-in {
  display: grid;
  gap: 36px;
  align-items: center;
}
@media (min-width: 900px) {
  .hero {
    padding: 72px 0 80px;
  }
  .hero-in {
    grid-template-columns: 1.25fr 1fr;
    gap: 56px;
  }
}
.eyebrow {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.hero h1 {
  font-size: clamp(34px, 6vw, 56px);
  font-weight: 800;
}
.lead {
  margin-top: 18px;
  font-size: 19px;
  color: var(--sec);
  max-width: 36em;
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}
.cta-row.center {
  justify-content: center;
}
.fine {
  margin-top: 14px;
  font-size: 15px;
  color: var(--sec);
}

/* Phone frame around each screen */
.phone {
  margin: 0 auto;
  width: 100%;
  max-width: 300px;
  padding: 10px;
  border-radius: 40px;
  background: #0f172a;
  box-shadow: 0 30px 60px -20px rgba(11, 42, 85, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}
.phone img {
  display: block;
  border-radius: 30px;
  /* Shows as a blank app screen, not a black box, while a lazy-loaded picture is still on its way. */
  aspect-ratio: 1 / 2;
  background: #f4f6fb;
}
.hero-phone {
  max-width: 320px;
}

/* Band */
.band {
  background: var(--hero);
  color: var(--hero-muted);
  padding: 28px 0;
}
.points {
  list-style: none;
  margin: 0 auto;
  display: grid;
  gap: 18px;
}
@media (min-width: 800px) {
  .points {
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
  }
}
.points strong {
  display: block;
  color: var(--hero-text);
  font-size: 18px;
  margin-bottom: 2px;
}

/* Features */
.features {
  padding: 64px 0 24px;
}
.section-title {
  font-size: clamp(28px, 4.5vw, 40px);
  font-weight: 800;
  text-align: center;
  margin-bottom: 40px;
}
.feature {
  display: grid;
  gap: 28px;
  align-items: center;
  padding: 28px 0 44px;
}
@media (min-width: 800px) {
  .feature {
    grid-template-columns: 1.2fr 1fr;
    gap: 64px;
    padding: 36px 0 56px;
  }
  .feature.flip .feature-copy {
    order: 2;
  }
}
.feature h3 {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 12px;
}
.feature p {
  color: var(--sec);
  max-width: 34em;
}
.ticks {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: grid;
  gap: 8px;
}
.ticks li {
  position: relative;
  padding-left: 30px;
  font-weight: 600;
}
.ticks li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.35em;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--success);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M8 16A8 8 0 108 0a8 8 0 000 16zm3.9-10.6a1 1 0 00-1.5-1.3L6.7 8.2 5.2 6.7a1 1 0 10-1.4 1.4l2.3 2.3a1 1 0 001.4 0z'/%3E%3C/svg%3E")
    center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M8 16A8 8 0 108 0a8 8 0 000 16zm3.9-10.6a1 1 0 00-1.5-1.3L6.7 8.2 5.2 6.7a1 1 0 10-1.4 1.4l2.3 2.3a1 1 0 001.4 0z'/%3E%3C/svg%3E")
    center / contain no-repeat;
}

.more {
  display: grid;
  gap: 16px;
  padding: 8px 0 40px;
}
@media (min-width: 800px) {
  .more {
    grid-template-columns: repeat(3, 1fr);
  }
}
.more-item {
  background: var(--el);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  box-shadow: var(--shadow);
}
.more-item h3 {
  font-size: 20px;
  margin-bottom: 6px;
}
.more-item p {
  color: var(--sec);
  font-size: 16px;
}

/* Steps */
.steps {
  padding: 40px 0 72px;
}
.step-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 16px;
  counter-reset: step;
}
@media (min-width: 800px) {
  .step-list {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }
}
.step-list li {
  counter-increment: step;
  background: var(--el);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  box-shadow: var(--shadow);
}
.step-list li::before {
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 800;
  margin-bottom: 12px;
}
.step-list h3 {
  font-size: 20px;
  margin-bottom: 6px;
}
.step-list p {
  color: var(--sec);
  font-size: 16px;
}

/* Final call to action */
.final {
  background: var(--hero);
  color: var(--hero-muted);
  padding: 64px 0;
  text-align: center;
}
.final h2 {
  color: var(--hero-text);
  font-size: clamp(28px, 4.5vw, 40px);
  font-weight: 800;
}
.final p {
  max-width: 36em;
  margin: 14px auto 0;
}
@media (prefers-color-scheme: dark) {
  .btn-light {
    color: #0b2a55 !important;
  }
}

/* Footer */
.foot {
  padding: 36px 0 48px;
  border-top: 1px solid var(--border);
}
.foot-in {
  display: grid;
  gap: 20px;
}
@media (min-width: 800px) {
  .foot-in {
    grid-template-columns: 1fr auto;
    align-items: start;
  }
}
.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}
.foot nav a {
  font-size: 15px;
  font-weight: 600;
}
