*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-gray-800);
  background: var(--color-white);
  overflow-x: clip;
  width: 100%;
}

main {
  overflow-x: clip;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition);
}

a:hover:not(.btn):not(.site-footer__social-link) {
  color: var(--color-gold);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-black);
  margin: 0 0 0.75rem;
}

p {
  margin: 0 0 1rem;
}

ul,
ol {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

.container {
  width: min(100% - 2rem, var(--container-width));
  max-width: 100%;
  margin-inline: auto;
}

.section {
  padding: 4rem 0;
}

.section--gray {
  background: var(--color-gray-50);
}

.section--dark {
  background: linear-gradient(135deg, #f4f7fb 0%, #d5e0ee 100%);
  color: var(--color-gray-800);
}

.section--dark h2,
.section--dark h3 {
  color: var(--color-blue-dark);
}

.section__header {
  margin-bottom: 2.5rem;
}

.section__title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  position: relative;
  padding-bottom: 0.75rem;
}

.section__title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 60px;
  height: 3px;
  background: var(--color-gold);
}

.section__subtitle {
  color: var(--color-gray-600);
  max-width: 640px;
  margin-top: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

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

.btn:active {
  transform: translateY(0) scale(0.97);
}

/* Moving shine sweep — all buttons */
.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 70%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.15),
    rgba(255, 255, 255, 0.45),
    rgba(255, 255, 255, 0.15),
    transparent
  );
  transform: skewX(-22deg);
  animation: btnShimmer 2.8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes btnShimmer {
  0% { left: -120%; }
  55%, 100% { left: 140%; }
}

/* Primary — blue gradient */
.btn--primary,
a.btn--primary,
button.btn--primary {
  color: #ffffff;
  border-color: var(--color-blue-light);
  background: linear-gradient(
    90deg,
    var(--color-blue-dark),
    var(--color-blue),
    var(--color-blue-light),
    var(--color-blue),
    var(--color-blue-dark)
  );
  background-size: 300% 100%;
  animation: btnGradientMove 3.5s ease infinite, btnGlowGold 2.2s ease-in-out infinite;
}

.btn--primary:hover,
.btn--primary:focus,
.btn--primary:active,
a.btn--primary:hover,
a.btn--primary:focus,
button.btn--primary:hover {
  color: #ffffff;
  border-color: #4d8fd4;
  animation: btnGradientMove 1.8s ease infinite, btnGlowGoldHover 1.2s ease-in-out infinite;
}

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

@keyframes btnGlowGold {
  0%, 100% {
    box-shadow: 0 0 10px rgba(1, 57, 129, 0.35), 0 4px 14px rgba(1, 57, 129, 0.2);
  }
  50% {
    box-shadow: 0 0 22px rgba(1, 57, 129, 0.65), 0 0 40px rgba(1, 88, 189, 0.25), 0 6px 18px rgba(1, 57, 129, 0.3);
  }
}

@keyframes btnGlowGoldHover {
  0%, 100% {
    box-shadow: 0 0 18px rgba(1, 57, 129, 0.7), 0 0 35px rgba(1, 88, 189, 0.35), 0 8px 22px rgba(1, 57, 129, 0.35);
  }
  50% {
    box-shadow: 0 0 28px rgba(1, 57, 129, 0.9), 0 0 50px rgba(1, 88, 189, 0.45), 0 8px 26px rgba(1, 57, 129, 0.45);
  }
}

/* Outline — blue on white */
.btn--outline {
  color: var(--color-blue-dark);
  background: var(--color-white);
  background-size: 250% 100%;
  border-color: var(--color-blue);
  animation: btnOutlineGlow 2.5s ease-in-out infinite;
}

.btn--outline:hover,
a.btn--outline:hover,
button.btn--outline:hover {
  color: #ffffff;
  background: linear-gradient(
    90deg,
    var(--color-blue-dark),
    var(--color-blue-light),
    var(--color-blue),
    var(--color-blue-light),
    var(--color-blue-dark)
  );
  background-size: 300% 100%;
  animation: btnGradientMove 1.8s ease infinite, btnGlowGoldHover 1.2s ease-in-out infinite;
  border-color: var(--color-blue-light);
}

@keyframes btnOutlineGlow {
  0%, 100% {
    box-shadow: 0 0 8px rgba(1, 57, 129, 0.25), inset 0 0 10px rgba(1, 57, 129, 0.05);
  }
  50% {
    box-shadow: 0 0 18px rgba(1, 57, 129, 0.5), inset 0 0 14px rgba(1, 57, 129, 0.1);
  }
}

/* Dark — solid blue */
.btn--dark,
a.btn--dark,
button.btn--dark {
  color: #ffffff;
  border-color: var(--color-blue-dark);
  background: linear-gradient(
    90deg,
    var(--color-blue-dark),
    #012d70,
    var(--color-blue),
    #012d70,
    var(--color-blue-dark)
  );
  background-size: 300% 100%;
  animation: btnGradientMove 4s ease infinite, btnGlowDark 2.5s ease-in-out infinite;
}

.btn--dark:hover,
.btn--dark:focus,
a.btn--dark:hover,
button.btn--dark:hover {
  color: #ffffff;
  border-color: var(--color-blue-light);
  background: linear-gradient(
    90deg,
    var(--color-blue-dark),
    var(--color-blue),
    var(--color-blue-light),
    var(--color-blue),
    var(--color-blue-dark)
  );
  background-size: 300% 100%;
  animation: btnGradientMove 1.8s ease infinite, btnGlowGoldHover 1.2s ease-in-out infinite;
}

@keyframes btnGlowDark {
  0%, 100% {
    box-shadow: 0 0 6px rgba(1, 57, 129, 0.15), 0 4px 12px rgba(0, 0, 0, 0.3);
  }
  50% {
    box-shadow: 0 0 16px rgba(1, 57, 129, 0.35), 0 4px 16px rgba(0, 0, 0, 0.35);
  }
}

/* Legacy class — inherits from .btn */
.btn-animated {
  /* animations applied via .btn base */
}

.text-gold {
  color: var(--color-gold);
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius-sm);
}

.badge--gold {
  background: var(--color-gold-light);
  color: var(--color-black);
}

.badge--dark {
  background: var(--color-blue);
  color: var(--color-white);
}

.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;
}
