/* ===== Base & tokens ===== */
:root {
  --color-bg: #0f1210;
  --color-bg-alt: #161b17;
  --color-surface: #1b211c;
  --color-surface-2: #212820;
  --color-border: rgba(212, 175, 106, 0.18);
  --color-text: #f1ede3;
  --color-text-muted: #b9b3a4;
  --color-gold: #d4af6a;
  --color-gold-light: #e9cf9a;
  --color-red: #8e2a2a;
  --color-red-light: #b23a3a;
  --radius: 14px;
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.45);
  --container-w: 1140px;
  --font-heading: "Noto Serif Thai", "Noto Sans SC", serif;
  --font-body: "Prompt", "Noto Sans SC", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--color-gold-light);
  margin: 0 0 0.6em;
  line-height: 1.3;
}

p { margin: 0 0 1em; }
ul { padding: 0; margin: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 24px;
}

.bg-pattern {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 15% 10%, rgba(142, 42, 42, 0.16), transparent 45%),
    radial-gradient(circle at 85% 20%, rgba(212, 175, 106, 0.1), transparent 40%),
    radial-gradient(circle at 50% 100%, rgba(212, 175, 106, 0.06), transparent 55%),
    var(--color-bg);
}

.section-eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  color: var(--color-gold);
  text-transform: uppercase;
  margin-bottom: 0.8em;
  font-weight: 500;
}
.section-eyebrow.center { display: block; text-align: center; }
.section-head { max-width: 640px; margin: 0 auto 56px; }
h2.center { text-align: center; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 30px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn-primary {
  background: linear-gradient(135deg, var(--color-gold-light), var(--color-gold));
  color: #221605;
  box-shadow: 0 10px 30px rgba(212, 175, 106, 0.25);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 36px rgba(212, 175, 106, 0.35); }
.btn-outline {
  background: transparent;
  border-color: var(--color-border);
  color: var(--color-gold-light);
}
.btn-outline:hover { background: rgba(212, 175, 106, 0.08); transform: translateY(-2px); }
.btn-block { width: 100%; }

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 18, 16, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--color-gold-light);
}
.logo-symbol { font-size: 1.4rem; color: var(--color-gold); }

.nav { display: flex; align-items: center; gap: 30px; }
.nav a {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  transition: color 0.2s ease;
}
.nav a:hover { color: var(--color-gold-light); }
.nav-cta {
  padding: 10px 20px;
  border-radius: 999px;
  background: rgba(212, 175, 106, 0.12);
  border: 1px solid var(--color-border);
  color: var(--color-gold-light) !important;
}
.nav-cta:hover { background: rgba(212, 175, 106, 0.2); }

.lang-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-left: 6px;
}
.lang-btn {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text-muted);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.lang-btn:hover { color: var(--color-gold-light); border-color: rgba(212, 175, 106, 0.4); }
.lang-btn.is-active {
  background: var(--color-gold);
  border-color: var(--color-gold);
  color: #221605;
  font-weight: 700;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--color-gold-light);
  border-radius: 2px;
}

/* ===== Hero ===== */
.hero { padding: 90px 0 70px; overflow: hidden; }
.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 50px;
}
.eyebrow {
  color: var(--color-gold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.85rem;
  margin-bottom: 1em;
}
.hero h1 {
  font-size: clamp(2rem, 4vw, 3.1rem);
  margin-bottom: 0.5em;
}
.accent { color: var(--color-gold); }
.hero-desc {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  max-width: 520px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin: 28px 0 44px; }
.hero-stats { display: flex; gap: 40px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; }
.stat-num { font-family: var(--font-heading); font-size: 1.8rem; color: var(--color-gold-light); font-weight: 700; }
.stat-label { color: var(--color-text-muted); font-size: 0.85rem; }

.hero-visual { display: flex; align-items: center; justify-content: center; position: relative; }
.bagua-ring {
  width: 340px;
  height: 340px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background:
    conic-gradient(from 0deg, rgba(212,175,106,0.12), rgba(142,42,42,0.12), rgba(212,175,106,0.12));
  animation: spin 40s linear infinite;
}
.bagua-ring::before {
  content: "";
  position: absolute;
  inset: 20px;
  border-radius: 50%;
  border: 1px dashed var(--color-border);
}
.bagua-core {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--color-gold-light), var(--color-gold) 60%, #7a5a20 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: #1c1206;
  box-shadow: var(--shadow-lg);
  animation: spin 40s linear infinite reverse;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== About ===== */
.about { padding: 90px 0; background: var(--color-bg-alt); }
.about-inner {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 60px;
  align-items: center;
}
.about-portrait { position: relative; }
.portrait-frame {
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--color-surface-2), var(--color-surface));
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: 0.95rem;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.portrait-badge {
  position: absolute;
  bottom: -20px;
  right: -20px;
  background: var(--color-red);
  color: #fbe9c8;
  padding: 18px 22px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.badge-num { font-family: var(--font-heading); font-size: 1.6rem; font-weight: 700; }
.badge-text { font-size: 0.78rem; text-align: center; opacity: 0.9; }

.about-role { color: var(--color-gold); font-weight: 500; margin-bottom: 0.8em; }
.about-text { color: var(--color-text-muted); }
.about-list { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }
.about-list li { display: flex; align-items: flex-start; gap: 10px; color: var(--color-text); }
.check { color: var(--color-gold); font-weight: 700; }

/* ===== Services ===== */
.services { padding: 90px 0; }
.service-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.service-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 32px 26px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.service-card:hover { transform: translateY(-6px); border-color: rgba(212,175,106,0.4); }
.service-icon { font-size: 2rem; margin-bottom: 14px; }
.service-card h3 { font-size: 1.1rem; margin-bottom: 0.5em; }
.service-card p { color: var(--color-text-muted); font-size: 0.92rem; margin: 0; }

/* ===== Experience / Timeline ===== */
.experience { padding: 90px 0; background: var(--color-bg-alt); }
.timeline {
  position: relative;
  max-width: 760px;
  margin: 0 auto 70px;
  padding-left: 30px;
  border-left: 1px solid var(--color-border);
}
.timeline-item { position: relative; padding-bottom: 42px; padding-left: 30px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute;
  left: -37px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-gold);
  box-shadow: 0 0 0 4px rgba(212, 175, 106, 0.18);
}
.timeline-year {
  display: inline-block;
  color: var(--color-gold);
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 6px;
}
.timeline-content h3 { font-size: 1.15rem; margin-bottom: 0.4em; }
.timeline-content p { color: var(--color-text-muted); margin: 0; font-size: 0.95rem; }

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.portfolio-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s ease;
}
.portfolio-card:hover { transform: translateY(-6px); }
.portfolio-photo { aspect-ratio: 4 / 3; overflow: hidden; }
.portfolio-photo img { width: 100%; height: 100%; object-fit: cover; }
.portfolio-body { padding: 22px 24px 26px; }
.portfolio-card h4 { font-size: 1.02rem; margin-bottom: 0.5em; color: var(--color-gold-light); font-family: var(--font-heading); }
.portfolio-card p { color: var(--color-text-muted); font-size: 0.9rem; margin: 0; }

/* ===== Gallery ===== */
.gallery { padding: 90px 0; background: var(--color-bg-alt); }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.gallery-item {
  display: block;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--color-border);
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.gallery-item:hover img { transform: scale(1.06); }

/* ===== Videos ===== */
.video-section { padding: 90px 0; }
.video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.video-item {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: #000;
}
.video-item video {
  width: 100%;
  height: 100%;
  aspect-ratio: 9 / 16;
  display: block;
  object-fit: cover;
  background: #000;
}

/* ===== Testimonials ===== */
.testimonials { padding: 90px 0; }
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.testimonial-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 30px 26px;
}
.testimonial-text { color: var(--color-text); font-style: italic; margin-bottom: 22px; }
.testimonial-author { display: flex; align-items: center; gap: 12px; }
.author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-gold-light), var(--color-red-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #1c1206;
  flex-shrink: 0;
}
.author-name { display: block; font-weight: 600; color: var(--color-gold-light); font-size: 0.92rem; }
.author-role { display: block; color: var(--color-text-muted); font-size: 0.82rem; }

/* ===== Contact ===== */
.contact { padding: 90px 0; background: var(--color-bg-alt); }
.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}
.contact-desc { color: var(--color-text-muted); }
.contact-list { display: flex; flex-direction: column; gap: 14px; margin-top: 24px; }
.contact-list li { display: flex; align-items: center; gap: 12px; color: var(--color-text); }
.contact-icon { font-size: 1.1rem; }

.contact-form {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-lg);
}
.form-row { margin-bottom: 18px; }
.form-row label { display: block; margin-bottom: 8px; font-size: 0.88rem; color: var(--color-text-muted); }
.form-row input,
.form-row textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--color-border);
  background: var(--color-surface-2);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  resize: vertical;
}
.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--color-gold);
}

/* ===== Footer ===== */
.site-footer { padding: 40px 0; border-top: 1px solid var(--color-border); }
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}
.footer-logo { display: flex; align-items: center; gap: 8px; color: var(--color-gold-light); font-family: var(--font-heading); font-weight: 600; }
.footer-note { color: var(--color-text-muted); font-size: 0.85rem; margin: 0; }

/* ===== Floating CTA ===== */
.float-cta {
  position: fixed;
  bottom: 26px;
  right: 26px;
  background: linear-gradient(135deg, var(--color-gold-light), var(--color-gold));
  color: #221605;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 600;
  box-shadow: 0 14px 34px rgba(212, 175, 106, 0.35);
  z-index: 40;
  transition: transform 0.2s ease, opacity 0.25s ease;
}
.float-cta:hover { transform: translateY(-3px); }
.float-cta.is-hidden { opacity: 0; pointer-events: none; }

/* ===== Reveal animation ===== */
.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .about-inner { grid-template-columns: 1fr; }
  .contact-inner { grid-template-columns: 1fr; }
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
  .testimonial-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .video-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .nav {
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--color-bg-alt);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 24px 28px;
    gap: 18px;
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav-toggle { display: flex; }
  .lang-switch { padding-left: 0; padding-top: 14px; margin-top: 4px; border-top: 1px solid var(--color-border); width: 100%; }
  .service-grid { grid-template-columns: 1fr; }
  .portfolio-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 24px; }
  .float-cta { padding: 12px 18px; font-size: 0.9rem; }
  .portrait-badge { right: 8px; bottom: -16px; padding: 12px 16px; }
  .badge-num { font-size: 1.3rem; }
  .badge-text { font-size: 0.7rem; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .video-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .hero-break { display: none; }
  .bagua-ring { width: 240px; height: 240px; }
  .bagua-core { width: 106px; height: 106px; font-size: 2.8rem; }
  .hero, .about, .services, .experience, .gallery, .video-section, .testimonials, .contact {
    padding-top: 64px;
    padding-bottom: 64px;
  }
}

@media (max-width: 420px) {
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { text-align: center; }
}
