/* ============================================================
   Tell Me Why — KidsGen
   Theme: "Curiosity Notebook Under a Night Sky"
   ============================================================ */

:root{
  --ink:        #14213D;
  --ink-soft:   #2B3A67;
  --paper:      #FFFBF2;
  --paper-dim:  #FDF0D6;
  --cream:      #FFF8EE;
  --sunshine:   #FFB627;
  --sunshine-d: #E89A00;
  --coral:      #FF6B5B;
  --coral-d:    #DE4C3C;
  --sprout:     #3FA383;
  --sprout-d:   #2C7F65;
  --sky:        #3E8FD0;
  --sky-d:      #2C6EA8;
  --pink:       #E85D9E;
  --pink-d:     #C43F7C;
  --violet:     #7C6FE0;
  --violet-d:   #5D4FC2;
  --parchment:  #F5EDD8;
  --parchment-mid:   #d4c9ab;
  --parchment-dark:  #715941;
  --parchment-light: #fffdf6;
  --muted:      #6B5E50;
  --border:     #E8D5B0;
  --line:       rgba(20,33,61,0.14);
  --shadow:     rgba(20,33,61,0.16);
  --radius-card: 4px 18px 4px 18px;
  --radius: 10px;
  --radius-pill: 40px;
  --font-display: "Baloo 2", ui-rounded, "Segoe UI", sans-serif;
  --font-body: "Nunito Sans", "Segoe UI", sans-serif;
}

*{ box-sizing: border-box; }

html{ scroll-behavior: smooth; }

body{
  margin:0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img, svg{ max-width:100%; display:block; height:auto }

a{ color: var(--sky-d); text-decoration:none }

h1,h2,h3,h4{
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 .5em;
}

.container{
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* -------------------- Skip link -------------------- */
.skip-link{
  position:absolute; left:-999px; top:0;
  background: var(--sunshine); color: var(--ink);
  padding: 10px 16px; border-radius: 0 0 8px 0;
  font-weight:700; z-index: 999;
}
.skip-link:focus{ left:0; }

 /* ═══════════════════════════════════════════════
       TOP NAV
    ═══════════════════════════════════════════════ */
    .top-nav {
      background: var(--ink);
      padding: 0 clamp(16px, 4vw, 60px);
      top: 0;
      z-index: 100;
      box-shadow: 0 3px 18px rgba(0,0,0,0.18);
    }
    .nav-inner {
      max-width: 1200px;
      margin: 0 auto;
      align-items: center;
      justify-content: space-between;
    }
   .top-nav ul{
    list-style: none;
	padding-left:0;
	margin:0;
}
/* Logo */
.logo{
    display: inline-block;
    padding-top: 10px;
}
.logo img {
	max-width:200px;
}
/* Nav menu */
.nav{
    position: fixed;
	left: 10px;
    right: 10px;
    background-color: var(--sky-d);
    overflow: hidden;
    z-index: 2;
}
.menu a{
    display: block;
    padding: 12px 25px;
    border-bottom: 1px solid var(--shadow);
    color: #fff;
	text-decoration:none
}
.menu li:last-child a {border:none}
.menu a:hover{
    background-color: var(--shadow);
}
.nav{
    max-height: 0;
    transition: max-height .5s ease-out;
}
/* Menu Icon */
.hamb{
    cursor: pointer;
    float: right;
    padding: 35px 20px;
}/* Style label tag */

.hamb-line {
    background: var(--cream);
    display: block;
    height: 2px;
    position: relative;
    width: 24px;

} /* Style span tag */

.hamb-line::before,
.hamb-line::after{
    background:var(--cream);
    content: '';
    display: block;
    height: 100%;
    position: absolute;
    transition: all .2s ease-out;
    width: 100%;
}
.hamb-line::before{
    top: 5px;
}
.hamb-line::after{
    top: -5px;
}

.side-menu {
    display: none;
} /* Hide checkbox */
/* Toggle menu icon */
.side-menu:checked ~ nav{
    max-height:fit-content;
}
.side-menu:checked ~ .hamb .hamb-line {
    background: transparent;
}
.side-menu:checked ~ .hamb .hamb-line::before {
    transform: rotate(-45deg);
    top:0;
}
.side-menu:checked ~ .hamb .hamb-line::after {
    transform: rotate(45deg);
    top:0;
}

body:has(.side-menu:checked) {
  overflow: hidden;
}

@media (max-width: 991px) {
	.logo img {
			max-width:170px;
		}
	.nav{
		box-shadow: var(--shadow);
		z-index:3
	}
}
/* Responsiveness */
@media (min-width: 992px) {	
    .nav{
        max-height: none;
		margin-top: 18px;
        top: 0;
        position: relative;
        float: right;
        width: fit-content;
        background-color: transparent;
    }
    .menu li{
        float: left;
    }
	.menu a{
        background-color:var(--ink);
		border-radius:var(--radius-pill);
		border:none;
		padding: 5px 25px;
		margin:0 2px;
		transition: all 0.5s ease 0s;
    }
    .menu a:hover, .menu a.active {
        background: var(--coral-d);
		transition: all 0.5s ease 0s;
    }

    .hamb{
        display: none;
    }
}
@media (min-width:992px) and (max-width:1023px) {
	.menu a{
		font-size:0.7rem;
		padding: 10px 15px;
    }
}
@media (min-width:1024px) {
	.menu a{
		font-size:0.9rem;
		padding: 10px 15px;
    }
}
/* -------------------- Hero -------------------- */
.hero{
  position:relative;
  background: radial-gradient(120% 140% at 15% -10%, #24336B 0%, var(--ink) 55%, #0E1830 100%);
  color:#fff;
  padding: 64px 0 84px;
}
.hero-doodles{
  position:absolute; inset:0; pointer-events:none;
}
.hero-doodles span{
  position:absolute; font-size: 34px; opacity:.35;
  animation: float 7s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce){
  .hero-doodles span{ animation:none; }
}
.hero-doodles span:nth-child(1){ top:8%;  left:6%;  font-size:44px; animation-delay:0s; }
.hero-doodles span:nth-child(2){ top:62%; left:3%;  font-size:28px; animation-delay:1.1s; }
.hero-doodles span:nth-child(3){ top:16%; right:9%; font-size:50px; animation-delay:.4s; }
.hero-doodles span:nth-child(4){ top:70%; right:14%;font-size:30px; animation-delay:1.8s; }
.hero-doodles span:nth-child(5){ top:40%; left:46%; font-size:22px; opacity:.22; animation-delay:.8s; }
@keyframes float{
  0%,100%{ transform: translateY(0) rotate(0deg); }
  50%{ transform: translateY(-16px) rotate(6deg); }
}

.hero-inner{ position:relative;}
.eyebrow-tag{
  display:inline-flex; align-items:center; gap:8px;
  background: rgba(255,182,39,0.16);
  border: 1px solid rgba(255,182,39,0.5);
  color: var(--sunshine);
  padding: 6px 14px; border-radius: 999px;
  font-family: var(--font-body); font-weight:700; font-size: 14px;
  margin-bottom: 20px;
}
.hero h1{
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  color:#fff;
  font-weight:800;
  margin-bottom: 18px;
}
.hero p.lede{
  font-size: 19px;
  color: #C9D2EE;
  max-width: 56ch;
  margin-bottom: 30px;
}
.hero-actions{ display:flex; gap:14px; flex-wrap:wrap; }
.hero-image-wrap {
	  border-radius: 24px;
	  overflow: hidden;
	  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
	}
@media (min-width: 768px) {
    .hero-image-wrap {
        aspect-ratio: 3/2;
    }
    .hero-image-wrap img {
        width: 100%;
        height: 100%;
        transition: transform 0.6s ease;
    }
	.hero-image-wrap:hover img { transform: scale(1.04); }
}

.btn{
  display:inline-flex; align-items:center; gap:8px;
  font-family: var(--font-display);
  font-weight:700; font-size:16px;
  padding: 13px 26px;
  border-radius: 999px;
  border: 2px solid transparent;
  text-decoration:none;
  cursor:pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover{ transform: translateY(-2px); }
.btn:active{ transform: translateY(0); }
.btn-primary{
  background: var(--sunshine); color: var(--ink);
  box-shadow: 0 8px 0 0 var(--sunshine-d);
}
.btn-primary:hover{ box-shadow: 0 6px 0 0 var(--sunshine-d); }
.btn-ghost{
  background: transparent; color:#fff; border-color: rgba(255,255,255,0.5);
}
.btn-ghost:hover{ border-color:#fff; }
.btn-coral{
  background: var(--coral); color:#fff;
  box-shadow: 0 8px 0 0 var(--coral-d);
}
.btn-coral:hover{ box-shadow: 0 6px 0 0 var(--coral-d); }
.btn-sprout{
  background: var(--sprout); color:#fff;
  box-shadow: 0 8px 0 0 var(--sprout-d);
}
.btn-sprout:hover{ box-shadow: 0 6px 0 0 var(--sprout-d); }
.btn-small{ padding: 9px 18px; font-size:14px; box-shadow-width:4px; }

/**************** CONTENT GRID **********/

.content-grid {
		display: grid;
		grid-template-columns:1fr 300px;
		gap: 25px;
		padding: 50px 0;
		align-items: start;
	}
	@media (max-width:767px) {
		 .content-grid {
			 grid-template-columns:1fr;
			}
	}

/* -------------------- Section framing -------------------- */
section{ padding: 62px 0; border-bottom: 1px solid var(--line);}
section:last-child {border:none;}
.section-head{ max-width: 62ch; margin-bottom: 34px; }
.section-head h2{ font-size: clamp(1.7rem, 3.6vw, 2.4rem); }
.section-head p{ color: var(--ink-soft); font-size:17px; }
.on-dark .section-head p{ color:#C9D2EE; }
.on-dark{ background: var(--ink); color:#fff; }
.on-dark h2{ color:#fff; }
.on-dim{ background: var(--paper-dim); }

/* -------------------- Fact cards -------------------- */
/*.facts-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}*/
.fact-card{
  position:relative;
  background:#fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 28px 20px 24px;
  box-shadow: 0 3px 0 var(--line);
}
.fact-card:nth-child(3n+2){ transform: rotate(-.4deg); }
.fact-card:nth-child(3n+3){ transform: rotate(.4deg); }
.fact-tag{
  display: table;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 13px;
    padding: 4px 12px 5px;
    border-radius: 0 0 10px 10px;
    color: #fff;
    margin-bottom: 14px;
    margin-top: -28px;
}
.tag-body{ background: var(--coral); }
.tag-culture{ background: var(--pink); }
.tag-space{ background: var(--sky); }
.tag-science{ background: var(--violet); }
.tag-animals{ background: var(--sprout); }
.fact-card h3{
  font-size: 20px;
  margin-bottom: 10px;
}
.fact-card p{
  color: var(--ink-soft);
  font-size: 15.5px;
  line-height: 150%;
}
.fact-card p:last-child{ margin-bottom:0; }

/* -------------------- Bonus strip -------------------- */
.bonus-strip{
  display:flex; gap:18px; overflow-x:auto; padding-bottom:10px;
  scroll-snap-type: x proximity;
}
.bonus-strip::-webkit-scrollbar{ height:8px; }
.bonus-strip::-webkit-scrollbar-thumb{ background: var(--line); border-radius:8px; }
.bonus-card{
  flex: 0 0 250px;
  scroll-snap-align:start;
  background: #fff;
  border: 1px dashed var(--sunshine-d);
  border-radius: 16px;
  padding: 20px;
}
.bonus-card .glyph{ font-size:28px; margin-bottom:10px; }
.bonus-card h4{ font-size:16px; margin-bottom:6px; }
.bonus-card p{ font-size:14.5px; color: var(--ink-soft); margin:0; }

/* -------------------- Games -------------------- */
.games-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(300px,1fr));
  gap: 26px;
}
.game-card{
  background: #1D2A50;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 26px;
}
.game-card h3{
  color:#fff; font-size:21px; display:flex; align-items:center; gap:10px;
}
.game-card > p{ color:#B9C3E4; font-size:15px; margin-bottom:18px; }

/* Wonder wheel */
.wheel-wrap{ display:flex; flex-direction:column; align-items:center; gap:18px; }
.wheel{
  width: 170px; height:170px; border-radius:50%;
  background: conic-gradient(
    var(--sunshine) 0turn .125turn, var(--coral) .125turn .25turn,
    var(--sprout) .25turn .375turn, var(--sky) .375turn .5turn,
    var(--violet) .5turn .625turn, var(--pink) .625turn .75turn,
    var(--sunshine) .75turn .875turn, var(--coral) .875turn 1turn
  );
  border: 5px solid #fff;
  position:relative;
  transition: transform 2.2s cubic-bezier(.17,.67,.16,1.01);
}
.wheel-pointer{
  width:0; height:0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 16px solid #fff;
  margin: 0 auto -8px;
}
.wheel-result{
  background: rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 14px 16px;
  min-height: 54px;
  font-size:14.5px; color:#EDEFFA;
  text-align:center;
  width:100%;
}

/* Quiz */
.quiz-progress{ font-size:13px; color:#B9C3E4; margin-bottom:8px; }
.quiz-question{ color:#fff; font-weight:700; margin-bottom:14px; font-size:16px; }
.quiz-options{ display:grid; gap:10px; margin-bottom:14px; }
.quiz-option{
  text-align:left;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  color:#EDEFFA;
  padding: 11px 14px;
  border-radius: 10px;
  font-family: var(--font-body); font-size:14.5px;
  cursor:pointer;
}
.quiz-option:hover{ border-color: var(--sunshine); }
.quiz-option.correct{ background: rgba(63,163,131,0.35); border-color: var(--sprout); }
.quiz-option.wrong{ background: rgba(255,107,91,0.3); border-color: var(--coral); }
.quiz-option[disabled]{ cursor:default; }
.quiz-feedback{ min-height:20px; font-size:14px; color: var(--sunshine); margin-bottom:8px; }
.quiz-score{ color:#fff; font-weight:700; }

/* Memory match */
.memory-grid{
  display:grid; grid-template-columns: repeat(4, 1fr); gap:8px; margin-bottom:14px;
}
.memory-card{
  aspect-ratio: 1;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 10px;
  display:flex; align-items:center; justify-content:center;
  font-size: 22px;
  cursor:pointer;
  user-select:none;
}
.memory-card.flipped, .memory-card.matched{
  background: rgba(255,182,39,0.18);
  border-color: var(--sunshine);
}
.memory-card.matched{ opacity:.55; cursor:default; }
.memory-meta{ display:flex; justify-content:space-between; font-size:13px; color:#B9C3E4; margin-bottom:10px; }

/* -------------------- Callout / continue reading -------------------- */
.callout{
  background: linear-gradient(120deg, var(--violet), var(--sky));
  border-radius: 22px;
  padding: 38px 34px;
  color:#fff;
  display:flex; flex-wrap:wrap; gap:24px; align-items:center; justify-content:space-between;
}
.callout h3{ color:#fff; font-size:22px; margin-bottom:6px; }
.callout p{ margin:0; color:#EAEBFF; max-width:46ch; }

/* -------------------- Ask-a-why -------------------- */
.ask-box{
  border: 2px dashed var(--sky-d);
  border-radius: 20px;
  padding: 30px;
  text-align:center;
  background:#fff;
}
.ask-box h3{ font-size:22px; }
.ask-box p{ color: var(--ink-soft); max-width:52ch; margin: 0 auto 18px; }

/* ═══════════════════════════════════════════════
       ASIDE RIGHT CONTAINER
    ═══════════════════════════════════════════════ */
	.sidebar { position: sticky; top: 20px; display: flex; flex-direction: column; gap: 22px; }
	.panel-card {
		background: var(--parchment);
		border:1px solid var(--parchment-mid);
		border-radius: var(--radius-card);
		padding: 20px;
		box-shadow: 0 8px 20px -16px rgba(46,26,82,0.4);
	}
	.panel-card h3, .panel-card .h3, .panel-card .section-head{
		font-family: var(--font-display);
		color:var(--red-dark);
		display: block;
		font-size: 1.3rem;
		margin: 0 0 14px;
		font-weight: 600;
		padding-bottom: 2px;
		border-bottom:2px solid var(--border);
	}
	.panel-link { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--muted);transition: all 0.5s ease 0s; }
	.panel-link:last-child { border-bottom: none; }
	.panel-link img { width: 48px; height: 48px; object-fit: cover; border-radius: 12px; flex-shrink: 0; }
	.panel-link span { font-weight: 700; font-size: 0.9rem; line-height: 1.3;transition: all 0.5s ease 0s;  }
	.panel-link:hover span {padding-left:5px;transition: all 0.5s ease 0s; }
	.panel-card .discover-list a { display: block; padding: 7px 0; font-weight: 700; font-size: 0.92rem; border-bottom: 1px dashed var(--muted);transition: all 0.5s ease 0s; }
	.panel-card .discover-list a:last-child { border-bottom: none; }
	.panel-card .discover-list a:hover { color: var(--ink); padding-left:10px; transition: all 0.5s ease 0s; }
	.panel-card br {display:none}
	
	.newsletter {
	background: linear-gradient(135deg, var(--sprout), #1f9c91);
	color: #fff; border: none;
	}
	.newsletter .h3 { color: #fff; }
	.newsletter p { font-size: 0.86rem; opacity: 0.92; margin: 0 0 14px; }
	.newsletter input[type=text], .newsletter input[type=email] {
	width: 100%; padding: 11px 14px; border-radius: 12px; border: none;
	font-family: inherit; font-size: 0.92rem; margin-bottom: 10px;
	}
	.newsletter input[type=submit] {
	width: 100%; padding: 11px; border-radius: 12px; border: none;
	background: var(--gold); color: var(--ink); font-weight: 800;
	cursor: pointer; transition: transform 0.2s ease;
	}
	.newsletter input[type=submit]:hover { transform: translateY(-2px); }
	
	
	 /* ═══════════════════════════════════════════════
       RELATED
    ═══════════════════════════════════════════════ */
	.related-wrap {
		margin-bottom:25px;
		margin-top: 30px;
		padding-top:25px;
		border-top: 2px solid var(--border);
		}
	.related-wrap h2 {border:none;}
	.related-nav { display: flex; gap: 8px; flex-wrap: wrap; justify-content:center }
    .related-nav a, .more-nav a:link {
      border: 1.5px solid var(--orange);
      background: var(--orange);
      color: var(--cream);
      font-size: 0.82rem;
      font-weight: 700;
      padding: 6px 16px;
	  text-decoration:none;
      border-radius: var(--radius);
      transition: all 0.5s ease 0s;
      font-family: var(--font-body);
    }
    .related-nav a:hover { background: var(--card-bg); border-color: var(--border); color:var(--ink);transition: all 0.5s ease 0s; }
	.related-nav a span.left {margin-right:7px;}
	.related-nav a span.right {margin-left:7px;}
	@media (max-width:490px) {.related-nav a, .more-nav a:link {font-size: 0.7rem;}}

 /* ═══════════════════════════════════════════════
       FOOTER
    ═══════════════════════════════════════════════ */
	.foot-banner {
		background:var(--parchment);
		padding:25px 0;
		}
	.foot-banner .container {
		padding:15px;
		}
    .site-footer {
      background: var(--ink);
      color: rgba(255,255,255,0.65);
      padding: clamp(36px, 5vw, 60px) clamp(16px, 5vw, 60px) 28px;
    }
    
    .footer-bottom {
		border-bottom: 1px solid rgba(255, 255, 255, 0.12);
		display: flex;
		flex-wrap: wrap;
		gap: 10px;
		justify-content: space-between;
		color: #8B96BE;
		padding-bottom: 20px;
    	margin-bottom: 20px;
    }
	@media (max-width:767px) {
		.footer-bottom {
			display:block;
			text-align: center;
		}
		.foot-left, .foot-right {margin-bottom:10px;}
	}
	.footer-bottom a { color: rgba(255,255,255,0.5); text-transform:uppercase; font-size:0.8rem; text-decoration:none; padding-left:6px; padding-right:6px; transition: all 0.6s ease 0s; }
    .footer-bottom a:hover { color: var(--sky); text-decoration:underline;transition: all 0.6s ease 0s; }
	/*** SECTION FOOTER **/
	.site-footer .bann-wrap {background:rgba(255,255,255,0.9); padding:10px; margin:15px 0; border-radius:15px}
	.site-footer .wrap {max-width:unset;}
	.foot-sections {padding:0 16px}
	.foot-sections .h3, .foot-sections .foot-head { display:block;font-family: var(--font-display); color: var(--gold-soft); font-size: 1.8rem; margin: 0 0 16px; font-weight:600 }
    .foot-sections ul {
	  list-style: none; padding: 0; margin: 0;
	  display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px 18px;
    }
    .foot-sections a { text-decoration:none; font-size:0.9rem; color:var(--parchment);transition: all 0.5s ease 0s; }
    .foot-sections a:hover { color:var(--pink); text-decoration:underline;transition: all 0.5s ease 0s; }
    
	@media (max-width:767px) {
		.footer-col ul {padding: 0; margin: 0;display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px 18px;}
		.foot-sections {padding:0} 
		.foot-sections ul {grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }		
	}


/* -------------------- Focus visibility -------------------- */
a:focus-visible, button:focus-visible, input:focus-visible{
  outline: 3px solid var(--sunshine);
  outline-offset: 2px;
}

/* -------------------- Responsive -------------------- */
@media (max-width: 640px){
  .hero{ padding: 48px 0 60px; }
  section{ padding: 44px 0; }
  .memory-grid{ grid-template-columns: repeat(3,1fr); }
  .callout{ flex-direction:column; align-items:flex-start; }
}

/* -------------------- Responsive -------------------- */
.box-grid-2, .box-grid-3 {
	display:grid;
	gap:20px;
}
.box-grid-2 {
	grid-template-columns: repeat(2, 1fr)
}
.box-grid-3 {
	grid-template-columns: repeat(3, 1fr)
}
@media (max-width:767px) {
	.box-grid-2, .box-grid-3 {
		grid-template-columns:1fr
	}
}