/* ==========================================================================
   kids.css — zarathushtra.com
   Kid's Korner: fully standalone. Does NOT depend on base.css.
   All pages in /kids/ load this file only.
   ========================================================================== */

/* --------------------------------------------------------------------------
   GOOGLE FONTS
   -------------------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&family=Cormorant+Garamond:ital,wght@0,300;0,400;1,300;1,400&display=swap');


/* --------------------------------------------------------------------------
   CSS VARIABLES
   -------------------------------------------------------------------------- */
:root {
  --k-page:        #FDF6E3;       /* warm parchment — page background      */
  --k-surface:     #FFFDF5;       /* slightly lighter surface               */
  --k-border:      #D4BC8A;       /* warm tan border                        */
  --k-border-hover:#B08040;       /* darker border on hover                 */
  --k-stone:       #E8D5A8;       /* hopscotch tile fill                    */
  --k-stone-alt:   #F0E2B8;       /* hopscotch tile fill — hover / start    */
  --k-text:        #3D2B10;       /* deep warm brown — primary text         */
  --k-text-mid:    #6B4C22;       /* mid-brown — secondary text             */
  --k-text-dim:    #9A7A48;       /* muted warm — captions, labels          */
  --k-gold:        #C4A060;       /* warm gold accent                       */
  --k-gold-rule:   rgba(196,160,96,0.3);
  --k-grass:       #C8E6A0;       /* meadow green — decorative only         */
  --k-sun:         #F5C842;       /* sun yellow — decorative only           */

  --k-font-head:   'Nunito', 'Trebuchet MS', sans-serif;
  --k-font-body:   'Cormorant Garamond', Georgia, serif;

  --k-door-w:      160px;
  --k-door-arc:    80px 80px 10px 10px;  /* arched top, square-ish bottom  */
}


/* --------------------------------------------------------------------------
   RESET & BASE
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  min-height: 100vh;
  background: var(--k-page);
  color: var(--k-text);
  font-family: var(--k-font-body);
}

a {
  color: var(--k-text-mid);
  text-decoration: none;
}


/* --------------------------------------------------------------------------
   LANDING PAGE  (body.kids-landing)
   -------------------------------------------------------------------------- */
.kids-landing {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--k-page);
}

.kl-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
  padding: 3rem 2rem 6rem;
  position: relative;
  z-index: 1;
}

/* Site title */
.kl-title {
  font-family: var(--k-font-head);
  font-size: clamp(2rem, 6vw, 3.2rem);
  font-weight: 800;
  color: var(--k-text);
  letter-spacing: -0.01em;
  text-align: center;
}

/* Doors row */
.kl-doors {
  display: flex;
  gap: 2.5rem;
  align-items: flex-end;
}

/* Individual door */
.kl-door {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  width: var(--k-door-w);
  padding: 2rem 1rem 1.5rem;
  background: var(--k-surface);
  border: 2px solid var(--k-border);
  border-radius: var(--k-door-arc);
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.2s ease;
  cursor: pointer;
}

.kl-door:hover {
  border-color: var(--k-border-hover);
  transform: translateY(-5px);
}

.kl-door-icon {
  display: block;
  width: 56px;
  height: 56px;
}

.kl-door-icon svg {
  width: 100%;
  height: 100%;
}

.kl-door-label {
  font-family: var(--k-font-head);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--k-text);
  letter-spacing: 0.02em;
}

/* Back to main site link */
.kl-back {
  font-family: var(--k-font-head);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--k-text-dim);
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid var(--k-gold-rule);
  padding-bottom: 2px;
  transition: color 0.2s;
}

.kl-back:hover {
  color: var(--k-text-mid);
}

/* Landscape SVG — sun top-right, ground and trees bottom */
.kl-sun-svg {
  position: fixed;
  top: 0;
  right: 0;
  width: 200px;
  height: 200px;
  pointer-events: none;
  z-index: 0;
}

.kl-landscape {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 200px;
  pointer-events: none;
  z-index: 0;
}


/* --------------------------------------------------------------------------
   STORIES HUB  (body.kids-stories)
   -------------------------------------------------------------------------- */
.kids-stories .ks-main {
  min-height: 100vh;
  padding: 3rem 2.5rem 4rem;
  position: relative;
}

.ks-title {
  font-family: var(--k-font-head);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--k-text);
  margin-bottom: 0.4rem;
}

.ks-back {
  font-family: var(--k-font-head);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--k-text-dim);
  text-decoration: none;
  border-bottom: 1px solid var(--k-gold-rule);
  padding-bottom: 1px;
}

.ks-back:hover { color: var(--k-text-mid); }

/* Horizontal hopscotch
   Pattern (L→R): single | single | double | single | double | single
   Stones:            1  |    2   |   3+4  |    5   |   6+7  |   8   */
.ks-hopscotch-h {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-top: 2.5rem;
  padding-bottom: 160px;
}

/* Single column — one stone, vertically centred */
.hh-col.hh-single {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 280px;
}

/* Double column — two stones stacked */
.hh-col.hh-double {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 280px;
}

/* Each hopscotch stone */
.hh-stone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 140px;
  height: 140px;
  background: var(--k-stone);
  border: 3px solid var(--k-border);
  text-decoration: none;
  padding: 0.75rem 0.6rem;
  text-align: center;
  transition: background 0.2s, border-color 0.2s;
  position: relative;
  z-index: 1;
}

.hh-stone:hover {
  background: var(--k-stone-alt);
  border-color: var(--k-border-hover);
  z-index: 2;
}

/* Story 1 — subtle start highlight */
.hh-stone.hh-start {
  background: var(--k-stone-alt);
  border-color: var(--k-gold);
}

.hh-icon {
  display: block;
  font-size: 3.2rem;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.hh-label {
  display: block;
  font-family: var(--k-font-head);
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--k-text);
  line-height: 1.35;
}


/* --------------------------------------------------------------------------
   STORY PAGE  (body.kids-story)
   -------------------------------------------------------------------------- */
.kids-story .kst-main {
  max-width: 680px;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
}

.kst-nav-top {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  font-family: var(--k-font-head);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.kst-nav-top a {
  color: var(--k-text-dim);
  text-decoration: none;
  border-bottom: 1px solid var(--k-gold-rule);
  padding-bottom: 1px;
  transition: color 0.2s;
}

.kst-nav-top a:hover { color: var(--k-text-mid); }

.kst-title {
  font-family: var(--k-font-head);
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 800;
  color: var(--k-text);
  margin-bottom: 2rem;
  line-height: 1.2;
}

/* Story body text */
.kst-body p {
  font-family: var(--k-font-head);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.9;
  color: var(--k-text);
  margin-bottom: 1.2rem;
}

.kst-body img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.5rem auto;
  border-radius: 4px;
}

/* Poem / verse styling */
.kst-verse {
  font-family: var(--k-font-body);
  font-size: 1.1rem;
  font-style: italic;
  font-weight: 300;
  line-height: 2;
  color: var(--k-text);
  text-align: center;
  margin: 2rem auto;
  max-width: 44ch;
}

/* Copyright byline */
.kst-byline {
  font-family: var(--k-font-body);
  font-size: 1rem;
  font-style: italic;
  color: var(--k-text-dim);
  margin-top: 2.5rem;
  border-top: 1px solid var(--k-gold-rule);
  padding-top: 1rem;
}

/* Prev / Stories / Next nav */
.kst-nav-bottom {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--k-gold-rule);
  font-family: var(--k-font-head);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  gap: 1rem;
}

.kst-nav-bottom a {
  color: var(--k-text-mid);
  text-decoration: none;
  border-bottom: 1px solid var(--k-gold-rule);
  padding-bottom: 1px;
  transition: color 0.2s;
}

.kst-nav-bottom a:hover { color: var(--k-text); }

/* First child = prev (left-aligned) */
.kst-nav-bottom a:first-child { text-align: left; }

/* Middle child = Stories (centred) */
.kst-nav-bottom a:nth-child(2) {
  text-align: center;
  color: var(--k-text);
  border-bottom-color: var(--k-border);
}

/* Last child = next (right-aligned) */
.kst-nav-bottom a:last-child { text-align: right; }

/* Placeholder span when prev or next is absent (page 1 or page 8) */
.kst-nav-bottom span { display: block; }


/* --------------------------------------------------------------------------
   GAMES HUB  (body.kids-games)
   -------------------------------------------------------------------------- */
.kids-games .kg-main {
  max-width: 780px;
  margin: 0 auto;
  padding: 3rem 2.5rem 4rem;
}

.kg-title {
  font-family: var(--k-font-head);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--k-text);
  margin-bottom: 0.4rem;
}

.kg-back {
  font-family: var(--k-font-head);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--k-text-dim);
  text-decoration: none;
  border-bottom: 1px solid var(--k-gold-rule);
  padding-bottom: 1px;
}

.kg-back:hover { color: var(--k-text-mid); }

.kg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.kg-card {
  display: block;
  background: var(--k-surface);
  border: 2px solid var(--k-border);
  border-radius: 12px;
  padding: 1.5rem 1.25rem 1.25rem;
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.2s ease;
  cursor: pointer;
}

.kg-card:hover {
  border-color: var(--k-border-hover);
  transform: translateY(-3px);
}

.kg-card-icon {
  display: block;
  width: 44px;
  height: 44px;
  margin-bottom: 0.9rem;
}

.kg-card-icon svg { width: 100%; height: 100%; }

.kg-card-title {
  font-family: var(--k-font-head);
  font-size: 1rem;
  font-weight: 800;
  color: var(--k-text);
  margin-bottom: 0.3rem;
}

.kg-card-desc {
  font-family: var(--k-font-body);
  font-size: 0.9rem;
  font-style: italic;
  color: var(--k-text-dim);
  line-height: 1.5;
}


/* --------------------------------------------------------------------------
   FOOTER (shared across all kids pages)
   -------------------------------------------------------------------------- */
.kids-footer {
  text-align: center;
  padding: 1.5rem;
  font-family: var(--k-font-body);
  font-size: 0.72rem;
  font-style: italic;
  color: var(--k-text-dim);
  border-top: 1px solid var(--k-gold-rule);
}


/* --------------------------------------------------------------------------
   MOBILE — ≤ 767px
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {

  .kl-doors {
    gap: 1.25rem;
  }

  :root {
    --k-door-w: 130px;
  }

  .kst-main,
  .kg-main,
  .ks-main {
    padding: 2rem 1.25rem 3rem;
  }

  .kst-body p {
    font-size: 1.05rem;
  }

  .ks-hopscotch-h {
    justify-content: flex-start;
    overflow-x: auto;
    padding-left: 1rem;
    padding-right: 1rem;
    padding-bottom: 120px;
  }

  .hh-stone {
    width: 110px;
    height: 110px;
  }

  .hh-col.hh-single,
  .hh-col.hh-double {
    height: 220px;
  }

  .hh-icon {
    font-size: 1.4rem;
  }

  .hh-label {
    font-size: 0.58rem;
  }
}
