/* Huninn Font Definition */
@font-face {
  font-family: 'Huninn';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('../fonts/huninn-latin-400-normal.woff2') format('woff2'),
       url('../fonts/huninn-latin-400-normal.woff') format('woff');
}

@font-face {
  font-family: 'Huninn';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('../fonts/huninn-latin-ext-400-normal.woff2') format('woff2'),
       url('../fonts/huninn-latin-ext-400-normal.woff') format('woff');
}

@font-face {
  font-family: 'Huninn';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url('../fonts/huninn-latin-400-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'Huninn';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url('../fonts/huninn-latin-400-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'Huninn';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url('../fonts/huninn-latin-400-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'Huninn';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url('../fonts/huninn-latin-400-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'Huninn';
  font-style: normal;
  font-display: swap;
  font-weight: 800;
  src: url('../fonts/huninn-latin-400-normal.woff2') format('woff2');
}

:root {
  --green: #2B7FE0;
  --cyan: #5B9BD5;
  --navy: #0D1B40;
  --navy2: #132254;
  --teal: #192B60;
  --ink: #0D1B40;
  --muted: #4A6168;
  --line: #D4DCF0;
  --bg: #F5F7FF;
  --white: #FFFFFF;
  --tealtext: #1A4FBB;
  --lime: #C5DC3A;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Huninn', 'Figtree', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  background: #ffffff;
  -webkit-font-smoothing: antialiased;
}

section {
  scroll-margin-top: 76px;
}

/* Animations */
@keyframes drop {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

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

@keyframes drift {
  from {
    transform: translate(0, 0);
  }
  to {
    transform: translate(-40px, 18px);
  }
}

@keyframes flow {
  to {
    stroke-dashoffset: -372;
  }
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes fadein {
  to {
    opacity: 1;
  }
}

@keyframes grow {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@keyframes flow2 {
  to {
    stroke-dashoffset: -410;
  }
}

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

@keyframes fade-down {
  from {
    opacity: 0;
    transform: translateY(-8px) translateX(-50%);
  }
  to {
    opacity: 1;
    transform: translateY(0) translateX(-50%);
  }
}

@keyframes floatSlow1 {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(1deg); }
}

@keyframes floatSlow2 {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(12px) rotate(-1.5deg); }
}

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

@keyframes pulseGlow {
  0%, 100% { opacity: 0.35; transform: scale(0.98); }
  50% { opacity: 0.7; transform: scale(1.02); }
}

@keyframes flowDash {
  to {
    stroke-dashoffset: -140;
  }
}

.animate-drop {
  animation: drop 0.22s ease;
}

.animate-pulse-custom {
  animation: pulse 4.5s ease-in-out infinite;
}

.animate-drift {
  animation: drift 18s ease-in-out infinite alternate;
}

.animate-flow {
  stroke-dasharray: 6 180;
  animation: flow 6s linear infinite;
}

.animate-flow2 {
  stroke-dasharray: 10 400;
  animation: flow2 5s linear infinite;
}

.animate-draw {
  stroke-dasharray: 520;
  stroke-dashoffset: 520;
  animation: draw 2.2s 0.5s cubic-bezier(0.4, 0.1, 0.2, 1) forwards;
}

.animate-fadein {
  opacity: 0;
  animation: fadein 1.2s 1.6s ease forwards;
}

.animate-dot-fadein {
  opacity: 0;
  animation: fadein 0.4s 2.6s ease forwards;
}

.animate-grow {
  transform-origin: left;
  animation: grow 1.4s 1s cubic-bezier(0.3, 0.7, 0.2, 1) both;
}

.hero-in {
  animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hero-in2 {
  animation: rise 0.8s 0.12s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hero-in3 {
  animation: rise 0.9s 0.28s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.animate-fade-down {
  animation: fade-down 0.18s ease-out forwards;
}

.animate-float-1 { animation: floatSlow1 5s ease-in-out infinite; }
.animate-float-2 { animation: floatSlow2 6s ease-in-out infinite 1s; }
.animate-float-3 { animation: floatSlow3 4.5s ease-in-out infinite 0.5s; }
.animate-pulse-glow { animation: pulseGlow 3s ease-in-out infinite; }
.flow-line-anim {
  stroke-dasharray: 6 8;
  animation: flowDash 3.2s linear infinite;
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

/* Ensure hero section elements are always immediately visible */
section:first-of-type .reveal,
main > *:first-child .reveal,
.hero .reveal {
  opacity: 1 !important;
  transform: none !important;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

[data-reveal].in {
  opacity: 1;
  transform: none;
}

/* Core theme background & color fallbacks */
.bg-\[\#0D1B40\], .bg-\[\#0d1b40\], .bg-navy {
  background-color: #0D1B40;
}
.bg-\[\#071022\], .bg-\[\#071022\], .bg-navy-deep {
  background-color: #071022;
}
.bg-\[\#0B162C\], .bg-\[\#0b162c\], .bg-navy-card {
  background-color: #0B162C;
}
.bg-\[\#0D273C\], .bg-\[\#0d273c\], .bg-navy-surface {
  background-color: #0D273C;
}
.text-\[\#0D1B40\], .text-\[\#0d1b40\], .text-navy {
  color: #0D1B40;
}

/* Hover state overrides */
.hover\:text-white:hover {
  color: #ffffff !important;
}
.hover\:text-\[\#2B7FE0\]:hover, .hover\:text-brandGreen:hover {
  color: #2B7FE0 !important;
}
.hover\:bg-\[\#0D1B40\]:hover {
  background-color: #0D1B40 !important;
}

/* Accordion & Panel State Rules */
.faq-answer.hidden {
  display: none !important;
}
.faq-answer:not(.hidden) {
  display: block !important;
}
.max-h-0 {
  max-height: 0px !important;
}
.max-h-96 {
  max-height: 24rem !important;
}
.max-h-\[800px\] {
  max-height: 800px !important;
}
.grid-rows-\[0fr\] {
  grid-template-rows: 0fr !important;
}
.grid-rows-\[1fr\] {
  grid-template-rows: 1fr !important;
}

/* Custom Scrollbars */
.custom-scrollbar::-webkit-scrollbar {
  width: 5px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: #F1F5F9;
  border-radius: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .animate-draw {
    stroke-dashoffset: 0 !important;
  }
  .animate-fadein, .animate-dot-fadein, .reveal, [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
}
