/* StarNest Academy website: royal blue, golden yellow, soft orange, sky blue, cloud white, warm cream */
:root {
  --royal: #2547B8; --royal-deep: #1A3389; --gold: #FFC83D; --gold-deep: #F2A516;
  --orange: #FF8A3D; --orange-deep: #E66A22; --sky: #8FD3FF; --sky-light: #CDEBFF;
  --cream: #FFF4DD; --cream-deep: #F6E2BC; --ink: #2B1E3A; --red: #E5443F; --pink: #FF8FB1; --green: #3DBE7A;
  --white: #FFFFFF; --muted: #5B5069;
  --radius: 22px; --radius-lg: 34px; --shadow: 0 6px 0 rgba(43, 30, 58, 0.12);
  --title: "Luckiest Guy", "Fredoka", system-ui, sans-serif;
  --body: "Fredoka", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1160px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--body); font-size: 18px; line-height: 1.55; color: var(--ink); background: var(--cream); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--royal); }
h1, h2, h3 { line-height: 1.12; margin: 0 0 0.4em; }
h1, h2 { font-family: var(--title); font-weight: 400; letter-spacing: 0.5px; }
h1 { font-size: clamp(2.3rem, 5.6vw, 4rem); color: var(--royal); }
h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); color: var(--royal); }
h3 { font-size: 1.3rem; font-weight: 700; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.section { padding: 72px 0; }
.section.tight { padding: 44px 0; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 720px; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }
.eyebrow { display: inline-block; font-weight: 700; font-size: 0.95rem; color: var(--orange-deep); background: #FFE7D3; padding: 6px 14px; border-radius: 999px; margin-bottom: 14px; }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; font-family: var(--body); font-weight: 700; font-size: 1.05rem; text-decoration: none; padding: 14px 26px; border-radius: 999px; border: 3px solid var(--ink); background: var(--gold); color: var(--ink); box-shadow: 0 5px 0 var(--ink); cursor: pointer; transition: transform 0.12s, box-shadow 0.12s; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 7px 0 var(--ink); }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--ink); }
.btn.blue { background: var(--royal); color: var(--white); }
.btn.white { background: var(--white); }
.btn.orange { background: var(--orange); color: var(--white); }
.btn.small { padding: 9px 18px; font-size: 0.95rem; box-shadow: 0 4px 0 var(--ink); }
.btn[aria-disabled="true"] { background: #E9E1F0; color: var(--muted); box-shadow: 0 4px 0 #CFC4DA; border-color: #CFC4DA; cursor: default; transform: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 244, 221, 0.94); backdrop-filter: blur(8px); border-bottom: 3px solid var(--cream-deep); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { white-space: nowrap; display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--royal); font-family: var(--title); font-size: 1.5rem; letter-spacing: 0.5px; }
.brand img { width: 52px; height: 52px; }
@media (max-width: 480px) { .brand { font-size: 1.15rem; } .brand img { width: 42px; height: 42px; } .brand small { display: none !important; } }
.brand small { display: block; font-family: var(--body); font-size: 0.72rem; color: var(--orange-deep); font-weight: 700; letter-spacing: 0; margin-top: -4px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { white-space: nowrap; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 0.98rem; padding: 8px 11px; border-radius: 999px; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--sky-light); color: var(--royal); }
.nav .btn { margin-left: 8px; padding: 9px 18px; font-size: 0.95rem; box-shadow: 0 4px 0 var(--ink); }
.menu-btn { display: none; background: none; border: 3px solid var(--ink); border-radius: 14px; width: 48px; height: 44px; font-size: 1.4rem; cursor: pointer; }
@media (max-width: 1180px) {
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; top: 76px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--cream); border-bottom: 3px solid var(--cream-deep); padding: 12px 20px 20px; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 14px; }
  .nav .btn { margin: 8px 0 0; justify-content: center; }
}

/* hero */
.hero { position: relative; overflow: hidden; background: radial-gradient(circle at 75% 30%, #FFFFFF 0%, var(--sky-light) 45%, var(--sky) 100%); padding: 64px 0 0; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 30px; align-items: end; }
.hero-copy { padding-bottom: 70px; }
.hero h1 { color: var(--royal-deep); }
.hero h1 span { color: var(--orange-deep); }
.hero .lead { color: var(--ink); }
.hero-cast { position: relative; height: 440px; display: flex; align-items: flex-end; justify-content: center; gap: 4px; }
.hero-cast img { width: auto; filter: drop-shadow(0 6px 0 rgba(43, 30, 58, 0.12)); margin-bottom: -4px; }
.hero-cast .c1 { height: 250px; } .hero-cast .c2 { height: 290px; margin-left: -24px; } .hero-cast .c3 { height: 300px; margin-left: -24px; } .hero-cast .c4 { height: 300px; margin-left: -18px; }
.hero-cast .pip { position: absolute; right: 4%; top: 0; height: 150px; margin: 0; animation: bob 3s ease-in-out infinite; }
.cloud { position: absolute; background: #fff; border-radius: 999px; opacity: 0.6; z-index: 0; }
.hero .wrap { position: relative; z-index: 1; }
@keyframes bob { 50% { transform: translateY(-12px) rotate(3deg); } }
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-copy { padding-bottom: 10px; text-align: center; }
  .hero-copy .btn-row { justify-content: center; }
  .hero-cast { height: 250px; }
  .hero-cast .c1 { height: 150px; } .hero-cast .c2 { height: 172px; margin-left: -16px; } .hero-cast .c3 { height: 178px; margin-left: -16px; } .hero-cast .c4 { height: 178px; margin-left: -12px; }
  .hero-cast .pip { height: 84px; right: 0; }
}
.wave { display: block; width: 100%; height: 60px; margin-top: -1px; }

/* trust strip */
.trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.trust div { background: var(--white); border: 3px solid var(--ink); border-radius: var(--radius); padding: 18px; text-align: center; box-shadow: var(--shadow); font-weight: 600; }
.trust b { display: block; font-size: 1.8rem; line-height: 1.1; margin-bottom: 4px; }
@media (max-width: 760px) { .trust { grid-template-columns: repeat(2, 1fr); } }

/* cards */
.grid { display: grid; gap: 22px; }
.grid.c3 { grid-template-columns: repeat(3, 1fr); }
.grid.c4 { grid-template-columns: repeat(4, 1fr); }
.grid.c2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 960px) { .grid.c3, .grid.c4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid.c3, .grid.c4, .grid.c2 { grid-template-columns: 1fr; } }
.card { background: var(--white); border: 3px solid var(--ink); border-radius: var(--radius-lg); padding: 26px; box-shadow: var(--shadow); }
.card.feature { text-align: center; }
.card .icon { width: 74px; height: 74px; margin: 0 auto 14px; display: grid; place-items: center; font-size: 2.2rem; border-radius: 50%; border: 3px solid var(--ink); }
.card h3 { color: var(--royal); }
.card p:last-child { margin-bottom: 0; }

/* the four lesson parts */
.parts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.part { border: 3px solid var(--ink); border-radius: var(--radius); padding: 22px 18px; color: var(--ink); box-shadow: var(--shadow); }
.part .tag { display: inline-block; font-family: var(--title); font-size: 1.15rem; letter-spacing: 0.5px; color: var(--white); background: var(--ink); padding: 4px 12px; border-radius: 10px; margin-bottom: 10px; }
.part.rule { background: #FFE0DF; } .part.skill { background: #FFF1C9; } .part.think { background: var(--sky-light); } .part.home { background: #DDF6E8; }
@media (max-width: 900px) { .parts { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .parts { grid-template-columns: 1fr; } }

/* episode cards */
.ep-card { display: flex; flex-direction: column; background: var(--white); border: 3px solid var(--ink); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: transform 0.15s; }
.ep-card:hover { transform: translateY(-4px); }
.ep-card .thumb { position: relative; aspect-ratio: 16 / 9; background: var(--sky-light); border-bottom: 3px solid var(--ink); }
.ep-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.ep-card .num { position: absolute; top: 10px; left: 10px; background: var(--gold); border: 2px solid var(--ink); border-radius: 999px; padding: 2px 10px; font-weight: 700; font-size: 0.85rem; }
.ep-card .body { padding: 14px 16px 18px; }
.ep-card h3 { font-size: 1.08rem; margin: 0 0 6px; color: var(--ink); }
.ep-card .meta { font-size: 0.85rem; color: var(--muted); }
.ep-card .chip { display: inline-block; margin-top: 8px; font-size: 0.78rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--sky-light); color: var(--royal); }

/* filters */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 26px; }
.filter { font-family: var(--body); font-weight: 600; font-size: 0.95rem; padding: 8px 16px; border-radius: 999px; border: 2px solid var(--ink); background: var(--white); color: var(--ink); cursor: pointer; }
.filter[aria-pressed="true"] { background: var(--royal); color: var(--white); }
.search { width: 100%; max-width: 420px; font: inherit; padding: 12px 18px; border-radius: 999px; border: 3px solid var(--ink); background: var(--white); margin-bottom: 16px; }

/* episode detail */
.ep-hero { display: grid; grid-template-columns: 1.4fr 1fr; gap: 30px; align-items: start; }
@media (max-width: 900px) { .ep-hero { grid-template-columns: 1fr; } }
.video { position: relative; aspect-ratio: 16 / 9; border: 4px solid var(--ink); border-radius: var(--radius-lg); overflow: hidden; background: var(--royal-deep); box-shadow: var(--shadow); }
.video iframe, .video img { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.video .play { position: absolute; inset: 0; display: grid; place-items: center; text-decoration: none; }
.video .play span { background: rgba(255, 255, 255, 0.95); border: 3px solid var(--ink); border-radius: 999px; padding: 12px 22px; font-weight: 700; color: var(--ink); }
.reveal { margin-top: 10px; }
.answer { display: none; margin-top: 10px; font-weight: 700; }
.answer.show { display: block; }

/* passport */
.flag-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.flag-tile { background: var(--white); border: 3px solid var(--ink); border-radius: 18px; padding: 12px; text-align: center; cursor: pointer; font: inherit; color: var(--ink); box-shadow: var(--shadow); transition: transform 0.12s; }
.flag-tile:hover { transform: translateY(-3px) rotate(-1deg); }
.flag-tile img { height: 70px; margin: 0 auto 8px; object-fit: contain; }
.flag-tile b { display: block; font-size: 0.92rem; line-height: 1.2; }
.flag-tile small { color: var(--muted); font-size: 0.78rem; }
.flag-tile.stamped { background: #FFF6D6; }
.flag-tile.stamped::after { content: "\2605"; position: relative; display: block; color: var(--gold-deep); font-size: 1.1rem; }

/* dialog */
dialog { border: 4px solid var(--ink); border-radius: var(--radius-lg); padding: 0; max-width: 520px; width: calc(100% - 32px); box-shadow: 0 10px 0 rgba(43, 30, 58, 0.2); }
dialog::backdrop { background: rgba(26, 51, 137, 0.45); }
dialog .inner { padding: 28px; text-align: center; }
dialog img { height: 150px; margin: 0 auto 14px; }
dialog .close { position: absolute; right: 14px; top: 12px; background: none; border: 0; font-size: 1.6rem; cursor: pointer; color: var(--ink); }

/* characters */
.char { text-align: center; }
.char img { height: 260px; width: auto; max-width: 100%; object-fit: contain; margin: 0 auto -6px; position: relative; z-index: 1; }
.char .card { padding-top: 24px; }

/* sign-up band */
.band { background: var(--royal); color: var(--white); border-radius: var(--radius-lg); padding: 44px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; align-items: center; border: 4px solid var(--ink); box-shadow: 0 8px 0 var(--ink); }
.band h2 { color: var(--gold); }
.band p { color: #E6ECFF; }
.signup { display: flex; flex-direction: column; gap: 10px; }
.signup input { font: inherit; padding: 14px 18px; border-radius: 999px; border: 3px solid var(--ink); }
.signup label.check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.85rem; color: #E6ECFF; }
.signup .note { font-size: 0.82rem; color: #C9D5FF; margin: 0; }
.signup .msg { background: var(--gold); color: var(--ink); border-radius: 16px; padding: 12px 14px; font-weight: 600; display: none; }
@media (max-width: 860px) { .band { grid-template-columns: 1fr; padding: 30px 22px; } }

/* shop */
.product .thumb { aspect-ratio: 4 / 3; border-radius: 18px; border: 3px solid var(--ink); display: grid; place-items: center; margin-bottom: 16px; overflow: hidden; }
.product .thumb img { max-height: 85%; width: auto; }
.price { font-family: var(--title); font-size: 1.5rem; color: var(--orange-deep); }
.badge { display: inline-block; font-size: 0.8rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: #FFE7D3; color: var(--orange-deep); margin-bottom: 8px; }

/* prose (privacy, about) */
.prose { max-width: 780px; }
.prose h2 { font-size: 1.8rem; margin-top: 1.4em; }
.prose li { margin-bottom: 0.4em; }

/* footer */
.site-footer { background: var(--royal-deep); color: #DCE4FF; padding: 56px 0 30px; margin-top: 40px; }
.site-footer a { color: #FFFFFF; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 28px; }
.foot-grid h4 { color: var(--gold); margin: 0 0 12px; font-size: 1rem; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.foot-brand { display: flex; gap: 12px; align-items: center; font-family: var(--title); font-size: 1.4rem; color: var(--white); margin-bottom: 10px; }
.foot-brand img { width: 50px; }
.foot-bottom { border-top: 1px solid rgba(255, 255, 255, 0.18); margin-top: 36px; padding-top: 20px; font-size: 0.85rem; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .foot-grid { grid-template-columns: 1fr; } }

.page-head { background: linear-gradient(180deg, var(--sky-light), var(--cream)); padding: 56px 0 30px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 4px solid var(--orange); outline-offset: 3px; }

/* about: meet the creator */
.creator{display:grid;grid-template-columns:minmax(0,340px) minmax(0,1fr);gap:48px;align-items:start}
.creator-photo{margin:0;position:sticky;top:96px}
.creator-photo img{width:100%;height:auto;display:block;border-radius:28px;border:4px solid #fff;box-shadow:0 14px 34px rgba(20,40,110,.18)}
.creator-photo figcaption{text-align:center;margin-top:14px;display:flex;flex-direction:column;gap:2px}
.creator-photo figcaption b{font-size:1.15rem;color:var(--royal,#1E3FA8)}
.creator-photo figcaption span{font-size:.95rem;opacity:.75}
.creator-goal{font-weight:700;font-size:1.12rem;color:var(--royal,#1E3FA8);background:var(--sky-light);border-radius:18px;padding:16px 20px}
@media (max-width:760px){.creator{grid-template-columns:1fr;gap:24px}.creator-photo{position:static;max-width:300px;margin:0 auto}}
