/* Orthoguard Medica - custom styles layered on top of Tailwind CDN utilities */

:root {
  --warm-white: #FAFAFA;
  --white: #FFFFFF;
  --grey-light: #E8E8EA;
  --charcoal: #2B2B2B;
  --grey-mid: #555555;
  --burgundy: #8A2522;
  --burgundy-dark: #6F1D1B;
  --crimson: #B83232;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', 'Montserrat', sans-serif;
  background: var(--warm-white);
  color: var(--charcoal);
}

/* Subtle anatomical / geometric background accents */
.og-hero-bg {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 80% 20%, rgba(138,37,34,0.05), transparent 45%),
                     radial-gradient(circle at 10% 90%, rgba(43,43,43,0.04), transparent 40%);
  pointer-events: none;
  overflow: hidden;
}

.og-line-pattern {
  background-image: repeating-linear-gradient(135deg, rgba(138,37,34,0.08) 0, rgba(138,37,34,0.08) 1px, transparent 1px, transparent 14px);
}

/* Faint anatomical bone/joint art, sourced from Orthoguard's own brand
   collateral. Positioned decoratively behind hero/section content -- never
   as the focal point, per the design brief. */
.og-anatomy-art {
  position: absolute;
  pointer-events: none;
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 0.16;
  filter: grayscale(1);
  transition: transform 8s ease-out, opacity 1.2s ease;
  z-index: 0;
}
.og-anatomy-art--hip {
  top: -8%;
  right: -6%;
  width: 58%;
  height: 130%;
  background-image: url('../images/bg-hip-anatomy.webp');
  background-position: right center;
}
.og-anatomy-art--knee {
  top: -8%;
  left: -6%;
  width: 54%;
  height: 130%;
  background-image: url('../images/bg-knee-anatomy.webp');
  background-position: left center;
  transform: scaleX(-1);
}
.og-anatomy-art--knee.is-visible { transform: scaleX(-1) scale(1.03); }
.og-anatomy-art--hip.is-visible { transform: scale(1.03); }

/* Lighter variant for use on the dark charcoal sections */
.og-anatomy-art--on-dark {
  opacity: 0.07;
  filter: grayscale(1) invert(1);
}

/* Ensure section content sits above the decorative art layer */
.og-content-layer { position: relative; z-index: 1; }

/* Soft morphing blob shapes -- organic, translucent, continuously reshaping
   via animated border-radius. Purely decorative, sits behind hero content. */
.og-morph-blob {
  position: absolute;
  pointer-events: none;
  z-index: 0;
  filter: blur(6px);
  border-radius: 42% 58% 65% 35% / 45% 45% 55% 55%;
  animation: og-blob-morph 14s ease-in-out infinite;
  will-change: border-radius, transform;
}
.og-morph-blob--burgundy {
  background: radial-gradient(circle at 30% 30%, rgba(138,37,34,0.16), rgba(138,37,34,0.02) 70%);
}
.og-morph-blob--charcoal {
  background: radial-gradient(circle at 30% 30%, rgba(43,43,43,0.10), rgba(43,43,43,0.01) 70%);
}
.og-morph-blob--light {
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.12), rgba(255,255,255,0.01) 70%);
}
@keyframes og-blob-morph {
  0%, 100% {
    border-radius: 42% 58% 65% 35% / 45% 45% 55% 55%;
    transform: rotate(0deg) scale(1);
  }
  25% {
    border-radius: 58% 42% 35% 65% / 55% 60% 40% 45%;
    transform: rotate(8deg) scale(1.04);
  }
  50% {
    border-radius: 50% 50% 40% 60% / 60% 40% 60% 40%;
    transform: rotate(-4deg) scale(0.98);
  }
  75% {
    border-radius: 65% 35% 45% 55% / 40% 55% 45% 60%;
    transform: rotate(5deg) scale(1.02);
  }
}

/* Fade-up scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }

/* Product / feature card hover */
.og-card {
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.og-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 48px -20px rgba(43,43,43,0.28);
}

.og-card img {
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.og-card:hover img {
  transform: scale(1.08);
}

.og-card i.fa-solid {
  transition: transform 0.35s ease;
}
.og-card:hover i.fa-solid {
  transform: translateY(-3px) scale(1.1);
}

/* Hero image reveal: soft scale-in + fade, distinct from the reveal-up used elsewhere */
.reveal-image {
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 1s ease, transform 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-image.is-visible {
  opacity: 1;
  transform: scale(1);
}

/* Floating stat badge (hero) */
.og-float-badge {
  animation: og-float 4.5s ease-in-out infinite;
}
@keyframes og-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* Gentle glow pulse on the primary hero CTA to draw the eye without being loud */
.btn-glow {
  position: relative;
}
.btn-glow::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(138,37,34,0.45);
  animation: og-pulse 2.8s ease-out infinite;
  pointer-events: none;
}
@keyframes og-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(138,37,34,0.35); }
  70%  { box-shadow: 0 0 0 14px rgba(138,37,34,0); }
  100% { box-shadow: 0 0 0 0 rgba(138,37,34,0); }
}

/* Trust-strip icon hover bounce */
.og-trust-icon {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: inline-block;
}
.og-trust-icon:hover {
  transform: translateY(-4px) scale(1.12);
}

/* Buttons */
.btn-primary {
  background: var(--burgundy);
  color: #fff;
  transition: background 0.25s ease, transform 0.15s ease, box-shadow 0.25s ease;
  box-shadow: 0 8px 20px -10px rgba(138,37,34,0.55);
}
.btn-primary:hover {
  background: var(--burgundy-dark);
  transform: translateY(-2px);
}
.btn-primary:active {
  transform: translateY(0);
}

.btn-outline {
  border: 1.5px solid var(--burgundy);
  color: var(--burgundy);
  transition: all 0.25s ease;
}
.btn-outline:hover {
  background: var(--burgundy);
  color: #fff;
}

.nav-link {
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: var(--burgundy);
  transition: width 0.25s ease;
}
.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Sticky header shadow state, toggled via JS */
.header-scrolled {
  box-shadow: 0 6px 24px -12px rgba(43,43,43,0.18);
  backdrop-filter: blur(6px);
}

/* Accessible focus states */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--burgundy);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal-image { opacity: 1; transform: none; transition: none; }
  .og-card, .og-card img, .btn-primary, .nav-link::after, .og-anatomy-art {
    transition: none !important;
  }
  .og-float-badge, .btn-glow::after {
    animation: none !important;
  }
  .og-morph-blob {
    animation: none !important;
  }
  .og-hero-slide.is-active img {
    animation: none !important;
  }
}

/* Hero image slider: crossfade + subtle Ken Burns zoom, per current best
   practice for hero carousels (limited slide count, manual dot controls,
   pause on hover/focus, no motion when prefers-reduced-motion is set). */
.og-hero-slider {
  position: relative;
}
.og-hero-slider::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(to top, rgba(0,0,0,0.38), transparent 45%);
  pointer-events: none;
}
.og-hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  z-index: 0;
  transition: opacity 1.1s ease;
}
.og-hero-slide.is-active {
  opacity: 1;
  z-index: 1;
}
.og-hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1);
}
.og-hero-slide.is-active img {
  animation: og-kenburns 6.5s ease-in-out forwards;
}
@keyframes og-kenburns {
  from { transform: scale(1); }
  to   { transform: scale(1.08); }
}
.og-hero-dots {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 3;
}
.og-hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.5);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.3s ease;
}
.og-hero-dot:hover {
  background: rgba(255,255,255,0.8);
}
.og-hero-dot.is-active {
  background: #ffffff;
  width: 24px;
}
