/* Open Ham Prep Marketing Site Styles
   Brand Identity: Navy + Amber + Mint
   Typography: Norwester (headings) + DM Sans (body)
   Colors: #212F45 Navy | #FFB36D Amber | #85FFC7 Mint */

/* ==========================================
   TYPOGRAPHY
   ========================================== */

body {
  font-family: 'DM Sans', system-ui, sans-serif;
}

h1, h2, h3, h4, h5, h6, .font-mono {
  font-family: 'Norwester', system-ui, sans-serif;
}

html {
  scroll-behavior: smooth;
}

/* ==========================================
   ANIMATION KEYFRAMES
   ========================================== */

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

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

@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes wave {
  0% { transform: translateX(0) translateY(0); }
  50% { transform: translateX(-25px) translateY(5px); }
  100% { transform: translateX(0) translateY(0); }
}

@keyframes signalPulse {
  0%, 100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.05);
  }
}

/* ==========================================
   ANIMATION UTILITY CLASSES
   ========================================== */

.animate-fade-in {
  animation: fadeIn 0.6s ease-out forwards;
  opacity: 0;
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out forwards;
  opacity: 0;
}

.animate-fade-in-down {
  animation: fadeInDown 0.6s ease-out forwards;
  opacity: 0;
}

.animate-fade-in-left {
  animation: fadeInLeft 0.6s ease-out forwards;
  opacity: 0;
}

.animate-fade-in-right {
  animation: fadeInRight 0.6s ease-out forwards;
  opacity: 0;
}

.animate-scale-in {
  animation: scaleIn 0.5s ease-out forwards;
  opacity: 0;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

.animate-pulse-slow {
  animation: pulse 3s ease-in-out infinite;
}

.animate-wave {
  animation: wave 8s ease-in-out infinite;
}

/* Staggered animation delays */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }
.delay-600 { animation-delay: 0.6s; }
.delay-700 { animation-delay: 0.7s; }
.delay-800 { animation-delay: 0.8s; }

/* ==========================================
   SCROLL-TRIGGERED ANIMATIONS
   ========================================== */

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal-left.active {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal-right.active {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.reveal-scale.active {
  opacity: 1;
  transform: scale(1);
}

/* ==========================================
   NAVY HERO SECTIONS — Brand signature dark
   ========================================== */

/* ⚠️  gray-800 = #212F45 (brand navy, NOT standard Tailwind gray-800).
   Any element using dark:bg-gray-800 will have a navy background in dark mode.
   Explicitly override text colors for those elements — do not rely on inherited
   .gradient-hero text overrides to do the right thing inside cards. */

.gradient-hero {
  position: relative;
  background-color: #212F45;
  color: white;
  overflow: hidden;
}

/* Subtle radio-wave pattern on dark navy */
.gradient-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  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%3Cpath d='M0 50 Q 25 40, 50 50 T 100 50' stroke='%23ffffff' stroke-width='0.5' fill='none' opacity='0.06'/%3E%3Cpath d='M0 60 Q 25 50, 50 60 T 100 60' stroke='%23ffffff' stroke-width='0.3' fill='none' opacity='0.04'/%3E%3Cpath d='M0 70 Q 25 60, 50 70 T 100 70' stroke='%23FFB36D' stroke-width='0.4' fill='none' opacity='0.08'/%3E%3C/svg%3E");
  background-size: 200px 100px;
  animation: wave 12s linear infinite;
  pointer-events: none;
}

/* Amber glow in top-right corner */
.gradient-hero::after {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 179, 109, 0.12) 0%, transparent 65%);
  pointer-events: none;
}

/* ---- Text overrides inside navy hero ---- */

.gradient-hero h1,
.gradient-hero h2,
.gradient-hero h3 {
  color: white !important;
}

.gradient-hero p,
.gradient-hero .text-gray-600,
.gradient-hero .text-gray-400,
.gradient-hero .text-gray-700,
.gradient-hero .text-gray-300 {
  color: rgba(255, 255, 255, 0.75) !important;
}

.gradient-hero .text-gray-500 {
  color: rgba(255, 255, 255, 0.55) !important;
}

/* Checkmarks → brand mint on dark bg */
.gradient-hero .text-green-500 {
  color: #85FFC7 !important;
}

/* Community / teal icons → mint */
.gradient-hero .text-cyan-600,
.gradient-hero .text-cyan-400 {
  color: #85FFC7 !important;
}

/* Secondary button on dark bg */
.gradient-hero .btn-secondary {
  color: rgba(255, 255, 255, 0.85) !important;
  border-radius: 0.75rem;
}
.gradient-hero .btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.1) !important;
}

/* Badge variants on dark bg */
.gradient-hero .badge-amber {
  background: rgba(255, 179, 109, 0.2);
  color: #FFB36D;
}
.gradient-hero .badge-teal {
  background: rgba(133, 255, 199, 0.15);
  color: #85FFC7;
}

/* ---- CTA card floating on navy bg ---- */
/* Light mode: white card resets text colors back to dark */

.gradient-hero .cta-card h2,
.gradient-hero .cta-card h3 {
  color: #212F45 !important;
}

.gradient-hero .cta-card p,
.gradient-hero .cta-card .text-gray-600,
.gradient-hero .cta-card .text-gray-400,
.gradient-hero .cta-card .text-gray-500 {
  color: #4A4646 !important;
}

/* Dark mode: card background is navy, so text must be light */
html.dark .gradient-hero .cta-card h2,
html.dark .gradient-hero .cta-card h3 {
  color: white !important;
}

html.dark .gradient-hero .cta-card p,
html.dark .gradient-hero .cta-card .text-gray-600,
html.dark .gradient-hero .cta-card .text-gray-400,
html.dark .gradient-hero .cta-card .text-gray-500 {
  color: rgba(255, 255, 255, 0.75) !important;
}

.gradient-text {
  background: linear-gradient(135deg, #FFB36D, #F09A50, #FFD48A);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% auto;
  animation: shimmer 3s linear infinite;
}

.gradient-border {
  position: relative;
  background: linear-gradient(white, white) padding-box,
              linear-gradient(135deg, #FFB36D, #85FFC7) border-box;
  border: 2px solid transparent;
}

.dark .gradient-border {
  background: linear-gradient(rgb(33, 47, 69), rgb(33, 47, 69)) padding-box,
              linear-gradient(135deg, #FFB36D, #85FFC7) border-box;
}

/* Signal wave decoration */
.signal-waves {
  position: absolute;
  right: -100px;
  top: 50%;
  transform: translateY(-50%);
  width: 400px;
  height: 400px;
  pointer-events: none;
  opacity: 0.1;
}

.signal-waves::before,
.signal-waves::after {
  content: '';
  position: absolute;
  border: 2px solid currentColor;
  border-radius: 50%;
  animation: signalPulse 3s ease-in-out infinite;
}

.signal-waves::before {
  width: 200px;
  height: 200px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #FFB36D;
}

.signal-waves::after {
  width: 300px;
  height: 300px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #85FFC7;
  animation-delay: 0.5s;
}

/* ==========================================
   PILLAR CARDS (Value Proposition)
   ========================================== */

.pillar-card {
  position: relative;
  background: white;
  border-radius: 1.5rem;
  padding: 2rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}

html.dark .pillar-card {
  background-color: rgb(33, 47, 69);
  border-color: rgb(44, 62, 84);
}

.pillar-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--pillar-color, #FFB36D), transparent);
}

.pillar-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.15);
}

.dark .pillar-card:hover {
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.4);
}

.pillar-card.pillar-free { --pillar-color: #10b981; }
.pillar-card.pillar-learn { --pillar-color: #8b5cf6; }
.pillar-card.pillar-community { --pillar-color: #85FFC7; }
.pillar-card.pillar-smart { --pillar-color: #FFB36D; }

/* ==========================================
   ENHANCED FEATURE CARDS
   ========================================== */

.feature-card {
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

html.dark .feature-card {
  background-color: rgb(33, 47, 69);
  border-color: rgb(44, 62, 84);
}

.feature-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, transparent, transparent);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease, background 0.3s ease;
  pointer-events: none;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.1);
}

.feature-card:hover::before {
  opacity: 1;
  background: linear-gradient(135deg, #FFB36D, #85FFC7);
}

.dark .feature-card:hover {
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.3);
}

/* Icon container glow effect */
.icon-glow {
  position: relative;
}

.icon-glow::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  background: inherit;
  filter: blur(10px);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.feature-card:hover .icon-glow::after {
  opacity: 0.4;
}

/* ==========================================
   COMMUNITY SECTION
   ========================================== */

.community-card {
  position: relative;
  background: linear-gradient(135deg,
    rgba(133, 255, 199, 0.1) 0%,
    rgba(133, 255, 199, 0.05) 100%
  );
  border: 1px solid rgba(133, 255, 199, 0.2);
  border-radius: 1.5rem;
  overflow: hidden;
}

.dark .community-card {
  background: linear-gradient(135deg,
    rgba(133, 255, 199, 0.12) 0%,
    rgba(133, 255, 199, 0.06) 100%
  );
  border-color: rgba(133, 255, 199, 0.25);
}

.community-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(133, 255, 199, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

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

.btn-primary {
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px -10px rgba(255, 179, 109, 0.5);
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-secondary {
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

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

/* ==========================================
   BENEFIT ITEMS
   ========================================== */

.benefit-item {
  transition: transform 0.2s ease;
}

.benefit-item:hover {
  transform: translateX(4px);
}

/* ==========================================
   STEP CIRCLES
   ========================================== */

.step-circle {
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.step-circle::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FFB36D, #F09A50);
  opacity: 0;
  filter: blur(8px);
  transition: opacity 0.3s ease;
  z-index: -1;
}

.step-circle:hover {
  transform: scale(1.1);
}

.step-circle:hover::before {
  opacity: 0.5;
}

/* ==========================================
   FAQ ACCORDION
   ========================================== */

.faq-answer {
  transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
}

[data-lucide="chevron-down"] {
  transition: transform 0.2s ease-out;
}

.rotate-180 {
  transform: rotate(180deg);
}

/* ==========================================
   NAVIGATION ENHANCEMENTS
   ========================================== */

.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #FFB36D, #85FFC7);
  transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* ==========================================
   CTA SECTION
   ========================================== */

.cta-card {
  position: relative;
  overflow: hidden;
}

.cta-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 179, 109, 0.08) 0%, transparent 60%);
  animation: pulse 4s ease-in-out infinite;
  pointer-events: none;
}

/* ==========================================
   STAT CARDS
   ========================================== */

.stat-card {
  text-align: center;
  padding: 1.5rem;
}

.stat-number {
  font-family: 'Norwester', system-ui, sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #FFB36D, #F09A50);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ==========================================
   RESPONSIVE ADJUSTMENTS
   ========================================== */

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

  .reveal,
  .reveal-left,
  .reveal-right,
  .reveal-scale {
    opacity: 1;
    transform: none;
  }
}

/* ==========================================
   NC STATE OUTLINE
   ========================================== */

.nc-outline {
  filter: invert(47%) sepia(98%) saturate(456%) hue-rotate(2deg) brightness(98%) contrast(90%);
  transition: filter 0.3s ease;
}

.dark .nc-outline {
  filter: invert(73%) sepia(31%) saturate(1060%) hue-rotate(355deg) brightness(103%) contrast(101%);
}

/* ==========================================
   MISC UTILITIES
   ========================================== */

.text-balance {
  text-wrap: balance;
}

.shadow-glow-amber {
  box-shadow: 0 0 40px rgba(255, 179, 109, 0.2);
}

.dark .shadow-glow-amber {
  box-shadow: 0 0 40px rgba(255, 179, 109, 0.12);
}

/* Checkmark list styling */
.check-list li {
  position: relative;
  padding-left: 1.75rem;
}

.check-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.25rem;
  width: 1rem;
  height: 1rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2310b981' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

/* Badge styling */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.875rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
}

.badge-amber {
  background: rgba(255, 179, 109, 0.15);
  color: #E08A40;
}

.dark .badge-amber {
  background: rgba(255, 179, 109, 0.18);
  color: #FFB36D;
}

.badge-teal {
  background: rgba(133, 255, 199, 0.15);
  color: #1A8F65;
}

.dark .badge-teal {
  background: rgba(133, 255, 199, 0.18);
  color: #3DDBA0;
}

.badge-purple {
  background: rgba(139, 92, 246, 0.15);
  color: #7c3aed;
}

.dark .badge-purple {
  background: rgba(139, 92, 246, 0.2);
  color: #a78bfa;
}

/* ==========================================
   ACCESSIBILITY UTILITIES
   ========================================== */

/* Skip link for keyboard navigation */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #FFB36D;
  color: #212F45;
  padding: 8px 16px;
  z-index: 100;
  text-decoration: none;
  font-weight: 600;
  border-radius: 0 0 8px 0;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
  outline: 2px solid #212F45;
  outline-offset: 2px;
}

/* Screen reader only utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus visible styling for keyboard navigation */
:focus-visible {
  outline: 2px solid #FFB36D;
  outline-offset: 2px;
}

/* Remove default focus for mouse users */
:focus:not(:focus-visible) {
  outline: none;
}
