/* Nuvilo Kids — Montessori Learning Box
   Warm beige · sage green · natural wood · rounded corners.
   Mobile-first, no frameworks. */

:root {
  --green: #315b3d;
  --sage: #789579;
  --cream: #fff8ee;
  --paper: #fffdf8;
  --rose: #c96f67;
  --gold: #dda72d;
  --blue: #4c91a7;
  --ink: #263229;
  --muted: #69716b;
  --line: #e6dccd;
  --shadow: 0 18px 50px rgba(49, 91, 61, .13);
  --header-h: 78px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* Keep anchored sections clear of the sticky header when jumping. */
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: linear-gradient(180deg, #fffaf2, #f3eee5);
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; }

.wrap { max-width: 1180px; margin: auto; padding: 0 20px; }

/* Header / navigation */
.top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 250, 242, .92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(230, 220, 205, .8);
}
.header {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.logo {
  font-weight: 900;
  letter-spacing: .20em;
  font-size: 26px;
  color: var(--green);
  white-space: nowrap;
}
.logo span { letter-spacing: .08em; font-weight: 700; }

.header-actions { display: flex; align-items: center; gap: 14px; }
.nav {
  display: flex;
  gap: 17px;
  align-items: center;
  font-size: 14px;
  font-weight: 750;
}
.nav a { color: var(--green); }
.nav a:hover, .nav a:focus-visible { text-decoration: underline; }

.lang {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 999px;
  padding: 9px 12px;
  color: var(--green);
  font-weight: 800;
}

/* Hamburger — hidden on desktop, shown on small screens. */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 12px;
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--green);
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 34px;
  align-items: center;
  margin: 34px auto 24px;   /* auto keeps the card centred like every other .wrap */
  padding: 34px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 34px;
  box-shadow: var(--shadow);
}
.eyebrow { color: var(--rose); font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.hero h1 { color: var(--green); font-size: clamp(38px, 6vw, 69px); line-height: 1; margin: .3em 0 .2em; }
.hero .sub { font-size: clamp(20px, 2.6vw, 30px); font-weight: 800; color: var(--rose); line-height: 1.25; }
.hero p { font-size: 18px; line-height: 1.6; color: var(--muted); }
.hero img {
  border-radius: 24px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, .12);
  width: 100%;
  max-width: 560px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  justify-self: center;   /* centre within the hero's right column */
}

.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 18px;
  border-radius: 999px;
  font-weight: 850;
  background: var(--green);
  color: white;
}
.btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.btn.alt { background: #efe5d7; color: var(--green); }

/* Sections */
.section { padding: 54px 0; }
.section-title { text-align: center; max-width: 760px; margin: 0 auto 28px; }
.section-title h2 { font-size: clamp(30px, 4vw, 48px); color: var(--green); margin: 0 0 10px; }
.section-title p { font-size: 18px; color: var(--muted); line-height: 1.55; margin: 0; }

/* Inside the box */
.toys { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.toy {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(49, 91, 61, .08);
}
.toy img { aspect-ratio: 1 / 1; object-fit: cover; background: #f4e5d0; }
.toy-body { padding: 18px; }
.toy h3 { margin: 0 0 7px; color: var(--green); }
.toy p { margin: 0; color: var(--muted); line-height: 1.45; }

/* Activities */
.activity-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.activity {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px;
  min-height: 150px;
}
.num {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #edf3ea;
  color: var(--green);
  font-weight: 900;
}
.activity h3 { color: var(--green); font-size: 18px; margin: 12px 0 7px; }
.activity p { color: var(--muted); line-height: 1.45; margin: 0; }

/* Parent guide */
.guide { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.guide-card {
  background: var(--green);
  color: white;
  border-radius: 28px;
  padding: 30px;
  box-shadow: var(--shadow);
}
.guide-card.light { background: var(--paper); color: var(--ink); border: 1px solid var(--line); }
.guide-card h2 { font-size: 32px; margin: 0 0 14px; }
.guide-card p { font-size: 18px; line-height: 1.65; margin: 0 0 14px; }
.guide-card.light h2 { color: var(--green); }

/* Downloads */
.downloads { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.download-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 18px;
  box-shadow: var(--shadow);
}
.download-card img { border-radius: 18px; border: 1px solid var(--line); aspect-ratio: 3 / 2; object-fit: cover; }
.download-card h3 { font-size: 25px; color: var(--green); margin: 16px 0 4px; }
.download-card p { color: var(--muted); margin: 0 0 14px; }

/* Grow together */
.grow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grow-card {
  border-radius: 24px;
  padding: 24px;
  background: linear-gradient(145deg, #fffdf8, #f3eadc);
  border: 1px solid var(--line);
}
.grow-card .emo { font-size: 32px; }
.grow-card h3 { color: var(--green); margin: 12px 0 8px; }
.grow-card p { color: var(--muted); line-height: 1.5; margin: 0; }

/* Footer */
footer { background: var(--green); color: #eff5ef; margin-top: 40px; }
.footer { padding: 32px 20px; text-align: center; }
.footer .mark { font-weight: 900; letter-spacing: .18em; font-size: 23px; margin-bottom: 8px; }

/* Responsive */
@media (max-width: 980px) {
  .nav-toggle { display: flex; }
  .nav {
    position: absolute;
    top: var(--header-h);
    right: 20px;
    left: 20px;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 10px 12px; border-radius: 12px; font-size: 16px; }
  .nav a:hover, .nav a:focus-visible { background: #edf3ea; text-decoration: none; }
  .hero { grid-template-columns: 1fr; }
  .toys, .activity-grid { grid-template-columns: repeat(2, 1fr); }
  .grow { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 620px) {
  .wrap { padding: 0 14px; }
  .header { min-height: 68px; --header-h: 68px; }
  .logo { font-size: 20px; }
  .hero { padding: 20px; margin-top: 18px; }
  .toys, .activity-grid, .downloads, .guide, .grow { grid-template-columns: 1fr; }
  .section { padding: 42px 0; }
  .activity { min-height: auto; }
}

/* Respect users who prefer reduced motion. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .nav-toggle span { transition: none; }
}
