/* =================================================================
   LoLo Coco — styles.css
   Mobile-first. Pure CSS, no framework, no build step.
   Sections: 1) Tokens  2) Reset/base  3) Layout  4) Buttons
             5) Header/nav  6) Hero  7) Values  8) Books
             9) Coloring  10) About  11) Club  12) Footer
             13) Motion  14) Responsive (tablet/desktop)
   ================================================================= */

/* ---------- 1. DESIGN TOKENS ---------- */
:root {
  /* Brand palette (from the approved concept) */
  --red:        #e03131;
  --red-dark:   #c11f1f;
  --yellow:     #ffd23f;
  --yellow-soft:#ffe792;
  --green:      #43a047;
  --green-dark: #2f7d33;
  --sky:        #7cc4ef;
  --sky-deep:   #4ea6e0;
  --blue-ink:   #2f6fb0;

  /* Neutrals — warm, not clinical */
  --cream:      #fbf6ec;
  --cream-2:    #fff4d8;
  --paper:      #ffffff;
  --ink:        #3a2a1c;   /* headings */
  --ink-soft:   #5c4a39;   /* body */
  --line:       #efe4cf;

  /* Type */
  --font-display: "Baloo 2", "Trebuchet MS", system-ui, sans-serif;
  --font-body:    "Nunito", "Segoe UI", system-ui, sans-serif;

  /* Radius & shadow */
  --r-sm: 12px;
  --r-md: 20px;
  --r-lg: 28px;
  --r-xl: 40px;
  --shadow-sm: 0 4px 14px rgba(58, 42, 28, .08);
  --shadow-md: 0 12px 32px rgba(58, 42, 28, .12);
  --shadow-lg: 0 24px 60px rgba(58, 42, 28, .18);

  /* Layout */
  --maxw: 1160px;
  --gutter: 20px;
  --header-h: 72px;
}

/* ---------- 2. RESET / BASE ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px); /* offset sticky header on anchor jump */
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink-soft);
  background: var(--cream);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.05;
  margin: 0 0 .4em;
  letter-spacing: -.01em;
}

p { margin: 0 0 1em; }

/* Accessibility: visible focus everywhere */
:focus-visible {
  outline: 3px solid var(--blue-ink);
  outline-offset: 3px;
  border-radius: 6px;
}

.visually-hidden,
.skip-link {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.skip-link:focus {
  position: fixed; top: 12px; left: 12px;
  width: auto; height: auto;
  padding: 12px 18px; margin: 0; clip: auto;
  background: var(--red); color: #fff;
  border-radius: var(--r-sm); z-index: 1000;
  box-shadow: var(--shadow-md);
}

.nowrap { white-space: nowrap; }

/* ---------- 3. LAYOUT ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(48px, 8vw, 96px); }

.section__head { text-align: center; max-width: 640px; margin: 0 auto clamp(28px, 4vw, 48px); }
.section__title {
  font-size: clamp(1.8rem, 4.5vw, 2.9rem);
  font-weight: 800;
}
.section__title--left { text-align: left; }
.section__intro { color: var(--ink-soft); font-size: 1.075rem; }

.eyebrow {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .82rem;
  color: var(--red);
  margin: 0 0 .5em;
}
.eyebrow--center { text-align: center; }

/* ---------- 4. BUTTONS ---------- */
.btn {
  --btn-bg: var(--red);
  --btn-fg: #fff;
  display: inline-flex;
  align-items: center;
  gap: .5em;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
  padding: 14px 24px;
  border: none;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  cursor: pointer;
  box-shadow: 0 6px 0 rgba(0,0,0,.10), var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  text-align: center;
}
.btn:hover { transform: translateY(-2px); background: var(--red-dark); }
.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 rgba(0,0,0,.12); }

.btn--primary { --btn-bg: var(--red); }
.btn--ghost {
  --btn-bg: #fff; --btn-fg: var(--ink);
  border: 2.5px solid var(--ink);
  box-shadow: 0 6px 0 rgba(58,42,28,.14);
}
.btn--ghost:hover { background: var(--cream-2); }
.btn--download {
  --btn-bg: var(--green); box-shadow: 0 5px 0 var(--green-dark), var(--shadow-sm);
  width: 100%; justify-content: center; font-size: .95rem; padding: 12px 18px;
}
.btn--download:hover { background: var(--green-dark); }
.btn--lg { padding: 16px 30px; font-size: 1.075rem; }

/* ---------- 5. HEADER / NAV ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.92);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 2px solid transparent;
  transition: box-shadow .2s ease, border-color .2s ease;
}
.site-header.is-stuck {
  box-shadow: var(--shadow-sm);
  border-color: var(--line);
}
.header__inner {
  display: flex; align-items: center; gap: 16px;
  min-height: var(--header-h);
}

.brand { display: inline-flex; align-items: center; gap: 10px; margin-right: auto; }
.brand__mark { display: grid; place-items: center; }
.brand__mark svg { display: block; }
.brand__text { display: grid; line-height: 1; }
.brand__name {
  font-family: var(--font-display); font-weight: 800;
  font-size: 1.35rem; color: var(--red); letter-spacing: -.01em;
}
.brand__sub {
  font-family: var(--font-display); font-weight: 700;
  font-size: .62rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--ink);
}

.nav { display: none; }
.nav__list { display: flex; gap: 26px; }
.nav__link {
  font-family: var(--font-display); font-weight: 600;
  color: var(--ink); font-size: 1.02rem; padding: 6px 2px;
  position: relative;
}
.nav__link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 3px; border-radius: 3px; background: var(--red);
  transform: scaleX(0); transform-origin: left; transition: transform .2s ease;
}
.nav__link:hover::after,
.nav__link.is-active::after { transform: scaleX(1); }

.btn--shop { display: none; }

/* Mobile hamburger */
.nav-toggle {
  display: inline-flex; flex-direction: column; gap: 5px;
  width: 46px; height: 46px; align-items: center; justify-content: center;
  background: var(--cream-2); border: 2px solid var(--line);
  border-radius: 14px; cursor: pointer; padding: 0;
}
.nav-toggle__bar {
  width: 22px; height: 3px; border-radius: 3px; background: var(--ink);
  transition: transform .25s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Mobile nav drawer */
@media (max-width: 899px) {
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    display: block;
    background: var(--paper);
    border-bottom: 2px solid var(--line);
    box-shadow: var(--shadow-md);
    transform: translateY(-120%);
    transition: transform .3s ease;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
  }
  .nav.is-open { transform: translateY(0); }
  .nav__list { flex-direction: column; gap: 0; padding: 8px var(--gutter) 20px; }
  .nav__list li { border-bottom: 1px solid var(--line); }
  .nav__link { display: block; padding: 16px 4px; font-size: 1.12rem; }
  .nav__link::after { display: none; }
}

/* ---------- 6. HERO ---------- */
.hero {
  position: relative;
  padding-block: clamp(28px, 6vw, 64px) clamp(40px, 7vw, 80px);
  background:
    radial-gradient(120% 90% at 80% 0%, #bfe6fb 0%, var(--sky) 42%, var(--sky-deep) 100%);
  overflow: hidden;
}
.hero__clouds { position: absolute; inset: 0; pointer-events: none; }
.cloud {
  position: absolute; background: #fff; border-radius: 100px;
  opacity: .9; filter: blur(.3px);
}
.cloud::before, .cloud::after {
  content: ""; position: absolute; background: #fff; border-radius: 100px;
}
.cloud--1 { width: 120px; height: 34px; top: 10%; left: 6%; }
.cloud--1::before { width: 60px; height: 60px; top: -26px; left: 22px; }
.cloud--2 { width: 90px; height: 26px; top: 22%; right: 12%; opacity: .75; }
.cloud--2::before { width: 46px; height: 46px; top: -20px; left: 18px; }
.cloud--3 { width: 70px; height: 22px; top: 55%; left: 3%; opacity: .55; }
.cloud--3::before { width: 38px; height: 38px; top: -16px; left: 14px; }

.hero__inner {
  position: relative;
  display: grid; gap: clamp(24px, 4vw, 40px);
  align-items: center;
}
.hero__copy { text-align: center; }
.hero .eyebrow { color: var(--blue-ink); }
.hero__title {
  font-size: clamp(2.4rem, 9vw, 4.6rem);
  font-weight: 800;
  color: #0e3b63;                              /* deep blue — stays readable over sky AND white clouds */
  text-shadow: 0 2px 0 rgba(255,255,255,.55);  /* soft white lift for legibility */
}
.hero__title-accent { color: #0e3b63; display: inline-block; }
.hero__lead {
  font-size: clamp(1.05rem, 2.6vw, 1.25rem);
  color: #10405f; font-weight: 600;
  max-width: 40ch; margin-inline: auto; margin-bottom: 1.6em;
}
.hero__actions {
  display: flex; flex-wrap: wrap; gap: 14px; justify-content: center;
}
.hero__tag {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 24px; padding: 12px 20px;
  background: var(--yellow-soft); color: var(--ink);
  font-family: var(--font-display); font-weight: 700; font-size: .95rem;
  border-radius: 999px; box-shadow: var(--shadow-sm);
}
.hero__art { display: grid; place-items: center; }
.hero__frame {
  background: #fff; padding: 12px; border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  transform: rotate(-1.5deg);
  max-width: 520px; width: 100%;
}
.hero__frame img { border-radius: calc(var(--r-xl) - 12px); }

/* ---------- 7. VALUES ---------- */
.values { background: var(--paper); padding-block: clamp(36px, 6vw, 60px); }
.values__grid {
  display: grid; grid-template-columns: 1fr; gap: 26px 20px;
  text-align: center;
}
.value__icon {
  width: 62px; height: 62px; border-radius: 20px;
  display: grid; place-items: center; margin: 0 auto 14px;
  color: #fff; box-shadow: var(--shadow-sm);
}
.value__icon--red    { background: var(--red); }
.value__icon--yellow { background: var(--yellow); color: var(--ink); }
.value__icon--green  { background: var(--green); }
.value__icon--blue   { background: var(--sky-deep); }
.value__title { font-size: 1.15rem; font-weight: 700; margin-bottom: .2em; }
.value__text { font-size: .95rem; margin: 0; }

/* ---------- 8. BOOKS ---------- */
.books { background: var(--cream); }
.book-grid {
  display: grid; grid-template-columns: 1fr; gap: 28px;
  max-width: 920px; margin-inline: auto;
}
.book-card {
  display: grid; grid-template-columns: 1fr;
  background: var(--paper); border-radius: var(--r-lg);
  overflow: hidden; box-shadow: var(--shadow-md);
  border: 2px solid var(--line);
  transition: transform .2s ease, box-shadow .2s ease;
}
.book-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.book-card__cover { background: var(--cream-2); }
.book-card__cover img { width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.book-card__body { padding: 24px 24px 28px; }
.book-card__title { font-size: 1.5rem; font-weight: 800; }
.book-card__desc { font-size: 1rem; }
.book-card__facts {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px;
}
.book-card__facts li {
  font-size: .8rem; font-weight: 700; font-family: var(--font-display);
  background: var(--cream-2); color: var(--ink-soft);
  padding: 5px 12px; border-radius: 999px;
}
.book-card__cta { width: 100%; justify-content: center; }

/* ---------- 9. COLORING ---------- */
.coloring { background: var(--paper); }
.coloring-grid {
  display: grid; grid-template-columns: 1fr; gap: 24px;
}
.color-card {
  background: var(--cream); border: 2px solid var(--line);
  border-radius: var(--r-md); overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.color-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.color-card__thumb { position: relative; background: #fff; }
.color-card__thumb img { width: 100%; aspect-ratio: 1/1; object-fit: contain; padding: 8px; }
.color-card__badge {
  position: absolute; top: 12px; left: 12px;
  font-family: var(--font-display); font-weight: 700; font-size: .72rem;
  letter-spacing: .04em; text-transform: uppercase;
  background: var(--red); color: #fff; padding: 4px 12px; border-radius: 999px;
  box-shadow: var(--shadow-sm);
}
.color-card__badge--green { background: var(--green); }
.color-card__body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.color-card__title { font-size: 1.2rem; font-weight: 700; margin: 0; }
.color-card__desc { font-size: .92rem; margin: 0 0 12px; flex: 1; }
.color-card__promo {
  font-family: var(--font-display); font-weight: 700; font-size: .88rem;
  color: var(--red); margin-top: 12px; align-self: center;
}
.color-card__promo:hover { text-decoration: underline; }

/* ---------- 10. ABOUT ---------- */
.about { background: var(--cream-2); }
.about__inner { display: grid; gap: 32px; align-items: center; }
.about__art {
  background: #fff; padding: 10px; border-radius: var(--r-xl);
  box-shadow: var(--shadow-md); transform: rotate(1.2deg);
  max-width: 460px; margin-inline: auto; width: 100%;
}
.about__art img { border-radius: calc(var(--r-xl) - 10px); aspect-ratio: 1/1; object-fit: cover; }
.about__list { display: grid; gap: 12px; margin: 0 0 20px; }
.about__list li { font-size: 1.02rem; }
.about__list span { color: var(--red); margin-right: 6px; }
.about__note {
  font-style: italic; color: var(--ink-soft);
  border-left: 4px solid var(--yellow); padding-left: 14px; margin: 0;
}

/* ---------- 11. CLUB (newsletter) ---------- */
.club {
  background:
    radial-gradient(120% 120% at 15% 20%, #4c9e50 0%, var(--green-dark) 100%);
  color: #fff;
}
.club__inner { max-width: 720px; margin-inline: auto; text-align: center; }
.club__title { color: #fff; font-size: clamp(1.8rem, 5vw, 2.6rem); font-weight: 800; }
.club__text { color: #eafbe9; font-size: 1.08rem; margin-bottom: 1.6em; }
.club__form {
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: center;
  max-width: 520px; margin: 0 auto;
}
.club__input {
  flex: 1 1 240px; min-width: 0;
  padding: 15px 20px; border: none; border-radius: 999px;
  font-family: var(--font-body); font-size: 1rem; color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.club__input::placeholder { color: #9a8a76; }
.club__submit { flex: 0 0 auto; }
.club__msg { flex: 1 0 100%; margin: 6px 0 0; font-weight: 700; min-height: 1.2em; }
.club__msg.is-ok { color: var(--yellow); }
.club__msg.is-err { color: #ffd7d7; }
.club__fine { color: #cdeccb; font-size: .85rem; margin-top: 16px; margin-bottom: 0; }

/* ---------- 12. FOOTER ---------- */
.site-footer { background: var(--ink); color: #e9dcc9; padding-block: 40px 24px; }
.footer__inner {
  display: grid; gap: 24px; justify-items: center; text-align: center;
  padding-bottom: 24px; border-bottom: 1px solid rgba(255,255,255,.12);
}
.brand__name--footer { color: var(--yellow); font-size: 1.6rem; }
.footer__tagline { color: #cbb89f; max-width: 42ch; margin: 8px 0 0; }
.footer__publisher { color: #e9dcc9; font-size: .9rem; margin: 10px 0 0; }
.footer__publisher strong { color: var(--yellow); font-family: var(--font-display); }
.footer__nav { display: flex; flex-wrap: wrap; gap: 20px; justify-content: center; }
.footer__nav a { font-family: var(--font-display); font-weight: 600; }
.footer__nav a:hover { color: var(--yellow); }
.footer__bottom {
  display: flex; flex-wrap: wrap; gap: 6px 20px;
  justify-content: center; align-items: center;
  padding-top: 18px; font-size: .85rem; color: #b8a488; text-align: center;
}
.footer__bottom p { margin: 0; }
.footer__by { color: var(--yellow); font-weight: 700; }

/* ---------- 13. MOTION (page-load reveal) ---------- */
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero__copy > * { animation: rise .6s ease both; }
.hero__copy .eyebrow    { animation-delay: .05s; }
.hero__title            { animation-delay: .12s; }
.hero__lead             { animation-delay: .20s; }
.hero__actions          { animation-delay: .28s; }
.hero__tag              { animation-delay: .36s; }
.hero__frame { animation: rise .7s ease .3s both; }

/* Scroll-in reveal (JS toggles .is-visible) */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .55s ease, transform .55s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- 14. RESPONSIVE ---------- */

/* Small tablets */
@media (min-width: 560px) {
  .values__grid { grid-template-columns: repeat(2, 1fr); }
  .coloring-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Tablets */
@media (min-width: 768px) {
  .book-card { grid-template-columns: 300px 1fr; }
  .book-card__cover img { height: 100%; }
  .about__inner { grid-template-columns: 1fr 1.15fr; }
}

/* Desktop */
@media (min-width: 900px) {
  .nav { display: block; }
  .btn--shop { display: inline-flex; }
  .nav-toggle { display: none; }

  .hero__inner { grid-template-columns: 1.05fr 1fr; }
  .hero__copy { text-align: left; }
  .hero__lead { margin-inline: 0; }
  .hero__actions { justify-content: flex-start; }

  .values__grid { grid-template-columns: repeat(4, 1fr); }
  .coloring-grid { grid-template-columns: repeat(3, 1fr); }

  .club__inner { text-align: center; }
  .footer__inner {
    grid-template-columns: 1fr auto;
    justify-items: start; text-align: left; align-items: center;
  }
  .footer__nav { justify-content: flex-end; }
  .footer__bottom { justify-content: space-between; }
}

@media (min-width: 1040px) {
  .book-card { grid-template-columns: 340px 1fr; }
}

/* ---------- 15. UTILITIES ---------- */
/* Body scroll-lock while the mobile menu is open (set by script.js) */
body.no-scroll { overflow: hidden; }

/* ---------- 16. PRINT ---------- */
@media print {
  .site-header, .nav-toggle, .hero__clouds, .club, .btn, .site-footer { display: none !important; }
  body { color: #000; background: #fff; }
  .hero, .section { padding-block: 12px; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .8em; color: #555; }
}
