/* ============================================================
   Khob Khun Klasse — Learn Thai with Kru Ice
   Design system: Thai silk jewel tones on ivory
   ============================================================ */

:root {
  --silk: #FBF6ED;
  --silk-deep: #F3EADA;
  --card: #FFFFFF;
  --ink: #2A322E;
  --ink-soft: #5A6560;
  --emerald: #14655A;
  --emerald-deep: #0B453D;
  --emerald-tint: #E4EFEA;
  --gold: #C9962B;
  --gold-bright: #E3B23C;
  --gold-tint: #F8EED3;
  --orchid: #C8527E;
  --orchid-tint: #F9E9F0;
  --mango: #DF8A3C;
  --mango-tint: #FBEFE0;

  --font-display: 'Mitr', 'Sarabun', sans-serif;
  --font-body: 'Sarabun', sans-serif;
  --font-hand: 'Sriracha', 'Sarabun', cursive;

  --radius: 18px;
  --radius-arch: 260px 260px 22px 22px;
  --shadow: 0 10px 30px rgba(20, 60, 52, 0.10);
  --shadow-soft: 0 4px 14px rgba(20, 60, 52, 0.07);
  --maxw: 1120px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--silk);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--emerald); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

h1, h2, h3 { font-family: var(--font-display); line-height: 1.25; color: var(--emerald-deep); }

h1 { font-size: clamp(2.1rem, 5vw, 3.3rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.3rem); font-weight: 600; }
h3 { font-size: 1.22rem; font-weight: 600; }

.eyebrow {
  font-family: var(--font-hand);
  color: var(--gold);
  font-size: 1.25rem;
  display: block;
  margin-bottom: .4rem;
}

.lead { font-size: 1.12rem; color: var(--ink-soft); }

/* ---------- Lai-thai gold ribbon divider ---------- */
.ribbon {
  height: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='16' viewBox='0 0 40 16'%3E%3Cpath d='M0 12 L10 4 L20 12 L30 4 L40 12' fill='none' stroke='%23C9962B' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-position: center;
  opacity: .55;
  margin: 0 auto;
  max-width: 240px;
}

section { padding: 72px 0; }
section.tint { background: var(--silk-deep); }

.section-head { text-align: center; max-width: 680px; margin: 0 auto 44px; }
.section-head .ribbon { margin-top: 18px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 246, 237, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(201, 150, 43, 0.25);
}

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px; max-width: var(--maxw); margin: 0 auto;
  gap: 16px;
}

.wordmark { display: flex; flex-direction: column; text-decoration: none; line-height: 1.15; }
.wordmark .thai { font-family: var(--font-hand); font-size: .85rem; color: var(--gold); }
.wordmark .latin { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; color: var(--emerald-deep); }
.wordmark .latin em { font-style: normal; color: var(--gold); }

.main-nav { display: flex; align-items: center; gap: 26px; }
.main-nav a {
  text-decoration: none; color: var(--ink); font-weight: 600; font-size: .98rem;
  padding: 4px 0; border-bottom: 2.5px solid transparent;
}
.main-nav a:hover { color: var(--emerald); }
.main-nav a.active { color: var(--emerald); border-bottom-color: var(--gold); }

.lang-switch { display: flex; gap: 4px; margin-left: 8px; background: var(--emerald-tint); border-radius: 999px; padding: 4px; }
.lang-switch button {
  border: 0; background: transparent; font-family: var(--font-body);
  font-weight: 700; font-size: .82rem; color: var(--emerald-deep);
  padding: 4px 11px; border-radius: 999px; cursor: pointer;
}
.lang-switch button.active { background: var(--emerald); color: #fff; }

.nav-toggle {
  display: none; border: 0; background: transparent; cursor: pointer;
  width: 42px; height: 42px; border-radius: 10px;
}
.nav-toggle span { display: block; width: 22px; height: 2.5px; background: var(--emerald-deep); margin: 5px auto; border-radius: 2px; transition: transform .25s; }

/* ---------- Hero ---------- */
.hero { padding: 64px 0 84px; overflow: hidden; }
.hero-grid {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center;
}
.hero h1 { margin: .2rem 0 1rem; }
.hero .greeting {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2.4rem, 6vw, 4rem); color: var(--gold);
  line-height: 1.1;
}
.hero .greeting-note { font-family: var(--font-hand); color: var(--ink-soft); font-size: 1.1rem; margin-bottom: 1rem; }
.hero .lead { margin-bottom: 1.8rem; max-width: 34rem; }

.hero-photo { position: relative; justify-self: center; }
.hero-photo img {
  width: min(380px, 82vw);
  border-radius: var(--radius-arch);
  box-shadow: var(--shadow);
  border: 6px solid #fff;
}
.hero-photo::after {
  content: ""; position: absolute; inset: -14px -14px auto auto;
  width: 70px; height: 70px; border-top: 4px solid var(--gold); border-right: 4px solid var(--gold);
  border-radius: 0 130px 0 0;
}

.btn-row { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-block; text-decoration: none; font-family: var(--font-display);
  font-weight: 600; font-size: 1rem; padding: 13px 26px; border-radius: 999px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--emerald); color: #fff; box-shadow: 0 6px 18px rgba(20, 101, 90, .35); }
.btn-primary:hover { background: var(--emerald-deep); }
.btn-outline { border: 2px solid var(--gold); color: var(--emerald-deep); background: transparent; }
.btn-outline:hover { background: var(--gold-tint); }

.name-note {
  margin-top: 2rem; font-size: .92rem; color: var(--ink-soft);
  background: var(--gold-tint); border-left: 3px solid var(--gold);
  padding: 10px 16px; border-radius: 0 12px 12px 0; max-width: 34rem;
}

/* ---------- Cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; }
.card {
  background: var(--card); border-radius: var(--radius); padding: 28px 26px;
  box-shadow: var(--shadow-soft); border-top: 4px solid var(--gold);
}
.card .icon {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: var(--emerald-tint); margin-bottom: 16px; font-size: 1.5rem;
}
.card h3 { margin-bottom: .5rem; }
.card p { color: var(--ink-soft); font-size: .98rem; }

/* ---------- Photo strip ---------- */
.photo-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.photo-strip figure {
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-soft);
  background: #fff; position: relative;
}
.photo-strip img { width: 100%; height: 280px; object-fit: cover; transition: transform .4s ease; }
.photo-strip figure:hover img { transform: scale(1.04); }
.photo-strip figcaption {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(11, 69, 61, .85));
  color: #fff; padding: 34px 16px 12px; font-size: .9rem; font-weight: 600;
}

/* ---------- Pricing ---------- */
.audience { margin-bottom: 56px; }
.audience:last-child { margin-bottom: 0; }
.audience-head {
  display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 8px;
  border-left: 5px solid var(--accent, var(--emerald)); padding-left: 16px;
}
.audience-head h2 { color: var(--accent-deep, var(--emerald-deep)); }
.audience-head .tag {
  font-size: .8rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  background: var(--accent-tint, var(--emerald-tint)); color: var(--accent-deep, var(--emerald-deep));
  padding: 4px 12px; border-radius: 999px;
}
.audience-sub { color: var(--ink-soft); margin: 0 0 24px 21px; }

.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 22px; }
.price-card {
  background: var(--card); border-radius: var(--radius); padding: 26px 24px 24px;
  box-shadow: var(--shadow-soft); position: relative; text-align: center;
  border: 1.5px solid rgba(20, 101, 90, .10);
  display: flex; flex-direction: column;
}
.price-card.featured { border: 2px solid var(--accent, var(--emerald)); box-shadow: var(--shadow); }
.badge {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--gold-bright); color: #5C420C; font-weight: 700; font-size: .74rem;
  letter-spacing: .05em; text-transform: uppercase; padding: 4px 14px; border-radius: 999px;
  white-space: nowrap;
}
.pack-name {
  font-family: var(--font-display); font-weight: 600; color: var(--accent-deep, var(--emerald-deep));
  font-size: 1.05rem; margin-bottom: 10px;
}
.per-lesson { font-family: var(--font-display); font-size: 2.3rem; font-weight: 700; color: var(--ink); line-height: 1; }
.per-lesson small { font-size: .95rem; font-weight: 500; color: var(--ink-soft); }
.per-lesson-label { font-size: .85rem; color: var(--ink-soft); margin-bottom: 14px; }
.price-features { list-style: none; text-align: left; margin: 6px 0 16px; flex: 1; }
.price-features li {
  padding: 7px 0 7px 26px; font-size: .93rem; color: var(--ink-soft);
  border-bottom: 1px dashed rgba(20, 101, 90, .15); position: relative;
}
.price-features li:last-child { border-bottom: 0; }
.price-features li::before {
  content: "✓"; position: absolute; left: 2px; color: var(--accent, var(--emerald)); font-weight: 700;
}
.total {
  font-family: var(--font-display); font-size: 1.35rem; font-weight: 700;
  color: var(--accent-deep, var(--emerald-deep)); margin-bottom: 14px;
}
.total small { display: block; font-family: var(--font-body); font-size: .78rem; font-weight: 500; color: var(--ink-soft); }
.price-card .btn { width: 100%; text-align: center; }
.btn-accent { background: var(--accent, var(--emerald)); color: #fff; }
.btn-accent:hover { filter: brightness(.92); }

.audience.adult-private { --accent: #14655A; --accent-deep: #0B453D; --accent-tint: #E4EFEA; }
.audience.adult-group   { --accent: #1D7A8C; --accent-deep: #0F5361; --accent-tint: #E2F0F3; }
.audience.kid-private   { --accent: #C8527E; --accent-deep: #93365A; --accent-tint: #F9E9F0; }
.audience.kid-group     { --accent: #DF8A3C; --accent-deep: #A9601F; --accent-tint: #FBEFE0; }

.flex-note {
  display: flex; align-items: center; gap: 10px; justify-content: center;
  background: var(--emerald-tint); color: var(--emerald-deep);
  border-radius: 999px; padding: 10px 22px; font-weight: 600; font-size: .95rem;
  max-width: fit-content; margin: 0 auto 48px;
}

/* ---------- Teaser cards (home) ---------- */
.teaser-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; }
.teaser {
  border-radius: var(--radius); padding: 26px 24px; background: var(--card);
  box-shadow: var(--shadow-soft); text-decoration: none; display: block;
  border-top: 5px solid var(--accent, var(--emerald));
  transition: transform .18s ease, box-shadow .18s ease;
}
.teaser:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.teaser h3 { color: var(--accent-deep, var(--emerald-deep)); }
.teaser .from { color: var(--ink-soft); font-size: .92rem; margin-top: 6px; }
.teaser .from strong { font-family: var(--font-display); font-size: 1.5rem; color: var(--ink); display: block; }
.teaser.adult-private { --accent: #14655A; --accent-deep: #0B453D; }
.teaser.adult-group   { --accent: #1D7A8C; --accent-deep: #0F5361; }
.teaser.kid-private   { --accent: #C8527E; --accent-deep: #93365A; }
.teaser.kid-group     { --accent: #DF8A3C; --accent-deep: #A9601F; }

/* ---------- About page ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 340px; gap: 48px; align-items: start; }
.about-body p { margin-bottom: 1.15rem; }
.about-body strong { color: var(--emerald-deep); }
.about-side { position: sticky; top: 96px; display: grid; gap: 24px; }
.about-side img {
  border-radius: var(--radius-arch); border: 6px solid #fff; box-shadow: var(--shadow);
}
.cred-card { background: var(--card); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-soft); border-top: 4px solid var(--gold); }
.cred-card h3 { margin-bottom: 12px; }
.cred-card ul { list-style: none; }
.cred-card li { padding: 8px 0 8px 26px; position: relative; font-size: .94rem; color: var(--ink-soft); border-bottom: 1px dashed rgba(20,101,90,.15); }
.cred-card li:last-child { border-bottom: 0; }
.cred-card li::before { content: "★"; position: absolute; left: 0; color: var(--gold); }

/* ---------- Curriculum ---------- */
.curr-part { margin-bottom: 48px; }
.curr-part-title {
  display: flex; align-items: center; gap: 14px; margin-bottom: 22px;
}
.curr-part-title .num {
  font-family: var(--font-display); font-weight: 700; color: #fff; background: var(--emerald);
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 1.2rem;
  flex-shrink: 0;
}
.curr-part-title.culture .num { background: var(--orchid); }
details.level {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-soft);
  margin-bottom: 14px; overflow: hidden; border-left: 4px solid var(--emerald);
}
.curr-part.culture details.level { border-left-color: var(--orchid); }
details.level summary {
  cursor: pointer; list-style: none; padding: 18px 54px 18px 24px;
  font-family: var(--font-display); font-weight: 600; font-size: 1.06rem; color: var(--emerald-deep);
  position: relative;
}
.curr-part.culture details.level summary { color: #93365A; }
details.level summary::-webkit-details-marker { display: none; }
details.level summary::after {
  content: "+"; position: absolute; right: 22px; top: 50%; transform: translateY(-50%);
  font-size: 1.5rem; color: var(--gold); font-weight: 400; transition: transform .2s;
}
details.level[open] summary::after { content: "–"; }
details.level .level-body { padding: 0 24px 22px; color: var(--ink-soft); }
details.level .level-body p { margin-bottom: .9rem; }
details.level .level-body p:last-child { margin-bottom: 0; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.contact-card {
  background: var(--card); border-radius: var(--radius); padding: 30px 26px;
  box-shadow: var(--shadow-soft); text-align: center; border-top: 4px solid var(--accent, var(--gold));
}
.contact-card.line { --accent: #06C755; }
.contact-card.whatsapp { --accent: #25D366; }
.contact-card.email { --accent: var(--gold); }
.contact-card img.qr {
  width: 190px; height: 190px; object-fit: cover; margin: 16px auto; border-radius: 14px;
  border: 1px solid rgba(0,0,0,.08);
}
.contact-card h3 { margin-bottom: 4px; }
.contact-card p { color: var(--ink-soft); font-size: .94rem; }
.contact-card .btn { margin-top: 16px; }
.email-big {
  display: inline-block; margin: 22px 0 6px; font-family: var(--font-display); font-weight: 600;
  font-size: clamp(.95rem, 2.6vw, 1.15rem); color: var(--emerald-deep); word-break: break-all;
}

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(135deg, var(--emerald-deep), var(--emerald));
  border-radius: 26px; padding: 52px 40px; text-align: center; color: #fff;
  position: relative; overflow: hidden;
}
.cta-band::before {
  content: "ขอบคุณ"; position: absolute; right: -30px; bottom: -46px;
  font-family: var(--font-display); font-weight: 700; font-size: 9rem; opacity: .07; color: #fff;
  pointer-events: none;
}
.cta-band h2 { color: #fff; margin-bottom: .6rem; }
.cta-band p { color: rgba(255,255,255,.85); max-width: 34rem; margin: 0 auto 1.6rem; }
.cta-band .btn-primary { background: var(--gold-bright); color: #4A340A; box-shadow: none; }
.cta-band .btn-primary:hover { background: #fff; }

/* ---------- Footer ---------- */
.site-footer { background: var(--emerald-deep); color: rgba(255,255,255,.8); padding: 44px 0 30px; margin-top: 72px; }
.footer-grid { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; align-items: flex-start; }
.site-footer .wordmark .latin { color: #fff; }
.site-footer .wordmark .thai { color: var(--gold-bright); }
.footer-nav { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-nav a { color: rgba(255,255,255,.85); text-decoration: none; font-size: .94rem; }
.footer-nav a:hover { color: var(--gold-bright); }
.footer-note { margin-top: 26px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.15); font-size: .85rem; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.footer-note a { color: var(--gold-bright); text-decoration: none; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .teaser, .photo-strip img { transition: none; }
}

:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-photo { order: -1; }
  .about-grid { grid-template-columns: 1fr; }
  .about-side { position: static; grid-template-columns: 1fr 1fr; }
  .photo-strip { grid-template-columns: 1fr; }
  .photo-strip img { height: 240px; }
}

@media (max-width: 760px) {
  .main-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--silk); flex-direction: column; align-items: flex-start;
    padding: 18px 24px 24px; gap: 16px; border-bottom: 2px solid var(--gold-tint);
    box-shadow: 0 14px 24px rgba(20,60,52,.12);
  }
  .main-nav.open { display: flex; }
  .nav-toggle { display: block; }
  .about-side { grid-template-columns: 1fr; }
  section { padding: 54px 0; }
}

/* Max-savings badge variant */
.badge.alt { background: #BFE3C0; color: #1F5B2E; }
