/* ================================
   HERO CRITICAL CSS
   Only above-fold hero styles for fast first paint
   ================================ */

.hero {
  background: var(--hero-gradient);
  color: var(--text-white);
  position: relative;
  overflow: hidden;
  min-height: 500px;
}

.page-transatlantic .hero {
  background: url('../assets/images/US-UK-flags-blended-1200x675.webp') center / cover no-repeat;
  min-height: auto;
}

.page-transatlantic .hero-title {
  color: var(--color-gray-900, #111827);
}

.page-transatlantic .hero-subtitle {
  color: var(--color-gray-600, #4b5563);
  font-style: italic;
}

.page-transatlantic .hero-locale-us {
  display: none;
}

.locale-slider-container {
  position: relative;
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
}

.locale-layer-us {
  display: none;
}

@media (min-width: 768px) {
  .locale-layer-uk {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1;
    background: #EDEDF0;
  }

  .locale-layer-us {
    display: block;
  }
}

@media (min-width: 768px) {
  .hero {
    min-height: 600px;
  }
}

.waves {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 50px;
  min-height: 50px;
}

@media (min-width: 768px) {
  .waves {
    height: 80px;
    min-height: 80px;
  }
}

.hero-grid {
  position: relative;
}

.hero-content {
  max-width: 42rem;
  padding: 4rem 0;
}

@media (min-width: 768px) {
  .hero-content {
    padding: 6rem 0;
  }
}

.hero-image {
  display: none;
  position: absolute;
  right: -200px;
  top: 40%;
  transform: translateY(-50%);
}

@media (min-width: 924px) {
  .hero-image {
    display: flex;
    align-items: center;
    justify-content: flex-end;
  }
}

.hero-laptop {
  width: 600px;
  height: auto;
  aspect-ratio: 750 / 485;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.3));
}

@media (min-width: 1024px) {
  .hero-laptop {
    width: 750px;
  }
}

@media (max-width: 1100px) {
  .hero-laptop {
    width: 525px;
  }
}

.hero-title {
  font-size: 1.875rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1rem;
  color: #EDEDF0;
}

.hero-title em {
  font-style: italic;
  color: #fbbf24;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 3rem;
  }
}

.hero-subtitle {
  font-size: var(--text-lg);
  color: rgba(204, 251, 241, 0.9);
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .hero-subtitle {
    font-size: var(--text-xl);
  }
}

.social-proof {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
  font-size: var(--text-xl);
  font-weight: 600;
}

.proof-badges {
  display: flex;
}

.proof-badge {
  width: 2rem;
  height: 2rem;
  background: rgba(2, 115, 115, 0.7);
  border: 2px solid var(--color-teal-700);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  margin-left: -0.5rem;
}

.proof-badge:first-child {
  margin-left: 0;
}

.proof-text {
  color: rgba(153, 246, 228, 0.9);
}

.hero-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 640px) {
  .hero-buttons {
    flex-direction: row;
  }
}

.hero-disclaimer {
  margin-top: 1rem;
  font-size: 0.6875rem;
  color: rgba(153, 246, 228, 0.5);
  max-width: 24rem;
  line-height: 1.4;
}

/* Hero Buttons - Critical for LCP */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  line-height: 1;
  text-decoration: none;
  border-radius: var(--radius-lg);
  transition: var(--transition-all);
  cursor: pointer;
  border: 2px solid transparent;
}

.btn-green {
  background: #15743d;
  color: #EDEDF0;
  border-color: #15743d;
}

.btn-green:hover {
  background: #166534;
  border-color: #166534;
  color: #EDEDF0;
}

.btn-ghost {
  background: var(--overlay-white-10, rgba(255, 255, 255, 0.1));
  color: var(--text-white, #EDEDF0);
  border-color: var(--overlay-white-20, rgba(255, 255, 255, 0.2));
  -webkit-backdrop-filter: var(--backdrop-blur, blur(8px));
  backdrop-filter: var(--backdrop-blur, blur(8px));
}

.btn-ghost:hover {
  background: var(--overlay-white-20, rgba(255, 255, 255, 0.2));
  color: var(--text-white, #EDEDF0);
}

/* Above-fold reveal - Prevent flash of invisible content */
.hero .reveal-fade-up {
  opacity: 1;
  transform: none;
}

/* Wave Animation */
.waves use:nth-child(1) {
  animation: moveWaveRight 48s cubic-bezier(0.55, 0.5, 0.45, 0.5) infinite;
  animation-delay: -2s;
}

.waves use:nth-child(2) {
  animation: moveWaveLeft 68s cubic-bezier(0.55, 0.5, 0.45, 0.5) infinite;
  animation-delay: -3s;
}

.waves use:nth-child(3) {
  animation: moveWaveRight 88s cubic-bezier(0.55, 0.5, 0.45, 0.5) infinite;
  animation-delay: -4s;
}

.waves use:nth-child(4) {
  animation: moveWaveLeft 136s cubic-bezier(0.55, 0.5, 0.45, 0.5) infinite;
  animation-delay: -5s;
}

@keyframes moveWaveRight {
  0% {
    transform: translateX(-90px);
  }

  100% {
    transform: translateX(85px);
  }
}

@keyframes moveWaveLeft {
  0% {
    transform: translateX(85px);
  }

  100% {
    transform: translateX(-90px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .waves use {
    animation: none;
  }
}

/* ================================
   OUR WORK HERO — Above-fold styles
   ================================ */

.page-our-work .hero-content {
  text-align: center;
  max-width: 52rem;
  margin: 0 auto;
}

.hero-title--xl {
  font-size: 2rem;
  letter-spacing: -0.02em;
  line-height: 1.05;
  animation: hero-slide-in 0.7s ease-out both;
}

@media (min-width: 768px) {
  .hero-title--xl {
    font-size: 3.5rem;
  }
}

.hero-slow-svg {
  display: inline-block;
  height: 0.85em;
  width: auto;
  vertical-align: middle;
  overflow: hidden;
}

.hero-subtitle--xl {
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 1rem;
}

@media (min-width: 768px) {
  .hero-subtitle--xl {
    font-size: 2.25rem;
  }
}

@keyframes hero-slide-in {
  from {
    transform: translateX(-80px);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Score Rings */
.hero-scores {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 0 auto 2rem;
  flex-wrap: wrap;
}

@media (min-width: 768px) {
  .hero-scores {
    gap: 1.5rem;
  }
}

.hero-score-ring {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 4px solid #84cc16;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 24px rgba(132, 204, 22, 0.4), 0 0 48px rgba(132, 204, 22, 0.12);
  animation: pulse-glow 3s ease-in-out infinite;
}

@media (min-width: 768px) {
  .hero-score-ring {
    width: 100px;
    height: 100px;
    border-width: 5px;
  }
}

.hero-score-number {
  font-size: 1.75rem;
  font-weight: 800;
  color: #84cc16;
  line-height: 1;
}

@media (min-width: 768px) {
  .hero-score-number {
    font-size: 2.25rem;
  }
}

.hero-score-label {
  font-size: 0.4rem;
  color: rgb(255, 255, 255);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-top: 0.125rem;
  text-align: center;
}

@media (min-width: 768px) {
  .hero-score-label {
    font-size: 0.5625rem;
  }
}

@keyframes pulse-glow {

  0%,
  100% {
    box-shadow: 0 0 24px rgba(132, 204, 22, 0.4), 0 0 48px rgba(132, 204, 22, 0.12);
  }

  50% {
    box-shadow: 0 0 32px rgba(132, 204, 22, 0.6), 0 0 64px rgba(132, 204, 22, 0.2);
  }
}

/* Subway-map Steps */
.hero-steps {
  display: flex;
  margin: 2rem auto 1.5rem;
  max-width: 48rem;
  position: relative;
}

.hero-steps::before {
  content: '';
  position: absolute;
  top: 21px;
  left: 12.5%;
  right: 12.5%;
  height: 2px;
  background: rgba(255, 255, 255, 0.25);
  z-index: 0;
}

.hero-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-step-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(2, 77, 77, 0.9);
  border: 2px solid rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.125rem;
  color: #EDEDF0;
  flex-shrink: 0;
}

.hero-step-text {
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: rgb(228, 243, 242);
  line-height: 1.5;
  padding: 0 0.375rem;
  text-align: center;
}

@media (min-width: 768px) {
  .hero-step-text {
    font-size: 0.8125rem;
    padding: 0 0.75rem;
  }
}

/* Hero Test Input */
.hero-test-input-group {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 32rem;
  margin: 0 auto 1.25rem;
}

.hero-test-input {
  flex: 1;
  min-width: 200px;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  color: #EDEDF0;
  font-size: 1rem;
  backdrop-filter: blur(4px);
}

.hero-test-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

/* Disclaimers */
.hero-disclaimers {
  max-width: 36rem;
  margin: 0 auto;
}

.hero-disclaimers p {
  font-size: 0.625rem;
  color: rgba(204, 251, 241, 0.5);
  line-height: 1.5;
  margin: 0 0 0.5rem;
  text-align: center;
}

.hero-disclaimers a {
  color: rgba(204, 251, 241, 0.65);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.hero-disclaimers a:hover {
  color: rgba(204, 251, 241, 0.9);
}

/* Hero Test Button — Animated green CTA */
/* Pricing hero — wide H1 needs unconstrained container */
.page-pricing .hero-content {
  max-width: 100%;
}

.page-pricing .hero-subtitle {
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 768px) {
  .page-pricing .hero-subtitle {
    font-size: var(--text-2xl);
  }
}

/* Speed Test Button — Animated yellow CTA */
.btn-speed {
  position: relative;
  background: #fbbf24;
  color: #451a03;
  border-color: transparent;
  font-weight: 700;
  overflow: hidden;
  z-index: 0;
}

.btn-speed:hover {
  transform: translateY(-2px) scale(1.03);
  background: #84cc16;
  color: #052e16;
}

.btn-speed::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 250%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: conic-gradient(transparent 70%, #EDEDF0 100%);
  animation: spin-border 1.5s 2s linear infinite, chase-fade-in 0.6s 2s forwards;
  opacity: 0;
  z-index: -2;
  pointer-events: none;
}

.btn-speed::after {
  content: '';
  position: absolute;
  inset: 2px;
  background: var(--btn-speed-fill, #fbbf24);
  border-radius: calc(var(--radius-lg) - 2px);
  z-index: -1;
  pointer-events: none;
  transition: background 0.3s;
}

.btn-speed:hover::after {
  background: #84cc16;
}

.card-dark .btn-speed {
  --btn-speed-fill: #fbbf24;
}

.btn-speed--lg {
  padding: 1rem 2.5rem;
  font-size: var(--text-lg);
  letter-spacing: 0.05em;
}

@keyframes spin-border {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@keyframes chase-fade-in {
  to {
    opacity: 1;
  }
}

.btn-hero-test {
  position: relative;
  background: #22c55e;
  color: #052e16;
  border-color: transparent;
  font-weight: 700;
  overflow: hidden;
  z-index: 0;
  padding: 0.875rem 2rem;
  font-size: 1.0625rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.btn-hero-test:hover {
  transform: translateY(-2px) scale(1.03);
  background: #4ade80;
  color: #052e16;
}

.btn-hero-test::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 250%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: conic-gradient(transparent 70%, #EDEDF0 100%);
  animation: spin-border 1.5s 2s linear infinite, chase-fade-in 0.6s 2s forwards;
  opacity: 0;
  z-index: -2;
  pointer-events: none;
}

.btn-hero-test::after {
  content: '';
  position: absolute;
  inset: 2px;
  background: #22c55e;
  border-radius: calc(var(--radius-lg) - 2px);
  z-index: -1;
  pointer-events: none;
  transition: background 0.3s;
}

.btn-hero-test:hover::after {
  background: #4ade80;
}