/* ============================================================
   MELLO — Rainbow Storybook Design System
   Warm cream world, rainbow arcs, brown outlines, plum ink
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700;9..144,800&family=Nunito:wght@400;500;600;700;800&display=swap');

:root {
  /* === Backgrounds === */
  --cream:        #fbf1de;   /* warm cream */
  --butter:       #f7e6c0;   /* butter beige */
  --peach:        #ffd6b8;   /* pale peach */
  --peach-deep:   #ffb892;   /* deeper peach */
  --blush:        #fbcfd1;   /* soft blush */
  --mint-pale:    #d8efd9;   /* very light mint */
  --sky-pale:     #cfe7ee;   /* faded sky aqua */
  --lilac-pale:   #e6daee;

  /* === Accents === */
  --coral:        #ff7a59;
  --coral-soft:   #ffa388;
  --pink:         #f48aa9;
  --hotpink:      #ec5b8a;
  --sun:          #f5c34b;
  --sun-soft:     #f7d77a;
  --turq:         #5cc4c8;
  --teal:         #2fa3a8;
  --mint:         #7ccfa0;
  --grass:        #4ea96d;
  --lavender:     #b9a3dd;
  --lilac:        #d3b9e8;

  /* === Ink (text) — warm, not black === */
  --plum:         #3a1f3d;   /* deep plum (headlines) */
  --plum-2:       #5c2f5e;
  --brown:        #6b4226;   /* warm brown */
  --brown-soft:   #8a5b3a;
  --olive:        #4a3a1a;   /* dark olive-plum */
  --indigo-soft:  #5a4a8a;   /* secondary emphasis */

  /* === Outlines (warm, never harsh black) === */
  --line:         #6b3a2a;   /* deep coral-brown — the signature outline */
  --line-soft:    #8a5b3a;
  --line-thin:    rgba(107, 58, 42, 0.35);

  /* === Type === */
  --font-display: 'Fraunces', 'Cooper', Georgia, serif;
  --font-body:    'Nunito', system-ui, sans-serif;

  /* === Radii === */
  --r-sm: 14px;
  --r-md: 22px;
  --r-lg: 32px;
  --r-xl: 44px;
  --r-full: 999px;

  /* === Shadow === */
  --shadow-offset: 5px;

  /* === Motion === */
  --ease-out: cubic-bezier(.2,.7,.2,1);
  --ease-spring: cubic-bezier(.34,1.56,.64,1);
}

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

html {
  scroll-behavior: smooth;
  background: var(--cream);
}

body {
  font-family: var(--font-body);
  color: var(--plum);
  background:
    radial-gradient(ellipse 60% 40% at 50% 0%, rgba(255,180,140,0.45), transparent 70%),
    radial-gradient(ellipse 50% 30% at 100% 30%, rgba(244, 138, 169, 0.28), transparent 70%),
    radial-gradient(ellipse 50% 30% at 0% 60%, rgba(207, 231, 238, 0.5), transparent 70%),
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(255, 200, 160, 0.4), transparent 70%),
    linear-gradient(180deg, #fde6cc 0%, #fbf1de 25%, #fbf1de 60%, #fde0c4 100%);
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.6;
  font-weight: 500;
  font-size: 17px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main, header, footer, section { position: relative; z-index: 1; }

/* ============================================================
   Type
   ============================================================ */

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.0;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--plum);
  text-wrap: balance;
  font-variation-settings: "opsz" 144, "SOFT" 100;
}

h1 { font-size: clamp(48px, 7vw, 96px); font-weight: 700; letter-spacing: -0.025em; }
h2 { font-size: clamp(38px, 5vw, 68px); }
h3 { font-size: clamp(24px, 2.6vw, 34px); }
h4 { font-size: 22px; }

p { margin: 0; text-wrap: pretty; color: var(--brown); }

.lead {
  font-size: clamp(18px, 1.4vw, 22px);
  color: var(--brown);
  line-height: 1.55;
  max-width: 56ch;
  font-weight: 500;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--coral);
  padding: 8px 16px;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: var(--r-full);
  box-shadow: 2px 2px 0 var(--line);
}
.eyebrow .star { color: var(--sun); }

.muted { color: var(--brown-soft); }

/* ============================================================
   Layout
   ============================================================ */

.container {
  width: min(1240px, 92%);
  margin: 0 auto;
  position: relative;
}
.container-narrow { width: min(960px, 92%); margin: 0 auto; position: relative; }

section { padding: clamp(80px, 10vw, 140px) 0; }

/* ============================================================
   Buttons — storybook badge style
   ============================================================ */

.btn {
  --bg: var(--coral);
  --fg: #fff;
  --bd: var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 28px;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.005em;
  background: var(--bg);
  color: var(--fg);
  border: 2.5px solid var(--bd);
  border-radius: var(--r-full);
  box-shadow: var(--shadow-offset) var(--shadow-offset) 0 var(--bd);
  cursor: pointer;
  text-decoration: none;
  transition: transform .18s var(--ease-out), box-shadow .18s var(--ease-out);
  position: relative;
  white-space: nowrap;
}
.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 var(--bd);
}
.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 3px 3px 0 var(--bd);
}
.btn--cream { --bg: #fff; --fg: var(--plum); }
.btn--mint { --bg: var(--mint); --fg: var(--plum); }
.btn--sun { --bg: var(--sun); --fg: var(--plum); }
.btn--lg { padding: 19px 34px; font-size: 17px; }
.btn--sm { padding: 11px 18px; font-size: 14px; }

/* App store badges, restyled cream */
.badges { display: flex; gap: 14px; flex-wrap: wrap; }

.badge-store {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px 12px 16px;
  background: #fff;
  color: var(--plum);
  border: 2.5px solid var(--line);
  border-radius: 18px;
  box-shadow: 5px 5px 0 var(--line);
  text-decoration: none;
  font-family: var(--font-body);
  transition: transform .18s var(--ease-out), box-shadow .18s var(--ease-out);
  min-width: 178px;
}
.badge-store:hover { transform: translate(-2px,-2px); box-shadow: 7px 7px 0 var(--line); }
.badge-store__icon { width: 30px; height: 30px; flex-shrink: 0; color: var(--plum); }
.badge-store__text { display: flex; flex-direction: column; line-height: 1.05; }
.badge-store__small { font-size: 11px; color: var(--brown-soft); font-weight: 700; }
.badge-store__big   { font-size: 19px; font-weight: 700; font-family: var(--font-display); letter-spacing: -0.01em; }

/* ============================================================
   Cards — storybook frame
   ============================================================ */

.card {
  background: #fff;
  border: 2.5px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: 5px 5px 0 var(--line);
  padding: 30px;
  position: relative;
  transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out);
}

/* ============================================================
   Nav
   ============================================================ */

.nav {
  position: fixed;
  top: 14px; left: 0; right: 0;
  z-index: 100;
  padding: 0;
}
.nav__inner {
  width: min(1280px, 94%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 12px 12px 22px;
  background: rgba(255, 247, 232, 0.92);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  border: 2.5px solid var(--line);
  border-radius: var(--r-full);
  box-shadow: 4px 4px 0 var(--line);
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--plum);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  letter-spacing: -0.02em;
}
.logo__mark {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border: 2px solid var(--line);
  background: linear-gradient(135deg, #ffd58a, #ff9d6b);
  box-shadow: 2px 2px 0 var(--line);
  position: relative;
  overflow: hidden;
}
.logo__mark::after {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,0.7), transparent 50%);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__links a {
  display: inline-block;
  padding: 9px 16px;
  color: var(--brown);
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  border-radius: var(--r-full);
  transition: color .2s, background .2s;
}
.nav__links a:hover { color: var(--plum); background: rgba(255, 122, 89, 0.12); }
.nav__links a.is-active { color: var(--coral); }

.nav__right { display: flex; align-items: center; gap: 12px; }

.nav__burger {
  display: none;
  width: 44px; height: 44px;
  border-radius: 14px;
  background: #fff;
  border: 2.5px solid var(--line);
  color: var(--plum);
  cursor: pointer;
  place-items: center;
  box-shadow: 2px 2px 0 var(--line);
}

@media (max-width: 920px) {
  .nav__links, .nav__right .btn { display: none; }
  .nav__burger { display: grid; }

  .nav.is-open .nav__links {
    display: flex;
    position: absolute;
    top: calc(100% + 8px);
    left: 16px;
    right: 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: #fff;
    border: 2.5px solid var(--line);
    border-radius: 22px;
    padding: 10px;
    box-shadow: 4px 4px 0 var(--line);
  }
  .nav.is-open .nav__links a {
    display: block;
    padding: 12px 16px;
    border-radius: 14px;
    text-align: left;
  }
  .nav.is-open .nav__right .btn {
    display: inline-flex;
  }
}

/* ============================================================
   Decor — flowers, clouds, rainbows, sunshine
   ============================================================ */

.decor { position: absolute; pointer-events: none; }

/* Floating, looping decor */
@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(var(--rot, 0deg)); }
  50% { transform: translateY(-10px) rotate(calc(var(--rot, 0deg) + 3deg)); }
}
.decor--float { animation: floaty 7s ease-in-out infinite; }

@keyframes spin-slow { to { transform: rotate(360deg); } }
.spin-slow { animation: spin-slow 60s linear infinite; }

/* ============================================================
   Footer
   ============================================================ */

.footer {
  position: relative;
  padding: 80px 0 32px;
  margin-top: 0;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 48px;
}
@media (max-width: 800px) {
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 36px; }
}
.footer__col h5 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--plum);
  margin-bottom: 16px;
}
.footer__col ul { list-style: none; padding: 0; margin: 0; }
.footer__col li { margin-bottom: 10px; }
.footer__col a {
  color: var(--brown);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  transition: color .2s;
}
.footer__col a:hover { color: var(--coral); }
.footer__blurb { color: var(--brown); font-size: 15px; margin: 14px 0 20px; max-width: 32ch; line-height: 1.6; }
.footer__bottom {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 2px dashed var(--line-thin);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--brown-soft);
  font-size: 13px;
}
.footer__bottom a { color: var(--brown-soft); text-decoration: none; margin-left: 18px; font-weight: 600; }
.footer__bottom a:hover { color: var(--coral); }

/* ============================================================
   Reveal
   ============================================================ */
.reveal {
  transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
}
.reveal.is-hidden { opacity: 0; transform: translateY(28px); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   Tweaks panel (minimal reuse)
   ============================================================ */
.tweaks {
  position: fixed; right: 20px; bottom: 20px; z-index: 200;
  width: 320px;
  background: rgba(255, 247, 232, 0.96);
  backdrop-filter: blur(14px);
  border: 2.5px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: 6px 6px 0 var(--line);
  display: none;
  flex-direction: column;
  font-family: var(--font-body);
  max-height: calc(100vh - 40px);
  overflow: hidden;
}
.tweaks.is-on { display: flex; }
.tweaks__head { padding: 14px 18px; border-bottom: 2px solid var(--line-thin); display: flex; justify-content: space-between; align-items: center; }
.tweaks__title { font-family: var(--font-display); font-weight: 700; font-size: 17px; color: var(--plum); }
.tweaks__close { background: none; border: 0; color: var(--brown); cursor: pointer; padding: 4px; font-size: 20px; }
.tweaks__body { padding: 16px 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 18px; }
.tweak { display: flex; flex-direction: column; gap: 8px; }
.tweak__label { font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--brown-soft); }
.tweak__options { display: flex; gap: 6px; flex-wrap: wrap; }
.tweak__opt {
  padding: 7px 13px; font-size: 12px; font-weight: 700;
  background: #fff; color: var(--brown);
  border: 2px solid var(--line-thin);
  border-radius: var(--r-full); cursor: pointer; font-family: inherit;
}
.tweak__opt.is-on { background: var(--coral); color: #fff; border-color: var(--line); }
.tweak__swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.tweak__swatch { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--line); cursor: pointer; transition: transform .15s; }
.tweak__swatch:hover { transform: scale(1.12); }
.tweak__swatch.is-on { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--line); }
