/* ==========================================================================
   Little Wonderland — Design tokens & base styles
   ========================================================================== */

:root {
  /* Brand palette */
  --cream: #fff5e8;
  --cream-deep: #ffedd7;
  --cream-soft: #fffaf2;
  --sky: #a8d9f0;
  --sky-soft: #eaf7fd;
  --sky-deep: #78bedf;
  --peach: #ffb5a5;
  --peach-soft: #ffede7;
  --peach-deep: #ef8f79;
  --mint: #b8ddaa;
  --mint-soft: #edf7e6;
  --mint-deep: #83b974;
  --sun: #f7d878;
  --sun-soft: #fff6d9;
  --sun-deep: #e3b93f;
  --ink: #343b45;
  --ink-soft: #5d6674;
  --ink-faint: #8b929d;
  --white: #ffffff;
  --line: rgba(52, 59, 69, 0.12);
  --line-soft: rgba(52, 59, 69, 0.07);

  /* Type */
  --font-display: 'Fredoka', system-ui, sans-serif;
  --font-body: 'Nunito', system-ui, -apple-system, sans-serif;

  --fs-display: clamp(2.85rem, 6.4vw, 6.4rem);
  --fs-h2: clamp(2.15rem, 4.4vw, 3.9rem);
  --fs-h3: clamp(1.35rem, 1.6vw, 1.65rem);
  --fs-h4: clamp(1.1rem, 1.15vw, 1.25rem);
  --fs-body: clamp(1rem, 0.35vw + 0.94rem, 1.12rem);
  --fs-small: clamp(0.82rem, 0.2vw + 0.79rem, 0.9rem);
  --fs-eyebrow: clamp(0.68rem, 0.2vw + 0.64rem, 0.76rem);

  /* Layout */
  --container: 1240px;
  --container-narrow: 940px;
  --gutter: clamp(1.15rem, 4vw, 2.5rem);
  --section-y: clamp(4.5rem, 9vw, 8.5rem);

  /* Radii */
  --r-xs: 12px;
  --r-sm: 18px;
  --r-md: 26px;
  --r-lg: 36px;
  --r-xl: 52px;
  --r-pill: 999px;

  /* Shadows */
  --shadow-xs: 0 2px 8px rgba(52, 59, 69, 0.05);
  --shadow-sm: 0 10px 30px -18px rgba(52, 59, 69, 0.35);
  --shadow-md: 0 26px 60px -32px rgba(52, 59, 69, 0.38);
  --shadow-lg: 0 48px 100px -48px rgba(52, 59, 69, 0.42);
  --shadow-card: 0 24px 50px -30px rgba(52, 59, 69, 0.42),
    0 2px 0 rgba(255, 255, 255, 0.9) inset;

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-fast: 180ms;
  --dur: 320ms;
  --dur-slow: 620ms;

  --nav-height: 78px;
}

/* --- Reset ---------------------------------------------------------------- */

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

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 24px);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  min-height: 100vh;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

body.is-locked {
  overflow: hidden;
}

main {
  display: block;
  overflow: clip;
}

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

img {
  height: auto;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
  padding: 0;
}

h1,
h2,
h3,
h4,
h5 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

::selection {
  background: var(--sun);
  color: var(--ink);
}

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

/* --- Shared primitives ---------------------------------------------------- */

.container {
  width: min(calc(100% - (var(--gutter) * 2)), var(--container));
  margin-inline: auto;
}

.container--narrow {
  width: min(calc(100% - (var(--gutter) * 2)), var(--container-narrow));
  margin-inline: auto;
}

.section {
  position: relative;
  padding-block: var(--section-y);
}

.section--tight {
  padding-block: clamp(3rem, 6vw, 5rem);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-body);
  font-size: var(--fs-eyebrow);
  font-weight: 800;
  letter-spacing: 0.2em;
  line-height: 1;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.eyebrow::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--peach-deep);
  box-shadow: 0 0 0 4px rgba(239, 143, 121, 0.16);
}

.eyebrow--light {
  color: rgba(255, 245, 232, 0.72);
}

.eyebrow--light::before {
  background: var(--sun);
  box-shadow: 0 0 0 4px rgba(247, 216, 120, 0.18);
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
  max-width: 760px;
}

.section-head__title {
  font-size: var(--fs-h2);
  max-width: 18ch;
}

.section-head__lede {
  max-width: 58ch;
  color: var(--ink-soft);
  font-size: var(--fs-body);
}

.section-head--center {
  align-items: center;
  text-align: center;
  margin-inline: auto;
}

.section-head--center .section-head__title,
.section-head--center .section-head__lede {
  margin-inline: auto;
}

/* Decorative hand-drawn underline used beneath a keyword */
.scribble {
  position: relative;
  display: inline-block;
  white-space: nowrap;
}

.scribble svg {
  position: absolute;
  left: -2%;
  right: -2%;
  bottom: -0.18em;
  width: 104%;
  height: 0.32em;
  overflow: visible;
  pointer-events: none;
}

.scribble path {
  fill: none;
  stroke: var(--peach-deep);
  stroke-width: 7;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.85;
}

.scribble--sun path {
  stroke: var(--sun-deep);
}

.scribble--mint path {
  stroke: var(--mint-deep);
}

/* Fine paper grain over the whole page for a premium, tactile finish */
.grain {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  opacity: 0.032;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 240px 240px;
  mix-blend-mode: multiply;
}

/* Accessibility helpers */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 10000;
  padding: 0.9rem 1.3rem;
  border-radius: var(--r-pill);
  background: var(--ink);
  color: var(--cream);
  font-weight: 700;
  transform: translateY(-160%);
  transition: transform var(--dur) var(--ease-out);
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
}

.no-js {
  padding: 1rem;
  background: var(--ink);
  color: var(--cream);
  text-align: center;
  font-weight: 600;
}

/* Keep authored markup truthful: the hidden attribute always wins. */
[hidden] {
  display: none !important;
}

/* Pause decorative animation while the tab is hidden */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}
