:root {
  --bg: #f5f4f1;
  --surface: #ffffff;
  --text: #2a2a28;
  --muted: #6b6b66;
  --accent: #3d5a4c;
  --accent-hover: #2f463c;
  --accent-soft: #e8ede9;
  --warm: #c4a574;
  --border: #e0ded8;
  --error: #9b3b2e;
  --success: #2f5d45;
  --radius: 4px;
  --shadow: 0 12px 40px rgba(42, 42, 40, 0.06);
  --font-display: "Prompt", sans-serif;
  --font-body: "Sarabun", sans-serif;
  --space: clamp(1rem, 2vw, 1.5rem);
  --max: 1120px;
  --header-h: 4.25rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(61, 90, 76, 0.07), transparent),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(196, 165, 116, 0.08), transparent);
  min-height: 100vh;
}

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

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-hover);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0 0 0.75rem;
}

h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1rem; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 1000;
}

.skip-link:focus {
  top: 1rem;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 244, 241, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 1rem;
}

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.brand:hover { color: var(--accent); }

.nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}

.nav-list a:hover,
.nav-list a[aria-current="page"] {
  color: var(--accent);
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  display: block;
  width: 1.1rem;
  height: 2px;
  background: var(--text);
  position: relative;
}

.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle-bar::before { top: -6px; }
.nav-toggle-bar::after { top: 6px; }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: var(--header-h);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 1rem;
    display: none;
  }
  .site-nav.is-open { display: block; animation: fadeSlide 0.25s ease; }
  .nav-list { flex-direction: column; gap: 0.75rem; }
}

@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes riseIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.reveal {
  animation: riseIn 0.7s ease both;
}

.reveal-delay { animation-delay: 0.15s; }
.reveal-delay-2 { animation-delay: 0.3s; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.75rem 1.35rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* Hero */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  display: grid;
  align-items: end;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(42, 42, 40, 0.72) 0%,
    rgba(42, 42, 40, 0.35) 45%,
    rgba(42, 42, 40, 0.15) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: clamp(3rem, 8vw, 6rem) 0;
  color: #f8f7f4;
  max-width: 36rem;
}

.hero-content .brand-hero {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5.5vw, 3.75rem);
  font-weight: 700;
  margin: 0 0 0.75rem;
  color: #fff;
  letter-spacing: -0.02em;
}

.hero-content h1 {
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  font-weight: 500;
  color: rgba(248, 247, 244, 0.92);
  margin-bottom: 0.75rem;
}

.hero-content p {
  color: rgba(248, 247, 244, 0.82);
  font-size: 1.05rem;
}

.hero .btn-primary {
  background: #fff;
  color: var(--accent);
}

.hero .btn-primary:hover {
  background: var(--accent-soft);
  color: var(--accent-hover);
}

.hero .btn-ghost {
  border-color: rgba(255, 255, 255, 0.45);
  color: #fff;
}

.hero .btn-ghost:hover {
  border-color: #fff;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

/* Sections */
.section {
  padding: clamp(3rem, 7vw, 5.5rem) 0;
}

.section-alt {
  background: var(--surface);
  border-block: 1px solid var(--border);
}

.section-intro {
  max-width: 38rem;
  margin-bottom: 2.5rem;
}

.section-intro p {
  color: var(--muted);
}

.eyebrow {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--warm);
  margin-bottom: 0.5rem;
}

/* Offer list */
.offer-list {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 720px) {
  .offer-list { grid-template-columns: repeat(3, 1fr); }
}

.offer-item {
  padding: 0;
}

.offer-item img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  margin-bottom: 1rem;
  filter: saturate(0.9);
}

.offer-item h3 {
  margin-bottom: 0.4rem;
}

.offer-item p {
  color: var(--muted);
  font-size: 0.98rem;
}

.offer-item a.more {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
}

/* Split */
.split {
  display: grid;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 800px) {
  .split { grid-template-columns: 1.05fr 0.95fr; gap: 3rem; }
  .split-reverse { direction: rtl; }
  .split-reverse > * { direction: ltr; }
}

.split-visual img {
  width: 100%;
  aspect-ratio: 5/4;
  object-fit: cover;
  box-shadow: var(--shadow);
}

/* Quote */
.quote-block {
  max-width: 40rem;
  margin: 0 auto;
  text-align: center;
}

.quote-block blockquote {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.5vw, 1.55rem);
  font-weight: 500;
  line-height: 1.5;
  margin: 0 0 1rem;
  color: var(--text);
}

.quote-block cite {
  font-style: normal;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Page hero (inner) */
.page-hero {
  padding: clamp(2.5rem, 6vw, 4rem) 0 2rem;
}

.page-hero h1 {
  max-width: 20ch;
}

.page-hero p.lead {
  max-width: 40rem;
  color: var(--muted);
  font-size: 1.1rem;
}

.page-hero-image {
  margin-top: 2rem;
}

.page-hero-image img {
  width: 100%;
  max-height: 380px;
  object-fit: cover;
}

/* Cards for interactive forms / pricing rows — interaction containers */
.price-table {
  width: 100%;
  border-collapse: collapse;
}

.price-table th,
.price-table td {
  text-align: left;
  padding: 1rem 0.75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.price-table th {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--muted);
  font-size: 0.85rem;
}

.price-note {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 1.5rem;
}

/* Reviews */
.review-grid {
  display: grid;
  gap: 1.75rem;
}

@media (min-width: 700px) {
  .review-grid { grid-template-columns: 1fr 1fr; }
}

.review-item {
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
}

.review-item p {
  margin-bottom: 0.75rem;
}

.review-meta {
  font-size: 0.9rem;
  color: var(--muted);
}

.review-meta strong {
  color: var(--text);
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
}

/* Blog */
.blog-list {
  display: grid;
  gap: 2rem;
}

@media (min-width: 700px) {
  .blog-list { grid-template-columns: 1fr 1fr; }
}

.blog-item img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  margin-bottom: 1rem;
}

.blog-item time {
  font-size: 0.85rem;
  color: var(--muted);
}

.blog-item h2 {
  font-size: 1.3rem;
}

.blog-item h2 a {
  color: var(--text);
  text-decoration: none;
}

.blog-item h2 a:hover { color: var(--accent); }

.prose {
  max-width: 42rem;
}

.prose h2 { margin-top: 2.5rem; }
.prose ul, .prose ol { padding-left: 1.25rem; margin-bottom: 1rem; }
.prose li { margin-bottom: 0.4rem; }

.article-cover {
  margin: 1.5rem 0 2rem;
}

.article-cover img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
}

/* Forms */
.form {
  max-width: 36rem;
  display: grid;
  gap: 1.1rem;
}

.form-field label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  font: inherit;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.2s ease;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: 2px solid var(--accent-soft);
  border-color: var(--accent);
}

.form-field .error-msg {
  color: var(--error);
  font-size: 0.85rem;
  margin-top: 0.3rem;
  display: none;
}

.form-field.has-error .error-msg { display: block; }
.form-field.has-error input,
.form-field.has-error select,
.form-field.has-error textarea {
  border-color: var(--error);
}

.form-status {
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  display: none;
  font-size: 0.95rem;
}

.form-status.is-success {
  display: block;
  background: var(--accent-soft);
  color: var(--success);
}

.form-status.is-error {
  display: block;
  background: #f8eae7;
  color: var(--error);
}

.contact-aside {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.contact-aside p { margin-bottom: 0.5rem; }

/* Curriculum timeline */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 2px solid var(--border);
}

.timeline li {
  padding: 0 0 2rem 1.5rem;
  position: relative;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 0.4rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}

.timeline h3 { margin-bottom: 0.35rem; }
.timeline p { color: var(--muted); margin: 0; }

/* FAQ */
.faq-list {
  max-width: 40rem;
}

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 0;
}

.faq-item h3 {
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}

.faq-item p {
  color: var(--muted);
  margin: 0;
}

/* Footer */
.site-footer {
  background: #2a2a28;
  color: rgba(245, 244, 241, 0.78);
  padding: 3rem 0 1.5rem;
  margin-top: 2rem;
}

.site-footer a {
  color: rgba(245, 244, 241, 0.88);
  text-decoration: none;
}

.site-footer a:hover { color: #fff; }

.footer-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 700px) {
  .footer-grid { grid-template-columns: 1.2fr 1.4fr 1fr; }
}

.footer-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: #fff;
  margin-bottom: 0.4rem;
}

.footer-tag { font-size: 0.95rem; }

.footer-links ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links li { margin-bottom: 0.35rem; }

.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.85rem;
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--surface);
  border-top: 1px solid var(--border);
  box-shadow: 0 -8px 30px rgba(42, 42, 40, 0.08);
  padding: 1.25rem 0;
  animation: fadeSlide 0.35s ease;
}

.cookie-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.cookie-inner p {
  margin: 0;
  flex: 1 1 16rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.cookie-actions {
  display: flex;
  gap: 0.5rem;
}

/* 404 */
.error-page {
  min-height: 60vh;
  display: grid;
  place-content: center;
  text-align: center;
  padding: 3rem 1rem;
}

.error-page .code {
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0;
  line-height: 1;
}

/* Legal */
.legal {
  max-width: 44rem;
}

.legal h2 {
  margin-top: 2.25rem;
  font-size: 1.25rem;
}

.legal table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin: 1rem 0;
}

.legal th,
.legal td {
  border: 1px solid var(--border);
  padding: 0.6rem 0.75rem;
  text-align: left;
  vertical-align: top;
}

.legal th {
  background: var(--accent-soft);
  font-family: var(--font-display);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
