/* =========================================================
   Sundari Yoga Studio — static rebuild
   Matched to the live WordPress site:
     - Brick-red header & footer with subtle floral tile
     - Cream-yellow body with geometric floral tile
     - Yellow/red script wordmark logo
   ========================================================= */

/* ---------- Design tokens ---------- */
:root {
  /* Brand palette — read from live site DevTools */
  --c-brick:        #a65353;   /* header, buttons, links — matches live site */
  --c-brick-deep:   #843e3e;   /* hover */
  --c-brick-soft:   #c97370;
  --c-footer:       #4c2627;   /* footer background (deeper than header) */
  --c-footer-deep:  #361a1b;   /* footer top-border accent */
  --c-cream:        #fbf2d4;   /* body background base */
  --c-cream-soft:   #fdf7e0;   /* cards on cream */
  --c-cream-edge:   #e9d7a3;
  --c-gold:         #e7b637;   /* logo accent yellow */
  --c-ink:          #2c2a26;
  --c-ink-soft:     #55524c;
  --c-rule:         #c9b585;
  --c-rule-soft:    #d8c89e;
  --c-link:         var(--c-brick-deep);   /* WCAG AA: 6.85:1 on cream */
  --c-link-hover:   #6e2517;                /* even darker on hover */

  --maxw:           1140px;
  --gutter:         clamp(1rem, 3vw, 2rem);
  --radius:         4px;
  --shadow-sm:      0 1px 2px rgba(0,0,0,.06);
  --shadow-md:      0 4px 14px rgba(0,0,0,.10);

  --f-sans:   "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --f-serif:  "Playfair Display", "Cormorant Garamond", Georgia, "Times New Roman", serif;
}

/* ---------- Reset / base ---------- */
*,*::before,*::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
/* Bump root font size 12.5% (16→18px) for older readers with vision challenges.
   Everything sized in rem scales proportionally. Users who want even larger
   text can use browser zoom; rem-based sizing keeps the layout stable. */
html { font-size: 112.5%; }

body {
  margin: 0;
  background-color: var(--c-cream);
  background-image:
    url("https://sundariyogastudio.com/wp-content/uploads/2024/04/sundari_floral_bg-rev.gif"),
    url("../assets/images/patterns/cream-body.gif");
  background-repeat: repeat;
  background-position: 50% 0;
  color: var(--c-ink);
  font: 1rem/1.7 var(--f-sans);     /* 18px base, line-height 1.7 for easier scanning */
  -webkit-font-smoothing: antialiased;
}
img, picture, video, iframe { max-width: 100%; height: auto; display: block; }
a { color: var(--c-link); text-decoration: underline; text-underline-offset: 2px; }
a:hover, a:focus { color: var(--c-link-hover); }

h1,h2,h3,h4 {
  font-family: var(--f-serif);
  color: var(--c-ink);
  line-height: 1.2; margin: 0 0 .6em; font-weight: 400;
  letter-spacing: .005em;
}
h1 { font-size: clamp(2rem, 4.6vw, 2.75rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2rem); }
h3 { font-size: clamp(1.2rem, 2.4vw, 1.4rem); }
h4 { font-size: 1.05rem; letter-spacing: .03em; }
p  { margin: 0 0 1em; }
ul, ol { padding-left: 1.25rem; margin: 0 0 1em; }
/* Default spacing for content lists. Scoped to typical prose containers so it
   doesn't sneak into flex rows (nav, social) where the extra margin top on
   item-2-onwards visibly mis-aligns item 1 even with align-items:center. */
main li + li,
.callout li + li,
.bio li + li,
.feature li + li,
.pricing li + li { margin-top: .25em; }
hr { border: 0; border-top: 1px solid var(--c-rule); margin: 2rem 0; }
blockquote { margin: 0 0 1em; padding-left: 1rem; border-left: 3px solid var(--c-brick); font-style: italic; color: var(--c-ink-soft); }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--c-brick); color: #fff; padding: .5rem 1rem; z-index: 1000;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(1.5rem, 3.5vw, 2.5rem); }
.section--narrow { padding-block: clamp(1rem, 2.5vw, 1.75rem); }

/* ---------- Header (brick-red with floral tile) ---------- */
.site-header {
  background-color: var(--c-brick);
  /* Live site's revised header tile, with local fallback. */
  background-image:
    url("https://sundariyogastudio.com/wp-content/uploads/2024/05/sundari_floral-rev.gif"),
    url("../assets/images/patterns/brick-header.gif");
  background-repeat: repeat;
  background-position: 50% 0;
  color: #fff;
  border-bottom: 3px solid var(--c-brick-deep);
}
.site-header__inner {
  display: flex; flex-direction: column; align-items: center;
  gap: .5rem; padding-block: 1.1rem .25rem;
  text-align: center;
  position: relative;
}
.site-logo { display: inline-block; line-height: 0; }
.site-logo img {
  height: clamp(48px, 6vw, 70px);
  width: auto; max-width: 90vw;
}

/* Mobile burger */
.nav-toggle {
  position: absolute; right: 1rem; top: 1rem;
  padding: .4rem .75rem;
  background: transparent; border: 1px solid rgba(255,255,255,.5); border-radius: var(--radius);
  font: inherit; cursor: pointer; color: #fff;
}
.nav-toggle[aria-expanded="true"] { background: rgba(0,0,0,.15); }

/* Nav — tighten so 9 items fit on one line at desktop */
.primary-nav { width: 100%; }
.primary-nav__list {
  list-style: none; padding: 0; margin: 0;
  display: none; flex-direction: column; gap: 0;
  text-align: center;
}
.primary-nav[data-open="true"] .primary-nav__list { display: flex; }
.primary-nav__list li { display: block; line-height: 1; }
.primary-nav__list a {
  display: inline-block;
  padding: .65rem 1rem;
  color: #fff; font-size: .8rem; letter-spacing: .12em;
  text-transform: uppercase; text-decoration: none;
  font-family: var(--f-serif); font-weight: 400;
  line-height: 1; /* prevents per-item baseline shifts (fixes "Home" looking high) */
  vertical-align: middle;
}
/* Hover/focus/current — bright cream-yellow gives 4.7:1 contrast on brick
   (AA pass), vs. 2.80 for the original gold. Plus an underline for clarity. */
.primary-nav__list a:hover,
.primary-nav__list a:focus,
.primary-nav__list a[aria-current="page"] {
  color: #fdeaa6;
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media (min-width: 820px) {
  .nav-toggle { display: none; }
  .site-header__inner { padding-block: 1rem .25rem; }
  .primary-nav__list {
    display: flex !important; flex-direction: row;
    flex-wrap: nowrap; justify-content: center; align-items: center;
    gap: 0;
    padding: 0 0 .75rem;
    white-space: nowrap;
  }
  .primary-nav__list a {
    padding: .6rem .85rem;             /* taller touch target */
    font-size: clamp(.78rem, 1vw, .9rem);  /* slightly larger than before */
    letter-spacing: .1em;
  }
}
/* Allow wrap to a tidy 2-line grouping if it must (very narrow desktop) */
@media (min-width: 820px) and (max-width: 980px) {
  .primary-nav__list { flex-wrap: wrap; }
  .primary-nav__list a { padding: .45rem .55rem; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: #000;
  width: 100%;
  /* Was: aspect-ratio 16/7 + max-height 540px — that combo capped the WIDTH
     on wide monitors because the browser shrinks width to preserve ratio
     once max-height clips the height. Using a clamp height instead lets
     width fill 100% at every viewport while keeping the hero a sensible
     height on phones (≥260px) and capping at 540px on large screens. */
  height: clamp(260px, 32vw, 540px);
}
.hero__slide {
  position: absolute; inset: 0;
  opacity: 0; transition: opacity 1000ms ease;
}
.hero__slide.is-active { opacity: 1; }
.hero__slide img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Page title (ruled both sides) ---------- */
.page-title {
  text-align: center;
  padding-block: clamp(2rem, 5vw, 3rem);
}
.page-title__row {
  display: flex; align-items: center; gap: 1rem;
  max-width: 880px; margin: 0 auto;
}
.page-title__row::before,
.page-title__row::after {
  content: ""; flex: 1; height: 1px; background: var(--c-rule);
}
.page-title h1 {
  margin: 0; white-space: nowrap;
  color: var(--c-ink);
  padding: 0 1rem;
}

/* Homepage welcome heading */
.welcome-heading {
  font-family: var(--f-serif); font-style: italic;
  color: var(--c-brick); text-align: center;
  font-size: clamp(1.6rem, 3.4vw, 2.25rem);
  margin: 0 0 .25em;
}

/* ---------- Asterisk-decorated heading (WP is-style-asterisk) ----------
   Prepends a single large brick-red asterisk centered above the heading.
   Use by adding `heading--asterisk` to any h2/h3 element. */
.heading--asterisk {
  text-align: center;
  position: relative;
  padding-top: 1.5em;
}
.heading--asterisk::before {
  content: "✦";
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  font-size: 1.4em; line-height: 1;
  color: var(--c-brick);
  font-family: var(--f-serif); font-weight: 400;
}

/* ---------- Lotus border divider ----------
   Decorative WP image used as a section separator. Centered, max width
   ~768px, transparent PNG so the cream pattern shows through. */
.lotus-border {
  text-align: center;
  padding: 1rem 0;
  line-height: 0;
}
.lotus-border img {
  display: inline-block;
  max-width: min(100%, 768px);
  height: auto;
}

/* ---------- Section title (ruled both sides) ---------- */
.section-title {
  display: flex; align-items: center; gap: 1rem;
  max-width: 880px; margin: 0 auto 1.25rem;
}
.section-title::before,
.section-title::after {
  content: ""; flex: 1; height: 1px; background: var(--c-rule);
}
.section-title h2 {
  margin: 0; white-space: nowrap; padding: 0 1rem;
}

/* ---------- Testimonial rotator (cross-fade) ----------
   All quotes are stacked absolutely in the same spot; only the active one
   is opacity:1. CSS handles the fade; JS just toggles .is-active. */
.testimonials {
  background: var(--c-cream-soft);
  border-block: 1px solid var(--c-rule-soft);
}
.testimonials__rotor {
  position: relative; min-height: 9rem; max-width: 720px; margin: 0 auto;
}
.testimonial {
  position: absolute; inset: 0;
  display: grid; place-items: center; text-align: center;
  padding: 1rem;
  opacity: 0; transform: translateY(6px);
  transition: opacity 700ms ease, transform 700ms ease;
  pointer-events: none;
}
.testimonial.is-active {
  opacity: 1; transform: translateY(0);
  pointer-events: auto;
}
.testimonial p {
  font-family: var(--f-serif); font-size: clamp(1.1rem, 2.2vw, 1.3rem);
  font-style: italic; color: var(--c-ink); margin: 0 0 .5rem;
}
.testimonial cite {
  font-style: normal; font-weight: 600; color: var(--c-brick);
  font-family: var(--f-sans); font-size: .9rem; letter-spacing: .04em;
  display: block;
}

/* ---------- Generic grid ---------- */
.grid {
  display: grid; gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }

/* ---------- Homepage feature rows ---------- */
.feature {
  display: grid; gap: 1.25rem;
  grid-template-columns: 1fr;
  align-items: center;
  background: var(--c-cream-soft);
  border: 1px solid var(--c-rule-soft);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.feature__media img { width: 100%; border-radius: var(--radius); }
.feature__body h3 { margin-top: 0; font-style: italic; color: var(--c-ink); }
.feature__cta { margin-top: 1rem; }
@media (min-width: 720px) {
  .feature { grid-template-columns: 280px 1fr; gap: 1.75rem; padding: 1.5rem; }
  .feature--reverse { grid-template-columns: 1fr 280px; }
  .feature--reverse .feature__media { grid-column: 2; grid-row: 1; }
}

/* ---------- CTA / Button ---------- */
.btn {
  display: inline-block; padding: .7rem 1.4rem;   /* 44px+ touch target */
  background: var(--c-brick); color: #fff !important;
  text-decoration: none !important;
  border-radius: var(--radius);
  font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: .85rem;
  transition: background 150ms ease;
  border: 1px solid var(--c-brick);
  min-height: 44px;
  line-height: 1.4;
}
.btn:hover, .btn:focus { background: var(--c-brick-deep); border-color: var(--c-brick-deep); }
.btn--ghost {
  background: transparent; color: var(--c-brick) !important;
  border: 1px solid var(--c-brick);
}
.btn--ghost:hover, .btn--ghost:focus { background: var(--c-brick); color: #fff !important; }

/* ---------- Bio blocks (instructors, classes) ---------- */
.bio {
  display: grid; gap: 1.25rem; align-items: start;
  grid-template-columns: 1fr;
  padding-block: 1.75rem;
  border-bottom: 1px solid var(--c-rule-soft);
}
.bio:last-child { border-bottom: 0; }
.bio__photo img {
  width: 100%; max-width: 280px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-inline: auto;
}
.bio__body h2 { margin-top: 0; font-size: 1.5rem; }
.bio__role { font-weight: 600; color: var(--c-brick); margin-bottom: .5em; font-size: .95rem; }

@media (min-width: 720px) {
  .bio { grid-template-columns: 240px 1fr; gap: 2rem; }
  .bio--reverse { grid-template-columns: 1fr 240px; }
  .bio--reverse .bio__photo { grid-column: 2; grid-row: 1; }
}

/* ---------- Highlighted callout (Schedule "Locals welcome") ---------- */
.callout {
  background: var(--c-cream-soft);
  border: 1px solid var(--c-rule-soft);
  padding: 1.5rem 1.75rem;
  margin: 1.5rem auto;
  border-radius: var(--radius);
  text-align: center;
  max-width: 760px;
  position: relative;
}
.callout::before {
  content: "❋"; display: block;
  color: var(--c-brick); font-size: 1rem;
  margin-bottom: .5rem;
}

/* ---------- Gallery + Lightbox ---------- */
.gallery {
  display: grid; gap: .5rem;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 600px) { .gallery { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .gallery { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1100px) { .gallery { grid-template-columns: repeat(5, 1fr); } }
.gallery a,
[data-lightbox] a { cursor: zoom-in; }
.gallery a { display: block; overflow: hidden; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.gallery img {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  transition: transform 250ms ease;
}
.gallery a:hover img, .gallery a:focus img { transform: scale(1.04); }

/* Lightbox overlay */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.88);
  display: none;
  align-items: center; justify-content: center;
  z-index: 9000;
  padding: 2rem;
}
.lightbox.is-open { display: flex; }
.lightbox__img {
  max-width: 95vw; max-height: 90vh;
  width: auto; height: auto;
  box-shadow: 0 10px 50px rgba(0,0,0,.5);
  border-radius: 4px;
  user-select: none;
}
.lightbox__close,
.lightbox__prev,
.lightbox__next {
  position: absolute;
  background: rgba(255,255,255,.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 50%;
  width: 44px; height: 44px;
  font-size: 1.25rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 150ms ease;
}
.lightbox__close:hover,
.lightbox__prev:hover,
.lightbox__next:hover { background: rgba(255,255,255,.25); }
.lightbox__close { top: 1.5rem; right: 1.5rem; }
.lightbox__prev  { left: 1.5rem;  top: 50%; transform: translateY(-50%); }
.lightbox__next  { right: 1.5rem; top: 50%; transform: translateY(-50%); }
@media (max-width: 600px) {
  .lightbox__close, .lightbox__prev, .lightbox__next { width: 36px; height: 36px; }
}

/* ---------- Map ---------- */
.map-embed {
  border: 0; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

/* ---------- Calendar ---------- */
.calendar { text-align: center; }
.calendar img {
  margin-inline: auto; border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}
.calendar__caption { margin-top: 1rem; color: var(--c-ink-soft); font-size: .95rem; }

/* ---------- Pricing ---------- */
.pricing {
  background: var(--c-cream-soft);
  border: 1px solid var(--c-rule-soft);
  border-radius: var(--radius);
  padding: 1.5rem; max-width: 460px; margin: 1rem auto; text-align: center;
}
.pricing ul { list-style: none; padding: 0; }
.pricing li { padding: .35em 0; border-bottom: 1px dashed var(--c-rule-soft); }
.pricing li:last-child { border-bottom: 0; }

/* ---------- Footer (deeper than header, same floral tile) ---------- */
.site-footer {
  background-color: var(--c-footer);
  /* No blend-mode here — the live site lets the pattern sit naturally on top
     of the base color. Adding multiply would compound the darkness and shift
     the footer browner than the intended #4c2627. */
  background-image:
    url("https://sundariyogastudio.com/wp-content/uploads/2024/05/sundari_floral-rev.gif"),
    url("../assets/images/patterns/brick-header.gif");
  background-repeat: repeat;
  background-position: 50% 0;
  color: #f4e6c8;
  padding: 2rem 0 1.25rem; margin-top: 3rem;
  border-top: 3px solid var(--c-footer-deep);
}
.site-footer a { color: #f4e6c8; }
.site-footer a:hover, .site-footer a:focus { color: var(--c-gold); }
.site-footer__inner {
  display: flex; flex-direction: column; align-items: center; gap: .85rem;
  text-align: center;
}
.site-footer__logo { line-height: 0; }
.site-footer__logo img {
  height: clamp(46px, 5vw, 60px); width: auto;
}
.site-footer__tag {
  font-size: .95rem; color: #f4e6c8; margin: 0;
  letter-spacing: .02em;
}
.site-footer__meta { font-size: .9rem; color: #f4e6c8; opacity: .92; margin: 0; }
.site-footer__meta a { text-decoration: underline; }

/* Social icons row — image-based */
.site-footer__social {
  list-style: none; padding: 0; margin: .25rem 0 0;
  display: flex; gap: .75rem; justify-content: center; align-items: center;
}
.site-footer__social li { line-height: 0; }
.site-footer__social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;    /* WCAG 2.5.5 touch target */
  background: var(--c-cream);
  overflow: hidden;
  transition: transform 150ms ease, background 150ms ease;
}
.site-footer__social a:hover, .site-footer__social a:focus { transform: scale(1.08); background: var(--c-gold); }
.site-footer__social img { width: 22px; height: 22px; object-fit: contain; display: block; }
/* Instagram icon keeps its color gradient; Facebook stays as-is. */

/* Design studio credit */
.site-footer__credit {
  font-size: .8rem; color: #c8b88f; margin: .5rem 0 0;
  letter-spacing: .02em;
}
.site-footer__credit a {
  color: #c8b88f; text-decoration: none;
  display: inline-flex; align-items: center; gap: .35rem;
}
.site-footer__credit a:hover, .site-footer__credit a:focus { color: var(--c-gold); }
.site-footer__credit img {
  width: 14px; height: 14px; vertical-align: middle; opacity: .9;
}

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: 2rem; }
.muted { color: var(--c-ink-soft); }
.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;
}

/* ---------- Accessibility: focus indicators (WCAG 2.4.7) ----------
   Visible 2px outline on keyboard focus only. Mouse clicks don't show it
   thanks to :focus-visible. */
:focus-visible {
  outline: 2px solid var(--c-brick-deep);
  outline-offset: 3px;
  border-radius: 2px;
}
.btn:focus-visible,
.btn--ghost:focus-visible {
  outline-offset: 4px;
}
.site-header :focus-visible,
.site-footer :focus-visible {
  outline-color: #fdeaa6;   /* visible on brick background */
}

/* ---------- Accessibility: reduced motion (WCAG 2.3.3) ----------
   Honor user OS-level "reduce motion" preference. Disables hero slide
   transitions, testimonial rotator fades, and gallery hover zoom. */
@media (prefers-reduced-motion: reduce) {
  .hero__slide,
  .testimonial,
  .gallery img,
  .site-footer__social a,
  .btn {
    transition: none !important;
    animation: none !important;
  }
  html { scroll-behavior: auto; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .site-footer, .nav-toggle, .hero, .lightbox { display: none; }
  body { background: #fff; color: #000; background-image: none; }
}
