/* ==========================================================================
   Spirit Essence Collective — global stylesheet
   Mobile-first. Breakpoints: tablet 768px, desktop 1024px (see docs/architecture.md)
   Palette is the official one from reference-material/colour-palette.jpeg —
   Deep Charcoal, Warm Ivory, Lotus Rose, Antique Gold. This supersedes the
   earlier palette sampled from screenshots of Tara Diana's site. Swap here
   if Tara provides updated hex codes later.
   ========================================================================== */

:root {
  /* ---- Palette (official — reference-material/colour-palette.jpeg) ---- */
  --color-bg: #fef7ee; /* Warm Ivory */
  --color-surface: #fff;
  --color-text: #20231f; /* Deep Charcoal */
  --color-text-muted: #636562;
  --color-primary: #20231f; /* Deep Charcoal */
  --color-primary-contrast: #fef7ee; /* Warm Ivory */
  --color-accent: #e25f7a; /* Lotus Rose */
  --color-accent-soft: #f3bfca;
  --color-gold: #c7a66a; /* Antique Gold */
  --color-border: #f6ebda;
  --color-focus: #e25f7a; /* Lotus Rose */

  /* ---- Type (system stack — see docs/architecture.md) ---- */
  --font-heading: "Iowan Old Style", "Palatino Linotype", georgia, ui-serif, serif;
  --font-body: -apple-system, blinkmacsystemfont, "Segoe UI", roboto, "Helvetica Neue", arial, sans-serif;
  --step-0: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --step-1: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
  --step-2: clamp(1.6rem, 1.4rem + 1vw, 2.1rem);
  --step-3: clamp(2rem, 1.7rem + 1.5vw, 2.75rem);
  --step-4: clamp(2.5rem, 2rem + 2.5vw, 3.75rem);

  /* ---- Spacing scale ---- */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4.5rem;
  --space-7: 6rem;
  --radius: 0.75rem;
  --shadow-soft: 0 1px 2px rgb(32 35 31 / 6%), 0 8px 24px rgb(32 35 31 / 6%);
  --max-width: 72rem;
}

/* ---- Reset ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  /* stylelint-disable-next-line property-no-vendor-prefix -- needed for iOS Safari text scaling */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

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

img,
picture,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

ul,
ol {
  padding: 0;
  margin: 0;
  list-style: none;
}

h1,
h2,
h3,
h4,
p,
figure {
  margin: 0;
}

button {
  font: inherit;
  cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}

/* ---- Layout helpers ---- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-3);
}

.section {
  padding-block: var(--space-6);
}

.section--muted {
  background: var(--color-surface);
  border-block: 1px solid var(--color-border);
}

.section-heading {
  font-family: var(--font-heading);
  font-size: var(--step-3);
  font-weight: 600;
  max-width: 40rem;
  margin-bottom: var(--space-3);
}

.section-lead {
  color: var(--color-text-muted);
  font-size: var(--step-1);
  max-width: 40rem;
  margin-bottom: var(--space-4);
}

/* For sections where the 40rem measure leaves an odd, oversized gap
   next to short lead text — lets it span the full container instead. */
.section-lead--wide {
  max-width: none;
}

.section-heading--wide {
  max-width: none;
}

/* The About page reads as long-form prose rather than short intro
   lines, so let it use the full container width instead of the
   40rem measure the rest of the site uses for scannable intros. */
.about-page .section-lead {
  max-width: none;
}

.placeholder-note {
  display: inline-block;
  margin-top: var(--space-1);
  padding: 0.15em 0.6em;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--color-primary);
  background: #fbe7eb;
  border: 1px solid var(--color-accent-soft);
  border-radius: 999px;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  min-height: 44px;
  padding: 0.85em 1.5em;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--primary {
  background: var(--color-primary);
  color: var(--color-primary-contrast);
  border-color: var(--color-gold);
}

.btn--primary:hover {
  background: #151714;
}

.btn--secondary {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn--secondary:hover {
  background: var(--color-primary);
  color: var(--color-primary-contrast);
}

.external-icon {
  display: inline-block;
  width: 0.85em;
  height: 0.85em;
  flex-shrink: 0;
}

/* ---- Header / nav ---- */

/* backdrop-filter lives on ::before, not on .site-header itself — a filter
   or backdrop-filter on an element creates a new containing block for any
   position:fixed descendants, which would confine the fixed mobile-nav
   overlay (a descendant of .site-header) to the header's own small box
   instead of the full viewport. Isolating it on an empty pseudo-element
   keeps the frosted-glass look without that side effect. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgb(199 166 106 / 30%); /* Antique Gold hairline */
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgb(32 35 31 / 94%); /* Deep Charcoal */
  backdrop-filter: blur(8px);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-2);
  padding-block: var(--space-2);
  max-width: 88rem;
  margin-inline: auto;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-family: var(--font-heading);
  font-size: var(--step-1);
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-primary-contrast);
}

.site-logo__mark {
  display: block;
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgb(254 247 238 / 30%);
  border-radius: var(--radius);
  background: transparent;
}

.nav-toggle__bar,
.nav-toggle__bar::before,
.nav-toggle__bar::after {
  content: "";
  display: block;
  width: 20px;
  height: 2px;
  background: var(--color-primary-contrast);
  position: relative;
  transition: transform 0.2s ease;
}

.nav-toggle__bar::before {
  position: absolute;
  top: -6px;
}

.nav-toggle__bar::after {
  position: absolute;
  top: 6px;
}

.primary-nav {
  position: fixed;
  z-index: 60;
  inset: 0;
  top: 64px;
  background: var(--color-bg);
  padding: var(--space-3);
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.25s ease;
}

.primary-nav[data-open="true"] {
  transform: translateX(0);
}

.primary-nav__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.primary-nav__list a {
  min-height: 44px;
  display: flex;
  align-items: center;
  font-size: var(--step-1);
  text-decoration: none;
  border-bottom: 1px solid var(--color-border);
}

.primary-nav__cta {
  margin-top: var(--space-3);
}

/* ---- Hero ---- */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  color: #fff;
}

.hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.hero__slide[data-active="true"] {
  opacity: 1;
}

.hero__slide picture {
  display: block;
  width: 100%;
  height: 100%;
}

.hero__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgb(32 35 31 / 75%), rgb(32 35 31 / 15%) 60%);
}

.hero__content {
  position: relative;
  z-index: 2;
  padding: var(--space-4) var(--space-3) var(--space-6);
  max-width: 44rem;
}

.hero__eyebrow {
  display: inline-block;
  margin: 0 0 var(--space-3);
  padding: 0.5em 1em;
  border-radius: var(--radius);
  background: rgb(32 35 31 / 55%);
  backdrop-filter: blur(6px);
  font-family: var(--font-heading);
  font-size: var(--step-1);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-gold);
}

.hero__title {
  font-family: var(--font-heading);
  font-size: var(--step-4);
  line-height: 1.1;
  margin-bottom: var(--space-2);
}

.hero__lead {
  font-size: var(--step-1);
  margin-bottom: var(--space-3);
  max-width: 38rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

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

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

a.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgb(32 35 31 / 8%), 0 12px 28px rgb(32 35 31 / 10%);
}

.card__image {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.card__image picture {
  display: block;
  width: 100%;
  height: 100%;
}

.card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card__body {
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  flex: 1;
}

.card__title {
  font-family: var(--font-heading);
  font-size: var(--step-1);
  font-weight: 600;
}

.card__title--sm {
  font-size: var(--step-0);
}

.card__meta {
  color: var(--color-text-muted);
  font-size: 0.9em;
}

.card__footer {
  margin-top: auto;
  padding-top: var(--space-2);
}

/* ---- Experience pills (Bring the Collective to You) ---- */
.experience-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 10.5rem);
  grid-auto-rows: 6.5rem;
  justify-content: center;
  gap: var(--space-2);
}

.experience-pill {
  border: 1px solid var(--color-gold);
  border-radius: 999px;
  box-shadow: 0 2px 10px rgb(199 166 106 / 15%);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.experience-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgb(199 166 106 / 25%);
  border-color: var(--color-accent);
}

.experience-pill .card__body {
  align-items: center;
  justify-content: center;
  padding: var(--space-2);
  text-align: center;
}

.experience-pill .card__title {
  font-size: 0.8rem;
  line-height: 1.25;
  letter-spacing: 0.02em;
}

.experience-pill .card__title::before {
  content: "✦";
  display: block;
  margin-bottom: 0.4em;
  color: var(--color-gold);
  font-size: 0.7em;
}

.btn--small {
  min-height: 36px;
  padding: 0.5em 1.1em;
  font-size: 0.85em;
}

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

.practitioner-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.practitioner-card__photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--color-gold);
  margin-bottom: var(--space-2);
  flex-shrink: 0;
}

.practitioner-card__photo picture {
  display: block;
  width: 100%;
  height: 100%;
}

.practitioner-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.practitioner-card__name {
  font-family: var(--font-heading);
  font-size: var(--step-1);
  font-weight: 600;
}

.practitioner-card__role {
  color: var(--color-accent);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-top: 0.25em;
}

.practitioner-card__specialties {
  color: var(--color-text-muted);
  font-size: 0.85em;
  margin-top: var(--space-1);
}

.practitioner-card__bio {
  margin-top: var(--space-2);
  font-size: 0.9em;
  text-align: left;
}

/* ---- Testimonials ---- */
.testimonial {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-3);
}

.testimonial__quote {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-style: italic;
  margin-bottom: var(--space-2);
}

.testimonial__attribution {
  color: var(--color-text-muted);
  font-size: 0.9em;
}

/* ---- Footer ---- */
.site-footer {
  background: var(--color-primary);
  color: var(--color-primary-contrast);
  padding-block: var(--space-4);
}

.site-footer a {
  text-decoration: none;
  color: inherit;
}

.footer-grid {
  display: grid;
  gap: var(--space-3);
}

.footer-nav__list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.footer-nav__list a {
  display: inline-flex;
  align-items: center;
  padding-block: 0.15rem;
  font-size: 0.9rem;
}

.social-icons {
  display: flex;
  gap: 0.6rem;
  margin-top: var(--space-2);
}

.social-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid rgb(254 247 238 / 25%);
  border-radius: 50%;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.social-icon-link svg {
  width: 1.1rem;
  height: 1.1rem;
}

.social-icon-link:hover {
  background: var(--color-gold);
  border-color: var(--color-gold);
  color: var(--color-primary);
  transform: translateY(-2px);
}

.footer-bottom {
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid rgb(255 255 255 / 20%);
  font-size: 0.85em;
  color: var(--color-accent-soft);
  text-align: center;
}

.footer-credit {
  margin-bottom: var(--space-1);
  font-size: 1.1em;
  font-style: italic;
}

.footer-copyright {
  font-size: 0.85em;
}

/* ---- Scroll reveal ----
   Content is visible by default (no-JS / reduced-motion safe). JS opts
   elements INTO the hidden-then-reveal animation by adding .js-reveal-init —
   see main.js. Never hide content by default in CSS alone. */
.js-reveal-init[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.js-reveal-init[data-reveal="visible"] {
  opacity: 1;
  transform: none;
}

/* ---- Utilities ----
   Small, reusable classes standing in for one-off inline styles — the
   Content-Security-Policy (style-src 'self' in vercel.json) blocks inline
   style="..." attributes in production, so layout tweaks need to live here,
   not on the element. */
.text-center {
  text-align: center;
}

.mx-auto {
  margin-inline: auto;
}

.mt-2 {
  margin-top: var(--space-2);
}

.mt-3 {
  margin-top: var(--space-3);
}

.mt-4 {
  margin-top: var(--space-4);
}

.section--tight {
  padding-block: var(--space-4) 0;
}

.heading--sm {
  font-size: var(--step-1);
}

.list-disc {
  display: grid;
  gap: var(--space-1);
  list-style: disc;
  padding-left: 1.25rem;
}

.list-disc--spaced {
  margin-bottom: var(--space-3);
}

.stack-3 {
  display: grid;
  gap: var(--space-3);
}

.feature-photo {
  max-width: 36rem;
  border-radius: var(--radius);
  overflow: hidden;
}

.feature-photo picture {
  display: block;
  width: 100%;
}

.feature-photo img {
  display: block;
  width: 100%;
  height: auto;
}

.card__body--flush {
  padding: 0;
}

.btn--inverse {
  color: #fff;
  border-color: #fff;
}

.hero__actions--center {
  justify-content: center;
}

.btn--disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.social-links {
  margin-top: var(--space-3);
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

/* ---- Tablet ---- */
@media (width >= 768px) {
  .card-grid {
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  }

  .card-grid--2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .card-grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .card-grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .practitioner-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---- Desktop ---- */
@media (width >= 1024px) {
  .nav-toggle {
    display: none;
  }

  .site-logo__mark {
    width: 5.5rem;
    height: 5.5rem;
  }

  .primary-nav {
    position: static;
    display: flex;
    align-items: center;
    transform: none;
    padding: 0;
    background: transparent;
    overflow: visible;
  }

  .primary-nav__list {
    flex-direction: row;
    align-items: center;
    gap: var(--space-2);
  }

  .primary-nav__list a {
    border-bottom: none;
    min-height: auto;
    font-size: 0.95rem;
    white-space: nowrap;
    color: var(--color-primary-contrast);
  }

  .primary-nav__cta {
    margin-top: 0;
    margin-left: var(--space-2);
  }

  .primary-nav__cta .btn {
    white-space: nowrap;
    padding-inline: 1.1em;
  }

  /* On the dark header bar, a Deep Charcoal button would disappear —
     swap to Warm Ivory so the primary CTA still pops. */
  .primary-nav__cta .btn--primary {
    background: var(--color-primary-contrast);
    color: var(--color-primary);
    border-color: var(--color-gold);
  }

  .primary-nav__cta .btn--primary:hover {
    background: var(--color-border);
  }

  .card-grid--4 {
    grid-template-columns: repeat(4, 1fr);
  }

  .practitioner-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .hero {
    min-height: 80vh;
  }
}

@media (width >= 1280px) {
  .practitioner-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
