/* Chuffed website: Gold Star Day look.
   Gabarito is the app's voice. Shantell Sans is handwriting (people's own words). */

@font-face { font-family: "Gabarito"; font-weight: 400; font-display: swap; src: url("/fonts/gabarito-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Gabarito"; font-weight: 600; font-display: swap; src: url("/fonts/gabarito-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Gabarito"; font-weight: 700; font-display: swap; src: url("/fonts/gabarito-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Gabarito"; font-weight: 800; font-display: swap; src: url("/fonts/gabarito-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Shantell Sans"; font-weight: 500; font-display: swap; src: url("/fonts/shantell-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Shantell Sans"; font-weight: 600; font-display: swap; src: url("/fonts/shantell-sans-latin-600-normal.woff2") format("woff2"); }

:root {
  --cream: #FFF8E7;
  --gold: #FFC83D;
  --gold-deep: #E0A21B;
  --gold-light: #FFD95C;
  --sky: #8FD0FF;
  --sky-deep: #5DB8F5;
  --peach: #FF9A76;
  --grass: #86DBA8;
  --tape: #BDE3FF;
  --tape-gold: #FFE59A;
  --ink: #23201A;
  --ink-soft: #4A4436;
  --ink-faint: #5C5442;
  --paper-edge: #E8DCC0;
  --card: #FFFFFF;
  --link: #B03A0A;
  --ui: "Gabarito", ui-rounded, system-ui, -apple-system, "Segoe UI", sans-serif;
  --hand: "Shantell Sans", "Comic Sans MS", cursive;
  --wrap: 1080px;
  color-scheme: light;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--ui);
  font-size: 18px;
  line-height: 1.55;
  overflow-x: hidden;
}

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

a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 2px; }
a:hover { color: var(--ink); }

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

.skip {
  position: absolute; left: 16px; top: -60px;
  background: var(--ink); color: var(--cream);
  padding: 10px 16px; border-radius: 12px; font-weight: 700; z-index: 10;
}
.skip:focus { top: 12px; }

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

/* ---------- Header ---------- */

.site-header { padding: 18px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

.wordmark {
  display: inline-flex; align-items: flex-start; gap: 2px;
  font-weight: 800; font-size: 34px; line-height: 1; letter-spacing: -0.02em;
  color: var(--ink); text-decoration: none;
}
.wordmark svg { width: 26px; height: 26px; transform: rotate(14deg) translateY(-8px); }
.wordmark:hover { color: var(--ink); }

.nav { display: flex; gap: 6px; flex-wrap: wrap; }
.nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px;
  border-radius: 22px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 16px;
}
.nav a:hover { background: var(--card); }
.nav a[aria-current="page"] { background: var(--card); box-shadow: 0 1px 0 var(--paper-edge); }

/* ---------- Shared bits ---------- */

.sticker-star { filter: drop-shadow(0 2px 0 rgba(35, 32, 26, 0.12)); }

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 22px;
  background: var(--ink); color: var(--cream);
  font-weight: 700; font-size: 16px; text-decoration: none;
}
.pill:hover { color: var(--cream); background: #3A352B; }
.pill.light { background: var(--card); color: var(--ink); box-shadow: 0 1px 0 var(--paper-edge); }
.pill.light:hover { color: var(--ink); background: #FFFDF6; }

.card {
  position: relative; background: var(--card); border-radius: 8px;
  padding: 24px 22px 20px; box-shadow: 0 1px 0 var(--paper-edge), 0 10px 24px -18px rgba(35, 32, 26, 0.35);
}
.card .tape {
  position: absolute; top: -10px; left: 50%; width: 76px; height: 20px; margin-left: -38px;
  background: var(--tape); opacity: 0.9; transform: rotate(-3deg);
}
.card .tape.gold { background: var(--tape-gold); transform: rotate(2deg); }
.tilt-l { transform: rotate(-1.4deg); }
.tilt-r { transform: rotate(1.2deg); }

.hand { font-family: var(--hand); font-weight: 500; }

.eyebrow { font-size: 14px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-faint); margin: 0 0 8px; }

h1, h2, h3 { line-height: 1.08; margin: 0; }
h2 { font-weight: 800; font-size: clamp(30px, 5vw, 44px); letter-spacing: -0.01em; }
h3 { font-weight: 800; font-size: 22px; }

section { padding: 56px 0; }

/* ---------- Home: hero ---------- */

.hero { padding: 28px 0 56px; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 48px; align-items: center; }

.hero h1 { font-weight: 800; font-size: clamp(44px, 7.4vw, 76px); letter-spacing: -0.02em; line-height: 1; }
.hero .lede { font-size: clamp(19px, 2.2vw, 22px); color: var(--ink-soft); margin: 18px 0 0; max-width: 34ch; }
.hero .always { font-weight: 700; font-size: 19px; margin: 18px 0 0; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 28px; }
.soon { font-size: 15px; color: var(--ink-faint); font-weight: 600; }

/* Phone mockup */
.phone {
  justify-self: center; width: 100%; max-width: 330px; aspect-ratio: 390 / 720;
  background: var(--cream); border: 10px solid var(--ink); border-radius: 48px;
  padding: 44px 16px 16px; display: flex; flex-direction: column; gap: 14px;
  box-shadow: 0 30px 60px -30px rgba(35, 32, 26, 0.45);
  transform: rotate(2deg);
}
.phone .date { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.phone .star-count { display: inline-flex; align-items: center; gap: 4px; background: var(--card); border-radius: 15px; padding: 3px 10px 3px 6px; font-weight: 700; color: var(--ink); }
.phone .star-count svg { width: 18px; height: 18px; }
.phone .q { font-weight: 800; font-size: 29px; line-height: 1.02; }
.phone .sub { font-weight: 600; font-size: 13px; color: var(--ink-soft); margin-top: 4px; }
.phone .btns { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.phone .card { padding: 14px 14px 12px; margin-top: auto; }
.phone .card .label { font-size: 11px; font-weight: 700; color: var(--ink-faint); }
.phone .card .hand { font-size: 16px; line-height: 1.3; margin-top: 2px; }

.btn-tile {
  --r: 0deg;
  height: 96px; border-radius: 22px; padding: 12px; color: var(--ink);
  display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start;
  font-weight: 800; font-size: 18px; transform: rotate(var(--r));
  animation: pop 0.5s cubic-bezier(0.2, 0.8, 0.3, 1.3) both;
}
.btn-tile svg { width: 24px; height: 24px; }
.btn-tile.write { background: var(--gold-light); --r: -1.5deg; animation-delay: 0.05s; }
.btn-tile.snap { background: var(--sky); --r: 1deg; animation-delay: 0.12s; }
.btn-tile.say { background: var(--peach); --r: 1.2deg; animation-delay: 0.19s; }
.btn-tile.song { background: var(--grass); --r: -0.8deg; animation-delay: 0.26s; }

@keyframes pop {
  0% { transform: scale(0.6) rotate(var(--r)); opacity: 0; }
  60% { transform: scale(1.06) rotate(var(--r)); opacity: 1; }
  80% { transform: scale(0.98) rotate(var(--r)); }
  100% { transform: scale(1) rotate(var(--r)); }
}

/* ---------- Home: steps ---------- */

.steps-intro { max-width: 640px; margin-bottom: 36px; }
.steps-intro p { color: var(--ink-soft); margin: 12px 0 0; }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; list-style: none; margin: 0; padding: 0; }
.steps li { display: flex; flex-direction: column; gap: 10px; }
.steps .card { min-height: 100%; display: flex; flex-direction: column; gap: 10px; }
.steps .num {
  width: 44px; height: 44px; border-radius: 22px; display: grid; place-items: center;
  font-weight: 800; font-size: 20px; background: var(--gold); color: var(--ink);
}
.steps li:nth-child(2) .num { background: var(--sky); }
.steps li:nth-child(3) .num { background: var(--peach); }
.steps p { margin: 0; color: var(--ink-soft); font-size: 17px; }
.steps .hand { color: var(--ink); font-size: 18px; }

/* ---------- Home: your year ---------- */

.chart-section .wrap { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 48px; align-items: center; }
.chart-section p { color: var(--ink-soft); margin: 14px 0 0; }

.chart { padding: 22px; }
.chart .head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.chart .head strong { font-size: 20px; font-weight: 800; }
.chart .head span { font-size: 15px; font-weight: 600; color: var(--ink-faint); }
.chart-grid { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px; }
.chart-grid span { aspect-ratio: 1; border-radius: 50%; background: #F3EAD4; }
.chart-grid svg { width: 100%; height: 100%; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 14px; font-size: 14px; color: var(--ink-faint); font-weight: 600; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }

/* ---------- Home: promises ---------- */

.promises { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-top: 32px; }
.promise { background: var(--card); border-radius: 22px; padding: 20px; box-shadow: 0 1px 0 var(--paper-edge); }
.promise svg { width: 36px; height: 36px; margin-bottom: 10px; }
.promise h3 { font-size: 20px; }
.promise p { margin: 6px 0 0; color: var(--ink-soft); font-size: 16px; }

.free {
  background: var(--sky); border-radius: 32px; padding: 40px 32px;
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 28px; align-items: center;
}
.free svg { width: 120px; height: 120px; transform: rotate(-10deg); }
.free p { margin: 10px 0 0; font-size: 19px; max-width: 52ch; }

/* ---------- Prose pages (privacy, support) ---------- */

.page-head { padding: 28px 20px 8px; max-width: 760px; }
.page-head h1 { font-weight: 800; font-size: clamp(40px, 6.5vw, 64px); letter-spacing: -0.02em; }
.page-head .lede { font-size: 20px; color: var(--ink-soft); margin: 14px 0 0; max-width: 46ch; }
.page-head .meta { font-size: 15px; color: var(--ink-faint); font-weight: 600; margin: 12px 0 0; }

.prose { max-width: 720px; padding-top: 24px; padding-bottom: 64px; }
.prose h2 { font-size: clamp(26px, 3.6vw, 32px); margin: 44px 0 0; }
.prose h3 { font-size: 20px; margin: 26px 0 0; }
.prose p, .prose ul, .prose ol { margin: 12px 0 0; }
.prose ul, .prose ol { padding-left: 24px; }
.prose li + li { margin-top: 6px; }
.prose strong { font-weight: 700; }

.summary { margin-top: 24px; }
.summary ul { list-style: none; padding: 0; margin: 10px 0 0; }
.summary li { display: flex; gap: 10px; align-items: flex-start; }
.summary li svg { width: 22px; height: 22px; flex-shrink: 0; margin-top: 3px; }
.summary .hand { font-size: 20px; line-height: 1.3; }

.table-wrap { overflow-x: auto; margin-top: 14px; border-radius: 16px; background: var(--card); box-shadow: 0 1px 0 var(--paper-edge); }
table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 16px; }
th, td { text-align: left; vertical-align: top; padding: 12px 16px; border-bottom: 1px solid #F0E6CF; }
th { font-weight: 800; background: #FFFBEF; }
tr:last-child td { border-bottom: none; }

.faq details { background: var(--card); border-radius: 18px; margin-top: 12px; box-shadow: 0 1px 0 var(--paper-edge); }
.faq summary {
  cursor: pointer; list-style: none; padding: 16px 52px 16px 20px; min-height: 44px;
  font-weight: 700; font-size: 19px; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; border-radius: 14px; background: var(--gold-light);
  display: grid; place-items: center; font-weight: 800; font-size: 20px; line-height: 1;
}
.faq details[open] summary::after { content: "–"; background: var(--sky); }
.faq details > div { padding: 0 20px 18px; color: var(--ink-soft); }
.faq details > div p:first-child { margin-top: 0; }

.contact-card { margin-top: 28px; }
.contact-card .big { font-weight: 800; font-size: clamp(22px, 4vw, 30px); word-break: break-word; }

/* ---------- Footer ---------- */

.site-footer { border-top: 2px dashed var(--paper-edge); padding: 32px 0 40px; margin-top: 24px; font-size: 16px; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.site-footer .tag { font-family: var(--hand); font-size: 20px; margin: 6px 0 0; }
.site-footer nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 6px; }
.site-footer nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; color: var(--ink); font-weight: 600; }
.site-footer .small { color: var(--ink-faint); font-size: 14px; margin: 8px 0 0; }

/* ---------- 404 ---------- */

.lost { text-align: center; padding: 60px 0 80px; }
.lost svg { width: 140px; height: 140px; margin: 0 auto 20px; transform: rotate(-14deg); }
.lost h1 { font-weight: 800; font-size: clamp(40px, 7vw, 64px); }
.lost p { color: var(--ink-soft); margin: 14px auto 28px; max-width: 34ch; }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .hero .wrap, .chart-section .wrap { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .phone { max-width: 300px; }
  .steps { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .promises { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  body { font-size: 17px; }
  .wordmark { font-size: 30px; }
  .nav a { padding: 0 10px; font-size: 15px; }
  .promises { grid-template-columns: minmax(0, 1fr); }
  .free { grid-template-columns: minmax(0, 1fr); padding: 30px 22px; }
  .free svg { width: 88px; height: 88px; }
  section { padding: 44px 0; }
}

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