/* ============================================================
   The Reset Lab — Main Stylesheet
   Depends on tokens.css (must be loaded first)
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: "Inter", "Noto Sans Thai", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--rl-navy);
  background: var(--rl-off-white);
  -webkit-font-smoothing: antialiased;
}

html[lang="th"] body, body.lang-th {
  font-family: "Noto Sans Thai", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
}

a { color: var(--rl-teal-deep); text-decoration: none; transition: color 250ms var(--ease-std); }
a:hover { color: var(--rl-navy); }
img { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.25;
  color: var(--rl-navy);
}
h1 { font-size: clamp(36px, 5vw, 56px); line-height: 1.1; }
h2 { font-size: clamp(26px, 3.5vw, 40px); }
h3 { font-size: clamp(20px, 2.5vw, 26px); }
h4 { font-size: 19px; line-height: 1.4; }

html[lang="th"] h1, html[lang="th"] h2, html[lang="th"] h3, html[lang="th"] h4,
body.lang-th h1, body.lang-th h2, body.lang-th h3, body.lang-th h4 {
  letter-spacing: 0;
  line-height: 1.4;
}
html[lang="th"] h1, body.lang-th h1 { line-height: 1.3; }

p { color: var(--rl-gray-400); line-height: 1.75; margin: 0 0 16px; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 760px; margin: 0 auto; padding: 0 24px; }

.overline {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rl-teal-deep);
  margin-bottom: 16px;
}
html[lang="th"] .overline, body.lang-th .overline {
  letter-spacing: 0.05em;
  text-transform: none;
}

.lead {
  font-size: 18px;
  line-height: 1.7;
  color: var(--rl-gray-400);
  max-width: 600px;
}

/* NAV */
.rl-nav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(250, 250, 248, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rl-gray-100);
}
.rl-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 16px;
}
.rl-logo {
  font-size: 18px;
  font-weight: 500;
  color: var(--rl-navy);
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.rl-logo::before {
  content: "↺";
  display: inline-block;
  margin-right: 8px;
  color: var(--rl-aqua);
  font-weight: 400;
}
/* When a custom image logo is set, hide the ↺ glyph and size the image.
   Note: the_custom_logo() renders an <a class="custom-logo-link"> OUTSIDE .rl-logo
   (browsers un-nest the invalid nested anchors), so target .custom-logo directly. */
.rl-logo { display: none !important; } /* empty leftover anchor; logo renders via .custom-logo-link */
.custom-logo { height: 46px !important; width: auto !important; display: block; }
.rl-nav-links {
  display: none;
  gap: 28px;
  flex: 1;
  justify-content: center;
  list-style: none;
}
.rl-nav-links a, .rl-nav-list a {
  color: var(--rl-navy);
  font-size: 15px;
  font-weight: 400;
  position: relative;
  display: inline-block;
}
.rl-nav-links a::after, .rl-nav-list a::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--rl-aqua);
  transition: width 250ms var(--ease-std);
}
.rl-nav-links a:hover::after, .rl-nav-list a:hover::after { width: 100%; }
.rl-nav-list {
  display: none;
  gap: 28px;
  list-style: none;
  flex: 1;
  justify-content: center;
}
.rl-nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.lang-switcher {
  display: inline-flex;
  background: var(--rl-cream);
  border-radius: var(--radius-full);
  padding: 3px;
  border: 1px solid var(--rl-gray-100);
}
.lang-switcher button {
  background: transparent;
  border: none;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  color: var(--rl-gray-400);
  font-family: inherit;
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.04em;
  transition: all 200ms var(--ease-std);
  min-width: 36px;
}
.lang-switcher button.active {
  background: var(--rl-navy);
  color: var(--rl-white);
}
.lang-switcher button:not(.active):hover { color: var(--rl-navy); }

@media (min-width: 1024px) {
  .rl-nav-links, .rl-nav-list { display: flex; }
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: var(--radius-full);
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 250ms var(--ease-std);
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary { background: var(--rl-navy); color: var(--rl-white); }
.btn-primary:hover { background: var(--rl-navy-light); color: var(--rl-white); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--rl-navy); padding: 14px 8px; }
.btn-ghost:hover { color: var(--rl-teal-deep); }
.btn-aqua { background: var(--rl-aqua); color: var(--rl-navy); }
.btn-aqua:hover { background: var(--rl-teal-deep); color: var(--rl-white); }
.btn-sm { padding: 10px 18px; font-size: 14px; }

/* HERO */
.rl-hero {
  padding: clamp(72px, 12vh, 144px) 0 clamp(56px, 10vh, 112px);
  background: var(--rl-off-white);
  position: relative;
  overflow: hidden;
}
.rl-hero::after {
  content: "";
  position: absolute;
  right: -200px;
  top: 50%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(55, 199, 208, 0.07) 0%, transparent 70%);
  transform: translateY(-50%);
  pointer-events: none;
}
.rl-hero-inner { position: relative; z-index: 1; }
.rl-hero h1 { margin-bottom: 24px; max-width: 760px; }
.rl-hero .lead { margin-bottom: 40px; font-size: 19px; max-width: 580px; }
.rl-hero-cta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* SECTIONS */
.rl-section { padding: clamp(64px, 10vh, 120px) 0; }
.rl-section-dark { background: var(--rl-navy); color: var(--rl-white); }
.rl-section-dark h2, .rl-section-dark h3 { color: var(--rl-white); }
.rl-section-dark p { color: rgba(255, 255, 255, 0.72); }
.rl-section-dark .overline { color: var(--rl-aqua); }
.rl-section-cream { background: var(--rl-cream); }
.rl-section-header {
  text-align: center;
  margin-bottom: 56px;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}
.rl-section-header h2 { margin-bottom: 16px; }
.rl-section-header.left { text-align: left; margin-left: 0; }

/* GRIDS / CARDS */
.rl-grid-3 { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 768px) { .rl-grid-3 { grid-template-columns: repeat(3, 1fr); } }

.rl-promise-card {
  background: var(--rl-white);
  padding: 32px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--rl-gray-100);
  transition: all 300ms var(--ease-soft);
}
.rl-promise-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--rl-aqua-light); }
.rl-promise-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-md);
  background: var(--rl-aqua-light);
  color: var(--rl-teal-deep);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  margin-bottom: 24px;
}
.rl-promise-card h3 { font-size: 22px; margin-bottom: 12px; }

/* SCIENCE */
.rl-science-grid { display: grid; grid-template-columns: 1fr; gap: 48px; align-items: center; }
@media (min-width: 1024px) { .rl-science-grid { grid-template-columns: 1.1fr 1fr; gap: 80px; } }
.rl-science-visual {
  position: relative; height: 400px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--rl-navy-light) 0%, var(--rl-navy) 100%);
  overflow: hidden;
}
.rl-cells { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.rl-cells svg { width: 80%; height: 80%; opacity: 0.4; }
.rl-science-stat {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(55, 199, 208, 0.15);
  color: var(--rl-aqua);
  font-size: 12px; font-weight: 500;
  border-radius: var(--radius-full);
  margin-bottom: 24px;
  letter-spacing: 0.04em;
}

/* SOLUTIONS */
.rl-solutions-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (min-width: 768px) { .rl-solutions-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
.rl-solution-card {
  background: var(--rl-white);
  padding: 32px 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--rl-gray-100);
  text-align: left;
  transition: all 300ms var(--ease-soft);
  cursor: pointer;
}
.rl-solution-card:hover { border-color: var(--rl-aqua); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.rl-solution-icon { font-size: 28px; color: var(--rl-teal-deep); margin-bottom: 20px; }
.rl-solution-card h4 { font-size: 17px; margin-bottom: 6px; }
.rl-solution-card p { font-size: 13px; line-height: 1.55; margin-bottom: 16px; }
.rl-solution-arrow { font-size: 13px; color: var(--rl-teal-deep); font-weight: 500; }

/* CONTENT HUB */
.rl-article-card {
  background: var(--rl-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--rl-gray-100);
  transition: all 300ms var(--ease-soft);
}
.rl-article-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.rl-article-img { width: 100%; aspect-ratio: 16 / 10; background: var(--rl-cream); }
.rl-article-img img { width: 100%; height: 100%; object-fit: cover; }
.rl-article-body { padding: 24px; }
.rl-pillar-chip {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11px; font-weight: 500;
  margin-bottom: 12px;
}
.chip-health { background: rgba(46, 204, 113, 0.12); color: #1B8C4D; }
.chip-mind { background: rgba(59, 159, 217, 0.12); color: #1F6E9C; }
.chip-wealth { background: rgba(212, 168, 67, 0.16); color: #8A6A20; }
.rl-article-card h4 { font-size: 18px; line-height: 1.4; margin-bottom: 12px; }
.rl-article-meta { font-size: 13px; color: var(--rl-gray-400); display: flex; gap: 12px; align-items: center; }

/* STORIES */
.rl-story-card {
  background: var(--rl-white);
  border-radius: var(--radius-lg);
  padding: 32px;
  border: 1px solid var(--rl-gray-100);
}
.rl-story-quote { font-size: 17px; line-height: 1.6; color: var(--rl-navy); margin-bottom: 24px; font-style: italic; }
.rl-story-author { display: flex; align-items: center; gap: 12px; }
.rl-story-avatar {
  width: 48px; height: 48px;
  border-radius: var(--radius-full);
  background: var(--rl-aqua-light);
  display: flex; align-items: center; justify-content: center;
  color: var(--rl-teal-deep);
  font-weight: 500; font-size: 18px;
}
.rl-story-name { font-size: 14px; font-weight: 500; color: var(--rl-navy); }
.rl-story-result { font-size: 12px; color: var(--rl-gray-400); }

/* COMMUNITY */
.rl-community-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  text-align: center;
  margin-bottom: 56px;
}
@media (min-width: 768px) { .rl-community-stats { grid-template-columns: repeat(4, 1fr); } }
.rl-stat-num { font-size: clamp(36px, 4vw, 48px); font-weight: 500; color: var(--rl-navy); letter-spacing: -0.02em; line-height: 1; margin-bottom: 8px; }
.rl-stat-label { font-size: 13px; color: var(--rl-gray-400); letter-spacing: 0.02em; }

/* WEALTH */
.rl-wealth-block { text-align: center; max-width: 720px; margin: 0 auto; }
.rl-wealth-block h2 { margin-bottom: 24px; }

/* GET STARTED STRIP */
.rl-get-started-strip {
  background: var(--rl-navy);
  border-radius: var(--radius-xl);
  padding: clamp(48px, 8vw, 80px);
  text-align: center;
  color: var(--rl-white);
}
.rl-get-started-strip h2 { color: var(--rl-white); margin-bottom: 16px; }
.rl-get-started-strip p { color: rgba(255, 255, 255, 0.72); max-width: 520px; margin: 0 auto 32px; }

/* FOOTER */
.rl-footer { background: var(--rl-navy); color: rgba(255, 255, 255, 0.72); padding: 72px 0 32px; }
.rl-footer-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  margin-bottom: 56px;
}
@media (min-width: 768px) { .rl-footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.rl-footer-brand h3 { color: var(--rl-white); font-size: 22px; margin-bottom: 12px; }
.rl-footer-brand p { color: rgba(255, 255, 255, 0.6); font-size: 14px; max-width: 320px; }
.rl-footer-col h4 { color: var(--rl-white); font-size: 13px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 20px; }
.rl-footer-col ul { list-style: none; }
.rl-footer-col li { margin-bottom: 12px; }
.rl-footer-col a { color: rgba(255, 255, 255, 0.72); font-size: 14px; }
.rl-footer-col a:hover { color: var(--rl-aqua); }
.rl-footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 32px;
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 16px; font-size: 13px; color: rgba(255, 255, 255, 0.5);
}

/* MODAL */
.rl-modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(11, 31, 58, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 900;
  display: none;
  align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 250ms var(--ease-std);
}
.rl-modal-backdrop.open { display: flex; opacity: 1; }
.rl-modal {
  background: var(--rl-white);
  border-radius: var(--radius-xl);
  padding: clamp(32px, 5vw, 48px);
  max-width: 680px;
  width: 100%;
  box-shadow: var(--shadow-xl);
  position: relative;
  transform: translateY(40px);
  transition: transform 400ms var(--ease-soft);
}
.rl-modal-backdrop.open .rl-modal { transform: translateY(0); }
.rl-modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 36px; height: 36px;
  border-radius: var(--radius-full);
  background: var(--rl-cream); border: none;
  cursor: pointer;
  color: var(--rl-gray-400); font-size: 16px;
}
.rl-modal-close:hover { background: var(--rl-gray-100); color: var(--rl-navy); }
.rl-modal h2 { margin-bottom: 8px; font-size: 28px; }
.rl-modal .lead { margin-bottom: 32px; font-size: 15px; max-width: none; }
.rl-modal-options {
  display: grid; grid-template-columns: 1fr; gap: 12px; margin-bottom: 24px;
}
@media (min-width: 640px) { .rl-modal-options { grid-template-columns: repeat(3, 1fr); } }
.rl-option {
  padding: 24px 16px;
  background: var(--rl-off-white);
  border: 1px solid var(--rl-gray-100);
  border-radius: var(--radius-lg);
  text-align: center;
  cursor: pointer;
  transition: all 250ms var(--ease-std);
}
.rl-option:hover { border-color: var(--rl-aqua); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.rl-option-icon { font-size: 32px; color: var(--rl-teal-deep); margin-bottom: 12px; }
.rl-option-title { font-size: 15px; font-weight: 500; margin-bottom: 4px; }
.rl-option-sub { font-size: 12px; color: var(--rl-gray-400); margin-bottom: 16px; line-height: 1.5; }
.rl-option-cta { display: inline-block; padding: 8px 18px; background: var(--rl-navy); color: var(--rl-white); border-radius: var(--radius-full); font-size: 12px; font-weight: 500; }
.rl-reassurance { font-size: 12px; color: var(--rl-gray-400); text-align: center; font-style: italic; }

/* BRAND STAMP / SLOGAN */
.rl-brand-stamp-section {
  text-align: center;
  padding: clamp(48px, 7vh, 88px) 0;
  background: var(--rl-off-white);
  position: relative;
}
.rl-brand-stamp-section::before,
.rl-brand-stamp-section::after {
  content: "";
  display: block;
  width: 40px;
  height: 1px;
  background: var(--rl-aqua);
  margin: 0 auto 24px;
  opacity: 0.6;
}
.rl-brand-stamp-section::after { margin: 24px auto 0; }
.rl-brand-stamp {
  font-size: clamp(20px, 2.5vw, 26px);
  color: var(--rl-teal-deep);
  font-style: italic;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.5;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}
.rl-footer-slogan {
  color: var(--rl-aqua);
  font-size: 14px;
  font-weight: 500;
  font-style: italic;
  letter-spacing: 0.01em;
  margin-bottom: 16px;
  line-height: 1.5;
}

/* WordPress content area */
.rl-content { font-size: 17px; line-height: 1.8; }
.rl-content p { color: var(--rl-gray-700); margin-bottom: 20px; }
.rl-content h2 { margin: 40px 0 16px; }
.rl-content h3 { margin: 32px 0 12px; }
.rl-content a { color: var(--rl-teal-deep); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.rl-content img { border-radius: var(--radius-lg); margin: 24px 0; }
.rl-content ul, .rl-content ol { margin: 0 0 20px 24px; color: var(--rl-gray-700); }
.rl-content li { margin-bottom: 8px; }
.rl-content blockquote { border-left: 3px solid var(--rl-aqua); padding-left: 24px; margin: 32px 0; font-style: italic; color: var(--rl-navy); }

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