:root {
  --nav-h: 76px;
}
html {
  scroll-behavior: smooth;
  overflow-x: clip;
}
body {
  font-family: "Public Sans", system-ui, sans-serif;
}
section[id] {
  scroll-margin-top: var(--nav-h);
}

/* Image slot: shows a branded placeholder until the real image loads (img is removed on error) */
.ph {
  background-color: #042d53;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(135deg, #042d53 0%, #006ec9 140%);
  background-size:
    48px 48px,
    48px 48px,
    100% 100%;
}

/* Nav links */
.nav-link {
  position: relative;
  padding: 8px 2px;
  font-weight: 600;
  font-size: 15px;
  color: #262626;
  transition: color 0.2s;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: #fe7a03;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s;
}
.nav-link:hover,
.nav-link.is-active {
  color: #006ec9;
}
.nav-link:hover::after,
.nav-link.is-active::after {
  transform: scaleX(1);
}

.mobile-nav-link {
  display: flex;
  min-height: 54px;
  align-items: center;
  border-radius: 10px;
  padding: 0 16px;
  color: #042d53;
  font-weight: 700;
  transition:
    background-color 0.2s,
    color 0.2s,
    transform 0.2s;
}
.mobile-nav-link:hover,
.mobile-nav-link:focus-visible {
  background: #f3f7fa;
  color: #006ec9;
  transform: translateX(3px);
}

html.reveal-ready [data-reveal] {
  opacity: 0;
  transition:
    opacity 0.7s ease,
    translate 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}
html.reveal-ready [data-reveal="left"] {
  translate: -52px 0;
}
html.reveal-ready [data-reveal="right"] {
  translate: 52px 0;
}
html.reveal-ready [data-reveal].is-revealed {
  opacity: 1;
  translate: 0 0;
}

/* Header CTA: periodic jump, light sweep and bolt flicker */
.cta-bolt {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  animation:
    cta-jump 3.2s ease-in-out infinite,
    cta-ring 3.2s ease-out infinite;
}
.cta-bolt::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -60%;
  width: 40%;
  background: linear-gradient(
    100deg,
    transparent,
    rgba(255, 255, 255, 0.65),
    transparent
  );
  transform: skewX(-20deg);
  animation: cta-shine 3.2s ease-in-out infinite;
  z-index: -1;
}
.cta-bolt svg {
  animation: bolt-flash 3.2s linear infinite;
}
@keyframes cta-jump {
  0%,
  72%,
  100% {
    transform: translateY(0);
  }
  78% {
    transform: translateY(-7px);
  }
  84% {
    transform: translateY(0);
  }
  89% {
    transform: translateY(-3px);
  }
  94% {
    transform: translateY(0);
  }
}
@keyframes cta-shine {
  0%,
  55% {
    left: -60%;
  }
  80%,
  100% {
    left: 140%;
  }
}
@keyframes cta-ring {
  0%,
  70% {
    box-shadow: 0 0 0 0 rgba(254, 122, 3, 0.55);
  }
  90% {
    box-shadow: 0 0 0 12px rgba(254, 122, 3, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(254, 122, 3, 0);
  }
}
@keyframes bolt-flash {
  0%,
  70%,
  100% {
    opacity: 1;
  }
  74% {
    opacity: 0.25;
  }
  77% {
    opacity: 1;
  }
  80% {
    opacity: 0.35;
  }
  83% {
    opacity: 1;
  }
}

/* Buttons: white text, slide-in fill on hover, pressed edge */
.btn {
  --edge: #c65d00;
  --fill: #042d53;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 3px;
  padding: 14px 28px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
  box-shadow: 0 4px 0 var(--edge);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--fill);
  transform: translateX(-101%);
  transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.btn:hover::after,
.btn:focus-visible::after {
  transform: translateX(0);
}
.btn:hover {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--edge);
}
.btn:active {
  transform: translateY(4px);
  box-shadow: 0 0 0 var(--edge);
}
.btn .arr {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease;
}
.btn:hover .arr {
  transform: translateX(5px);
}
.btn-accent {
  background: #fe7a03;
}
.btn-navy {
  background: #042d53;
  --edge: #021b33;
  --fill: #fe7a03;
}
.btn-navy:hover {
  --edge: #c65d00;
}
.fill-brand {
  --fill: #006ec9;
}

:focus-visible {
  outline: 3px solid #fe7a03;
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .btn,
  .btn::after,
  .btn .arr {
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
  .cta-bolt,
  .cta-bolt::before,
  .cta-bolt svg {
    animation: none;
  }
  html.reveal-ready [data-reveal] {
    opacity: 1;
    translate: 0 0;
    transition: none;
  }
}
@media (max-width: 1023px) {
  :root {
    --nav-h: 68px;
  }
}
