/* Shape Mosaics: light "paper" theme with accent colors taken from the book cover. */

@font-face {
  font-family: "Fredoka";
  src: url("/fonts/fredoka.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --paper: #fbf7ee;
  --paper-2: #f4eddf;
  --card: #ffffff;
  --line: #e6dcc8;
  --ink: #101a3a;
  --ink-soft: #4b5470;
  --navy: #0b1d4d;
  --navy-2: #13296a;
  --blue: #1d4fd8;
  --blue-dark: #163fb0;
  --sky: #3bb4ee;
  --yellow: #ffd43b;
  --green: #2fbf71;
  --purple: #8d5cf6;
  --orange: #ff8a2a;
  --red: #e5322d;
  --teal: #00cfae;
  --radius: 16px;
  --display: "Fredoka", ui-rounded, "Arial Rounded MT Bold", system-ui, sans-serif;
  --body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}
a {
  color: var(--blue);
}
:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}
h1,
h2,
h3 {
  font-family: var(--display);
  line-height: 1.1;
  margin: 0;
  letter-spacing: -0.01em;
}
h2 {
  font-size: clamp(30px, 4.4vw, 46px);
  font-weight: 650;
}
h3 {
  font-size: 21px;
  font-weight: 600;
}
p {
  margin: 0;
}
.wrap {
  width: min(1120px, 100% - 32px);
  margin-inline: auto;
}
.skip-link {
  position: absolute;
  left: 8px;
  top: -100px;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 12px 16px;
  border-radius: 8px;
}
.skip-link:focus {
  top: 8px;
}

/* Kicker + section heads */
.kicker {
  font-family: var(--display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 10px;
}
.kicker-light {
  color: var(--yellow);
}
.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 44px;
}

/* WitShaped symbol, used as the site mark */
.mark {
  width: 28px;
  height: 28px;
  flex: none;
  fill: var(--teal);
}
.mark-lg {
  width: 56px;
  height: 56px;
}

/* Buttons */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.actions-center {
  justify-content: center;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 24px;
  border: 2px solid var(--blue);
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}
.button:hover {
  background: var(--blue-dark);
  border-color: var(--blue-dark);
  transform: translateY(-1px);
}
.button-ghost {
  background: transparent;
  color: var(--blue);
}
.button-ghost:hover {
  background: #fff;
  color: var(--blue-dark);
}
.button-small {
  min-height: 44px;
  padding: 8px 20px;
  font-size: 17px;
  background: var(--yellow);
  border-color: var(--yellow);
  color: var(--ink);
}
.button-small:hover {
  background: #ffe066;
  border-color: #ffe066;
}
.button svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(251, 247, 238, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}
.wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--display);
  font-weight: 650;
  font-size: 22px;
  white-space: nowrap;
}
.site-nav {
  display: flex;
  gap: 24px;
  margin-left: auto;
}
.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
}
.site-nav a:hover {
  color: var(--ink);
}
.badge {
  font-family: var(--display);
  font-weight: 600;
  font-size: 14px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--yellow);
  color: var(--ink);
  white-space: nowrap;
}

/* Hero */
.hero {
  padding: 56px 0 72px;
  overflow: hidden;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  align-items: center;
  gap: 56px;
}
.hero-cover {
  order: 2;
  justify-self: center;
  width: min(380px, 100%);
}
.hero-cover img {
  border-radius: 6px;
  transform: rotate(3deg);
  box-shadow:
    0 2px 4px rgba(16, 26, 58, 0.12),
    0 24px 48px -12px rgba(16, 26, 58, 0.4);
}
.hero-copy {
  order: 1;
}
h1 {
  font-size: clamp(42px, 6.4vw, 76px);
  font-weight: 650;
  line-height: 1.02;
  margin-bottom: 20px;
}
mark {
  color: inherit;
  background: linear-gradient(transparent 58%, var(--yellow) 58%, var(--yellow) 92%, transparent 92%);
  padding: 0 0.06em;
}
.lede {
  font-size: 19px;
  color: var(--ink-soft);
  max-width: 34em;
  margin-bottom: 28px;
}
.facts-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  font-size: 15px;
  color: var(--ink-soft);
}
.facts-line li::before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  margin-right: 8px;
  background: var(--sky);
  transform: rotate(12deg);
}
.facts-line li:nth-child(2)::before {
  background: var(--yellow);
}
.facts-line li:nth-child(3)::before {
  background: var(--green);
}

/* Reveal */
.reveal {
  background: radial-gradient(ellipse at 20% 20%, var(--navy-2), var(--navy) 65%);
  color: #fff;
  padding: 80px 0;
}
.reveal-inner {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  align-items: center;
  gap: 56px;
}
.reveal-copy p {
  color: #d5dcf0;
  font-size: 18px;
  margin-top: 16px;
  max-width: 30em;
}
.reveal-copy .reveal-note {
  font-size: 15px;
  color: #a9b5d6;
}
.compare {
  margin: 0;
  width: min(520px, 100%);
  justify-self: center;
}
.compare-stage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.compare-stage img {
  border-radius: 10px;
  background: #000;
}
.compare-handle,
.compare-range,
.compare figcaption {
  display: none;
}
/* JS on: stack the images and reveal with a slider */
.compare.is-live .compare-stage {
  display: block;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6);
}
.compare.is-live .compare-stage img {
  border-radius: 0;
}
.compare.is-live .compare-after {
  position: absolute;
  inset: 0;
  clip-path: inset(0 calc(100% - var(--pos)) 0 0);
}
.compare.is-live .compare-handle {
  display: block;
  position: absolute;
  top: 0;
  bottom: 0;
  left: clamp(24px, var(--pos), calc(100% - 24px));
  width: 4px;
  margin-left: -2px;
  background: var(--yellow);
  pointer-events: none;
}
.compare-handle span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}
.compare-handle span::before,
.compare-handle span::after {
  content: "";
  position: absolute;
  top: 50%;
  margin-top: -6px;
  border: 6px solid transparent;
}
.compare-handle span::before {
  left: 6px;
  border-right-color: var(--ink);
}
.compare-handle span::after {
  right: 6px;
  border-left-color: var(--ink);
}
.compare.is-live .compare-range {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  touch-action: pan-y;
}
.compare.is-live:has(.compare-range:focus-visible) .compare-stage {
  outline: 3px solid var(--yellow);
  outline-offset: 4px;
}
.compare.is-live figcaption {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 20px;
  color: #a9b5d6;
  font-size: 15px;
}

/* How it works */
.how {
  padding: 88px 0;
}
.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.step {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.step img {
  aspect-ratio: 2 / 1;
  width: calc(100% - 48px);
  margin: 24px 24px 0;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.step-body {
  padding: 22px 24px 26px;
}
.step-num {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  margin-bottom: 12px;
  background: var(--sky);
  color: var(--ink);
  font-family: var(--display);
  font-weight: 650;
  transform: rotate(-6deg);
}
.step:nth-child(2) .step-num {
  background: var(--yellow);
}
.step:nth-child(3) .step-num {
  background: var(--green);
}
.step h3 {
  margin-bottom: 8px;
}
.step p {
  color: var(--ink-soft);
  font-size: 16px;
}

/* Inside the book */
.inside {
  background: var(--paper-2);
  padding: 88px 0;
}
.inside-inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: 56px;
}
.spread-figure {
  margin: 0;
}
.spread {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 4px; /* the white backing shows through as the spine */
  padding: 14px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 24px 50px -20px rgba(16, 26, 58, 0.35);
  position: relative;
}
/* Fold sheen: light, so it shows against the black pages */
.spread::after {
  content: "";
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: 50%;
  width: 44px;
  margin-left: -22px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.14) 45%, transparent 50%, rgba(255, 255, 255, 0.14) 55%, transparent);
  pointer-events: none;
}
.spread img:first-child {
  border-radius: 2px 0 0 2px;
}
.spread-labels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 12px 14px 0;
  text-align: center;
  font-size: 14px;
  color: var(--ink-soft);
}
.features {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  display: grid;
  gap: 22px;
}
.features li {
  padding-left: 30px;
  position: relative;
}
.features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background: var(--blue);
  transform: rotate(10deg);
}
.features li:nth-child(2)::before {
  background: var(--orange);
}
.features li:nth-child(3)::before {
  background: var(--purple);
}
.features h3 {
  font-size: 20px;
  margin-bottom: 4px;
}
.features p {
  color: var(--ink-soft);
  font-size: 16px;
}

/* Audience */
.audience {
  padding: 88px 0;
}
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 6px solid var(--sky);
  border-radius: var(--radius);
  padding: 26px 26px 30px;
}
.card-yellow {
  border-top-color: var(--yellow);
}
.card-green {
  border-top-color: var(--green);
}
.card h3 {
  margin-bottom: 10px;
}
.card p {
  color: var(--ink-soft);
  font-size: 16px;
}

/* Details + FAQ */
.details {
  background: var(--paper-2);
  padding: 88px 0;
}
.details-inner {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 56px;
  align-items: start;
}
.facts {
  margin: 24px 0 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 6px 22px;
}
.facts div {
  display: grid;
  grid-template-columns: 7.5em 1fr;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.facts div:last-child {
  border-bottom: 0;
}
.facts dt {
  color: var(--ink-soft);
  font-size: 15px;
}
.facts dd {
  margin: 0;
  font-weight: 600;
}
.faq {
  margin-top: 24px;
  display: grid;
  gap: 12px;
}
.faq details {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 52px 16px 20px;
  position: relative;
  font-family: var(--display);
  font-weight: 600;
  font-size: 18px;
  min-height: 44px;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "+";
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 26px;
  font-weight: 500;
  color: var(--blue);
}
.faq details[open] summary::after {
  content: "–";
}
.faq details p {
  padding: 0 20px 18px;
  color: var(--ink-soft);
  font-size: 16px;
}

/* Follow */
.follow {
  padding: 88px 0;
}
.follow-panel {
  text-align: center;
  background: radial-gradient(ellipse at 30% 0%, var(--navy-2), var(--navy) 70%);
  color: #fff;
  border-radius: 24px;
  padding: 56px 24px;
}
.follow-panel .mark {
  margin-bottom: 18px;
}
.follow-panel p {
  color: #d5dcf0;
  margin: 12px auto 28px;
  max-width: 30em;
}
.button-social {
  background: #fff;
  border-color: #fff;
  color: var(--ink);
}
.button-social:hover {
  background: var(--yellow);
  border-color: var(--yellow);
}
.handle {
  font-family: var(--body);
  font-weight: 500;
  font-size: 15px;
  color: var(--ink-soft);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 36px;
  font-size: 14px;
  color: var(--ink-soft);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-logo img {
  width: 140px;
}
.site-footer a {
  margin-left: 12px;
}

/* Simple pages (privacy, 404) */
.page {
  padding: 72px 0 96px;
}
.page .wrap {
  max-width: 720px;
}
.page h1 {
  font-size: clamp(36px, 6vw, 56px);
}
.page h2 {
  font-size: 24px;
  margin: 32px 0 8px;
}
.page p,
.page li {
  color: var(--ink-soft);
}
.page p + p {
  margin-top: 12px;
}
.page .actions {
  margin-top: 28px;
}

/* Tablet */
@media (max-width: 900px) {
  .site-nav {
    display: none;
  }
  .badge {
    margin-left: auto;
  }
  .reveal-inner,
  .inside-inner,
  .details-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .reveal-copy {
    text-align: center;
  }
  .reveal-copy p {
    margin-inline: auto;
  }
  .steps,
  .cards {
    grid-template-columns: 1fr;
    max-width: 520px;
    margin-inline: auto;
  }
  .spread-figure {
    max-width: 560px;
    margin-inline: auto;
  }
}

/* Phone: cover first, kept compact so the buttons stay on the first screen */
@media (max-width: 700px) {
  body {
    font-size: 16px;
  }
  .header-inner {
    height: 56px;
  }
  .header-inner {
    gap: 12px;
  }
  .wordmark {
    font-size: 20px;
    gap: 8px;
  }
  .badge {
    font-size: 13px;
    padding: 4px 10px;
  }
  .hero {
    padding: 28px 0 56px;
  }
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 24px;
    text-align: center;
  }
  .hero-cover {
    order: 0;
    width: 190px;
  }
  .hero-cover img {
    transform: rotate(2deg);
  }
  h1 {
    margin-bottom: 14px;
  }
  .lede {
    font-size: 17px;
    margin: 0 auto 22px;
  }
  .actions {
    justify-content: center;
  }
  .facts-line {
    justify-content: center;
  }
  .reveal,
  .how,
  .inside,
  .audience,
  .details,
  .follow {
    padding: 60px 0;
  }
  .section-head {
    margin-bottom: 32px;
  }
  .spread {
    padding: 8px;
  }
  .spread-labels {
    padding: 10px 8px 0;
    font-size: 13px;
  }
  .spread::after {
    top: 8px;
    bottom: 8px;
  }
  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

/* Small phones (iPhone mini/SE size and below) */
@media (max-width: 380px) {
  .wordmark {
    font-size: 18px;
  }
  .wordmark .mark {
    width: 24px;
    height: 24px;
  }
}

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