/* บ้านเรียนโปรเกรส — homeschoolthai.com */
@font-face { font-family: "Noto Sans Thai"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(../fonts/notosansthai-thai.woff2) format("woff2");
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: "Noto Sans Thai"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(../fonts/notosansthai-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
:root {
  --forest: #1f4d2b;
  --forest-2: #163a20;
  --leaf: #5e9a35;
  --leaf-soft: #e7f1dc;
  --sun: #f0a93b;
  --sun-soft: #fdf0d8;
  --wood: #8b5a2b;
  --cream: #fbf7ee;
  --paper: #ffffff;
  --ink: #1d2a20;
  --muted: #5b6b5e;
  --line: #e6e0d0;
  --radius: 22px;
  --shadow: 0 1px 2px rgba(31, 77, 43, .06), 0 12px 32px -12px rgba(31, 77, 43, .22);
  --head: "Noto Sans Thai", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: "Noto Sans Thai", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--cream); color: var(--ink);
  font: 400 23px/1.8 var(--body); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--forest); }
h1, h2, h3 { font-family: var(--head); font-weight: 700; line-height: 1.3; letter-spacing: -.01em; margin: 0; color: var(--forest-2); }
h2 { font-size: clamp(32px, 4.6vw, 50px); text-wrap: balance; }
h3 { font-size: 24px; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(1360px, 100% - 48px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--forest); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }

.hl { color: var(--leaf); }
.hl--sun { color: var(--sun); }
.kicker { font-family: var(--head); font-size: 17px; letter-spacing: .08em; color: var(--leaf); margin: 0 0 10px; }
.kicker::before { content: ""; display: inline-block; width: 22px; height: 2px; background: currentColor; vertical-align: middle; margin-right: 10px; border-radius: 2px; }
.kicker--light { color: #bfe0a0; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 13px 24px; border-radius: 999px;
  background: var(--forest); color: #fff; text-decoration: none; font: 600 19px/1.2 var(--head);
  border: 2px solid var(--forest); transition: transform .15s, background .15s, box-shadow .15s;
  box-shadow: 0 8px 20px -10px rgba(31, 77, 43, .6);
}
.btn:hover { transform: translateY(-2px); background: var(--leaf); border-color: var(--leaf); }
.btn--ghost { background: transparent; color: var(--forest); box-shadow: none; }
.btn--ghost:hover { background: var(--forest); color: #fff; border-color: var(--forest); }
.btn--sm { padding: 8px 18px; font-size: 17px; }
.btn--sun { background: var(--sun); border-color: var(--sun); color: #3a2605; }
.btn--sun:hover { background: #ffc15e; border-color: #ffc15e; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(52, 110, 64, 1); backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px); border-bottom: 1px solid rgba(255,255,255,.12); box-shadow: 0 2px 4px -1px rgba(0,0,0,.12), 0 10px 24px -10px rgba(22,58,32,.45); transition: background .35s ease, box-shadow .35s ease; }
.nav.is-scrolled { background: rgba(52, 110, 64, .72); box-shadow: 0 1px 0 rgba(255,255,255,.08) inset, 0 12px 32px -12px rgba(22,58,32,.35); }
.nav__in { display: flex; align-items: center; justify-content: space-between; height: 82px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; }
.brand__logo { width: 48px; height: 48px; flex: none; position: relative; top: -5px; filter: drop-shadow(0 2px 3px rgba(0,0,0,.18)); transition: transform .25s; }
.brand:hover .brand__logo { transform: rotate(-4deg) scale(1.05); }
.brand b { display: block; font: 700 23px/1.1 var(--head);
  background: linear-gradient(100deg, #ffffff 0%, #ffffff 35%, #ffd27a 45%, #b8e986 55%, #ffffff 65%, #ffffff 100%);
  background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 4s linear infinite; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -150% 0; } }
.brand small { display: block; font-size: 12px; letter-spacing: .32em; color: rgba(255,255,255,.65); }
.nav__menu { display: flex; align-items: center; gap: 28px; }
.nav__menu a { display: flex; flex-direction: column; line-height: 1.25; }
.nav__menu a span { font-weight: 500; }
.nav__menu a small { font-size: 11px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.6); margin-top: 2px; }
.nav__menu a.btn { align-items: center; gap: 0; padding: 9px 22px; }
.nav__menu a.btn { background: var(--sun); border-color: var(--sun); color: #3a2605; box-shadow: none; }
.nav__menu a.btn:hover { background: #ffc15e; border-color: #ffc15e; }
.nav__menu a.btn small { color: rgba(58,38,5,.6); }
.nav__menu a:hover small { color: #9fd07a; }
.nav__menu a.btn:hover small { color: rgba(58,38,5,.75); }
.nav__menu a:not(.btn) { color: #f1f6ec; text-decoration: none; font-size: 18px; position: relative; }
.nav__menu a:not(.btn)::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -6px; height: 2px; background: #9fd07a; transition: right .2s; }
.nav__menu a:not(.btn):hover::after { right: 0; }
.nav__toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav__toggle span { display: block; width: 24px; height: 2px; background: #fff; margin: 5px 0; border-radius: 2px; transition: transform .2s, opacity .2s; }

/* Hero */
.hero { position: relative; padding: 48px 0 110px; overflow: hidden; background: var(--cream); }
/* Running colors: a slow flowing gradient + drifting glows behind the hero */
.hero::before, .hero::after { content: ""; position: absolute; pointer-events: none; z-index: 0; }
.hero::before { inset: 0;
  background: linear-gradient(115deg, rgba(94,154,53,.22), rgba(240,169,59,.26), rgba(120,190,225,.22), rgba(159,208,122,.24), rgba(240,169,59,.22), rgba(94,154,53,.22));
  background-size: 400% 400%; animation: heroFlow 16s ease-in-out infinite; }
.hero::after { width: 70vmax; height: 70vmax; left: -15vmax; top: -30vmax; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,210,122,.45), rgba(255,210,122,0) 60%);
  animation: heroGlow 20s ease-in-out infinite alternate; }
@keyframes heroFlow { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
@keyframes heroGlow { 0% { transform: translate(0, 0); } 50% { transform: translate(55vw, 10vh); } 100% { transform: translate(20vw, 30vh); } }
.hero__in, .hero__hill { position: relative; z-index: 1; }
.hero__in { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: start; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px; border-radius: 999px; background: var(--leaf-soft); color: var(--forest); font-size: 17px; font-weight: 500; margin-bottom: 20px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--leaf); box-shadow: 0 0 0 4px rgba(94,154,53,.25); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(94,154,53,0); } }
.hero h1 { font-size: clamp(30px, 3.4vw, 44px); line-height: 1.3; font-weight: 800; }
.hero__title .line { display: block; }
.hero__title .line + .line { margin-top: 10px; }
.hero__title small { display: block; font-size: 13px; font-weight: 500; line-height: 1.4; letter-spacing: .16em; text-transform: uppercase; color: #9aa59c; margin-top: 2px; }
.lead { font-size: 22px; color: var(--muted); margin: 22px 0 28px; max-width: 34em; }
.lead strong { color: var(--forest); font-weight: 700; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__media { padding-top: 8px; }
.hero__chips { list-style: none; padding: 0; margin: 40px 0 0; display: flex; flex-wrap: nowrap; justify-content: center; gap: 8px; }
.hero__chips li { padding: 6px 14px; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; font-size: 15px; white-space: nowrap; box-shadow: 0 4px 12px -8px rgba(31,77,43,.35); }
.hero__art { margin: 0; position: relative; }
.hero__art::before { content: ""; position: absolute; inset: 18px -18px -18px 18px; border-radius: 28px; background: linear-gradient(135deg, var(--leaf), var(--sun)); opacity: .35; z-index: -1; }
.hero__art img { border-radius: 26px; box-shadow: 0 30px 60px -24px rgba(22, 58, 32, .55); aspect-ratio: 3 / 2; object-fit: cover; }
.hero__hill { position: absolute !important; left: 0; right: 0; bottom: -1px; width: 100%; height: 90px; fill: var(--paper); }

/* Sections */
.section { padding: 96px 0; background: var(--paper); }
.section--tint { background: var(--cream); }
.section--forest { background: linear-gradient(160deg, var(--forest) 0%, var(--forest-2) 100%); color: #e8f0e2; }
.section--forest h2 { color: #fff; }
.section__head { max-width: 820px; margin: 0 auto 48px; text-align: center; }
.section__head p:last-child { color: var(--muted); margin-top: 14px; }

/* About */
.about { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: start; }
.about__body > p { color: var(--muted); }
.about__body strong { color: var(--forest); }
.pillars { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.pillars li { display: flex; gap: 18px; align-items: center; padding: 18px 20px; border-radius: 18px; background: var(--cream); border: 1px solid var(--line); }
.pillars span { font: 600 29px/1 var(--head); color: var(--sun); min-width: 40px; }
.pillars b { font-family: var(--head); font-weight: 700; color: var(--forest-2); font-size: 21px; }
.pillars p { margin: 0; color: var(--muted); font-size: 18px; }

/* Journey */
.journey { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; position: relative; }
.journey::before { content: ""; position: absolute; top: 34px; left: 12%; right: 12%; height: 3px; background: repeating-linear-gradient(90deg, var(--leaf) 0 12px, transparent 12px 22px); z-index: 0; }
.step { position: relative; z-index: 1; background: var(--paper); border-radius: var(--radius); padding: 0 24px 26px; box-shadow: var(--shadow); text-align: center; margin-top: 34px; }
.step__num { width: 52px; height: 52px; margin: -26px auto 10px; border-radius: 50%; background: var(--forest); color: #fff; font: 600 25px/52px var(--head); box-shadow: 0 0 0 6px var(--cream); }
.step__ico { font-size: 40px; line-height: 1.2; }
.step h3 { font-size: 27px; margin-top: 6px; }
.step__en { font-size: 15px; letter-spacing: .2em; text-transform: uppercase; color: var(--leaf); margin: 2px 0 12px; }
.step p:last-child { color: var(--muted); font-size: 18px; margin: 0; }
.step em { font-style: normal; color: var(--forest); font-weight: 700; }

/* Skills */
.skills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 22px; transition: transform .2s, box-shadow .2s, border-color .2s; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.card__ico { width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; font-size: 28px; margin-bottom: 16px; }
.card p { color: var(--muted); font-size: 18px; flex: 1; margin-top: 8px; }
.tags { list-style: none; padding: 0; margin: 0; display: flex; gap: 6px; flex-wrap: wrap; }
.tags li { font-size: 15px; padding: 2px 10px; border-radius: 999px; background: var(--cream); color: var(--muted); }
.c-fire { background: #fde6d8; } .c-leaf { background: var(--leaf-soft); } .c-wood { background: #f1e4d6; }
.c-sun { background: var(--sun-soft); } .c-gold { background: #fff4c7; } .c-sky { background: #dfeefb; }
.c-rose { background: #fbe3ea; } .c-ai { background: #ebe5fb; } .c-lake { background: #dcf2ee; }

/* Freedom calculator */
.freedom { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.freedom__text p { color: #cfdfc6; }
.freedom__text strong { color: #fff; }
.note { font-size: 16px; opacity: .75; }
.calc { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); border-radius: 26px; padding: 30px; backdrop-filter: blur(6px); }
.calc__row { margin-bottom: 18px; }
.calc__row label { display: block; font-size: 18px; margin-bottom: 6px; color: #e8f0e2; }
.calc output { font: 600 23px var(--head); color: var(--sun); }
.calc input[type=range] { width: 100%; accent-color: var(--sun); height: 28px; cursor: pointer; }
.calc__result { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 24px; padding-top: 22px; border-top: 1px dashed rgba(255,255,255,.22); }
.calc__result small { display: block; font-size: 16px; color: #bcd0b2; }
.calc__result b { font: 600 25px/1.3 var(--head); color: #fff; }
.calc__result b.sun { color: var(--sun); }
.calc__total { grid-column: 1 / -1; }
.calc__total b { font-size: clamp(30px, 4vw, 40px); color: #fff; }
.bar { grid-column: 1 / -1; height: 12px; border-radius: 99px; background: var(--sun); overflow: hidden; }
.bar span { display: block; height: 100%; width: 50%; background: #9fd07a; transition: width .3s; }
.calc__passive { grid-column: 1 / -1; margin: 4px 0 0; font-size: 18px; color: #e8f0e2; }
.calc__passive b { font-size: 21px; color: var(--sun); }

/* Library */
.library { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.res { position: relative; display: flex; flex-direction: column; background: var(--cream); border: 1px dashed #d6cdb6; border-radius: var(--radius); padding: 28px 22px; color: var(--ink); text-decoration: none; }
.res p { color: var(--muted); font-size: 18px; margin-top: 8px; flex: 1; }
.res__ico { font-size: 38px; margin-bottom: 10px; }
.res--live { background: linear-gradient(160deg, #2b6a3a, var(--forest-2)); border: 0; color: #fff; box-shadow: var(--shadow); transition: transform .2s; }
.res--live:hover { transform: translateY(-4px) rotate(-.5deg); }
.res--live h3 { color: #fff; }
.res--live p { color: #cfe3c3; }
.res__go { font-family: var(--head); color: var(--sun); }
.badge { align-self: flex-start; font-size: 15px; font-weight: 700; padding: 3px 12px; border-radius: 999px; background: var(--sun-soft); color: #8a5a0f; margin-bottom: 14px; }
.badge--live { background: var(--sun); color: #3a2605; }

/* Camps */
.camps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.camp { background: var(--paper); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.camp__top { height: 130px; display: grid; place-items: center; font-size: 56px; }
.c-forest { background: linear-gradient(135deg, #bcd9a3, #6fa24a); }
.c-market { background: linear-gradient(135deg, #fde2b0, #f0a93b); }
.c-circle { background: linear-gradient(135deg, #cfe7e2, #7cb8ad); }
.camp__body { padding: 24px; }
.camp__body p { color: var(--muted); font-size: 18px; margin-top: 8px; }
.camp .badge { margin-bottom: 0; }
.safety { display: flex; gap: 22px; align-items: flex-start; margin-top: 32px; padding: 26px 28px; border-radius: var(--radius); background: var(--leaf-soft); border: 1px solid #cfe2bd; }
.safety__ico { font-size: 38px; line-height: 1; }
.safety p { margin: 8px 0 0; color: #3f5a44; font-size: 18px; }

/* Join */
.join { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center; padding: 56px; border-radius: 32px; color: #e8f0e2;
  background: radial-gradient(600px 300px at 100% 0%, rgba(240,169,59,.35), transparent 70%), linear-gradient(135deg, var(--forest), var(--forest-2)); }
.join h2 { color: #fff; }
.join p { color: #cfdfc6; margin-top: 14px; }
.join__actions { text-align: center; }
.join__soon { font-size: 17px; }

/* Footer */
.foot { background: var(--forest-2); color: #b9ccb0; padding: 56px 0 24px; font-size: 18px; }
.foot__in { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.foot__logo { width: 64px; height: 64px; margin-bottom: 12px; }
.foot__brand b { display: block; font: 600 27px var(--head); color: #fff; }
.foot__brand span { font-size: 15px; letter-spacing: .2em; }
.foot__brand p { margin-top: 12px; }
.foot__nav { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: flex-start; }
.foot a { color: #dfeccf; text-decoration: none; }
.foot a:hover { color: var(--sun); }
.foot__bottom { display: flex; justify-content: space-between; margin-top: 36px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.1); font-size: 16px; }

/* Reveal on scroll (JS adds .js to <html>) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }

/* Responsive */
@media (max-width: 1024px) {
  .skills, .library { grid-template-columns: repeat(2, 1fr); }
  .journey { grid-template-columns: repeat(2, 1fr); }
  .journey::before { display: none; }
}
@media (max-width: 1140px) {
  .nav__toggle { display: block; }
  .nav__menu { position: absolute; top: 82px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px 20px; background: rgba(46, 100, 58, .97); border-bottom: 1px solid rgba(255,255,255,.08); box-shadow: 0 20px 30px -20px rgba(0,0,0,.3); display: none; }
  .nav__menu.is-open { display: flex; }
  .nav__menu a:not(.btn) { padding: 14px 4px; border-bottom: 1px solid rgba(255,255,255,.1); }
  .nav__menu .btn { margin-top: 14px; justify-content: center; }
  .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); }
  .nav__menu a:not(.btn) { flex-direction: row; align-items: baseline; justify-content: space-between; }
  .nav__menu a:not(.btn)::after { display: none; }
}
@media (max-width: 900px) {
  .hero { padding-top: 28px; }
  .hero__in, .about, .freedom, .join { grid-template-columns: 1fr; }
  .hero__media { order: -1; padding-top: 0; }
  .about { gap: 24px; }
  .camps { grid-template-columns: 1fr; }
  .join { padding: 36px 24px; }
  .nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}
@media (max-width: 600px) {
  body { font-size: 19px; }
  .section { padding: 68px 0; }
  .skills, .library, .journey { grid-template-columns: 1fr; }
  .calc { padding: 22px; }
  .safety { flex-direction: column; gap: 10px; }
  .foot__bottom { flex-direction: column; gap: 8px; }
  .brand b { font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* 404 */
.lost { min-height: 100vh; display: grid; place-items: center; text-align: center; }
.lost__ico { font-size: 72px; }
.lost h1 { font-size: clamp(34px, 6vw, 52px); margin: 10px 0; }
.lost p { color: var(--muted); }

/* Keep grid children from overflowing on small screens */
.hero__in > *, .hero__media, .about > *, .freedom > *, .join > *, .journey > *, .skills > *, .library > *, .camps > * { min-width: 0; }
@media (max-width: 1100px) and (min-width: 901px), (max-width: 560px) {
  .hero__chips { flex-wrap: wrap; }
}
@media (max-width: 600px) { .wrap { width: calc(100% - 32px); } }

/* FAQ */
.faq__list { max-width: 900px; margin: 0 auto; display: grid; gap: 14px; }
.faq__item { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; transition: box-shadow .2s, border-color .2s; }
.faq__item[open] { box-shadow: var(--shadow); border-color: transparent; }
.faq__item summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; cursor: pointer; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item h3 { font-size: 20px; font-weight: 600; }
.faq__item p { margin: 0; padding: 0 24px 22px; color: var(--muted); font-size: 18px; }
.faq__icon { flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--leaf-soft); position: relative; transition: transform .25s, background .25s; }
.faq__icon::before, .faq__icon::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; margin: -1px 0 0 -6px; background: var(--forest); border-radius: 2px; }
.faq__icon::after { transform: rotate(90deg); transition: transform .25s; }
.faq__item[open] .faq__icon { background: var(--sun); transform: rotate(180deg); }
.faq__item[open] .faq__icon::after { transform: rotate(0); }

/* Clickable header → back to top */
.nav { cursor: pointer; }
.nav__menu, .nav__toggle { cursor: auto; }
.nav__menu a, .nav__toggle { cursor: pointer; }
