/* MeloLingo Kids parent website. Felt storybook look, taken from the app's art.
   No scripts, no external requests: the CSP allows only this file, /fonts and /assets. */

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

:root {
  color-scheme: light;
  --cream: #f7f0e1;
  --paper: #fffaf0;
  --ink: #25392e;
  --muted: #56675c;
  --line: #e4d8bf;
  --green: #2d6a45;
  --green-dark: #1f4d31;
  --coral: #e2552c;      /* the app's Spanish colour */
  --coral-ink: #b63e1a;  /* coral for small text on cream */
  --teal: #1b8d89;
  --yellow: #f4c53a;
  --sky: #cfe4f2;
  --mint: #e3eedb;
  --shadow: 0 1px 0 #fff8 inset, 0 14px 30px -14px #4a3a1a40;
  --radius: 28px;
  --display: "Fredoka", ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  --text: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  font-family: var(--text);
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream) url("/assets/felt.webp");
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol { margin-top: 0; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.1; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.5rem, 6vw, 4.4rem); margin-bottom: 1.1rem; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); margin-bottom: 0.9rem; }
h3 { font-size: 1.3rem; margin-bottom: 0.5rem; }
p, ul, ol { margin-bottom: 1.2rem; }
li + li { margin-top: 0.45rem; }
a { color: var(--green); text-underline-offset: 0.2em; text-decoration-thickness: 1.5px; }
a:hover { color: var(--green-dark); text-decoration-thickness: 2.5px; }
a:focus-visible, summary:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 4px;
  border-radius: 6px;
}
strong { font-weight: 650; }

.wrap { width: min(1140px, 100% - 48px); margin-inline: auto; }
.skip { position: absolute; left: 12px; top: -100px; background: var(--paper); padding: 10px 16px; border-radius: 12px; z-index: 10; }
.skip:focus { top: 12px; }
.eyebrow {
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--coral-ink);
  margin-bottom: 0.8rem;
}
.lead, .intro { font-size: 1.15rem; color: var(--muted); max-width: 36em; }
.small { font-size: 0.88rem; color: var(--muted); }
.es { color: var(--coral-ink); font-weight: 650; }
.es::before { content: "✦ "; color: var(--coral); font-size: 0.8em; }

/* Felt pieces: soft paper with a stitched edge. */
.felt {
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  outline: 2px dashed #d9c9a6;
  outline-offset: -11px;
}

/* Header and footer */
.site-header { padding-block: 18px; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px 28px; flex-wrap: wrap; }
.brand {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--display); font-weight: 600; font-size: 1.45rem;
  color: var(--ink); text-decoration: none; white-space: nowrap;
}
.brand img { width: 44px; height: 44px; border-radius: 12px; box-shadow: 0 4px 10px -4px #1b8d8970; }
.brand span { color: var(--coral); }
.nav { display: flex; gap: 6px; flex-wrap: wrap; font-family: var(--display); font-weight: 500; font-size: 1rem; }
.nav a { color: var(--ink); text-decoration: none; padding: 6px 14px; border-radius: 999px; }
.nav a:hover { background: #fffaf0b0; }
.nav a[aria-current="page"] { background: var(--paper); box-shadow: var(--shadow); color: var(--green-dark); }

.site-footer { margin-top: 40px; padding-block: 36px 44px; font-size: 0.9rem; color: var(--muted); border-top: 2px dashed var(--line); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; }
.site-footer p { margin: 0; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; font-family: var(--display); font-weight: 500; }

/* Buttons and pills */
.button {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--display); font-weight: 600; font-size: 1.05rem;
  background: var(--green); color: #fff; text-decoration: none;
  padding: 14px 26px; border-radius: 999px;
  box-shadow: 0 6px 0 var(--green-dark), 0 14px 24px -12px #1f4d3199;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.button:hover { color: #fff; transform: translateY(2px); box-shadow: 0 4px 0 var(--green-dark), 0 10px 20px -12px #1f4d3199; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--display); font-weight: 500; font-size: 0.95rem;
  padding: 8px 16px; border-radius: 999px;
  background: #fffaf0d0; border: 2px dashed var(--line); color: var(--muted);
}
.actions { display: flex; align-items: center; gap: 14px 18px; flex-wrap: wrap; margin-top: 26px; }

/* Home: hero */
.hero { display: grid; grid-template-columns: 1fr 1.05fr; gap: 40px; align-items: center; padding-block: 40px 70px; }
.hero h1 { font-size: clamp(2.5rem, 5.2vw, 4rem); }
.hero h1 .es { white-space: nowrap; }
.hero h1 .es::before { font-size: 0.55em; vertical-align: 0.35em; }
.song-card { display: flex; align-items: center; gap: 18px; padding: 18px 26px 18px 18px; margin-top: 28px; max-width: 470px; }
.song-card img { width: 78px; flex: none; }
.song-card p { margin: 0; font-family: var(--display); font-size: 1.25rem; font-weight: 500; line-height: 1.35; }
.song-card .small { font-family: var(--text); font-size: 0.82rem; font-weight: 400; margin-top: 4px; }

.stage { position: relative; padding-bottom: 6%; }
.stage .window {
  border-radius: 46% 46% 32px 32px / 34% 34% 32px 32px;
  overflow: hidden;
  border: 12px solid var(--paper);
  box-shadow: var(--shadow), 0 0 0 2px #d9c9a6;
  aspect-ratio: 1 / 0.92;
}
.stage .window img { width: 100%; height: 100%; object-fit: cover; object-position: 52% 60%; }
.stage .mis { position: absolute; width: 41%; left: 8%; bottom: 0; filter: drop-shadow(0 12px 10px #3b2a0f40); }
.stage .cat { position: absolute; width: 27%; right: 9%; bottom: 3%; filter: drop-shadow(0 10px 8px #3b2a0f40); }
.stage .spark { position: absolute; width: 11%; }
.stage .spark-1 { top: 8%; left: 4%; }
.stage .spark-2 { top: 24%; right: -1%; width: 7%; }

/* Home: sections */
.section { padding-block: 64px; }
.section-head { max-width: 40em; margin-bottom: 36px; }
.section-head.center { margin-inline: auto; text-align: center; }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: step; list-style: none; padding: 0; }
.step { padding: 30px 26px 28px; position: relative; display: flex; flex-direction: column; margin: 0; }
.step + .step { margin-top: 0; }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: -14px; left: 22px;
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--display); font-weight: 600; color: #fff;
  background: var(--teal); box-shadow: 0 4px 0 #126865;
}
.step .art { height: 128px; display: flex; align-items: flex-end; justify-content: center; gap: 6px; margin-bottom: 18px; }
.step .art img { max-height: 128px; width: auto; max-width: 52%; object-fit: contain; }
.step .art .tiny { max-height: 76px; max-width: 28%; }
.step p { font-size: 0.97rem; color: var(--muted); margin: 0; }

.promises { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; list-style: none; padding: 0; margin: 0; }
.promise { padding: 26px 26px 24px; margin: 0; }
.promise + .promise { margin-top: 0; }
.promise h3::before {
  content: ""; display: inline-block; width: 14px; height: 14px; border-radius: 50%;
  margin-right: 10px; vertical-align: 0.08em; background: var(--dot, var(--teal));
}
.promise:nth-child(3n+2) { --dot: var(--coral); }
.promise:nth-child(3n) { --dot: var(--yellow); }
.promise p { margin: 0; font-size: 0.97rem; color: var(--muted); }

.band { display: grid; grid-template-columns: 1.1fr 1fr; gap: 44px; align-items: center; }
.band-art { position: relative; }
.band-art .scene { border-radius: var(--radius); border: 10px solid var(--paper); box-shadow: var(--shadow); }
.band-art .lion { position: absolute; width: 30%; left: 12%; bottom: 6%; }
.band-art .dog { position: absolute; width: 35%; right: 10%; bottom: 5%; }
.band-art .sticker { position: absolute; width: 20%; right: -4%; top: -9%; transform: rotate(10deg); }

.worlds { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; list-style: none; padding: 0; margin: 0; }
.world { margin: 0; text-align: center; font-family: var(--display); font-weight: 500; }
.world + .world { margin-top: 0; }
.world img { margin: 0 auto 10px; width: 100%; height: 190px; object-fit: contain; filter: drop-shadow(0 10px 10px #4a3a1a30); }
.world.later img { filter: grayscale(0.85) opacity(0.5); }
.world.later { color: var(--muted); }

.grown-ups { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grown-ups .felt { padding: 30px 28px; }
.grown-ups p { color: var(--muted); font-size: 0.97rem; }
.grown-ups a.more { font-family: var(--display); font-weight: 600; }

/* Inner pages */
.page-header { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: end; padding-block: 36px 34px; }
.page-header h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); }
.page-header .intro { margin-bottom: 0.8rem; }
.page-header .friend { width: 170px; filter: drop-shadow(0 12px 10px #3b2a0f40); }
.updated { font-size: 0.85rem; color: var(--muted); margin: 0; }

.legal-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 36px; align-items: start; padding-bottom: 40px; }
.toc { position: sticky; top: 20px; padding: 26px 24px; font-size: 0.92rem; }
.toc strong { font-family: var(--display); font-weight: 600; font-size: 1.05rem; }
.toc ol { padding-left: 20px; margin: 12px 0 0; }
.toc li + li { margin-top: 6px; }
.legal-copy, .content { padding: 44px clamp(24px, 5vw, 56px) 20px; }
.content { max-width: 860px; margin-bottom: 40px; }
.legal-copy section, .content section { scroll-margin-top: 20px; margin-bottom: 38px; }
.legal-copy h2, .content h2 { font-size: 1.6rem; }
.notice {
  background: var(--mint);
  border-radius: 22px;
  padding: 22px 26px;
  margin-bottom: 36px;
  border: 2px dashed #bcd2b0;
}
.notice p:last-child { margin-bottom: 0; }
.email { overflow-wrap: anywhere; }

details { border-bottom: 2px dashed var(--line); padding-block: 18px; }
details:last-of-type { border-bottom: 0; }
summary { cursor: pointer; font-family: var(--display); font-weight: 600; font-size: 1.12rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--coral); font-size: 1.4rem; line-height: 1; transition: transform 0.2s ease; }
details[open] summary::after { transform: rotate(45deg); }
details p { padding-top: 12px; color: var(--muted); margin-bottom: 0; }

.lost { text-align: center; padding-block: 50px 30px; }
.lost img { width: 220px; margin: 0 auto 20px; }
.lost .lead { margin-inline: auto; }

/* Gentle life, off when the device asks for less motion. */
@media (prefers-reduced-motion: no-preference) {
  .stage .mis { animation: bob 4.5s ease-in-out infinite; transform-origin: 50% 100%; }
  .stage .cat { animation: bob 3.8s ease-in-out 0.8s infinite; transform-origin: 50% 100%; }
  .stage .spark, .band-art .sticker { animation: twinkle 3.2s ease-in-out infinite; }
  .stage .spark-2 { animation-delay: 1.3s; }
}
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-6px) rotate(-1.2deg); } }
@keyframes twinkle { 0%, 100% { opacity: 1; scale: 1; } 50% { opacity: 0.6; scale: 0.86; } }

@media (max-width: 980px) {
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 34px; }
  .promises, .grown-ups { grid-template-columns: repeat(2, 1fr); }
  .worlds { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  .hero, .band { grid-template-columns: 1fr; }
  .hero { padding-top: 16px; gap: 30px; }
  .band-art { order: -1; margin-top: 16px; }
  .legal-layout { grid-template-columns: 1fr; gap: 20px; }
  .toc { position: static; }
  .toc ol { columns: 2; column-gap: 28px; }
  .page-header .friend { width: 120px; }
}
@media (max-width: 560px) {
  :root { font-size: 17px; }
  .wrap { width: calc(100% - 32px); }
  .steps, .promises, .grown-ups { grid-template-columns: 1fr; }
  .section { padding-block: 44px; }
  .song-card { padding: 14px 18px 14px 14px; gap: 14px; }
  .song-card img { width: 60px; }
  .song-card p { font-size: 1.1rem; }
  .page-header { grid-template-columns: 1fr; }
  .page-header .friend { display: none; }
  .toc ol { columns: 1; }
  .nav { gap: 2px; font-size: 0.95rem; }
  .nav a { padding: 5px 10px; }
  .brand { font-size: 1.3rem; }
  .brand img { width: 38px; height: 38px; }
  .legal-copy, .content { padding: 32px 22px 12px; }
}
