/* Capybook landing page
   Colors come from the mobile app: caramel (#A85A18) and the cream/peach of the app icon. */

:root {
  --caramel: #a85a18;
  --caramel-dark: #8a4710;
  --peach: #f2c48c;
  --teal: #1f5f66;

  --bg: #fff4e3;
  --bg-alt: #fbe6c7;
  --surface: #ffffff;
  --text: #2b2118;
  --text-muted: #6b5a4a;
  --border: rgba(120, 72, 24, 0.14);
  --shadow: 0 18px 40px -18px rgba(110, 60, 15, 0.35);

  --radius: 20px;
  --font-body: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "Fraunces", Georgia, serif;
  --font-brand: "Audiowide", var(--font-body);
}

@media (prefers-color-scheme: dark) {
  :root {
    --caramel: #e0954f;
    --caramel-dark: #f0ab69;
    --teal: #5fb3bb;

    --bg: #1e1914;
    --bg-alt: #27201a;
    --surface: #2f271f;
    --text: #f5ebdf;
    --text-muted: #c4b3a1;
    --border: rgba(242, 196, 140, 0.14);
    --shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.7);
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1,
h2,
h3 {
  font-family: var(--font-head);
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.5rem, 6vw, 4.25rem); }
h2 { font-size: clamp(1.85rem, 4vw, 2.75rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

a { color: var(--caramel); }

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
}

.muted { color: var(--text-muted); }

.eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--caramel);
  margin-bottom: 0.75em;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--surface);
  padding: 8px 14px;
  border-radius: 8px;
  z-index: 100;
}
.skip-link:focus { left: 8px; }

:focus-visible {
  outline: 3px solid var(--caramel);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  background: #a85a18;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 8px 20px -10px rgba(168, 90, 24, 0.8);
}
.btn:hover {
  background: #8a4710;
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
  box-shadow: none;
}
.btn-ghost:hover {
  background: var(--surface);
}
.btn-small {
  padding: 9px 18px;
  font-size: 0.95rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-brand);
  font-size: 1.35rem;
  color: var(--text);
  text-decoration: none;
}
.brand img { border-radius: 8px; }

.nav {
  display: flex;
  gap: 28px;
}
.nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
}
.nav a:hover { color: var(--text); }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 96px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: 48px;
}

.hero h1 em {
  font-style: italic;
  color: var(--caramel);
}

.lead {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 34em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 18px;
}

.hero-note {
  font-size: 0.92rem;
  color: var(--text-muted);
}

.hero-art {
  position: relative;
  max-width: 520px;
  justify-self: center;
  width: 100%;
}

.hero-blob {
  position: absolute;
  inset: 8% 4% 0 4%;
  background: radial-gradient(circle at 50% 45%, var(--peach), transparent 70%);
  opacity: 0.75;
  border-radius: 50%;
  filter: blur(6px);
}

.hero-capy {
  position: relative;
  animation: bob 6s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(-1deg); }
}

.float-card {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.card-progress {
  left: -6%;
  bottom: 10%;
  width: 220px;
}
.card-streak {
  right: 0;
  top: 8%;
  align-items: center;
}

.fc-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.fc-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.05rem;
}
.fc-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.fc-big {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.6rem;
  line-height: 1;
}

.bar {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: var(--bg-alt);
  overflow: hidden;
  margin: 4px 0 2px;
}
.bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--peach), var(--caramel));
}

/* Sections */
.section {
  padding: 96px 0;
}
.section-alt {
  background: var(--bg-alt);
}

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
}
.section-head p:last-child {
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* Features */
.feature-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.feature:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.feature p {
  color: var(--text-muted);
  margin: 0;
}

.feature-icon {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--peach) 45%, transparent);
  color: var(--caramel);
  margin-bottom: 18px;
}
.feature-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Split spotlights */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 64px;
}
.split-reverse .split-art { order: 2; }

.split-art {
  margin: 0;
}
.split-art img {
  border-radius: 28px;
  box-shadow: var(--shadow);
  aspect-ratio: 1200 / 733;
  object-fit: cover;
}

.split-copy > p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

.checklist {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: grid;
  gap: 14px;
}
.checklist li {
  position: relative;
  padding-left: 34px;
  color: var(--text-muted);
}
.checklist li strong { color: var(--text); }
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--teal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / 14px no-repeat;
}

.points {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 28px 0 20px;
}
.point {
  flex: 1 1 180px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  color: var(--text-muted);
  line-height: 1.35;
}
.point-num {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.9rem;
  color: var(--caramel);
  line-height: 1;
}

/* Steps */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  counter-reset: none;
}
.step {
  text-align: center;
  padding: 12px 20px;
}
.step p {
  color: var(--text-muted);
  margin: 0;
}
.step-num {
  display: inline-grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #a85a18;
  color: #fff;
  font-family: var(--font-brand);
  font-size: 1.4rem;
  margin-bottom: 18px;
  box-shadow: 0 8px 20px -10px rgba(168, 90, 24, 0.9);
}

/* CTA */
.cta {
  text-align: center;
  padding: 64px 28px;
  border-radius: 32px;
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.25), transparent 45%),
    linear-gradient(135deg, #f2c48c, #a85a18);
  color: #2b1a0b;
}
.cta h2 { color: #2b1a0b; }
.cta p {
  font-size: 1.15rem;
  max-width: 32em;
  margin: 0 auto 28px;
}
.cta-icon {
  width: 88px;
  height: 88px;
  margin: 0 auto 20px;
  border-radius: 22px;
  box-shadow: 0 12px 30px -12px rgba(60, 25, 0, 0.6);
}

.store-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 22px 10px 18px;
  border-radius: 14px;
  background: #1e1914;
  color: #fff;
  text-align: left;
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1.1;
  cursor: default;
}
.store-badge small {
  display: block;
  font-weight: 400;
  font-size: 0.72rem;
  opacity: 0.8;
}
.store-badge svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 36px 0;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}
.footer-inner p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.footer-inner .brand { font-size: 1.15rem; }

.footer-links {
  display: flex;
  gap: 20px;
}
.footer-links a {
  color: var(--text-muted);
  font-size: 0.95rem;
}
.footer-links a:hover { color: var(--text); }

/* Legal pages (privacy policy) */
.legal {
  padding: 56px 0 88px;
}
.legal-inner {
  max-width: 780px;
}
.legal h1 {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  margin-bottom: 0.2em;
}
.legal h2 {
  font-size: clamp(1.4rem, 3vw, 1.75rem);
  margin-top: 0;
}
.legal h3 {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 700;
  margin: 1.4em 0 0.5em;
}
.legal section {
  padding-top: 36px;
  margin-top: 36px;
  border-top: 1px solid var(--border);
}
.legal p,
.legal li {
  color: var(--text-muted);
}
.legal strong { color: var(--text); }
.legal ul {
  padding-left: 1.3em;
  margin: 0 0 1em;
}
.legal li { margin-bottom: 0.5em; }
.legal li::marker { color: var(--caramel); }
.legal a { overflow-wrap: anywhere; }

.legal-date {
  font-size: 0.95rem;
  margin-bottom: 1.6em;
}
.legal-intro {
  font-size: 1.15rem;
}

.toc {
  margin: 32px 0 0;
  padding: 22px 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.toc-title {
  font-weight: 700;
  color: var(--text) !important;
  margin-bottom: 0.6em;
}
.toc ol {
  margin: 0;
  padding-left: 1.4em;
  columns: 2;
  column-gap: 32px;
}
.toc li {
  margin-bottom: 0.35em;
  break-inside: avoid;
}
.toc a {
  color: var(--text-muted);
  text-decoration: none;
}
.toc a:hover {
  color: var(--caramel);
  text-decoration: underline;
}

.option-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 32px;
}
.legal .option-card {
  position: relative;
  margin: 0;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.option-card h2 { margin-bottom: 0.7em; }
.option-card > p:last-child { margin: 0; }
.option-tag {
  display: inline-block;
  margin-bottom: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--peach) 45%, transparent);
  color: var(--caramel);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.option-steps {
  margin: 0 0 1em;
  padding-left: 1.4em;
}
.option-steps li { margin-bottom: 0.5em; }
.option-steps li::marker {
  color: var(--caramel);
  font-weight: 700;
}

.contact-card {
  display: inline-block;
  padding: 18px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  line-height: 1.7;
}

/* Responsive */
@media (max-width: 960px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .split { gap: 40px; }
}

@media (max-width: 820px) {
  .nav { display: none; }

  .hero { padding: 40px 0 64px; }
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 24px;
  }
  .lead { margin: 0 auto 1em; }
  .hero-actions { justify-content: center; }
  .hero-art { max-width: 380px; }
  .card-progress { left: -2%; width: 190px; }

  .section { padding: 72px 0; }
  .section-head { margin-bottom: 40px; }

  .split { grid-template-columns: 1fr; }
  .split-reverse .split-art { order: 0; }

  .steps { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 560px) {
  .container { padding: 0 16px; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature { padding: 24px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .card-progress { width: 170px; padding: 10px 14px; }
  .card-streak { padding: 10px 14px; }
  .cta { padding: 48px 20px; border-radius: 24px; }
  .footer-inner { flex-direction: column; text-align: center; }
  .toc ol { columns: 1; }
  .option-grid { grid-template-columns: 1fr; }
  .legal .option-card { padding: 22px; }
  .toc { padding: 18px 20px; }
}

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