/* ================================================
   SPEECH THERAPY PLUS — DESIGN SYSTEM
   Hand-crafted, warm, organic healthcare aesthetic
   ================================================ */

/* ===== PAPER TEXTURE & BASE ===== */
body {
  background-color: #faf7f2;
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.018'/%3E%3C/svg%3E");
}

/* ===== TYPOGRAPHY ===== */
body {
  font-family: 'Nunito', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.font-serif {
  font-family: 'Lora', Georgia, serif;
}

/* ===== SCROLL ANIMATIONS ===== */
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-left {
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.fade-right {
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.fade-in {
  opacity: 0;
  transition: opacity 0.7s ease;
}
.fade-in.visible {
  opacity: 1;
}

.scale-in {
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.scale-in.visible {
  opacity: 1;
  transform: scale(1);
}

/* Stagger delays */
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
.delay-400 { transition-delay: 0.4s; }
.delay-500 { transition-delay: 0.5s; }
.delay-600 { transition-delay: 0.6s; }

/* ===== ORGANIC SHAPES (static, subtle backgrounds) ===== */
.organic-bg-1 {
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 62% 38% 46% 54% / 60% 44% 56% 40%;
  background: radial-gradient(ellipse at 30% 40%, rgba(179, 196, 142, 0.08), rgba(200, 118, 78, 0.04));
  pointer-events: none;
  z-index: 0;
}

.organic-bg-2 {
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 44% 56% 62% 38% / 48% 58% 42% 52%;
  background: radial-gradient(ellipse at 60% 50%, rgba(200, 118, 78, 0.06), rgba(179, 196, 142, 0.03));
  pointer-events: none;
  z-index: 0;
}

.organic-bg-3 {
  position: absolute;
  width: 250px;
  height: 250px;
  border-radius: 52% 48% 40% 60% / 56% 44% 56% 44%;
  background: radial-gradient(ellipse at 40% 60%, rgba(179, 196, 142, 0.06), transparent);
  pointer-events: none;
  z-index: 0;
}

/* ===== CARDS ===== */
.card-hover {
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  border-radius: 1.25rem;
}
.card-hover:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px -8px rgba(61, 51, 48, 0.08), 0 4px 12px -4px rgba(61, 51, 48, 0.04);
}

/* Warm card shadow (default for most cards) */
.warm-shadow {
  box-shadow: 0 2px 12px -2px rgba(61, 51, 48, 0.06), 0 1px 4px -1px rgba(61, 51, 48, 0.04);
}
.warm-shadow-lg {
  box-shadow: 0 8px 28px -4px rgba(61, 51, 48, 0.08), 0 4px 12px -4px rgba(61, 51, 48, 0.04);
}

/* Card accent — warm left border */
.card-accent {
  border-left: 3px solid #b3c48e;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}
.card-accent:hover {
  border-left-color: #789350;
  box-shadow: 0 12px 28px -8px rgba(75, 94, 51, 0.1);
  transform: translateY(-3px);
}

/* ===== BUTTONS ===== */

/* Primary button — pill shape, warm */
.btn-shine,
.btn-magnetic {
  position: relative;
  border-radius: 9999px !important;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}
.btn-shine:hover,
.btn-magnetic:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px -4px rgba(75, 94, 51, 0.25);
}
.btn-shine:active,
.btn-magnetic:active {
  transform: translateY(0);
}

/* ===== NAVIGATION ===== */
.glass-nav {
  background: rgba(250, 247, 242, 0.97) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 1px 4px rgba(61, 51, 48, 0.06);
}

/* ===== BACK TO TOP ===== */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 46px;
  height: 46px;
  background: #4b5e33;
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all 0.3s ease;
  z-index: 9999;
  box-shadow: 0 2px 12px rgba(75, 94, 51, 0.2);
}
.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover {
  background: #3d4c2b;
  box-shadow: 0 4px 16px rgba(75, 94, 51, 0.3);
}
.back-to-top svg {
  width: 20px;
  height: 20px;
}

/* ===== COUNTER ===== */
.counter {
  display: inline-block;
  font-variant-numeric: tabular-nums;
}

/* ===== VIDEO BACKGROUNDS ===== */
.video-bg-container {
  position: relative;
  overflow: hidden;
}
.video-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 65% 55%;
  z-index: 0;
}
/* On small phones, hide video entirely and show background image */
@media (max-width: 640px) {
  .video-bg {
    object-position: 65% 50%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .video-bg {
    display: none;
  }
}
.video-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.video-content {
  position: relative;
  z-index: 2;
}

/* ===== MARQUEE ===== */
.marquee-container {
  overflow: hidden;
  white-space: nowrap;
}
.marquee-track {
  display: inline-flex;
  animation: marqueeScroll 32s linear infinite;
}
.marquee-track:hover {
  animation-play-state: paused;
}
@keyframes marqueeScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ===== IMAGE TREATMENTS ===== */
.img-zoom-container {
  overflow: hidden;
  border-radius: 1.25rem;
}
.img-zoom-container img {
  transition: transform 0.5s ease;
}
.img-zoom-container:hover img {
  transform: scale(1.03);
}

/* Organic image frame — soft, slightly irregular border */
.img-organic {
  border-radius: 48% 52% 45% 55% / 52% 46% 54% 48%;
  overflow: hidden;
}

/* ===== GRADIENT TEXT ===== */
.gradient-text {
  background: linear-gradient(135deg, #4b5e33, #789350);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.gradient-text-light {
  background: linear-gradient(135deg, #ffffff, #e7ebda);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== SECTION DIVIDERS (organic, hand-drawn feel) ===== */
.section-divider {
  width: 100%;
  height: 48px;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 1200 48' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 24 Q150 8 300 24 T600 24 T900 24 T1200 24' fill='none' stroke='%23d1dab7' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center;
  background-size: 100% auto;
  opacity: 0.5;
}

/* ===== WARM BORDERS ===== */
.warm-border-left {
  border-left: 3px solid #b3c48e;
}

.stat-highlight {
  background: linear-gradient(135deg, rgba(179, 196, 142, 0.07) 0%, rgba(200, 118, 78, 0.04) 100%);
}

/* ===== IMAGE REVEAL ===== */
.img-reveal {
  position: relative;
  overflow: hidden;
}

/* ===== DISABLE LEFTOVER GIMMICK CLASSES ===== */
.float, .float-reverse, .float-slow { animation: none !important; }
.pulse-glow { animation: none !important; }
.spin-slow { animation: none !important; }
.rotate-badge { animation: none !important; }
.blob-morph { display: none !important; }
.morph-blob { display: none !important; }
.text-shimmer { -webkit-text-fill-color: currentColor !important; animation: none !important; }
.text-reveal { -webkit-text-fill-color: currentColor !important; animation: none !important; }
.animated-gradient { animation: none !important; }
.gradient-border::before { display: none !important; }
.fancy-underline::after { display: none !important; }
.wave-divider::after { display: none !important; }
.parallax-slow { will-change: auto !important; }
.organic-float, .organic-float-2, .organic-float-3 { animation: none !important; }
.animate-float, .animate-float-delayed { animation: none !important; }
.leaf-float, .leaf-float-delay, .leaf-float-slow { animation: none !important; }
.card-tilt { transition: transform 0.3s ease, box-shadow 0.3s ease; }
.card-tilt:hover { transform: translateY(-3px); box-shadow: 0 8px 20px -6px rgba(61, 51, 48, 0.08); }

/* ===== CUSTOM SELECTION COLOR ===== */
::selection {
  background: rgba(179, 196, 142, 0.3);
  color: #3a3330;
}

/* ===== SCROLLBAR (subtle, warm) ===== */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f4ede3;
}
::-webkit-scrollbar-thumb {
  background: #c5b9a8;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #a89b8a;
}

/* ===== TEXT ON VIDEO (readability) ===== */
.video-content h1,
.video-content h2,
.video-content h3,
.video-content p,
.video-content span,
.video-content blockquote,
.interstitial-content h1,
.interstitial-content h2,
.interstitial-content h3,
.interstitial-content p,
.interstitial-content blockquote {
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 0, 0, 0.15);
}

/* ===== FOCUS STYLES (accessible) ===== */
a:focus-visible, button:focus-visible {
  outline: 2px solid #789350;
  outline-offset: 2px;
  border-radius: 4px;
}
