/*
 * Fiabelle — crayon-ledger marketing site.
 * The same hand-drawn system as the app: every box/button/frame is a deterministic
 * sketch stroke drawn by sketch.js behind a [data-sk] element — no CSS-rounded
 * rectangles, no drop shadows. Tokens only; Gaegu (hand) + Baloo 2 (numbers).
 */

:root {
  /* crayon-ledger palette */
  --cream: #fff9f4;
  --pink: #ff8fab;
  --pink-tint: #ffd6e0;
  --pink-deep: #e76489;
  --mint: #bfe8d4;
  --butter: #ffe8a3;
  --lavender: #d9ccff;
  --sky: #bfe0ff;
  --ink: #4a3b38;
  --ink-soft: #8a7a74;
  --ink-faint: #b9aaa4;
  --white: #ffffff;
  --green: #2e8b6a;
  --green-bg: #dff3e9;
  --red-bg: #fbe3e8;
  /* warm paper surface behind the cards (a touch deeper than --cream) */
  --paper: #fff3ec;
  --paper-dot: #ffe3d6;

  --font-hand: 'Gaegu', 'Comic Sans MS', cursive;
  --font-num: 'Baloo 2', system-ui, -apple-system, sans-serif;
  --content: 1080px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-hand);
  color: var(--ink);
  /* warm paper with a faint dotted grid, like the app surface */
  background-color: var(--paper);
  background-image: radial-gradient(var(--paper-dot) 1.1px, transparent 1.2px);
  background-size: 52px 52px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: var(--pink-deep);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ── sketch engine chrome ──────────────────────────────────────────────── */
[data-sk] {
  position: relative;
  background: transparent !important;
  border: none !important;
  isolation: isolate;
}
.sk-svg {
  position: absolute;
  z-index: -1;
  pointer-events: none;
  overflow: visible;
}

/* ── layout ─────────────────────────────────────────────────────────────── */
.wrap {
  width: 100%;
  max-width: var(--content);
  margin: 0 auto;
  padding: 0 20px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--white);
  color: var(--ink);
  padding: 10px 16px;
  font-weight: 700;
  z-index: 20;
}
.skip-link:focus {
  left: 12px;
  top: 12px;
}

:focus-visible {
  outline: 3px solid var(--pink-deep);
  outline-offset: 3px;
}

/* ── nav ────────────────────────────────────────────────────────────────── */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 22px 0 8px;
}
.brand {
  font-family: var(--font-hand);
  font-size: 30px;
  font-weight: 700;
  color: var(--ink);
}
.nav-links {
  display: flex;
  gap: 8px;
  list-style: none;
}
.nav-links a {
  display: inline-block;
  color: var(--ink);
  font-weight: 700;
  font-size: 17px;
  padding: 7px 15px;
}
.nav-links a[aria-current='page'] {
  color: var(--pink-deep);
}

/* ── hero ───────────────────────────────────────────────────────────────── */
.hero {
  padding: 26px 0 44px;
}
.hero-card {
  position: relative;
  padding: 44px 34px 40px;
  text-align: center;
  overflow: visible;
}
.app-icon-frame {
  width: 108px;
  height: 108px;
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.app-icon-frame img {
  width: 82px;
  height: 82px;
}
.wordmark {
  font-family: var(--font-hand);
  font-size: 62px;
  font-weight: 700;
  line-height: 1;
  color: var(--ink);
}
.one-liner {
  font-size: 22px;
  color: var(--ink-soft);
  max-width: 30ch;
  margin: 10px auto 0;
}
.hero-claims {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 22px auto 4px;
  max-width: 580px;
}
.chip {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  padding: 8px 15px;
}
.badge-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
}
.badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 11px 26px;
  color: var(--ink);
  font-weight: 700;
}
.badge .big {
  font-size: 20px;
}
.badge .small {
  font-size: 13px;
  color: var(--ink-soft);
  font-weight: 700;
}
.badge-note {
  font-size: 15px;
  color: var(--ink-soft);
}
/* mascots peeking over the hero card's bottom-right edge */
.mascot-peek {
  position: absolute;
  right: 6px;
  bottom: -30px;
  width: 168px;
  pointer-events: none;
  z-index: 3;
}

/* ── section heading band ───────────────────────────────────────────────── */
.band {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 66px 0 10px;
  flex-wrap: wrap;
}
.band h2 {
  font-family: var(--font-hand);
  font-size: 30px;
  font-weight: 700;
  min-width: 0; /* let the heading wrap in the flex band instead of forcing width */
}
.band .ln {
  flex: 1;
  height: 0;
  border-top: 2.5px dashed var(--pink-tint);
}
.section-lead {
  font-size: 18px;
  color: var(--ink-soft);
  max-width: 62ch;
}

/* ── feature rows ───────────────────────────────────────────────────────── */
.feature {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 44px;
  margin: 44px 0;
}
.feature:nth-child(even) {
  grid-template-columns: auto 1fr;
}
.feature:nth-child(even) .feature-copy {
  order: 2;
}
.feature-copy {
  max-width: 46ch;
}
.feature-icon {
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  color: var(--ink);
}
.feature-icon svg {
  width: 30px;
  height: 30px;
}
.feature-copy h3 {
  font-family: var(--font-hand);
  font-size: 27px;
  font-weight: 700;
  line-height: 1.15;
}
.feature-copy p {
  font-size: 18px;
  color: var(--ink-soft);
  margin-top: 8px;
}

/* ── hand-drawn phone frame ─────────────────────────────────────────────── */
.phone {
  padding: 11px;
  flex: none;
  justify-self: center;
}
.phone .screen {
  width: 234px;
  height: auto;
  border-radius: 26px;
}

/* ── privacy manifesto strip ────────────────────────────────────────────── */
.manifesto {
  margin: 64px 0 8px;
  padding: 42px 34px;
  text-align: center;
}
.manifesto p {
  font-family: var(--font-hand);
  font-size: 30px;
  font-weight: 700;
  line-height: 1.3;
  max-width: 24ch;
  margin: 0 auto 16px;
}
.manifesto a {
  font-size: 19px;
  font-weight: 700;
}

/* ── generic content card (features intro / privacy / support) ──────────── */
.card {
  padding: 26px 26px;
  margin: 18px 0;
}
.card h2 {
  font-family: var(--font-hand);
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 6px;
}
.card h3 {
  font-family: var(--font-hand);
  font-size: 22px;
  font-weight: 700;
  margin: 14px 0 4px;
}
.card p,
.card li {
  font-size: 17px;
  color: var(--ink);
  margin-bottom: 8px;
}
.card ul {
  padding-left: 20px;
}
.card .muted {
  color: var(--ink-soft);
}

/* article page header */
.page-title {
  font-family: var(--font-hand);
  font-size: 46px;
  font-weight: 700;
  margin: 30px 0 2px;
}
.updated {
  color: var(--ink-soft);
  font-size: 16px;
  margin-bottom: 18px;
}

/* callout (short version) */
.callout {
  padding: 22px 24px;
  margin: 20px 0;
}
.callout b {
  color: var(--ink);
}

/* support contact + faq */
.contact-line {
  font-size: 18px;
  margin-bottom: 10px;
}
.faq {
  padding: 16px 20px;
  margin: 12px 0;
}
.faq summary {
  font-family: var(--font-hand);
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::before {
  content: '▸ ';
  color: var(--pink-deep);
}
.faq[open] summary::before {
  content: '▾ ';
}
.faq p {
  font-size: 17px;
  color: var(--ink);
  margin-top: 10px;
}

/* ── footer ─────────────────────────────────────────────────────────────── */
.footer {
  margin: 70px 0 40px;
  padding: 26px 0 0;
  border-top: 2.5px dashed var(--pink-tint);
  text-align: center;
  color: var(--ink-soft);
  font-size: 16px;
}
.footer-links {
  display: flex;
  gap: 8px;
  justify-content: center;
  list-style: none;
  margin-top: 10px;
}
.footer-links a {
  color: var(--ink);
  font-weight: 700;
  padding: 4px 12px;
}

.num {
  font-family: var(--font-num);
  font-weight: 700;
}

/* ── responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 720px) {
  .wordmark {
    font-size: 48px;
  }
  .one-liner {
    font-size: 19px;
  }
  .band h2 {
    font-size: 26px;
  }
  .feature,
  .feature:nth-child(even) {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 22px;
  }
  .feature:nth-child(even) .feature-copy {
    order: 0;
  }
  .feature-copy {
    max-width: 100%;
  }
  .feature-icon {
    margin-inline: auto;
  }
  .mascot-peek {
    width: 118px;
    bottom: -20px;
    right: 2px;
  }
  .manifesto p {
    font-size: 24px;
  }
  .page-title {
    font-size: 38px;
  }
}

/* ── reduced motion: skip entrance animation ────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    animation: rise 0.5s ease both;
  }
  @keyframes rise {
    from {
      opacity: 0;
      transform: translateY(14px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
