/* =========================================================================
   Averiya Yoga — professional editorial design system
   Dark blue + white palette · serif display + sans UI · mobile-first
   No frameworks, no tracking.
   ========================================================================= */

/* ---------- 1. Design tokens ---------- */
:root {
  /* Dark blue + white professional palette */
  --ivory:        #ffffff;   /* page base (white) */
  --warm-white:   #ffffff;   /* card surface (pure white) */
  --cream:        #f4f6f8;   /* very light grey tint for panels */
  --sand:         #eaeef3;   /* light grey-blue tint */
  --sand-2:       #dfe5ec;
  --taupe:        #64809e;   /* muted steel blue */
  --taupe-2:      #4c6a8b;
  --earth:        #1f4e79;   /* primary professional blue */
  --earth-deep:   #16385c;   /* deep navy */
  --charcoal:     #0d1b2a;   /* deep dark blue (near-navy) */
  --charcoal-soft:#3a4a5c;   /* mid slate */
  --ink:          #1b2631;   /* body text on light (dark navy) */
  --olive:        #6f7458;
  --olive-soft:   #8b9075;

  /* Structural roles */
  --bg:            var(--ivory);
  --surface:       var(--warm-white);
  --surface-2:     var(--cream);
  --surface-3:     var(--sand);
  --ink-soft:      #526070;               /* soft body text */
  --line:          #dae3ee;
  --line-strong:   #c2d0e0;
  --accent:        var(--earth);          /* blue */
  --accent-hover:  var(--earth-deep);
  --accent-soft:   #dbe7f3;               /* pale blue wash */
  --accent-2:      var(--earth);          /* blue focus ring */
  --bg-dark:       var(--charcoal);
  --bg-dark-2:     #122238;
  --dark-text:     #ffffff;               /* pure white on dark */
  --dark-soft:     #ffffff;               /* pure white on dark */

  --error:         #9c3b2e;
  --error-bg:      #f7e8e2;
  --ok:            #2e6b4f;
  --ok-bg:         #e7f1ec;

  /* Type */
  --serif:  Georgia, "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;
  --sans:   -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
            Helvetica, Arial, sans-serif;

  --fs-hero:   clamp(2.5rem, 7vw, 4.5rem);
  --fs-h1:     clamp(2rem, 5vw, 3rem);
  --fs-h2:     clamp(1.6rem, 3.6vw, 2.4rem);
  --fs-h3:     clamp(1.2rem, 2.2vw, 1.5rem);
  --fs-body:   1.075rem;
  --fs-small:  0.95rem;
  --fs-eyebrow: 0.78rem;
  --lh-body:   1.75;
  --lh-tight:  1.15;

  /* Spacing */
  --space: max(1.5rem, 3vw);
  --space-2: calc(var(--space) * 1.5);
  --space-3: calc(var(--space) * 2.75);
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --wrap: 1180px;
  --wrap-narrow: 820px;

  --radius: 6px;
  --shadow-soft: 0 1px 2px rgba(13,27,42,.06), 0 12px 40px -18px rgba(13,27,42,.30);
  --ease: cubic-bezier(.25,.6,.3,1);
}

/* ---------- 2. Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--accent-hover); }
h1,h2,h3,h4 { font-family: var(--serif); font-weight: 400; line-height: var(--lh-tight); color: var(--charcoal); margin: 0; }
p { margin: 0; }
ul, ol { padding: 0; margin: 0; list-style: none; }

/* ---------- 3. Typography helpers ---------- */
.eyebrow {
  font-family: var(--sans);
  font-size: var(--fs-eyebrow);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--taupe-2);
  font-weight: 600;
  margin-bottom: 1rem;
}
.display { font-size: var(--fs-hero); }
.lede  { font-size: 1.18rem; color: var(--ink-soft); max-width: 60ch; }

/* ---------- 4. Layout helpers ---------- */
.container { width: min(var(--wrap), 100% - (var(--gutter) * 2)); margin-inline: auto; }
.container--narrow { width: min(var(--wrap-narrow), 100% - (var(--gutter) * 2)); margin-inline: auto; }
.section { padding-block: var(--space-3); }
.section--flush { padding-block: 0; }
.section--dark { background: var(--bg-dark); color: var(--dark-text); }
.section--dark h2, .section--dark h3 { color: var(--dark-text); }
.section--dark .eyebrow { color: var(--dark-soft); }
.section--tint { background: var(--surface-2); }
.section--sand { background: var(--surface-3); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  padding: 0; border: 0; clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

/* ---------- 5. Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: .02em;
  text-align: center;
  padding: 0.95rem 1.9rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  min-height: 48px;
  line-height: 1.2;
  transition: background .25s var(--ease), color .25s var(--ease),
              border-color .25s var(--ease), transform .15s var(--ease);
}
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-hover); color: #fff; transform: translateY(-1px); }
.btn--outline { background: transparent; color: var(--accent); border-color: var(--line-strong); }
.btn--outline:hover { border-color: var(--accent); background: rgba(31,78,121,.05); }
.btn--light { background: transparent; color: var(--dark-text); border-color: rgba(238,243,248,.4); }
.btn--light:hover { border-color: var(--dark-text); color: var(--dark-text); }
.btn--block { display: block; width: 100%; }
.btn:focus-visible, .nav-link:focus-visible, a:focus-visible, button:focus-visible {
  outline: 3px solid var(--accent-2, var(--taupe));
  outline-offset: 3px;
}

/* Text link with underline */
.link-line { position: relative; font-weight: 600; }
.link-line::after {
  content: ""; position: absolute; left: 0; bottom: -3px; height: 1px; width: 100%;
  background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--ease);
}
.link-line:hover::after { transform: scaleX(1); }

/* ---------- 6. Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px) saturate(1.1);
  -webkit-backdrop-filter: blur(12px) saturate(1.1);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding-block: 1rem;
}
.brand { display: flex; align-items: center; gap: .6rem; }
.brand img { height: 34px; width: auto; }
.brand-name {
  font-family: var(--serif); font-size: 1.25rem; letter-spacing: .02em;
  color: var(--charcoal);
}

.nav-toggle {
  display: flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 46px; height: 46px; padding: 0 12px;
  background: none; border: 1px solid var(--line-strong); border-radius: 8px; cursor: pointer;
}
.nav-toggle-bar { display: block; height: 1.5px; background: var(--charcoal); transition: transform .3s var(--ease), opacity .3s var(--ease); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.primary-nav { position: absolute; top: 100%; left: 0; right: 0; background: var(--warm-white);
  border-bottom: 1px solid var(--line); box-shadow: 0 24px 50px -30px rgba(13,27,42,.5);
  display: none; }
.primary-nav.open { display: block; }
.nav-list { padding: .5rem var(--gutter) 1.25rem; }
.nav-link {
  display: block; padding: .8rem .1rem; color: var(--ink);
  border-bottom: 1px solid var(--line); font-weight: 500; font-size: 1.05rem;
}
.nav-link:hover { color: var(--accent); }
.nav-link.is-active { color: var(--accent); }
.nav-cta {
  border-bottom: none; margin-top: 1rem; background: var(--accent); color: #fff;
  text-align: center; border-radius: 999px; padding: .8rem 1rem;
}
.nav-cta:hover { background: var(--accent-hover); color: #fff; }

/* ---------- 7. Hero ---------- */
.hero {
  position: relative;
  background: linear-gradient(180deg, var(--surface-2) 0%, var(--ivory) 100%);
  padding-block: clamp(2rem,6vw,4.5rem) clamp(2.5rem,7vw,5.5rem);
  overflow: hidden;
}
.hero-inner {
  display: grid; gap: clamp(2rem,4vw,3.5rem);
  align-items: center;
}
.hero-copy { max-width: 34rem; }
.hero-title { margin: 0 0 1.25rem; }
.hero-sub { font-size: 1.18rem; color: var(--ink-soft); max-width: 32rem; margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }
.hero-perks {
  display: flex; flex-wrap: wrap; gap: .6rem 1.4rem;
  margin: 1.75rem 0 0; padding: 0;
}
.hero-perks li { position: relative; padding-left: 1.3rem; color: var(--ink-soft); font-size: .95rem; }
.hero-perks li::before {
  content: ""; position: absolute; left: 0; top: .45em; width: .6em; height: .6em;
  border-radius: 50%; background: var(--accent);
}
.hero-media { position: relative; }
.hero-media figure { margin: 0; }
.hero-media img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: var(--radius); box-shadow: var(--shadow-soft);
}
.hero-media::after {
  content: ""; position: absolute; inset: auto -2rem -2rem auto; width: 45%; height: 45%;
  background: var(--sand); border-radius: 100% 0 0 0; z-index: -1;
}

/* ---------- 8. Section patterns ---------- */
.section-head { max-width: 46ch; margin-bottom: clamp(2rem,4vw,3rem); }
.section-head p { color: var(--ink-soft); margin-top: 1rem; }
.split {
  display: grid; gap: clamp(2rem,5vw,4rem);
  align-items: center;
}
.split figure { margin: 0; }
.split img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow-soft); }
.split--image-left .split-body { order: 2; }
.split--image-left .split-media { order: 1; }

/* ---------- 9. Program cards ---------- */
.grid { display: grid; gap: var(--space); }
.grid--3 { grid-template-columns: 1fr; }

.program-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.program-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-soft); border-color: var(--line-strong); }
.program-card figure { margin: 0; overflow: hidden; }
.program-card-img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  transition: transform .6s var(--ease);
}
.program-card:hover .program-card-img { transform: scale(1.04); }
.program-card-body { padding: 1.5rem 1.6rem 1.7rem; display: flex; flex-direction: column; flex: 1; }
.program-card-tagline { color: var(--taupe-2); font-weight: 600; font-size: .85rem; letter-spacing: .04em; margin-bottom: .4rem; }
.program-card h3 { margin-bottom: .6rem; }
.program-card p { color: var(--ink-soft); }
.program-card-meta { display: flex; gap: 1.25rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.program-card-meta span { font-size: .85rem; color: var(--charcoal-soft); }
.program-card-cta { margin-top: 1.25rem; align-self: flex-start; }

.role-badge {
  display: inline-block; font-family: var(--sans);
  font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft);
  padding: .28em .7em; border-radius: 999px; line-height: 1;
}

/* ---------- 10. Quote band ---------- */
.quote-band { text-align: center; padding-block: clamp(3rem,8vw,6rem); }
.quote-mark { font-family: var(--serif); color: var(--dark-text); font-size: 2.6rem; line-height: 0; display: block; margin-bottom: .5rem; }
.quote-band blockquote { margin: 0; }
.quote-band p.statement {
  font-family: var(--serif); font-size: clamp(1.6rem,4vw,2.5rem);
  line-height: 1.35; color: var(--dark-text); max-width: 22em; margin-inline: auto;
}

/* ---------- 11. Wellness ---------- */
.wellness-grid { display: grid; grid-template-columns: 1fr; gap: var(--space); }
.wellness-item { display: grid; gap: 1.4rem; align-items: center; }
.wellness-item:nth-child(even) .wellness-media { order: 1; }
.wellness-item:nth-child(even) .wellness-body { order: 2; }
.wellness-media img { width: 100%; aspect-ratio: 3/2; object-fit: cover; border-radius: var(--radius); }
.wellness-body h3 { margin-bottom: .6rem; }
.wellness-body p { color: var(--ink-soft); }

/* ---------- 12. Journal ---------- */
.journal-intro { max-width: 54ch; margin-bottom: 2.5rem; }
.article-list-item { border-top: 1px solid var(--line); padding: 1.6rem 0; }
.article-list-item:last-child { border-bottom: 1px solid var(--line); }
.article-list-item a { display: block; }
.article-list-item h3 { font-size: 1.4rem; }
.empty-state {
  border: 1px dashed var(--line-strong); border-radius: var(--radius);
  padding: clamp(2rem,5vw,3.5rem); text-align: center; background: var(--surface);
}
.empty-state p { color: var(--ink-soft); max-width: 40ch; margin: 0 auto; }

/* ---------- 13. FAQ ---------- */
.faq-list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q {
  width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  font-family: var(--serif); font-size: 1.2rem; color: var(--charcoal);
  padding: 1.4rem .5rem; display: flex; justify-content: space-between; gap: 1rem; align-items: center;
}
.faq-q .faq-icon { flex: 0 0 auto; color: var(--accent); transition: transform .3s var(--ease); font-weight: 400; }
.faq-item[data-open="true"] .faq-icon { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .35s var(--ease); }
.faq-a-inner { padding: 0 2rem 1.5rem .5rem; color: var(--ink-soft); }

/* ---------- 14. Forms ---------- */
.page-head { padding-block: clamp(2rem,5vw,3.2rem) clamp(1.5rem,4vw,2.5rem); border-bottom: 1px solid var(--line); text-align: center; }
.page-head p { color: var(--ink-soft); max-width: 46ch; margin: 1rem auto 0; }
.form-section { padding-block: var(--space-2); }
.form-wrap { display: grid; gap: clamp(1.5rem,4vw,2.5rem); align-items: start; }
.form-panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1.5rem,4vw,2.5rem); box-shadow: var(--shadow-soft);
}
.form-row { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
.field { display: flex; flex-direction: column; gap: .45rem; margin-bottom: 1.4rem; }
.field label { font-weight: 600; font-size: .92rem; color: var(--charcoal); }
.field input, .field select, .field textarea {
  font-family: inherit; font-size: 1rem; color: var(--ink);
  padding: .85rem 1rem; border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--warm-white); transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(31,78,121,.18);
}
.field-hint { color: var(--charcoal-soft); font-size: .85rem; }
.form-note {
  background: var(--surface-2); border-left: 3px solid var(--accent);
  padding: 1rem 1.2rem; border-radius: 0 var(--radius) var(--radius) 0;
  font-size: .95rem; color: var(--ink); margin: 1.4rem 0;
}
.form-actions { margin-top: .5rem; }
.form-actions .btn { width: 100%; }

.aside-panel { display: grid; gap: 1.25rem; }
.aside-card { background: var(--surface-2); border-radius: var(--radius); padding: 1.6rem; }
.aside-card h3 { font-size: 1.15rem; margin-bottom: .5rem; }
.aside-card p { color: var(--ink-soft); font-size: .98rem; }
.aside-card a { font-weight: 600; }

/* ---------- 15. Flash / messages ---------- */
.flash { width: min(var(--wrap-narrow), 100% - (var(--gutter)*2)); margin: 1.5rem auto 0; padding: 1rem 1.2rem; border-radius: var(--radius); font-weight: 500; }
.flash--success { background: var(--ok-bg); color: var(--ok); border: 1px solid #cddcc8; }
.flash--error { background: var(--error-bg); color: var(--error); border: 1px solid #e9c9c0; }
.flash--center { text-align: center; }

/* ---------- 16. Footer ---------- */
.site-footer { background: var(--bg-dark); color: var(--dark-soft); }
.footer-grid {
  display: grid; gap: 2.5rem; grid-template-columns: 1fr;
  padding-block: clamp(2.5rem,6vw,4rem) 2rem;
}
.footer-brand-col { max-width: 30ch; }
.footer-brand-name { font-family: var(--serif); font-size: 1.4rem; color: var(--dark-text); margin-bottom: 1rem; }
.footer-brand-col p { font-size: .98rem; }
.footer-col h4 { font-family: var(--sans); font-size: .8rem; letter-spacing: .18em; text-transform: uppercase; color: var(--dark-soft); margin-bottom: 1rem; }
.footer-col ul { display: grid; gap: .6rem; }
.footer-col a { color: var(--dark-text); font-size: .98rem; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(238,243,248,.12);
  padding-block: 1.4rem; display: flex; flex-wrap: wrap; gap: 1rem;
  justify-content: space-between; align-items: center; font-size: .9rem;
}
.footer-legal { display: flex; flex-wrap: wrap; gap: 1.2rem; }

/* ---------- 16b. Sticky conversion CTA (mobile-only) ---------- */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 55;
  display: none;
  padding: .7rem var(--gutter) calc(.7rem + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.96);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.sticky-cta-btn { display: block; width: 100%; }
@media (max-width: 899px) {
  .sticky-cta { display: block; }
  /* give the footer a little breathing room above the fixed bar */
  .site-footer { padding-bottom: 4.5rem; }
}

/* ---------- 17. Policy / legal ---------- */
.legal h1 { margin-bottom: 1.5rem; }
.legal h3 { font-size: 1.25rem; margin: 2rem 0 .6rem; }
.legal p, .legal li { color: var(--ink-soft); margin-bottom: .8rem; }
.legal ul { list-style: disc; padding-left: 1.4rem; }
.legal .updated { font-size: .9rem; color: var(--charcoal-soft); font-style: italic; margin-bottom: 2rem; }

/* ---------- 18. Error / success ---------- */
.center-page { text-align: center; padding-block: clamp(3rem,8vw,5rem); }
.error-code { font-family: var(--serif); font-size: clamp(4rem,12vw,8rem); color: var(--accent); line-height: 1; margin-bottom: .5rem; }
.success-icon { width: 64px; height: 64px; margin: 0 auto 1.5rem; color: var(--ok); }

/* ---------- 19. Micro-interactions ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in-view { opacity: 1; transform: none; }

/* Reduce motion for all users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- 20. Responsive (mobile-first breakpoints) ---------- */
@media (min-width: 640px) {
  .form-row { grid-template-columns: 1fr 1fr; }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .wellness-item { grid-template-columns: 1fr 1fr; gap: clamp(1.5rem,3vw,2.5rem); }
}

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .primary-nav { position: static; display: block; background: none; border: none; box-shadow: none; }
  .nav-list { display: flex; align-items: center; gap: .4rem; padding: 0; }
  .nav-link { border-bottom: none; padding: .55rem .85rem; font-size: .98rem; }
  .nav-cta { margin: 0 0 0 .6rem; padding: .6rem 1.25rem; background: var(--accent); color: #fff; border-radius: 999px; }
  .nav-cta:hover { background: var(--accent-hover); }

  .hero-inner { grid-template-columns: 1.05fr .95fr; }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .form-wrap { grid-template-columns: 1.4fr .6fr; }
  .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; }
  .wellness-grid { grid-template-columns: 1fr; }
}

@media (min-width: 1280px) {
  .hero-media::after { inset: auto -3rem -3rem auto; }
}
