/* Baanmari Studio — design tokens & base */

:root {
  /* Light tones (default) */
  --bg: oklch(0.965 0.012 75);
  --bg-2: oklch(0.935 0.018 70);
  --bg-3: oklch(0.89 0.025 65);
  --bg-card: oklch(0.985 0.008 80);
  --line: oklch(0.85 0.025 60);
  --line-soft: oklch(0.91 0.018 65);

  --ink: oklch(0.22 0.025 55);
  --ink-2: oklch(0.42 0.035 55);
  --ink-3: oklch(0.58 0.03 60);

  --brand: oklch(0.42 0.06 50);
  --brand-2: oklch(0.55 0.07 50);
  --accent: oklch(0.58 0.13 40);
  --accent-2: oklch(0.68 0.10 60);

  --shadow-sm: 0 1px 2px oklch(0.2 0.03 50 / 0.06), 0 1px 1px oklch(0.2 0.03 50 / 0.04);
  --shadow-md: 0 6px 18px oklch(0.2 0.03 50 / 0.08), 0 2px 6px oklch(0.2 0.03 50 / 0.05);
  --shadow-lg: 0 24px 60px oklch(0.2 0.03 50 / 0.14), 0 8px 18px oklch(0.2 0.03 50 / 0.08);

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-xl: 32px;

  --font-display: "Noto Serif Display", "Cormorant Garamond", "Noto Serif Thai", serif;
  --font-thai-display: "IBM Plex Sans Thai", "Noto Serif Display", sans-serif;
  --font-body: "IBM Plex Sans Thai", "IBM Plex Sans", "Helvetica Neue", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;

  --type-scale: 1;
  --container: 1240px;
}

[data-theme="dark"] {
  --bg: oklch(0.18 0.013 50);
  --bg-2: oklch(0.22 0.018 52);
  --bg-3: oklch(0.27 0.022 55);
  --bg-card: oklch(0.24 0.018 55);
  --line: oklch(0.35 0.022 55);
  --line-soft: oklch(0.30 0.018 55);

  --ink: oklch(0.95 0.012 75);
  --ink-2: oklch(0.78 0.018 70);
  --ink-3: oklch(0.62 0.022 60);

  --brand: oklch(0.78 0.05 70);
  --brand-2: oklch(0.68 0.06 60);
  --accent: oklch(0.72 0.13 45);
  --accent-2: oklch(0.78 0.10 80);

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.4);
  --shadow-md: 0 8px 22px oklch(0 0 0 / 0.45);
  --shadow-lg: 0 28px 70px oklch(0 0 0 / 0.55);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: calc(16px * var(--type-scale));
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }

a { color: inherit; text-decoration: none; }

.serif { font-family: var(--font-thai-display); font-weight: 500; letter-spacing: -0.005em; }
.display-en { font-family: var(--font-display); font-weight: 500; font-style: italic; letter-spacing: -0.01em; }
.mono { font-family: var(--font-mono); font-size: 0.78em; letter-spacing: 0.04em; text-transform: uppercase; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}

/* ============ NAV ============ */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklch, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 76px; gap: 32px;
}
.brand-mark {
  display: flex; align-items: center; gap: 12px;
}
.brand-mark .logo {
  width: 44px; height: 44px;
  background: transparent;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.brand-mark .logo img {
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
}
.brand-mark .logo .light-only { display: block; }
.brand-mark .logo .dark-only { display: none; }
[data-theme="dark"] .brand-mark .logo .light-only { display: none; }
[data-theme="dark"] .brand-mark .logo .dark-only { display: block; }

/* Generic dual-asset logo (any img.light-only / img.dark-only) */
img.light-only { display: block; }
img.dark-only  { display: none; }
[data-theme="dark"] img.light-only { display: none; }
[data-theme="dark"] img.dark-only  { display: block; }
.brand-mark .name {
  font-family: var(--font-thai-display);
  font-size: 22px; font-weight: 500;
  letter-spacing: -0.005em;
  line-height: 1;
}
.brand-mark .name strong { font-weight: 500; }
.brand-mark .name em {
  font-family: var(--font-display); font-style: italic; font-weight: 400;
  color: var(--ink-2);
  font-size: 0.85em;
  margin-left: 2px;
}

.nav-links {
  display: flex; gap: 26px; align-items: center;
}
.nav-links a {
  position: relative;
  color: var(--ink-2);
  font-size: 14px;
  padding: 6px 0;
  transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-links a.active::after {
  content: ""; position: absolute; bottom: -2px; left: 0; right: 0;
  height: 1.5px; background: var(--accent);
}

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}
.btn:hover { background: var(--bg-2); }
.btn-primary {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
[data-theme="dark"] .btn-primary { background: var(--brand); color: oklch(0.18 0.015 50); border-color: var(--brand); }
.btn-primary:hover { background: var(--ink-2); transform: translateY(-1px); }
[data-theme="dark"] .btn-primary:hover { background: var(--brand-2); }
.btn-accent {
  background: var(--accent); color: white; border-color: var(--accent);
}
.btn-accent:hover { filter: brightness(1.05); transform: translateY(-1px); }
.btn-ghost { border-color: transparent; }
.btn-ghost:hover { background: var(--bg-2); }
.btn-sm { padding: 7px 14px; font-size: 13px; }

/* ============ HERO ============ */
.hero {
  padding: 80px 0 96px;
  position: relative;
  overflow: hidden;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px;
  color: var(--ink-3);
  margin-bottom: 28px;
  letter-spacing: 0.16em; text-transform: uppercase;
}
.hero-eyebrow::before {
  content: ""; width: 28px; height: 1px; background: var(--ink-3);
}
.hero-title {
  font-family: var(--font-thai-display);
  font-size: clamp(48px, 7.6vw, 108px);
  line-height: 0.98;
  font-weight: 500;
  letter-spacing: -0.018em;
  margin: 0;
  color: var(--ink);
}
.hero-title em {
  font-family: var(--font-display);
  font-style: italic; font-weight: 400;
  color: var(--accent);
}
.hero-sub {
  font-size: 18px;
  color: var(--ink-2);
  max-width: 540px;
  margin-top: 28px;
  line-height: 1.65;
}
.hero-ctas { margin-top: 36px; display: flex; gap: 12px; flex-wrap: wrap; }

/* Hero editorial grid */
.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 56px;
  align-items: center;
}
.hero-art {
  position: relative;
  height: 560px;
}
.hero-art .frame {
  position: absolute;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: var(--bg-3);
}
.hero-art .frame-1 { width: 65%; height: 70%; top: 0; right: 0; }
.hero-art .frame-2 { width: 50%; height: 55%; bottom: 0; left: 0; z-index: 2; }
.hero-art .frame-3 {
  position: absolute;
  width: 130px; height: 130px;
  right: 8%; bottom: 12%;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  display: grid; place-items: center; text-align: center;
  font-family: var(--font-display);
  font-style: italic; font-size: 17px;
  line-height: 1.15;
  box-shadow: var(--shadow-lg);
  z-index: 3;
  animation: spin 22s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Hero variant: stacked centered */
.hero[data-layout="stacked"] .hero-grid { grid-template-columns: 1fr; text-align: center; }
.hero[data-layout="stacked"] .hero-sub { margin-left: auto; margin-right: auto; }
.hero[data-layout="stacked"] .hero-ctas { justify-content: center; }
.hero[data-layout="stacked"] .hero-eyebrow { justify-content: center; }
.hero[data-layout="stacked"] .hero-art { height: 380px; margin-top: 56px; }
.hero[data-layout="stacked"] .hero-art .frame-1 { width: 42%; left: 8%; right: auto; }
.hero[data-layout="stacked"] .hero-art .frame-2 { width: 36%; right: 14%; left: auto; bottom: 12%; top: auto; }
.hero[data-layout="stacked"] .hero-art .frame-3 { right: 4%; top: 0; bottom: auto; }

/* Hero variant: full bleed */
.hero[data-layout="bleed"] { padding: 0; }
.hero[data-layout="bleed"] .hero-inner {
  min-height: 88vh;
  position: relative;
  display: grid; place-items: end start;
  padding: 56px 0;
  overflow: hidden;
}
.hero[data-layout="bleed"] .hero-art {
  position: absolute; inset: 0; height: auto; z-index: 0;
}
.hero[data-layout="bleed"] .hero-art .frame-1 {
  width: 100%; height: 100%; top: 0; right: 0; border-radius: 0;
  filter: brightness(0.92);
}
.hero[data-layout="bleed"] .hero-art .frame-2,
.hero[data-layout="bleed"] .hero-art .frame-3 { display: none; }
.hero[data-layout="bleed"] .hero-grid {
  position: relative; z-index: 2; grid-template-columns: 1fr;
}
.hero[data-layout="bleed"] .hero-title { color: white; max-width: 760px; }
.hero[data-layout="bleed"] .hero-sub { color: rgba(255,255,255,0.85); }
.hero[data-layout="bleed"] .hero-eyebrow { color: rgba(255,255,255,0.7); }
.hero[data-layout="bleed"] .hero-eyebrow::before { background: rgba(255,255,255,0.7); }
.hero[data-layout="bleed"] .btn { color: white; border-color: rgba(255,255,255,0.4); }
.hero[data-layout="bleed"] .btn-primary { background: white; color: var(--ink); border-color: white; }

/* Marquee strip */
.marquee {
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  overflow: hidden;
  padding: 18px 0;
  background: var(--bg-2);
}
.marquee-track {
  display: flex; gap: 60px; white-space: nowrap;
  animation: marquee 36s linear infinite;
  align-items: center;
}
.marquee-track > * {
  font-family: var(--font-display);
  font-style: italic; font-size: 22px;
  color: var(--ink-2);
  display: inline-flex; align-items: center; gap: 60px;
}
.marquee-track .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ============ SECTIONS ============ */
.section { padding: 96px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 36px; margin-bottom: 56px; flex-wrap: wrap; }
.section-eyebrow {
  font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-3); display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px;
}
.section-eyebrow::before { content: ""; width: 24px; height: 1px; background: var(--ink-3); }
.section-title {
  font-family: var(--font-thai-display);
  font-size: clamp(36px, 4.5vw, 60px);
  line-height: 1.05; font-weight: 500; letter-spacing: -0.015em;
  margin: 0;
  max-width: 720px;
  text-wrap: balance;
}
.section-title em { font-family: var(--font-display); font-style: italic; color: var(--accent); }
.section-blurb { color: var(--ink-2); max-width: 380px; font-size: 16px; }

/* ============ COURSES ============ */
.course-filters {
  display: flex; gap: 10px; flex-wrap: wrap;
  margin-bottom: 36px;
  align-items: center;
}
.filter-label { font-size: 12px; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.12em; margin-right: 8px; }
.chip {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-2);
  background: transparent;
  transition: all 0.18s;
}
.chip:hover { color: var(--ink); border-color: var(--ink-2); }
.chip.active {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
[data-theme="dark"] .chip.active { background: var(--brand); color: oklch(0.18 0.015 50); }

.courses-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
}
.course-card {
  grid-column: span 4;
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex; flex-direction: column; gap: 16px;
  transition: all 0.28s cubic-bezier(.2,.7,.2,1);
  position: relative;
  overflow: hidden;
}
.course-card.feature { grid-column: span 8; flex-direction: row; padding: 36px; gap: 36px; }
.course-card.feature .course-art { flex: 1; min-height: 280px; }
.course-card.feature .course-body { flex: 1; }
.course-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--line);
}
.course-card .course-art {
  border-radius: var(--radius);
  height: 180px;
  background: var(--bg-3);
  position: relative;
  overflow: hidden;
  display: grid; place-items: center;
}
.course-art-svg { width: 100%; height: 100%; display: block; }
.course-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.course-tag {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-2);
  color: var(--ink-2);
  letter-spacing: 0.04em;
  border: 1px solid var(--line-soft);
}
.course-card h3 {
  font-family: var(--font-thai-display);
  font-size: 26px; font-weight: 500;
  margin: 4px 0 0; letter-spacing: -0.01em;
  line-height: 1.15;
}
.course-card.feature h3 { font-size: 38px; }
.course-card p { color: var(--ink-2); margin: 0; font-size: 15px; line-height: 1.6; }
.course-foot {
  margin-top: auto;
  display: flex; justify-content: space-between; align-items: baseline;
  padding-top: 12px;
  border-top: 1px dashed var(--line-soft);
}
.course-price { font-family: var(--font-display); font-style: italic; font-size: 22px; color: var(--ink); }
.course-price small { font-style: normal; font-family: var(--font-body); font-size: 12px; color: var(--ink-3); margin-left: 4px; }
.course-arrow {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--line);
  display: grid; place-items: center;
  transition: all 0.2s;
}
.course-card:hover .course-arrow { background: var(--accent); border-color: var(--accent); color: white; transform: rotate(-45deg); }

/* ============ TEACHERS ============ */
.teachers-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.teacher-card {
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.25s;
}
.teacher-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.teacher-portrait {
  aspect-ratio: 4/5;
  background: var(--bg-3);
  position: relative; overflow: hidden;
}
.teacher-portrait svg { width: 100%; height: 100%; }
.teacher-body { padding: 22px; }
.teacher-body h4 {
  font-family: var(--font-thai-display);
  font-size: 22px; margin: 0 0 4px; font-weight: 500;
  letter-spacing: -0.005em;
}
.teacher-body .role {
  font-size: 13px; color: var(--accent); margin-bottom: 12px;
  font-family: var(--font-display); font-style: italic;
}
.teacher-body .meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 0; }

/* ============ SCHEDULE STRIP ============ */
.schedule-strip {
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--radius-xl);
  padding: 56px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: center;
  position: relative;
  overflow: hidden;
}
[data-theme="dark"] .schedule-strip { background: var(--bg-2); color: var(--ink); border: 1px solid var(--line); }
.schedule-strip h2 {
  font-family: var(--font-thai-display);
  font-size: clamp(32px, 3.8vw, 52px);
  line-height: 1.05; margin: 0; font-weight: 500; letter-spacing: -0.015em;
}
.schedule-strip h2 em { font-family: var(--font-display); font-style: italic; color: var(--accent-2); }
[data-theme="dark"] .schedule-strip h2 em { color: var(--accent); }
.schedule-strip p { color: oklch(0.85 0.012 75); margin: 18px 0 0; font-size: 16px; }
[data-theme="dark"] .schedule-strip p { color: var(--ink-2); }
.schedule-week {
  background: oklch(0.28 0.025 55);
  border-radius: var(--radius);
  padding: 22px;
}
[data-theme="dark"] .schedule-week { background: var(--bg-3); }
.schedule-week .week-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
  font-family: var(--font-display); font-style: italic; font-size: 18px;
}
.schedule-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  font-size: 11px;
  text-align: center;
}
.schedule-grid .day-name { padding: 4px 0; opacity: 0.5; font-size: 10px; letter-spacing: 0.1em; }
.schedule-grid .slot {
  padding: 10px 4px;
  background: oklch(0.32 0.03 55);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}
[data-theme="dark"] .schedule-grid .slot { background: var(--bg-card); }
.schedule-grid .slot:hover { background: var(--accent); transform: scale(1.04); }
.schedule-grid .slot.taken { opacity: 0.3; background: oklch(0.24 0.02 55); cursor: not-allowed; }
.schedule-grid .slot.free { background: oklch(0.42 0.03 55); }
.schedule-strip.schedule-strip--single {
  grid-template-columns: 1fr;
  text-align: center;
  padding: 72px 56px;
}
.schedule-strip.schedule-strip--single h2 { max-width: 720px; margin: 0 auto; }
.schedule-strip.schedule-strip--single p { max-width: 540px; margin: 18px auto 0; }
.schedule-strip.schedule-strip--single .section-eyebrow { justify-content: center; }

/* ============ PRICING ============ */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);
}
.price-col {
  padding: 36px 32px;
  border-right: 1px solid var(--line-soft);
  display: flex; flex-direction: column;
}
.price-col:last-child { border-right: none; }
.price-col.featured {
  background: var(--ink);
  color: var(--bg);
  position: relative;
}
[data-theme="dark"] .price-col.featured { background: var(--bg-3); color: var(--ink); }
.price-col h4 {
  font-family: var(--font-thai-display);
  font-size: 24px; font-weight: 500; margin: 0;
}
.price-col .price-num {
  font-family: var(--font-display);
  font-style: italic; font-size: 56px;
  font-weight: 500;
  line-height: 1; margin: 20px 0 8px;
  letter-spacing: -0.02em;
}
.price-col .price-num sup { font-size: 18px; vertical-align: top; margin-right: 4px; }
.price-col .price-per { font-size: 13px; color: var(--ink-3); }
.price-col.featured .price-per { color: oklch(0.75 0.012 75); }
[data-theme="dark"] .price-col.featured .price-per { color: var(--ink-3); }
.price-col ul { list-style: none; padding: 0; margin: 28px 0 28px; display: flex; flex-direction: column; gap: 10px; font-size: 14px; flex: 1; }
.price-col li::before { content: "+"; margin-right: 10px; color: var(--accent); }
.price-col.featured li::before { color: var(--accent-2); }
[data-theme="dark"] .price-col.featured li::before { color: var(--accent); }

/* ============ GALLERY ============ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 200px;
  grid-auto-flow: dense;
  gap: 12px;
}
.gallery-item {
  background: var(--bg-3);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}
.gallery-item.tall { grid-row: span 2; }
.gallery-item.wide { grid-column: span 2; }
.gallery-item svg { width: 100%; height: 100%; }
.gallery-cap {
  position: absolute; bottom: 12px; left: 14px;
  font-size: 12px; color: white;
  background: oklch(0 0 0 / 0.5);
  padding: 4px 10px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
}

/* ============ REVIEWS ============ */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.review-card {
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex; flex-direction: column; gap: 18px;
  position: relative;
}
.review-quote {
  font-family: var(--font-thai-display);
  font-size: 19px;
  line-height: 1.5;
  letter-spacing: -0.005em;
  color: var(--ink);
}
.review-quote::before {
  content: "\201C";
  font-family: var(--font-display);
  font-size: 80px; line-height: 0.1;
  color: var(--accent); display: block;
  height: 24px; margin-bottom: 8px;
}
.review-foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 16px; border-top: 1px dashed var(--line-soft); }
.review-author { display: flex; flex-direction: column; gap: 2px; }
.review-author .name { font-weight: 500; font-size: 14px; }
.review-author .who { font-size: 12px; color: var(--ink-3); }
.stars { color: var(--accent); font-size: 14px; letter-spacing: 0.05em; }

/* ============ ARTICLES ============ */
.articles-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.article-card {
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.25s;
  display: flex; flex-direction: column;
}
.article-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.article-cover {
  aspect-ratio: 16/10;
  background: var(--bg-3);
  position: relative; overflow: hidden;
}
.article-cover svg { width: 100%; height: 100%; }
.article-cover img { width: 100%; height: 100%; object-fit: cover; }
.article-body { padding: 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.article-meta { display: flex; gap: 10px; font-size: 11px; color: var(--ink-3); letter-spacing: 0.06em; text-transform: uppercase; }
.article-card h3 {
  font-family: var(--font-thai-display);
  font-size: 22px; margin: 0; font-weight: 500; line-height: 1.2;
  letter-spacing: -0.005em;
}
.article-card p { margin: 0; color: var(--ink-2); font-size: 14px; line-height: 1.55; }
.article-foot { margin-top: auto; padding-top: 8px; font-size: 12px; color: var(--ink-3); display: flex; justify-content: space-between; }

/* Article view */
.article-view { max-width: 760px; margin: 64px auto; padding: 0 28px; }
.article-view h1 {
  font-family: var(--font-thai-display);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 500; line-height: 1.08; margin: 8px 0 24px; letter-spacing: -0.015em;
}
.article-view .article-cover { aspect-ratio: 16/9; border-radius: var(--radius-lg); margin-bottom: 36px; }
.article-view .content { font-size: 17px; line-height: 1.75; color: var(--ink); white-space: pre-wrap; }
.article-view .content p { margin: 0 0 1em; }
.article-view .back { margin-bottom: 24px; }

/* Admin / Editor */
.editor-shell {
  max-width: 900px; margin: 64px auto; padding: 0 28px;
}
.editor-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 36px;
}
.editor-card h2 {
  font-family: var(--font-thai-display);
  font-size: 32px; margin: 0 0 8px; font-weight: 500;
}
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.field label { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.field input, .field textarea, .field select {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); }
.field textarea { min-height: 240px; font-family: inherit; resize: vertical; line-height: 1.6; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.editor-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 18px; }

/* Admin list */
.admin-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 0; border-bottom: 1px solid var(--line-soft);
  gap: 16px;
}
.admin-row .title-line { flex: 1; }
.admin-row .title-line h4 { margin: 0 0 4px; font-family: var(--font-thai-display); font-size: 18px; font-weight: 500; }
.admin-row .title-line .meta { font-size: 12px; color: var(--ink-3); }

/* ============ CONTACT / FOOTER ============ */
.contact-grid {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: start;
}
.contact-info-list { display: flex; flex-direction: column; gap: 24px; margin-top: 36px; }
.contact-item { display: flex; gap: 14px; align-items: flex-start; }
.contact-item .ic {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bg-2); border: 1px solid var(--line-soft);
  display: grid; place-items: center;
  flex-shrink: 0;
  font-family: var(--font-display); font-style: italic; font-size: 16px;
  color: var(--accent);
}
.contact-item .label { font-size: 12px; color: var(--ink-3); letter-spacing: 0.08em; text-transform: uppercase; }
.contact-item .val { font-family: var(--font-thai-display); font-size: 20px; }

.map-card {
  background: var(--bg-2); border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  aspect-ratio: 4/5;
  position: relative; overflow: hidden;
}
.map-svg { width: 100%; height: 100%; }
.map-pin {
  position: absolute; top: 46%; left: 52%;
  width: 18px; height: 18px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 6px color-mix(in oklch, var(--accent) 30%, transparent), 0 0 0 14px color-mix(in oklch, var(--accent) 12%, transparent);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 6px color-mix(in oklch, var(--accent) 30%, transparent), 0 0 0 14px color-mix(in oklch, var(--accent) 12%, transparent); }
  50% { box-shadow: 0 0 0 10px color-mix(in oklch, var(--accent) 25%, transparent), 0 0 0 22px color-mix(in oklch, var(--accent) 8%, transparent); }
}

.footer {
  padding: 64px 0 36px;
  border-top: 1px solid var(--line-soft);
  background: var(--bg-2);
  margin-top: 64px;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; margin-bottom: 36px; }
.footer h5 { font-family: var(--font-thai-display); font-size: 16px; font-weight: 500; margin: 0 0 16px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer a { color: var(--ink-2); font-size: 14px; }
.footer a:hover { color: var(--ink); }
.footer-base {
  border-top: 1px solid var(--line-soft);
  padding-top: 24px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-size: 12px; color: var(--ink-3);
}

/* ============ MODAL ============ */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: oklch(0.18 0.013 50 / 0.55);
  backdrop-filter: blur(6px);
  display: grid; place-items: center;
  padding: 36px;
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  max-width: 900px; width: 100%;
  max-height: 86vh; overflow: auto;
  display: grid; grid-template-columns: 1.1fr 1.4fr;
  gap: 0;
  box-shadow: var(--shadow-lg);
  animation: pop 0.25s ease;
}
@keyframes pop { from { transform: scale(0.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-portrait { background: var(--bg-3); position: relative; }
.modal-portrait svg { width: 100%; height: 100%; }
.modal-body { padding: 44px; }
.modal-body h3 { font-family: var(--font-thai-display); font-size: 36px; margin: 0 0 4px; font-weight: 500; line-height: 1.1; }
.modal-body .role { color: var(--accent); font-family: var(--font-display); font-style: italic; font-size: 16px; margin-bottom: 24px; }
.modal-body p { color: var(--ink-2); line-height: 1.7; }
.modal-close {
  position: absolute; top: 18px; right: 18px;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--bg-card); border: 1px solid var(--line);
  display: grid; place-items: center;
  z-index: 2;
}
.modal-skills { display: flex; flex-direction: column; gap: 10px; margin: 24px 0; }
.modal-achievements { margin: 24px 0 0; padding: 18px 0 0; border-top: 1px dashed var(--line-soft); }
.modal-achievements .ach-head {
  font-size: 12px; color: var(--ink-3);
  letter-spacing: 0.1em; text-transform: uppercase;
  margin-bottom: 12px;
}
.modal-achievements ul {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 8px;
}
.modal-achievements li {
  font-size: 14px; line-height: 1.55;
  color: var(--ink-2);
  padding-left: 18px;
  position: relative;
}
.modal-achievements li::before {
  content: "";
  position: absolute; left: 0; top: 9px;
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
}
.skill-row { display: flex; align-items: center; gap: 12px; }
.skill-row .name { width: 110px; font-size: 13px; }
.skill-row .bar { flex: 1; height: 6px; background: var(--bg-2); border-radius: 3px; overflow: hidden; }
.skill-row .bar-fill { height: 100%; background: var(--accent); border-radius: 3px; }
.skill-row .val { font-size: 12px; color: var(--ink-3); font-family: var(--font-display); font-style: italic; }

/* ============ BOOKING ============ */
.booking-shell {
  background: var(--bg-2);
  border-radius: var(--radius-xl);
  padding: 56px;
  border: 1px solid var(--line-soft);
}
.booking-progress { display: flex; gap: 8px; margin-bottom: 36px; }
.progress-step {
  flex: 1; height: 4px; background: var(--line-soft); border-radius: 2px; overflow: hidden;
}
.progress-step.active { background: var(--accent); }
.progress-step.done { background: var(--ink); }
[data-theme="dark"] .progress-step.done { background: var(--brand); }
.booking-step h3 { font-family: var(--font-thai-display); font-size: 32px; font-weight: 500; margin: 0 0 8px; }
.booking-step .step-sub { color: var(--ink-2); margin-bottom: 28px; font-size: 15px; }
.step-meta { font-size: 12px; color: var(--ink-3); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 10px; }
.option-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.option-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer; transition: all 0.18s;
  text-align: left;
}
.option-card:hover { border-color: var(--ink-2); }
.option-card.selected { border-color: var(--accent); background: color-mix(in oklch, var(--accent) 6%, var(--bg-card)); }
.option-card .opt-ic {
  font-family: var(--font-display); font-style: italic;
  font-size: 28px; color: var(--accent); margin-bottom: 6px;
}
.option-card .opt-name { font-family: var(--font-thai-display); font-size: 18px; font-weight: 500; }
.option-card .opt-desc { font-size: 12px; color: var(--ink-3); margin-top: 4px; }
.booking-actions { display: flex; justify-content: space-between; margin-top: 32px; }
.booking-summary {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid var(--line-soft);
  display: flex; flex-direction: column; gap: 12px;
}
.summary-row { display: flex; justify-content: space-between; font-size: 14px; }
.summary-row .k { color: var(--ink-3); }
.summary-row .v { font-family: var(--font-thai-display); }

/* ============ RESPONSIVE ============ */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { height: 380px; margin-top: 36px; }
  .nav-links { display: none; }
  .courses-grid { grid-template-columns: 1fr 1fr; }
  .course-card, .course-card.feature { grid-column: span 1; flex-direction: column; padding: 24px; }
  .teachers-grid { grid-template-columns: 1fr 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .price-col { border-right: none; border-bottom: 1px solid var(--line-soft); }
  .articles-list, .reviews-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 140px; }
  .contact-grid { grid-template-columns: 1fr; }
  .modal { grid-template-columns: 1fr; max-height: 90vh; }
  .modal-portrait { aspect-ratio: 1.4; }
  .schedule-strip { grid-template-columns: 1fr; padding: 36px; }
  .booking-shell { padding: 28px; }
  .option-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .section { padding: 64px 0; }
}
@media (max-width: 560px) {
  .courses-grid, .teachers-grid, .gallery-grid { grid-template-columns: 1fr; }
  .hero { padding: 48px 0 64px; }
  .container { padding: 0 20px; }
}
