/* ===== Design tokens ===== */
:root {
  --yellow: #ffd23f;
  --yellow-deep: #ffb703;
  --coral: #ff6b6b;
  --teal: #22a699;
  --teal-deep: #0f8a7e;
  --purple: #7b5ea7;
  --cream: #fff8ec;
  --cream-2: #fff1d6;
  --ink: #2b2233;
  --ink-soft: #5a5066;
  --white: #ffffff;
  --shadow: 0 12px 30px rgba(43, 34, 51, 0.12);
  --shadow-sm: 0 6px 16px rgba(43, 34, 51, 0.1);
  --radius: 22px;
  --radius-sm: 14px;
  --maxw: 1100px;
  --font-head: "Baloo 2", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

/* ===== Base ===== */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .brand, .footer-brand { font-family: var(--font-head); line-height: 1.1; }

a { color: var(--teal-deep); }

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

.highlight { color: var(--coral); }
em { font-style: normal; color: var(--teal-deep); font-weight: 700; }

/* ===== Header / Nav ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 248, 236, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 3px solid var(--yellow);
}

.nav {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.7rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.brand .logo { height: 1.5em; width: auto; }
.footer-brand .logo { height: 1.6rem; width: auto; vertical-align: -0.35em; }

.nav-menu {
  list-style: none;
  display: flex;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.nav-menu a {
  display: block;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  transition: background 0.2s, color 0.2s;
}

.nav-menu a:hover,
.nav-menu a:focus-visible {
  background: var(--yellow);
  color: var(--ink);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 44px;
  height: 40px;
  padding: 0 9px;
  background: var(--yellow);
  border: none;
  border-radius: 12px;
  cursor: pointer;
}
.nav-toggle .bar {
  height: 3px;
  width: 100%;
  background: var(--ink);
  border-radius: 3px;
  transition: transform 0.25s, opacity 0.25s;
}
.nav-toggle[aria-expanded="true"] .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  border-radius: 999px;
  font-weight: 800;
  font-family: var(--font-head);
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
  border: 3px solid transparent;
}
.btn:hover { transform: translateY(-3px); }
.btn-primary { background: var(--coral); color: var(--white); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: #ff5252; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--white); }

/* ===== Hero ===== */
.hero {
  position: relative;
  background:
    radial-gradient(1200px 500px at 80% -10%, var(--yellow) 0%, transparent 55%),
    linear-gradient(160deg, var(--cream-2), var(--cream) 60%);
  padding: 3.5rem 1.2rem 5rem;
  overflow: hidden;
}
.hero-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2.5rem;
  align-items: center;
}
.kicker {
  display: inline-block;
  background: var(--teal);
  color: var(--white);
  font-weight: 800;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  font-size: 0.85rem;
  margin: 0 0 1rem;
  letter-spacing: 0.3px;
}
.hero h1 { font-size: clamp(2.3rem, 5.5vw, 4rem); font-weight: 800; margin: 0 0 1rem; }
.lead { font-size: 1.2rem; color: var(--ink-soft); margin: 0 0 1.8rem; max-width: 32ch; }
.hero-actions { display: flex; gap: 0.8rem; flex-wrap: wrap; }

.hero-figure { margin: 0; }

.hero-wave {
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 60px;
  background: var(--cream);
  clip-path: polygon(0 60%, 6% 50%, 18% 65%, 32% 45%, 48% 62%, 62% 44%, 78% 64%, 92% 48%, 100% 60%, 100% 100%, 0 100%);
}

/* ===== Image slots ===== */
.img-slot {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background:
    repeating-linear-gradient(45deg, var(--cream-2), var(--cream-2) 14px, #ffe7b8 14px, #ffe7b8 28px);
  border: 3px dashed var(--yellow-deep);
  aspect-ratio: 4 / 3;
  box-shadow: var(--shadow);
  display: grid;
  place-items: center;
}
.img-slot--hero { aspect-ratio: 5 / 4; }
.img-slot--square { aspect-ratio: 1 / 1; box-shadow: var(--shadow-sm); }
.img-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}
/* Hide the broken-image icon while the placeholder file is missing */
.img-slot img:not([src]),
.img-slot img[src=""] { display: none; }
.img-slot__label {
  position: relative;
  z-index: 1;
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.75);
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  font-size: 0.85rem;
  pointer-events: none;
}
/* Once a real image loads it covers the label; broken images keep the dashed slot visible */

/* ===== Sections ===== */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 4rem 1.2rem;
}
.section--tint {
  max-width: none;
  background: linear-gradient(180deg, #fff, var(--cream-2));
  border-top: 3px solid var(--yellow);
  border-bottom: 3px solid var(--yellow);
}
.section--tint > * { max-width: var(--maxw); margin-left: auto; margin-right: auto; }
.section-head { text-align: center; margin-bottom: 2.5rem; }
.section-head h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0 0 0.5rem; }
.section-sub { color: var(--ink-soft); font-size: 1.1rem; margin: 0 auto; max-width: 46ch; }

/* ===== Prose block ===== */
.prose { max-width: 60ch; margin: 0 auto; }
.prose p { margin: 0 0 1rem; font-size: 1.08rem; }

/* ===== Facts grid ===== */
.facts-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.2rem;
}
.fact-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.6rem 1.2rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border-bottom: 5px solid var(--teal);
  transition: transform 0.2s, box-shadow 0.2s;
}
.fact-card:nth-child(2n) { border-bottom-color: var(--coral); }
.fact-card:nth-child(3n) { border-bottom-color: var(--yellow-deep); }
.fact-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.fact-emoji { font-size: 2.2rem; display: block; margin-bottom: 0.4rem; }
.fact-card h3 { margin: 0 0 0.3rem; font-size: 1.2rem; }
.fact-card p { margin: 0; color: var(--ink-soft); }

/* ===== Check list ===== */
.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.9rem; }
.check-list--wide { max-width: 760px; margin: 0 auto; }
.check-list li {
  position: relative;
  padding: 0.9rem 1rem 0.9rem 3rem;
  background: var(--white);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}
.check-list li::before {
  content: "🪶";
  position: absolute;
  left: 0.9rem;
  top: 0.85rem;
  font-size: 1.2rem;
}

/* ===== Diet ===== */
.diet-intro {
  text-align: center;
  max-width: 60ch;
  margin: 0 auto 2.2rem;
  font-size: 1.1rem;
}
.diet-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.diet-card {
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow-sm);
}
.diet-card h3 { margin: 0 0 1rem; font-size: 1.4rem; }
.diet-card ul { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.45rem; }
.diet-card--safe { background: #e9f8f3; border: 3px solid var(--teal); }
.diet-card--safe h3 { color: var(--teal-deep); }
.diet-card--avoid { background: #fdeaea; border: 3px solid var(--coral); }
.diet-card--avoid h3 { color: #d64545; }

/* ===== Moods (behavior) ===== */
.mood-grid {
  max-width: 820px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 0.9rem;
}
.mood-grid .mood { margin-bottom: 0; }
.mood {
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 1rem 1.2rem;
  margin-bottom: 0.9rem;
  box-shadow: var(--shadow-sm);
  border-left: 5px solid var(--purple);
}
.mood h3 { margin: 0 0 0.2rem; font-size: 1.15rem; }
.mood p { margin: 0; color: var(--ink-soft); }

/* ===== Gallery ===== */
.gallery-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.4rem;
}
.gallery-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 0.9rem;
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition: transform 0.2s;
}
.gallery-card:hover { transform: translateY(-6px) rotate(-1deg); }
.gallery-card h3 { margin: 0.6rem 0 0.2rem; }
.gallery-card p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }
.swatch {
  display: block;
  width: 56px;
  height: 56px;
  margin: 0.4rem auto 0;
  border-radius: 50%;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.7), var(--shadow-sm);
}

/* ===== FAQ ===== */
.faq { max-width: 760px; margin: 0 auto; display: grid; gap: 0.9rem; }
.faq-item {
  background: var(--white);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  border: 2px solid transparent;
  overflow: hidden;
}
.faq-item[open] { border-color: var(--yellow-deep); }
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 1.1rem 1.3rem;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.6rem;
  color: var(--coral);
  transition: transform 0.2s;
  line-height: 1;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-body { padding: 0 1.3rem 1.2rem; }
.faq-body p { margin: 0; color: var(--ink-soft); }

/* ===== Footer ===== */
.site-footer {
  background: var(--ink);
  color: var(--cream);
  margin-top: 2rem;
  padding: 3rem 1.2rem;
  text-align: center;
}
.footer-inner { max-width: 640px; margin: 0 auto; }
.footer-brand { font-size: 1.6rem; font-weight: 800; margin: 0 0 0.3rem; }
.footer-note { margin: 0 0 1rem; font-size: 1.05rem; }
.footer-disclaimer { color: #b9aec7; font-size: 0.9rem; margin: 0 0 1.4rem; }
.back-to-top { color: var(--yellow); font-weight: 800; text-decoration: none; }
.back-to-top:hover { text-decoration: underline; }

/* ===== Back-to-top floating button ===== */
.to-top-btn {
  position: fixed;
  right: 1.2rem;
  bottom: 1.2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--coral);
  color: var(--white);
  font-size: 1.4rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow);
  z-index: 60;
  transition: transform 0.15s, opacity 0.25s;
}
.to-top-btn:hover { transform: translateY(-3px); }
.to-top-btn[hidden] { display: none; }

/* ===== Reveal animation ===== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ===== Responsive ===== */
@media (max-width: 820px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--cream);
    border-bottom: 3px solid var(--yellow);
    padding: 0.8rem 1.2rem 1.2rem;
    gap: 0.2rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding-top: 0;
    padding-bottom: 0;
  }
  .nav-menu.open { max-height: 70vh; padding-top: 0.8rem; padding-bottom: 1.2rem; }
  .nav-menu a { padding: 0.7rem 0.8rem; }

  .hero-inner,
  .diet-columns { grid-template-columns: 1fr; }
  .hero-figure { max-width: 460px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover, .fact-card:hover, .gallery-card:hover, .to-top-btn:hover { transform: none; }
}
