/* ========================================
   AS DOT NETWORK - Motion & Polish Layer
   Enhanced with modern animations, consistent theming
   ======================================== */

:root {
  /* Core easing - natural, responsive feel */
  --fx-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --fx-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --fx-ease-in: cubic-bezier(0.4, 0, 1, 1);
  --fx-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Shadows */
  --fx-shadow-sm: 0 2px 8px rgba(34, 32, 26, 0.08);
  --fx-shadow-md: 0 8px 24px rgba(34, 32, 26, 0.1);
  --fx-shadow-lg: 0 18px 48px rgba(34, 32, 26, 0.12);
  --fx-shadow-xl: 0 28px 64px rgba(34, 32, 26, 0.15);

  /* Gradients - unified with notice bar */
  --fx-grad-primary: linear-gradient(135deg, #9b2415, #c62835);
  --fx-grad-accent: linear-gradient(135deg, #f6ae18, #ffd54f);
  --fx-grad-hero: linear-gradient(135deg, #ffb52e, #f0701a);
  --fx-grad-card: linear-gradient(145deg, #fff4ec, #fffaf3);
  --fx-grad-glow: radial-gradient(600px 400px at 50% 50%, rgba(246, 174, 24, 0.15), transparent);

  /* Colors */
  --fx-bg: #9b2415;
  --fx-accent: #f6ae18;
  --fx-accent-light: #ffd54f;
  --fx-text: #171a1d;
  --fx-text-muted: #646970;
  --fx-border: rgba(198, 28, 38, 0.12);
  --fx-border-hover: rgba(246, 174, 24, 0.55);
}

/* ========================================
   Scroll Progress Bar
   ======================================== */
.fx-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  z-index: 9999;
  background: var(--fx-grad-accent);
  transition: width 0.1s linear;
  box-shadow: 0 0 12px var(--fx-accent);
}

/* ========================================
   Scroll Reveal Animations
   ======================================== */
.fx-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--fx-ease), transform 0.8s var(--fx-ease);
  transition-delay: var(--fx-delay, 0s);
}

.fx-reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Stagger children */
.fx-reveal-stagger > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--fx-ease), transform 0.6s var(--fx-ease);
}

.fx-reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0.05s; }
.fx-reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 0.1s; }
.fx-reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 0.15s; }
.fx-reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 0.2s; }
.fx-reveal-stagger.is-visible > *:nth-child(5) { transition-delay: 0.25s; }
.fx-reveal-stagger.is-visible > *:nth-child(6) { transition-delay: 0.3s; }
.fx-reveal-stagger.is-visible > * { opacity: 1; transform: translateY(0); }

/* ========================================
   Hero Section Animations
   ======================================== */
.home-hero,
.page-hero {
  position: relative;
  overflow: hidden;
}

/* Hero background glow */
.home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.6;
  background:
    radial-gradient(520px 320px at 8% 12%, rgba(255, 196, 80, 0.28), transparent 70%),
    radial-gradient(480px 300px at 92% 78%, rgba(240, 112, 26, 0.14), transparent 70%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='360' height='260' fill='none' stroke='%23c9b27a' stroke-opacity='.35'><path d='M10 40L90 90L170 30L260 100L350 50M90 90L120 190L210 160L260 100M120 190L40 230'/><g fill='%23c9b27a' fill-opacity='.45' stroke='none'><circle cx='10' cy='40' r='3'/><circle cx='90' cy='90' r='3'/><circle cx='170' cy='30' r='3'/><circle cx='260' cy='100' r='3'/><circle cx='350' cy='50' r='3'/><circle cx='120' cy='190' r='3'/><circle cx='210' cy='160' r='3'/><circle cx='40' cy='230' r='3'/></g></svg>");
  background-size: auto, auto, 360px 260px;
  animation: fx-bg-breathe 20s ease-in-out infinite;
}

@keyframes fx-bg-breathe {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50% { opacity: 0.65; transform: scale(1.02); }
}

.home-hero > * {
  position: relative;
}

/* Hero slide transitions */
.hero-slide {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s var(--fx-ease), visibility 0.6s;
  position: absolute;
  inset: 0;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  position: relative;
  z-index: 1;
}

/* Hero content rise animation */
.hero-slide .home-hero-copy {
  transform: translateY(24px);
  opacity: 0;
  transition: transform 0.8s var(--fx-ease), opacity 0.8s var(--fx-ease);
  transition-delay: 0.2s;
}

.hero-slide.is-active .home-hero-copy {
  transform: translateY(0);
  opacity: 1;
}

.hero-slide .home-hero-copy > * {
  animation: fxRise 0.7s var(--fx-ease) both;
}

.hero-slide.is-active .home-hero-copy > *:nth-child(1) { animation-delay: 0.1s; }
.hero-slide.is-active .home-hero-copy > *:nth-child(2) { animation-delay: 0.18s; }
.hero-slide.is-active .home-hero-copy > *:nth-child(3) { animation-delay: 0.26s; }
.hero-slide.is-active .home-hero-copy > *:nth-child(4) { animation-delay: 0.34s; }
.hero-slide.is-active .home-hero-copy > *:nth-child(5) { animation-delay: 0.42s; }

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

/* Hero visual zoom */
.hero-slide.is-active .home-hero-visual img {
  animation: fxZoom 10s var(--fx-ease-out) both;
}

@keyframes fxZoom {
  from { transform: scale(1.08); }
  to { transform: scale(1); }
}

/* Floating chips */
.hero-chip {
  animation: fxFloat 4s ease-in-out infinite;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero-chip.hero-chip-bottom {
  animation-delay: 2s;
}

@keyframes fxFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-8px) scale(1.02); }
}

.hero-chip .live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--fx-accent);
  border-radius: 50%;
  margin-right: 8px;
  animation: fxLivePulse 1.5s ease-in-out infinite;
  box-shadow: 0 0 12px var(--fx-accent);
}

@keyframes fxLivePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}

/* Accent gradient text */
.hero-accent {
  background: var(--fx-grad-accent);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Slide-specific accent colors */
.hero-slide:nth-child(1) .hero-accent { background: linear-gradient(135deg, #ff3d8b, #8a3ffc); -webkit-background-clip: text; background-clip: text; }
.hero-slide:nth-child(4) .hero-accent { background: linear-gradient(135deg, #8a3ffc, #c04bf0); -webkit-background-clip: text; background-clip: text; }

/* ========================================
   Slider Controls
   ======================================== */
.hs-prev,
.hs-next,
.hs-toggle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.25s var(--fx-ease);
  backdrop-filter: blur(12px);
}

.hs-prev:hover,
.hs-next:hover,
.hs-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  transform: scale(1.08);
}

.hs-dots {
  display: flex;
  gap: 10px;
}

.hs-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  border: none;
  cursor: pointer;
  transition: all 0.25s var(--fx-ease);
}

.hs-dot.is-active,
.hs-dot:hover {
  background: var(--fx-accent);
  transform: scale(1.4);
  box-shadow: 0 0 16px var(--fx-accent);
}

/* ========================================
   Button Enhancements
   ======================================== */
.button {
  position: relative;
  overflow: hidden;
  transition: transform 0.25s var(--fx-ease), box-shadow 0.25s var(--fx-ease);
}

.button-primary {
  background: var(--fx-grad-primary);
  border-color: transparent;
  box-shadow: 0 10px 28px rgba(155, 36, 21, 0.3);
}

.button-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(155, 36, 21, 0.4);
}

.button-primary:active {
  transform: translateY(-1px) scale(0.98);
}

/* Shine effect */
.button::after {
  content: "";
  position: absolute;
  top: 0;
  left: -80%;
  width: 50%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: skewX(-20deg);
  transition: left 0.7s var(--fx-ease);
}

.button:hover::after {
  left: 130%;
}

/* Arrow nudge */
.button svg {
  transition: transform 0.25s var(--fx-ease);
}

.button:hover svg {
  transform: translateX(5px);
}

.button-outline-dark:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(34, 32, 26, 0.12);
}

/* ========================================
   Header Polish
   ======================================== */
.main-navigation .menu-list a {
  transition: background 0.2s, color 0.2s, transform 0.2s;
}

.main-navigation .menu-list a:hover {
  background: #fff4de;
  transform: translateY(-1px);
}

.header-offers {
  position: relative;
  animation: fxPulseGlow 2.8s ease-in-out infinite;
}

@keyframes fxPulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(246, 174, 24, 0.5); }
  50% { box-shadow: 0 0 0 16px rgba(246, 174, 24, 0); }
}

/* ========================================
   Card Hover Effects
   ======================================== */
.fact-card,
.pathway-card,
.package-card,
.feature-item,
.review-card,
.use-case-card,
.quick-request-card,
.request-panel,
.service-card,
.value-grid > article,
.payment-card,
.support-channel-grid > a {
  transition: transform 0.35s var(--fx-ease), box-shadow 0.35s var(--fx-ease), border-color 0.35s var(--fx-ease);
}

.fact-card:hover,
.pathway-card:hover,
.package-card:hover,
.review-card:hover,
.use-case-card:hover,
.service-card:hover,
.value-grid > article:hover,
.payment-card:hover,
.support-channel-grid > a:hover {
  transform: translateY(-8px);
  box-shadow: var(--fx-shadow-lg);
  border-color: var(--fx-border-hover);
}

/* Icon circles */
.fact-icon,
.pathway-icon,
.feature-check,
.review-empty-icon,
.use-case-card > .asdot-icon,
.service-card > .asdot-icon,
.value-grid > article > .asdot-icon,
.payment-card > .asdot-icon,
.support-channel-grid > a > .asdot-icon {
  display: inline-grid;
  place-items: center;
  border-radius: 16px;
  background: var(--fx-grad-card);
  color: var(--fx-accent);
  border: 1px solid var(--fx-border);
  transition: transform 0.35s var(--fx-ease), background 0.35s var(--fx-ease), color 0.35s var(--fx-ease), box-shadow 0.35s var(--fx-ease);
}

.use-case-card > .asdot-icon,
.service-card > .asdot-icon {
  width: 56px;
  height: 56px;
  padding: 14px;
  margin-bottom: 14px;
}

.fact-card:hover .fact-icon,
.pathway-card:hover .pathway-icon,
.feature-item:hover .feature-check,
.review-card:hover .review-empty-icon,
.use-case-card:hover > .asdot-icon,
.service-card:hover > .asdot-icon,
.value-grid > article:hover > .asdot-icon,
.payment-card:hover > .asdot-icon,
.support-channel-grid > a:hover > .asdot-icon {
  transform: translateY(-3px) scale(1.08) rotate(-4deg);
  background: var(--fx-grad-accent);
  color: #fff;
  box-shadow: 0 12px 28px rgba(246, 174, 24, 0.3);
}

/* Featured package card */
.package-card-featured {
  position: relative;
  border-color: transparent;
  background: linear-gradient(#fff, #fff) padding-box,
    linear-gradient(135deg, var(--fx-accent), #ff3d8b, var(--fx-accent)) border-box;
  border: 2px solid transparent;
}

.package-badge {
  background: var(--fx-grad-accent);
  color: var(--fx-text);
  animation: fxBadgePop 0.5s var(--fx-ease-spring);
}

@keyframes fxBadgePop {
  from { opacity: 0; transform: scale(0.4) rotate(-15deg); }
  to { opacity: 1; transform: scale(1) rotate(0); }
}

.package-speed-number {
  background: var(--fx-grad-accent);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ========================================
   Eyebrow & Live Dots
   ======================================== */
.eyebrow-dot,
.live-dot {
  animation: fxBlink 1.8s ease-in-out infinite;
}

@keyframes fxBlink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(0.8); }
}

/* ========================================
   Image Zoom Effects
   ======================================== */
.feature-image-wrap,
.split-feature-image,
.entertainment-banner,
.hero-visual {
  overflow: hidden;
}

.feature-image-wrap img,
.split-feature-image img,
.entertainment-banner img,
.hero-visual img {
  transition: transform 1s var(--fx-ease);
}

.feature-image-wrap:hover img,
.split-feature-image:hover img,
.entertainment-banner:hover img {
  transform: scale(1.05);
}

/* ========================================
   Footer Animations
   ======================================== */
.footer-column a {
  transition: color 0.2s, padding-left 0.2s;
}

.footer-column a:hover {
  padding-left: 6px;
  color: var(--fx-accent);
}

.footer-socials a {
  transition: transform 0.25s var(--fx-ease), color 0.25s var(--fx-ease);
}

.footer-socials a:hover {
  transform: translateY(-4px) scale(1.1);
  color: var(--fx-accent);
}

/* WhatsApp float */
.asdot-whatsapp {
  animation: fxWhatsAppFloat 3s ease-in-out infinite;
}

@keyframes fxWhatsAppFloat {
  0%, 100% {
    transform: translateY(0);
    box-shadow: 0 12px 32px rgba(37, 211, 102, 0.35), 0 0 0 0 rgba(37, 211, 102, 0.4);
  }
  50% {
    transform: translateY(-8px);
    box-shadow: 0 20px 48px rgba(37, 211, 102, 0.45), 0 0 0 16px rgba(37, 211, 102, 0);
  }
}

/* ========================================
   Form Field Animations
   ======================================== */
.connection-form .form-grid > label,
.quick-request-form .form-grid > label {
  opacity: 0;
  transform: translateY(16px);
  animation: fxFormFieldIn 0.6s var(--fx-ease) forwards;
}

.connection-form .form-grid > label:nth-child(1) { animation-delay: 0.05s; }
.connection-form .form-grid > label:nth-child(2) { animation-delay: 0.1s; }
.connection-form .form-grid > label:nth-child(3) { animation-delay: 0.15s; }
.connection-form .form-grid > label:nth-child(4) { animation-delay: 0.2s; }
.connection-form .form-grid > label:nth-child(5) { animation-delay: 0.25s; }
.connection-form .form-grid > label:nth-child(6) { animation-delay: 0.3s; }

@keyframes fxFormFieldIn {
  to { opacity: 1; transform: translateY(0); }
}

.connection-form input,
.connection-form select,
.connection-form textarea,
.quick-request-form input,
.quick-request-form select,
.quick-request-form textarea {
  border: 2px solid var(--fx-border);
  border-radius: 12px;
  padding: 16px 18px;
  font-size: 15px;
  transition: all 0.25s var(--fx-ease);
  background: #fff;
}

.connection-form input:focus,
.connection-form select:focus,
.connection-form textarea:focus,
.quick-request-form input:focus,
.quick-request-form select:focus,
.quick-request-form textarea:focus {
  outline: none;
  border-color: var(--fx-accent);
  box-shadow: 0 0 0 4px rgba(246, 174, 24, 0.2);
}

/* ========================================
   Speed Test Component
   ======================================== */
.asdot-speedtest {
  background: linear-gradient(135deg, rgba(155, 36, 21, 0.04), rgba(246, 174, 24, 0.04));
  border-radius: 20px;
  padding: 40px;
  border: 1px solid var(--fx-border);
  position: relative;
  overflow: hidden;
}

.asdot-speedtest::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: var(--fx-grad-glow);
  pointer-events: none;
}

.st-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}

.st-grid > div {
  text-align: center;
  padding: 24px;
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--fx-shadow-sm);
  transition: transform 0.3s var(--fx-ease), box-shadow 0.3s var(--fx-ease);
  position: relative;
  z-index: 1;
}

.st-grid > div:hover {
  transform: translateY(-6px);
  box-shadow: var(--fx-shadow-md);
}

.st-grid strong {
  display: block;
  font-size: 42px;
  font-weight: 800;
  color: var(--fx-bg);
  line-height: 1.1;
  transition: color 0.3s var(--fx-ease);
}

#st-ping { color: #e74c3c; }
#st-down { color: #27ae60; }
#st-up { color: #3498db; }

/* ========================================
   Review Stars
   ======================================== */
.review-stars {
  display: flex;
  gap: 3px;
  margin-bottom: 10px;
}

.review-stars .asdot-icon-star.is-on {
  color: var(--fx-accent);
  stroke: var(--fx-accent);
  animation: fxStarPop 0.5s var(--fx-ease-spring) backwards;
}

.review-stars .asdot-icon-star.is-on:nth-child(1) { animation-delay: 0.08s; }
.review-stars .asdot-icon-star.is-on:nth-child(2) { animation-delay: 0.14s; }
.review-stars .asdot-icon-star.is-on:nth-child(3) { animation-delay: 0.2s; }
.review-stars .asdot-icon-star.is-on:nth-child(4) { animation-delay: 0.26s; }
.review-stars .asdot-icon-star.is-on:nth-child(5) { animation-delay: 0.32s; }

@keyframes fxStarPop {
  from { opacity: 0; transform: scale(0) rotate(-180deg); }
  to { opacity: 1; transform: scale(1) rotate(0); }
}

/* ========================================
   Accent Title Underline
   ======================================== */
.accent {
  background: var(--fx-grad-accent);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
}

.accent::after {
  content: "";
  position: absolute;
  bottom: 2px;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--fx-grad-accent);
  border-radius: 2px;
  opacity: 0.4;
}

/* ========================================
   Footer Payment Banner
   ======================================== */
.footer-payment-banner {
  animation: fxBannerShimmer 4s ease-in-out infinite;
}

@keyframes fxBannerShimmer {
  0%, 100% { opacity: 0.92; }
  50% { opacity: 1; }
}

/* ========================================
   Consistent Icon Finish
   ======================================== */
.asdot-icon {
  flex-shrink: 0;
  vertical-align: middle;
  overflow: visible;
  transition: transform 0.25s var(--fx-ease), color 0.25s var(--fx-ease);
}

.fact-icon,
.pathway-icon,
.feature-check,
.review-empty-icon {
  border: 1px solid var(--fx-border) !important;
  background: var(--fx-grad-card) !important;
  color: #c62832 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 6px 16px rgba(36, 32, 26, 0.06);
}

.use-case-card > .asdot-icon,
.service-card > .asdot-icon,
.value-grid > article > .asdot-icon,
.payment-card > .asdot-icon,
.support-channel-grid > a > .asdot-icon {
  border: 1px solid var(--fx-border) !important;
  background: var(--fx-grad-card) !important;
  color: #c62832 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 6px 16px rgba(36, 32, 26, 0.06);
}

@media (hover: hover) and (pointer: fine) {
  .fact-card:hover .fact-icon,
  .pathway-card:hover .pathway-icon,
  .feature-item:hover .feature-check,
  .review-card:hover .review-empty-icon,
  .use-case-card:hover > .asdot-icon,
  .service-card:hover > .asdot-icon,
  .value-grid > article:hover > .asdot-icon,
  .payment-card:hover > .asdot-icon,
  .support-channel-grid > a:hover > .asdot-icon {
    transform: translateY(-3px) scale(1.06);
    background: var(--fx-grad-accent) !important;
    color: #fff !important;
    box-shadow: 0 12px 28px rgba(246, 174, 24, 0.3);
  }
}

/* ========================================
   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;
  }

  .fx-reveal { opacity: 1; transform: none; }
  .fx-reveal-stagger > * { opacity: 1; transform: none; }
  .hero-slide { opacity: 1; visibility: visible; position: relative; }
  .hero-slide .home-hero-copy { opacity: 1; transform: none; }
}

/* ========================================
   High Contrast Mode
   ======================================== */
@media (prefers-contrast: high) {
  .button-primary { border: 3px solid #000; }
  .button-outline-dark { border-width: 3px; }
  .package-card { border: 2px solid #000; }
  .asdot-icon { stroke-width: 2.5; }
}
