/* ===== Custom Properties ===== */
:root {
  color-scheme: light;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ===== Base Typography ===== */
body {
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.font-display {
  font-family: var(--font-display);
}

/* ===== Skip Link ===== */
.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: -1;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  padding: 0.75rem 1rem;
  background-color: #065f46;
  color: #ffffff;
  border-radius: 0.5rem;
  text-decoration: none;
  z-index: 1000;
}

/* ===== Prose (blog) ===== */
.prose h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  color: #0f172a;
  letter-spacing: -0.01em;
}
.prose h3 {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
  color: #1e293b;
}
.prose p {
  margin-bottom: 1.25rem;
  line-height: 1.8;
  color: #475569;
}
.prose ul, .prose ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
  color: #475569;
}
.prose li {
  margin-bottom: 0.375rem;
  line-height: 1.8;
}
.prose a {
  color: #047857;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s;
}
.prose a:hover {
  color: #065f46;
}
.prose strong {
  font-weight: 600;
  color: #0f172a;
}
.prose blockquote {
  border-left: 3px solid #059669;
  padding-left: 1.25rem;
  margin: 1.5rem 0;
  color: #64748b;
  font-style: italic;
}
.prose hr {
  border: none;
  border-top: 1px solid #e2e8f0;
  margin: 2.5rem 0;
}
.prose img {
  border-radius: 1rem;
  margin: 1.5rem 0;
}

/* ===== Scroll Reveal Animation ===== */
@keyframes reveal-up {
  from {
    opacity: 0;
    transform: translateY(2rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes reveal-scale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes float-gentle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.reveal {
  opacity: 0;
  transform: translateY(2rem);
}

.reveal.revealed {
  animation: reveal-up 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.95);
}

.reveal-scale.revealed {
  animation: reveal-scale 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Stagger children */
.reveal-stagger > .reveal:nth-child(1) { animation-delay: 0ms; }
.reveal-stagger > .reveal:nth-child(2) { animation-delay: 100ms; }
.reveal-stagger > .reveal:nth-child(3) { animation-delay: 200ms; }
.reveal-stagger > .reveal:nth-child(4) { animation-delay: 300ms; }
.reveal-stagger > .reveal:nth-child(5) { animation-delay: 400ms; }
.reveal-stagger > .reveal:nth-child(6) { animation-delay: 500ms; }

/* ===== Hover Card Lift ===== */
.card-lift {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}
.card-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.1);
}

/* ===== Gradient Text ===== */
.text-gradient {
  background: linear-gradient(135deg, #059669, #047857);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== Subtle texture overlay ===== */
.texture-dots {
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.05) 1px, transparent 0);
  background-size: 24px 24px;
}

/* ===== Navbar ===== */
.nav-scrolled {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* ===== Smooth details/summary ===== */
details[open] > div,
details[open] > p {
  animation: reveal-up 0.3s ease forwards;
}

/* ===== Form focus ring ===== */
.form-input-elevated {
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input-elevated:focus {
  border-color: #059669;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
  outline: none;
}

/* ===== Sticky 2-button CTA (all viewports) ===== */
.sticky-cta-bar {
  display: flex;
  gap: 0.625rem;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 0.75rem 0.875rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-top: 1px solid rgba(16, 185, 129, 0.18);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
}

.sticky-cta-btn {
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 0.5rem;
  border-radius: 0.75rem;
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  transition: transform 0.15s ease-out, background 0.2s, box-shadow 0.2s;
}

.sticky-cta-btn svg {
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
}

.sticky-cta-label-full {
  display: none;
}

.sticky-cta-btn:active {
  transform: scale(0.97);
}

.sticky-cta-call {
  background: linear-gradient(135deg, #065f46, #047857);
  color: #ffffff;
}

@media (hover: hover) {
  .sticky-cta-call:hover {
    background: linear-gradient(135deg, #047857, #059669);
  }
}

.sticky-cta-form {
  background: #ffffff;
  color: #065f46;
  border: 1px solid rgba(16, 185, 129, 0.45);
}

@media (hover: hover) {
  .sticky-cta-form:hover {
    background: #ecfdf5;
  }
}

body {
  padding-bottom: calc(4.25rem + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 768px) {
  .sticky-cta-bar {
    gap: 0.75rem;
    padding: 0.875rem 1.25rem calc(0.875rem + env(safe-area-inset-bottom, 0px));
    justify-content: center;
  }

  .sticky-cta-btn {
    flex: 0 1 auto;
    min-width: 13rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
  }

  .sticky-cta-label-short {
    display: none;
  }

  .sticky-cta-label-full {
    display: inline;
  }

  body {
    padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
  }
}

/* ===== Section divider ===== */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, #d1fae5, transparent);
}

/* ===== Image hairline outline ===== */
.img-outline {
  outline: 1px solid rgba(0, 0, 0, 0.1);
  outline-offset: -1px;
}
.img-outline-light {
  outline: 1px solid rgba(255, 255, 255, 0.1);
  outline-offset: -1px;
}

/* ===== Hero helpers ported from design doc ===== */
@keyframes pulse-sage {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.pulse-sage {
  animation: pulse-sage 2s ease-in-out infinite;
}
.hero-display {
  font-family: var(--font-body);
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1;
  letter-spacing: -0.035em;
  font-weight: 600;
  text-wrap: balance;
}
.stat-value {
  font-family: var(--font-body);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: #1a1f1c;
}

/* ===== Community hero word marquee =====
   Subliminal scrolling ghost words behind community-page heros. 3 rows,
   ~3.5% opacity, 110-140s cycles. Relies on hero <section> being
   position:relative + overflow:hidden, and content wrapper being z-10. */
@keyframes marquee-left  { from { transform: translateX(0); }     to { transform: translateX(-50%); } }
@keyframes marquee-right { from { transform: translateX(-50%); }  to { transform: translateX(0); } }

.marquee-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}
.marquee-row {
  position: absolute;
  left: 0;
  right: 0;
  display: flex;
  gap: 64px;
  white-space: nowrap;
  will-change: transform;
}
.marquee-row span {
  font: 600 96px/1 var(--font-body);
  letter-spacing: -3px;
  opacity: .035;
  color: #1a1f1c;
}
.marquee-row span.accent {
  color: #4a6b4f;
  opacity: .05;
}
@media (max-width: 768px) {
  .marquee-bg { display: none; }
}
.marquee-row--0 { top: 8%;  animation: marquee-left  110s linear infinite; }
.marquee-row--1 { top: 42%; animation: marquee-right 125s linear infinite; }
.marquee-row--2 { top: 76%; animation: marquee-left  140s linear infinite; }

@media (prefers-reduced-motion: reduce) {
  .marquee-row { animation: none; }
}

/* ===== Ambient aurora blobs =====
   Three slow-drifting, heavily-blurred color blobs that sit behind a
   section's content to give warmth without any readable motion. Opacity
   tuned for white/stone-50 section backgrounds -- softer than the hero
   preview's bone-on-bone variant. */
@keyframes aurora-blob-1 { 0%,100% { transform: translate(0,0) scale(1); }    50% { transform: translate(120px,60px) scale(1.15); } }
@keyframes aurora-blob-2 { 0%,100% { transform: translate(0,0) scale(1); }    50% { transform: translate(-100px,80px) scale(0.9); } }
@keyframes aurora-blob-3 { 0%,100% { transform: translate(0,0) scale(1.1); }  50% { transform: translate(60px,-80px) scale(1); } }

.aurora-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}
.aurora-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  will-change: transform;
}
.aurora-blob--1 { top: 10%; left: 20%;  width: 520px; height: 520px; background: #4a6b4f; opacity: .22; animation: aurora-blob-1 18s ease-in-out infinite; }
.aurora-blob--2 { top: 40%; right: -5%; width: 460px; height: 460px; background: #c9b66a; opacity: .25; animation: aurora-blob-2 22s ease-in-out infinite; }
.aurora-blob--3 { bottom: -10%; left: 5%; width: 600px; height: 600px; background: #d4b89a; opacity: .22; animation: aurora-blob-3 26s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  .aurora-blob { animation: none; }
}

/* ===== Community page palette scope =====
   Bone bg, ink text, sage accent, Inter-only typography. Keeps the emerald
   hero + sister-home dark blocks as anchors. Applied via body class. */
.palette-bone {
  background: #f4f1ea;
}
.palette-bone .font-display {
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: -0.02em;
}
.palette-bone .bg-white { background-color: #ffffff; }
.palette-bone .bg-stone-50 { background-color: #f4f1ea !important; }
.palette-bone .bg-emerald-50\/30 { background-color: #f4f1ea !important; }
.palette-bone .bg-emerald-50\/60 { background-color: #ece8dc !important; }
.palette-bone .bg-emerald-50 { background-color: #ece8dc !important; }
.palette-bone .bg-emerald-50\/50 { background-color: #ece8dc !important; }
.palette-bone .text-slate-900 { color: #1a1f1c; }
.palette-bone .text-slate-700 { color: #3e4641; }
.palette-bone .text-slate-600 { color: #5c655e; }
.palette-bone .text-slate-500 { color: #7a7f78; }
.palette-bone .border-emerald-100 { border-color: #e8e3d3; }
.palette-bone .ring-emerald-50 { --tw-ring-color: transparent; }
.palette-bone .border-emerald-200 { border-color: #d6d0bf; }
