/* ==========================================
   MEDITATE FREE — STYLESHEET
   ========================================== */

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { line-height: 1.6; -webkit-font-smoothing: antialiased; }
img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { cursor: pointer; border: none; background: none; font: inherit; }
ul, ol { list-style: none; }
[hidden] { display: none !important; }

/* === TOKENS === */
:root {
  /* Colors */
  --earth:         #2a1f0f;
  --earth-mid:     #3d2e18;
  --amber:         #c8823a;
  --amber-dark:    #a8662a;
  --cream:         #faf7f2;
  --sand:          #f0e9d8;
  --ink:           #2a1e0e;
  --muted:         #7a6b58;
  --border:        #ddd5c2;

  /* Solid text colors for dark backgrounds */
  --on-dark:       #faf7f2;
  --on-dark-sub:   #d4c8b4;
  --on-dark-muted: #a09080;

  /* Font families */
  --display: 'Cormorant Garamond', Georgia, serif;
  --sans:    'Nunito', system-ui, -apple-system, sans-serif;

  /* 5-size font scale — minimum 18px */
  --fs-1: 1.125rem;                    /* 18px */
  --fs-2: 1.25rem;                     /* 20px */
  --fs-3: 1.5rem;                      /* 24px */
  --fs-4: 2rem;                        /* 32px */
  --fs-5: clamp(2.75rem, 6vw, 4.5rem); /* h1 only */

  /* Layout */
  --nav-h:         68px;
  --container-max: 1100px;
  --section-pad:   5rem;
  --reveal-dur:    0.65s;
}

/* === ACCESSIBILITY === */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

.skip-nav {
  position: absolute;
  top: -100%; left: 1rem;
  background: var(--amber);
  color: var(--earth);
  padding: 0.5rem 1rem;
  font-family: var(--sans);
  font-weight: 700;
  z-index: 200;
  text-decoration: none;
  border-radius: 0 0 4px 4px;
}
.skip-nav:focus { top: 0; }

/* === BASE TYPOGRAPHY === */
body {
  font-family: var(--sans);
  font-size: var(--fs-1);
  color: var(--ink);
  background: var(--cream);
}

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
}

h1 { font-size: var(--fs-5); font-weight: 700; }
h2 { font-size: var(--fs-4); margin-bottom: 1.25rem; }
h3 { font-size: var(--fs-3); font-weight: 600; margin-bottom: 0.625rem; }

p { margin-bottom: 1.25rem; line-height: 1.75; }
p:last-child { margin-bottom: 0; }

.text-link {
  color: var(--amber-dark);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.text-link:hover { color: var(--amber); }

/* === CONTAINER === */
.container {
  max-width: var(--container-max);
  margin-inline: auto;
}

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
  font-size: var(--fs-1);
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  border-radius: 50px;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
  white-space: nowrap;
}

.btn-cta {
  background: var(--amber);
  color: var(--earth);
  padding: 1rem 2rem;
}
.btn-cta:hover {
  background: var(--amber-dark);
  color: var(--cream);
  transform: translateY(-1px);
}

.btn-cta--light {
  background: var(--cream);
  color: var(--earth);
}
.btn-cta--light:hover {
  background: var(--amber);
  color: var(--earth);
}

.btn-nav {
  background: var(--amber);
  color: var(--earth);
  padding: 0.625rem 1.375rem;
}
.btn-nav:hover { background: var(--amber-dark); color: var(--cream); }

/* === HEADER === */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(42, 31, 15, 0.97);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid #3d2e18;
  z-index: 100;
}

.header-inner {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 20px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.site-logo {
  font-family: var(--display);
  font-size: var(--fs-2);
  font-weight: 700;
  color: var(--on-dark);
  text-decoration: none;
  flex-shrink: 0;
  letter-spacing: 0.01em;
}
.site-logo span { color: var(--amber); }

.site-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-left: auto;
}

.site-nav ul {
  display: flex;
  gap: 2rem;
}

.site-nav ul a {
  font-family: var(--sans);
  font-size: var(--fs-1);
  font-weight: 600;
  color: var(--on-dark-sub);
  text-decoration: none;
}
.site-nav ul a:hover { color: var(--on-dark); }

/* === NAV TOGGLE === */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  margin-left: auto;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--on-dark);
  border-radius: 2px;
  transition: transform 0.22s ease, opacity 0.22s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* === MOBILE MENU === */
.mobile-menu {
  background: var(--earth-mid);
  border-top: 1px solid #4a3820;
  padding: 1.5rem 20px 2rem;
}
.mobile-menu ul {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.mobile-menu ul a {
  font-family: var(--sans);
  font-size: var(--fs-1);
  font-weight: 600;
  color: var(--on-dark-sub);
  text-decoration: none;
}
.mobile-menu .btn {
  margin-top: 0.5rem;
  width: 100%;
}

/* === MAIN === */
main { padding-top: var(--nav-h); }

/* === SECTIONS === */
section { padding: var(--section-pad) 20px; }

/* === HERO === */
.section-hero {
  background: var(--earth);
  color: var(--on-dark);
  text-align: center;
  padding-top: 6.5rem;
  padding-bottom: 7rem;
}

.section-hero .container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.section-hero h1 {
  color: var(--on-dark);
  max-width: 820px;
  margin-bottom: 1.25rem;
  margin-top: 0.75rem;
}

.hero-eyebrow {
  font-family: var(--sans);
  font-size: var(--fs-1);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 0 !important;
}

.hero-sub {
  font-size: var(--fs-2);
  color: var(--on-dark-sub);
  max-width: 620px;
  line-height: 1.75;
  margin-bottom: 0;
}

/* === OPT-IN FORM === */
.opt-in-form {
  margin-top: 2.5rem;
  width: 100%;
  max-width: 560px;
}

.email-form { width: 100%; }

.form-row {
  display: flex;
  gap: 8px;
  background: var(--cream);
  border-radius: 50px;
  padding: 8px;
  box-shadow: 0 4px 28px rgba(0, 0, 0, 0.3);
}

.form-row input[type="email"] {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  padding: 0.75rem 1.25rem;
  font-family: var(--sans);
  font-size: var(--fs-1);
  color: var(--ink);
  background: transparent;
  border-radius: 50px;
}
.form-row input[type="email"]::placeholder { color: #a09080; }

.form-note {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--sans);
  font-size: var(--fs-1);
  color: var(--on-dark-muted);
  margin-top: 0.875rem;
  margin-bottom: 0;
  justify-content: center;
}
.form-note svg { flex-shrink: 0; }

/* === SECTION BODY === */
.section-body { background: var(--cream); }
.section-alt  { background: var(--sand); }

/* === STEPS === */
.steps-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
  margin-top: 2.5rem;
}

.step-item {
  border-top: 2px solid var(--amber);
  padding-top: 1.5rem;
}

.step-num {
  font-family: var(--display);
  font-size: var(--fs-4);
  font-weight: 700;
  color: var(--amber);
  line-height: 1;
  margin-bottom: 0.75rem;
  display: block;
}

.step-item h3 {
  font-size: var(--fs-3);
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.step-item p {
  font-size: var(--fs-1);
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 0;
}

/* === FAQ === */
.faq-list {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--cream);
}

.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:last-child { border-bottom: none; }

.faq-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.375rem 1.5rem;
  text-align: left;
  font-family: var(--sans);
  font-size: var(--fs-1);
  font-weight: 700;
  color: var(--ink);
}
.faq-toggle:hover { background: var(--sand); }
.faq-toggle[aria-expanded="true"] { color: var(--amber-dark); }

.faq-icon {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border: 1.5px solid var(--border);
  border-radius: 50%;
  position: relative;
}
.faq-icon::before,
.faq-icon::after {
  content: '';
  position: absolute;
  background: var(--muted);
  border-radius: 2px;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}
.faq-icon::before { width: 10px; height: 1.5px; }
.faq-icon::after  { width: 1.5px; height: 10px; transition: transform 0.2s ease, opacity 0.2s ease; }
.faq-toggle[aria-expanded="true"] .faq-icon::after { transform: translate(-50%, -50%) rotate(90deg); opacity: 0; }

.faq-item dd {
  padding: 0 1.5rem 1.5rem;
  font-size: var(--fs-1);
  color: var(--muted);
  line-height: 1.75;
}
.faq-item dd p { margin-bottom: 0; }

/* === CTA SECTION === */
.section-cta {
  background: var(--earth);
  color: var(--on-dark);
  text-align: center;
}

.section-cta h2 {
  font-family: var(--display);
  color: var(--on-dark);
}

.cta-sub {
  font-size: var(--fs-2);
  color: var(--on-dark-sub);
  max-width: 520px;
  margin-inline: auto;
  margin-bottom: 0;
  line-height: 1.7;
}

.section-cta .opt-in-form { margin-inline: auto; }

/* === THANK-YOU PAGE === */
.page-thankyou main {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--nav-h));
  padding: 3rem 20px;
}

.thankyou-card {
  text-align: center;
  max-width: 600px;
  margin-inline: auto;
}

.check-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 5rem; height: 5rem;
  background: #dcfce7;
  color: #16a34a;
  border-radius: 50%;
  font-size: var(--fs-4);
  margin-bottom: 1.75rem;
}

.thankyou-card h1 { margin-bottom: 1rem; }

.thankyou-card p {
  font-size: var(--fs-2);
  color: var(--muted);
  margin-bottom: 1.25rem;
  line-height: 1.75;
}

.next-steps {
  background: var(--sand);
  border-radius: 10px;
  padding: 1.75rem;
  text-align: left;
  margin-top: 2rem;
  border: 1px solid var(--border);
}

.next-steps h2 {
  font-family: var(--sans);
  font-size: var(--fs-1);
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

.next-steps ol {
  list-style: decimal;
  padding-left: 1.375rem;
  font-size: var(--fs-1);
  color: var(--ink);
  line-height: 1.65;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* === FOOTER === */
.site-footer {
  background: var(--earth);
  padding: 3rem 20px;
}

.footer-inner {
  max-width: var(--container-max);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.footer-brand {
  font-family: var(--display);
  font-size: var(--fs-2);
  color: var(--on-dark);
  font-weight: 700;
  margin-bottom: 0;
}

.footer-nav {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-nav a {
  font-family: var(--sans);
  font-size: var(--fs-1);
  font-weight: 600;
  color: var(--on-dark-muted);
  text-decoration: none;
}
.footer-nav a:hover { color: var(--on-dark); }

.footer-legal {
  font-family: var(--sans);
  font-size: var(--fs-1);
  color: var(--on-dark-muted);
  margin-bottom: 0;
}

.footer-disclaimer {
  font-family: var(--sans);
  font-size: var(--fs-1);
  color: var(--on-dark-muted);
  max-width: 680px;
  line-height: 1.55;
  margin-bottom: 0;
}

/* === SCROLL REVEAL === */
.html-loaded [data-reveal] {
  opacity: 0;
  transition: opacity var(--reveal-dur) ease, transform var(--reveal-dur) ease;
}
.html-loaded [data-reveal="up"]    { transform: translateY(24px); }
.html-loaded [data-reveal="left"]  { transform: translateX(-28px); }
.html-loaded [data-reveal="right"] { transform: translateX(28px); }

.html-loaded [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

.html-loaded [data-delay="1"] { transition-delay: 0.15s; }
.html-loaded [data-delay="2"] { transition-delay: 0.3s; }
.html-loaded [data-delay="3"] { transition-delay: 0.45s; }

/* === RESPONSIVE: 900px === */
@media (max-width: 900px) {
  .site-nav   { display: none; }
  .nav-toggle { display: flex; }

  .steps-list { grid-template-columns: 1fr; gap: 2rem; }
}

/* === RESPONSIVE: 500px === */
@media (max-width: 500px) {
  :root {
    --section-pad: 3.5rem;
    --nav-h: 60px;
  }

  .section-hero { padding-top: 4.5rem; padding-bottom: 5rem; }

  .form-row {
    flex-direction: column;
    border-radius: 12px;
    gap: 8px;
    padding: 8px;
  }
  .form-row input[type="email"] { border-radius: 8px; padding: 0.875rem 1rem; }
  .btn-cta { width: 100%; padding: 1rem; border-radius: 8px; }
}
