/* ============================================
   The Unsafe Social Worker — Global Stylesheet
   Design: Calm, organic, editorial
   Theme: Dark purple advocacy
   ============================================ */

/* --- Self-hosted fonts --- */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/cormorant-garamond.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 400 500;
  font-display: swap;
  src: url('../fonts/cormorant-garamond-italic.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('../fonts/dm-sans.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* --- Design Tokens --- */
:root {
  color-scheme: dark;

  /* Palette — sober, muted, dark purple
     Token names retained (sage = primary accent, mauve = secondary)
     so existing pages inherit the new hues without markup changes. */
  --color-sage: #B794F4;
  --color-sage-light: #D6BCFA;
  --color-sage-pale: #4C3677;
  --color-sage-wash: #1E1530;
  --color-mauve: #F0A8D8;
  --color-mauve-light: #D69AC0;
  --color-mauve-pale: #2D1A2A;
  --color-slate: #A89FC8;
  --color-slate-light: #CFC7E2;
  --color-cream: #100A1C;
  --color-cream-warm: #1A1228;
  --color-white: #1D1430;
  --color-text: #EFE8F8;
  --color-text-light: #CDC1DE;
  --color-text-muted: #9A90AE;
  --color-border: #3D3454;
  --color-border-light: #29223C;
  --color-ink: #070410;
  --color-surface-raised: #241935;
  --color-surface-soft: #150F22;

  /* Typography */
  --font-heading: 'Cormorant Garamond', 'Georgia', serif;
  --font-body: 'DM Sans', 'Helvetica Neue', sans-serif;

  /* Spacing scale */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  --space-3xl: 8rem;

  /* Border radius — soft, organic */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 40px;
  --radius-full: 9999px;

  /* Shadows — soft depth for dark surfaces */
  --shadow-sm: 0 1px 6px rgb(0 0 0 / 0.24);
  --shadow-md: 0 8px 24px rgb(0 0 0 / 0.28);
  --shadow-lg: 0 18px 48px rgb(0 0 0 / 0.34);

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 0.2s;
  --duration-normal: 0.4s;
  --duration-slow: 0.7s;

  /* Layout */
  --max-width: 1200px;
  --max-width-narrow: 800px;
  --max-width-text: 680px;
}

/* --- Typography --- */
html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* Honeypot anti-spam field: visually hidden from sighted users AND keyboard,
   but still in the DOM so bots that fill all fields trip the server-side check. */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none;
}

/* --- Visually-hidden helper (sr-only) --- */
.sr-only,
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background:
    radial-gradient(circle at 18% 0%, rgb(76 54 119 / 0.28), transparent 34rem),
    radial-gradient(circle at 92% 8%, rgb(45 26 42 / 0.32), transparent 30rem),
    var(--color-cream);
  line-height: 1.7;
  font-weight: 400;
  letter-spacing: 0.01em;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0;
  color: var(--color-text);
}

h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
h3 { font-size: clamp(1.4rem, 2.5vw, 1.8rem); }
h4 { font-size: clamp(1.2rem, 2vw, 1.4rem); }

p {
  max-width: 65ch;
  margin-bottom: var(--space-sm);
}

a {
  color: var(--color-sage);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

a:hover { color: var(--color-mauve); }

::selection {
  background: rgb(183 148 244 / 0.32);
  color: var(--color-text);
}

blockquote {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-style: italic;
  color: var(--color-text-light);
  border-left: 3px solid var(--color-sage);
  padding: var(--space-md) var(--space-lg);
  margin: var(--space-lg) 0;
  background: var(--color-sage-wash);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* --- Skip Link --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-sm);
  background: var(--color-sage);
  color: var(--color-ink);
  padding: var(--space-xs) var(--space-sm);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  z-index: 1000;
  font-size: 0.875rem;
}

.skip-link:focus {
  top: 0;
  color: var(--color-ink);
}

/* --- Container --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.container--narrow {
  max-width: var(--max-width-narrow);
}

.container--text {
  max-width: var(--max-width-text);
}

/* --- noscript fallbacks (visible only when JS fails / disabled) --- */
.site-header__noscript {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  max-width: var(--max-width);
  margin: 0 auto;
}

.site-header__noscript .brand img { height: 64px; width: auto; }

.footer__noscript {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-lg) var(--space-md);
  text-align: center;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.9rem;
}

.footer__noscript a { color: var(--color-sage); }
.footer__noscript p { max-width: none; margin: 0 0 var(--space-xs); }

/* --- Header / Navigation --- */
/* backdrop-filter on .site-header would create a containing block for position:fixed
   children (the mobile drawer + overlay), trapping them inside the header's ~76px height.
   The blur is applied via ::before pseudo-element instead so fixed descendants are
   contained by the viewport, not the header. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--color-border-light);
  transition: box-shadow var(--duration-normal) var(--ease-out);
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgb(16 10 28 / 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.site-header.scrolled {
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-md);
  max-width: var(--max-width);
  margin: 0 auto;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.nav-logo img {
  height: 64px;
  width: auto;
  opacity: 0.95;
}

.nav-logo span {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  list-style: none;
}

.nav-links a {
  font-size: 0.9rem;
  color: var(--color-text-light);
  font-weight: 500;
  padding: var(--space-xs) 0;
  position: relative;
  letter-spacing: 0.02em;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-sage);
  border-radius: var(--radius-full);
  transition: width var(--duration-fast) var(--ease-out);
}

.nav-links a:hover::after,
.nav-links a.active::after,
.nav-links a[aria-current="page"]::after {
  width: 100%;
}

.nav-links a:hover,
.nav-links a.active,
.nav-links a[aria-current="page"] {
  color: var(--color-sage);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-xs);
  color: var(--color-text);
}

.nav-toggle svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.nav-close {
  display: none;
}

/* Mobile nav */
@media (max-width: 900px) {
  .nav-toggle { display: block; }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    transform: translateX(100%);
    width: min(320px, 85vw);
    height: 100vh;
    flex-direction: column;
    align-items: flex-start;
    background: var(--color-surface-soft);
    padding: var(--space-3xl) var(--space-lg) var(--space-lg);
    gap: var(--space-xs);
    transition: transform var(--duration-normal) var(--ease-out);
    box-shadow: -12px 0 40px rgb(0 0 0 / 0.42);
    z-index: 200;
  }

  .nav-links.open { transform: translateX(0); }

  .nav-links a {
    font-size: 1.1rem;
    padding: var(--space-sm) 0;
  }

  .nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgb(0 0 0 / 0.58);
    z-index: 150;
  }

  .nav-overlay.open { display: block; }

  .nav-close {
    display: block;
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text);
    padding: var(--space-xs);
  }

  .nav-close svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
  }
}

/* --- Quick Exit button --- */
/* Harm-reduction pattern: always visible in the header so users on shared/work
   devices can leave instantly. Slate color keeps it distinct from sage CTAs.
   No entrance animation — prefers-reduced-motion is automatically honoured
   because there is no animation to begin with. */
.quick-exit {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 0.45rem 0.9rem;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--color-slate);
  background: transparent;
  border: 1.5px solid var(--color-slate);
  border-radius: 8px;         /* pill-ish but rectangular — distinct from .btn */
  cursor: pointer;
  white-space: nowrap;
  min-height: 44px;           /* tap target */
  min-width: 44px;
  transition: background var(--duration-fast) var(--ease-out),
              color var(--duration-fast) var(--ease-out);
  flex-shrink: 0;
}

.quick-exit:hover,
.quick-exit:focus-visible {
  background: var(--color-slate);
  color: var(--color-ink);
  outline: none;
}

.quick-exit:focus-visible {
  outline: 3px solid var(--color-slate-light);
  outline-offset: 2px;
}

/* On mobile the button sits between the logo and the hamburger toggle.
   At very small viewports abbreviate nothing — 44px min height is already set. */
@media (max-width: 900px) {
  .quick-exit {
    font-size: 0.75rem;
    padding: 0.4rem 0.7rem;
  }
}

/* --- Sections --- */
.section {
  padding: var(--space-3xl) 0;
}

.section--cream { background: var(--color-cream); }
.section--white { background: var(--color-white); }
.section--sage { background: var(--color-sage-wash); }
.section--mauve { background: var(--color-mauve-pale); }

.section-label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-sage);
  margin-bottom: var(--space-sm);
}

.section-title {
  margin-bottom: var(--space-md);
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--color-text-light);
  max-width: 55ch;
  line-height: 1.8;
}

/* Organic section dividers */
.wave-divider {
  width: 100%;
  height: auto;
  display: block;
  margin: -1px 0;
}

.wave-divider path {
  fill: var(--color-cream);
}

.wave-divider--white path { fill: var(--color-white); }
.wave-divider--sage path { fill: var(--color-sage-wash); }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  padding: 0.85rem 2rem;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: background-color var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out), opacity var(--duration-fast) var(--ease-out);
  text-decoration: none;
  text-align: center;
}

.btn:focus-visible,
.nav-links a:focus-visible,
.nav-toggle:focus-visible,
.nav-close:focus-visible,
.footer-nav a:focus-visible,
.footer-social-links a:focus-visible,
.card__link:focus-visible,
.video-card__link:focus-visible {
  outline: 2px solid var(--color-sage);
  outline-offset: 4px;
}

.btn--primary {
  background: var(--color-sage);
  color: var(--color-ink);
}

/* Dual-ring focus indicator: sage outline on sage background = 1:1 (invisible).
   Use ink outline + sage halo so it reads clearly on any surface. WCAG 1.4.11 */
.btn--primary:focus-visible {
  outline: 2px solid var(--color-ink);
  outline-offset: 3px;
  box-shadow: 0 0 0 5px var(--color-sage);
}

.btn--primary:hover {
  background: var(--color-sage-light);
  color: var(--color-ink);
  transform: translateY(-2px);
}

.btn--secondary {
  background: transparent;
  color: var(--color-sage);
  border: 1.5px solid var(--color-sage);
}

.btn--secondary:hover {
  background: var(--color-sage-wash);
  color: var(--color-sage-light);
  transform: translateY(-2px);
}

.btn--ghost {
  background: transparent;
  color: var(--color-text-light);
  padding: 0.6rem 1.2rem;
}

.btn--ghost:hover {
  color: var(--color-sage);
  background: var(--color-sage-wash);
}

/* --- Cards — soft, floating --- */
.card {
  background: var(--color-white);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.card__image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.card__body {
  padding: var(--space-md) var(--space-lg);
}

.card__date {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-xs);
}

.card__title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: var(--space-xs);
  line-height: 1.3;
}

.card__excerpt {
  font-size: 0.92rem;
  color: var(--color-text-light);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-sage);
  margin-top: var(--space-sm);
}

.card__link:hover { color: var(--color-sage-light); }

/* --- Blog Grid --- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: var(--space-lg);
}

@media (max-width: 600px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Testimonials --- */
.testimonial {
  background: var(--color-white);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  position: relative;
}

.testimonial::before {
  content: '\201C';
  font-family: var(--font-heading);
  font-size: 4rem;
  color: rgb(183 148 244 / 0.22);
  position: absolute;
  top: var(--space-sm);
  left: var(--space-md);
  line-height: 1;
}

.testimonial p {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-style: italic;
  color: var(--color-text-light);
  line-height: 1.8;
  padding-top: var(--space-md);
}

/* --- Forms --- */
.form-group {
  margin-bottom: var(--space-md);
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text-light);
  margin-bottom: var(--space-xs);
  letter-spacing: 0.02em;
}

.form-input,
.form-textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.85rem 1.2rem;
  background: var(--color-surface-soft);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  transition: border-color var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out);
  outline: none;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--color-text-muted);
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--color-sage);
  box-shadow: 0 0 0 3px rgb(183 148 244 / 0.22);
}

.form-textarea {
  min-height: 160px;
  resize: vertical;
}

/* --- Newsletter --- */
.newsletter {
  background: var(--color-sage-wash);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  text-align: center;
}

.newsletter__form {
  display: flex;
  gap: var(--space-sm);
  max-width: 460px;
  margin: var(--space-md) auto 0;
}

.newsletter__form .form-input {
  flex: 1;
  background: var(--color-surface-soft);
}

@media (max-width: 500px) {
  .newsletter__form {
    flex-direction: column;
  }
}

/* Form status / aria-live region.
   Empty: zero height, doesn't reserve space. Populated by the sentinel guard
   in js/main.js (or by the real backend, later) → message renders as a banner
   spanning the full form width, with calm-witnessing tone (not red error). */
.form-status {
  flex: 1 1 100%;
  font-size: 0.875rem;
  color: var(--color-text-light);
  line-height: 1.5;
}
.form-status:empty {
  display: none;
}
.form-status:not(:empty) {
  margin-top: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: rgb(183 148 244 / 0.10);
  border-left: 3px solid var(--color-sage);
  border-radius: 4px;
}

/* --- Footer --- */
.site-footer {
  background: var(--color-ink);
  color: rgba(255, 255, 255, 0.7);
  padding: var(--space-2xl) 0 var(--space-lg);
  border-top: 1px solid var(--color-border-light);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: var(--space-xl);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.footer-brand p {
  font-size: 0.98rem;
  margin-top: var(--space-sm);
  color: rgba(255, 255, 255, 0.72);
  max-width: 35ch;
}

.footer-brand img {
  height: 40px;
  width: auto;
  opacity: 0.9;
}

.footer-nav h3,
.footer-social h3,
.footer-legal h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: var(--space-md);
}

.footer-nav ul,
.footer-legal ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.footer-nav a,
.footer-legal a {
  font-size: 0.98rem;
  color: rgba(255, 255, 255, 0.78);
}

.footer-nav a:hover,
.footer-legal a:hover { color: var(--color-sage-pale); }

.footer-social-links {
  display: flex;
  gap: var(--space-sm);
  list-style: none;
  padding: 0;
  margin: var(--space-sm) 0 0;
}

.footer-social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  transition: background var(--duration-fast) var(--ease-out);
}

.footer-social-links a:hover {
  background: var(--color-sage);
  color: var(--color-white);
}

.footer-social-links svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.footer-bottom {
  margin-top: var(--space-xl);
  padding-top: var(--space-md);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.65);
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-md);
  padding-right: var(--space-md);
  display: flex;
  gap: var(--space-xs) var(--space-md);
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.footer-bottom p { margin: 0; }

.footer-credit a {
  color: rgba(255, 255, 255, 0.6);
}

.footer-credit a:hover { color: var(--color-sage-pale); }

@media (max-width: 700px) {
  .footer-inner {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    text-align: center;
  }

  .footer-brand p {
    margin-left: auto;
    margin-right: auto;
  }

  .footer-brand img {
    margin-left: auto;
    margin-right: auto;
    display: block;
  }

  .footer-social-links {
    justify-content: center;
  }

  .footer-nav ul,
  .footer-legal ul {
    align-items: center;
  }
}

/* --- Scroll Reveal --- */
/* Progressive enhancement: only hide when JS adds .has-anim to <html>.
   Without JS, .reveal renders fully visible — no broken pages on JS failure. */
.reveal {
  opacity: 1;
  transform: none;
}

html.has-anim .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--duration-slow) var(--ease-out),
              transform var(--duration-slow) var(--ease-out);
  transition-delay: var(--delay, 0s);
}

html.has-anim .reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { --delay: 0.1s; }
.reveal-delay-2 { --delay: 0.2s; }
.reveal-delay-3 { --delay: 0.3s; }
.reveal-delay-4 { --delay: 0.4s; }

/* --- Page Hero --- */
.page-hero {
  padding: var(--space-3xl) 0 var(--space-2xl);
  text-align: center;
}

.page-hero .section-label {
  margin-bottom: var(--space-md);
}

.page-hero h1 {
  margin-bottom: var(--space-md);
}

.page-hero .section-subtitle {
  margin: 0 auto;
}

/* --- Article / Blog Post --- */
.article-hero {
  padding: var(--space-2xl) 0 var(--space-lg);
}

.article-hero img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin-top: var(--space-lg);
}

.article-meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-sm);
}

.article-content {
  padding: var(--space-lg) 0 var(--space-2xl);
}

.article-content p {
  font-size: 1.05rem;
  line-height: 1.85;
  margin-bottom: var(--space-md);
}

.article-content img {
  border-radius: var(--radius-md);
  margin: var(--space-lg) 0;
}

/* Related Posts */
.related-posts {
  padding: var(--space-2xl) 0;
  background: var(--color-sage-wash);
}

/* --- Video Grid --- */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: var(--space-lg);
}

.video-card {
  background: var(--color-white);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out);
}

.video-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.video-card__thumbnail {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--color-cream-warm);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

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

.video-card__play {
  position: absolute;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: rgb(239 232 248 / 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  transition: transform var(--duration-fast) var(--ease-out);
}

.video-card:hover .video-card__play {
  transform: scale(1.08);
}

.video-card__play svg {
  width: 22px;
  height: 22px;
  fill: #2A1B47;
  margin-left: 3px;
}

.video-card__body {
  padding: var(--space-md) var(--space-lg);
}

.video-card__title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
}

@media (max-width: 600px) {
  .video-grid { grid-template-columns: 1fr; }
}

/* --- Utility --- */
.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-lg { margin-bottom: var(--space-lg); }

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

  html.has-anim .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
