/* Calistreak landing. Same identity as the app (src/theme): Young Serif titles,
   Nunito text, the Violeta palette (light and dark), large radii, 3D buttons.
   Fonts are self-hosted (npm run gen:landing): no requests to third parties. */

@font-face {
  font-family: 'Young Serif';
  src: url('fonts/young-serif-400.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Nunito';
  src: url('fonts/nunito-400.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Nunito';
  src: url('fonts/nunito-700.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Nunito';
  src: url('fonts/nunito-800.ttf') format('truetype');
  font-weight: 800;
  font-display: swap;
}

:root {
  --bg: #faf6f1;
  --surface: #fffefd;
  --ink: #251e15;
  --muted: #69625a;
  --line: #e5ded7;
  --primary: #6b40c9;
  --primary-edge: #4a1e97;
  --primary-soft: #ebe8ff;
  --primary-text: #6b40c9;
  --on-primary: #ffffff;
  --shadow: 0 6px 24px rgba(37, 30, 21, 0.08);
  --radius: 22px;
  --gutter: 16px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141319;
    --surface: #1f1e26;
    --ink: #f3ede8;
    --muted: #b3ada5;
    --line: #35343d;
    --primary: #a890fe;
    --primary-edge: #7862bf;
    --primary-soft: #2f2849;
    --primary-text: #bcadff;
    --on-primary: #141319;
    --shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Nunito', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 400;
  line-height: 1.12;
}
h1,
h2 {
  font-family: 'Young Serif', Georgia, serif;
}
h1 {
  font-size: clamp(2.3rem, 7vw, 3.7rem);
  letter-spacing: -0.01em;
}
h2 {
  font-size: clamp(1.75rem, 4.5vw, 2.5rem);
  margin-bottom: 12px;
}
h3 {
  font-family: 'Nunito', system-ui, sans-serif;
  font-weight: 800;
  font-size: 1.08rem;
  line-height: 1.3;
}
p {
  margin: 0;
}
a {
  color: var(--primary-text);
  font-weight: 700;
}
picture {
  display: block;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
svg {
  width: 22px;
  height: 22px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.narrow {
  max-width: 720px;
}
.center {
  text-align: center;
}

.skip {
  position: absolute;
  left: -999px;
}
.skip:focus {
  left: 16px;
  top: 16px;
  z-index: 10;
  background: var(--surface);
  padding: 8px 12px;
  border-radius: 12px;
}

/* Header */
.top {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-family: 'Young Serif', Georgia, serif;
  font-weight: 400;
  font-size: 1.35rem;
}
.brand img {
  border-radius: 10px;
}
.pill {
  font-family: 'Nunito', system-ui, sans-serif;
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary-text);
  background: var(--primary-soft);
  padding: 3px 10px;
  border-radius: 999px;
}

/* Buttons (the app's Button3D) */
.btn {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 12px 24px;
  border-radius: 16px;
  background: var(--primary);
  color: var(--on-primary);
  border-bottom: 4px solid var(--primary-edge);
  font-weight: 800;
  font-size: 1.05rem;
  text-decoration: none;
  transition:
    transform 80ms ease,
    border-bottom-width 80ms ease;
}
.btn:active {
  transform: translateY(2px);
  border-bottom-width: 2px;
}
.btn:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}
.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-bottom: 4px solid var(--line);
}
.btn-small {
  min-height: 42px;
  padding: 8px 16px;
  font-size: 0.95rem;
  border-bottom-width: 3px;
}

/* Hero */
.hero {
  padding: 40px 0 56px;
}
.hero-grid {
  display: grid;
  gap: 36px;
  align-items: center;
}
.hero-text {
  display: grid;
  gap: 18px;
}
.eyebrow {
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary-text);
}
.lead {
  font-size: 1.18rem;
  color: var(--muted);
  max-width: 34em;
}
.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.qr {
  display: none;
  align-items: center;
  gap: 16px;
  max-width: 30em;
  color: var(--muted);
  font-size: 0.95rem;
}
.qr img {
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #ffffff;
  padding: 6px;
}

/* Phone screenshots */
.phone {
  margin: 0 auto;
  width: min(300px, 82vw);
  border-radius: 34px;
  border: 8px solid var(--surface);
  outline: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
  background: var(--surface);
}
.phone-small {
  width: min(250px, 70vw);
  border-width: 6px;
  border-radius: 28px;
}
figure.phone-small {
  overflow: visible;
  outline: none;
  border: none;
  box-shadow: none;
  background: none;
}
.phone-small img {
  border-radius: 24px;
  border: 6px solid var(--surface);
  outline: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.phone-small figcaption {
  margin-top: 12px;
  text-align: center;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.95rem;
}

/* Sections */
.section {
  padding: 64px 0;
}
.section-soft {
  background: color-mix(in srgb, var(--primary-soft) 45%, var(--bg));
}
.section-lead {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 40em;
  margin-bottom: 28px;
}
.center .section-lead {
  margin-left: auto;
  margin-right: auto;
}
.note {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 16px;
}

/* Cards */
.cards {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 8px;
  align-content: start;
}
.card p,
.card li {
  color: var(--muted);
}
.card .icon {
  width: 40px;
  height: 40px;
  padding: 9px;
  border-radius: 12px;
  color: var(--primary-text);
  background: var(--primary-soft);
}
.card-accent {
  background: var(--primary);
  border-color: var(--primary);
}
.card-accent h3,
.card-accent p {
  color: var(--on-primary);
}
.card-accent .icon {
  color: var(--on-primary);
  background: color-mix(in srgb, var(--on-primary) 18%, transparent);
}
.card ul,
.card ol {
  margin: 0;
  padding-left: 1.2em;
  display: grid;
  gap: 6px;
}
.inline {
  vertical-align: -4px;
  margin-right: 8px;
  color: var(--primary-text);
}
.inline.big {
  width: 30px;
  height: 30px;
  vertical-align: -5px;
}

/* How it works */
.split {
  display: grid;
  gap: 36px;
  align-items: center;
}
.steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 24px 0 0;
  display: grid;
  gap: 20px;
}
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 44px 1fr;
  column-gap: 14px;
}
.steps li::before {
  content: counter(step);
  grid-row: span 2;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: var(--on-primary);
  background: var(--primary);
  box-shadow: 0 3px 0 var(--primary-edge);
}
.steps p {
  color: var(--muted);
}

/* Features */
.features {
  list-style: none;
  padding: 0;
  margin: 0 0 40px;
  display: grid;
  gap: 12px;
}
.features li,
.checks li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
}
.features svg,
.checks svg {
  color: var(--primary-text);
}
.gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px;
}
.checks {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
  font-size: 1.08rem;
}

/* Transparency, install */
.columns {
  display: grid;
  gap: 16px;
}

/* Timeline */
.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 16px;
}
.timeline li {
  display: grid;
  gap: 4px;
  padding-left: 20px;
  border-left: 4px solid var(--primary);
}
.timeline li + li {
  border-left-color: var(--line);
}
.when {
  font-weight: 800;
  color: var(--primary-text);
}

/* FAQ */
details {
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}
summary {
  cursor: pointer;
  font-weight: 800;
  font-size: 1.05rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
summary::-webkit-details-marker {
  display: none;
}
summary::after {
  content: '+';
  color: var(--primary-text);
  font-size: 1.3rem;
  line-height: 1;
}
details[open] summary::after {
  content: '–';
}
details p {
  margin-top: 10px;
  color: var(--muted);
}

/* Final call and footer */
.final h2 {
  font-size: clamp(2rem, 5vw, 2.8rem);
}
.footer {
  border-top: 1px solid var(--line);
  padding: 32px 0 48px;
  color: var(--muted);
  font-size: 0.92rem;
}
.footer-grid {
  display: grid;
  gap: 20px;
}
.footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
}
.brand-small {
  font-family: 'Young Serif', Georgia, serif;
  font-size: 1.2rem;
  color: var(--ink);
  margin-bottom: 6px;
}

/* Wider screens */
@media (min-width: 720px) {
  :root {
    --gutter: 24px;
  }
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
  .features {
    grid-template-columns: repeat(2, 1fr);
  }
  .columns {
    grid-template-columns: repeat(2, 1fr);
  }
  .timeline {
    grid-template-columns: repeat(3, 1fr);
  }
  .timeline li {
    border-left: none;
    padding-left: 0;
    padding-top: 16px;
    border-top: 4px solid var(--line);
  }
  .timeline li:first-child {
    border-top-color: var(--primary);
  }
  .footer-grid {
    grid-template-columns: 1.4fr 1fr;
  }
}

@media (min-width: 960px) {
  .hero {
    padding: 72px 0 88px;
  }
  .hero-grid,
  .split {
    grid-template-columns: 1.2fr 1fr;
  }
  .cards {
    grid-template-columns: repeat(3, 1fr);
  }
  .card-accent {
    grid-column: span 3;
  }
  .features {
    grid-template-columns: repeat(3, 1fr);
  }
  .section {
    padding: 88px 0;
  }
}

/* The QR code only where a phone camera makes sense: a computer. */
@media (min-width: 960px) and (hover: hover) and (pointer: fine) {
  .qr {
    display: flex;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .btn {
    transition: none;
  }
}
