/* Global reset and base styles */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: linear-gradient(135deg, #0e27e6 0%, #1d4bff 40%, #ff3366 100%);
  background-size: 300% 300%;
  animation: gradientShift 12s ease infinite;
  color: #f5f7fb;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Hero layout */
.hero {
  position: relative;
  width: 100vw;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
}

.hero-inner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Subtle background grid / vignette */
.hero::before {
  content: "";
  position: absolute;
  inset: -20%;
  background-image: linear-gradient(
      rgba(255, 255, 255, 0.03) 1px,
      transparent 1px
    ),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: 0.6;
  mix-blend-mode: soft-light;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center,
      rgba(14, 39, 230, 0.2) 0%,
      rgba(255, 51, 102, 0.18) 30%,
      transparent 65%,
      rgba(0, 0, 0, 0.25) 100%);
  pointer-events: none;
}

/* AXC big mark */
.axc-mark {
  position: relative;
  width: min(70vmin, 520px);
  height: min(70vmin, 520px);
  z-index: 2;
}

/* X lines - simple straight lines with lightning effects */
.x-line {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 180%;
  height: 5px;
  background: linear-gradient(90deg, 
    #0e27e6 0%, 
    #1a3aff 25%,
    #0e27e6 50%,
    #2545ff 75%,
    #0e27e6 100%
  );
  border-radius: 0;
  transform-origin: center;
  opacity: 0;
  /* Lightning glow effect */
  filter: drop-shadow(0 0 8px #0e27e6) 
          drop-shadow(0 0 16px #0e27e6)
          drop-shadow(0 0 24px #0e27e6)
          drop-shadow(0 0 4px #0e27e6);
  box-shadow: 0 0 20px rgba(14, 39, 230, 0.9),
              0 0 40px rgba(14, 39, 230, 0.7),
              0 0 60px rgba(14, 39, 230, 0.5),
              inset 0 0 10px rgba(14, 39, 230, 0.4);
  animation: lightningFlicker 0.1s ease-in-out infinite;
}

.x-line-left {
  transform: translate(-50%, -50%) rotate(45deg) translateX(-120%);
}

.x-line-right {
  transform: translate(-50%, -50%) rotate(-45deg) translateX(120%);
}

@keyframes lightningFlicker {
  0%, 100% {
    filter: drop-shadow(0 0 8px #0e27e6) 
            drop-shadow(0 0 16px #0e27e6)
            drop-shadow(0 0 24px #0e27e6)
            drop-shadow(0 0 4px #0e27e6)
            brightness(1);
    box-shadow: 0 0 20px rgba(14, 39, 230, 0.9),
                0 0 40px rgba(14, 39, 230, 0.7),
                0 0 60px rgba(14, 39, 230, 0.5),
                inset 0 0 10px rgba(14, 39, 230, 0.4);
  }
  25% {
    filter: drop-shadow(0 0 4px #0e27e6) 
            drop-shadow(0 0 8px #0e27e6)
            drop-shadow(0 0 12px #0e27e6)
            drop-shadow(0 0 2px #0e27e6)
            brightness(0.9);
    box-shadow: 0 0 10px rgba(14, 39, 230, 0.6),
                0 0 20px rgba(14, 39, 230, 0.4),
                0 0 30px rgba(14, 39, 230, 0.3),
                inset 0 0 5px rgba(14, 39, 230, 0.3);
  }
  50% {
    filter: drop-shadow(0 0 12px #0e27e6) 
            drop-shadow(0 0 24px #0e27e6)
            drop-shadow(0 0 36px #0e27e6)
            drop-shadow(0 0 6px #0e27e6)
            brightness(1.3);
    box-shadow: 0 0 30px rgba(14, 39, 230, 1),
                0 0 60px rgba(14, 39, 230, 0.9),
                0 0 90px rgba(14, 39, 230, 0.7),
                inset 0 0 15px rgba(14, 39, 230, 0.6);
  }
  75% {
    filter: drop-shadow(0 0 6px #0e27e6) 
            drop-shadow(0 0 12px #0e27e6)
            drop-shadow(0 0 18px #0e27e6)
            drop-shadow(0 0 3px #0e27e6)
            brightness(0.95);
    box-shadow: 0 0 15px rgba(14, 39, 230, 0.7),
                0 0 30px rgba(14, 39, 230, 0.5),
                0 0 45px rgba(14, 39, 230, 0.4),
                inset 0 0 8px rgba(14, 39, 230, 0.35);
  }
}

/* Outward rays/halo effect emanating from X */
.x-ray {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 2px;
  height: 15vmin;
  background: linear-gradient(180deg, 
    rgba(0, 212, 255, 0.8) 0%,
    rgba(0, 184, 255, 0.6) 30%,
    rgba(0, 240, 255, 0.4) 60%,
    transparent 100%
  );
  transform-origin: center bottom;
  opacity: 0;
  filter: blur(1px);
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.6),
              0 0 20px rgba(0, 184, 255, 0.4);
}

.hero.is-animated .x-ray {
  animation: rayFadeIn 0.8s ease-out forwards;
  animation-delay: 1.8s;
}

.ray-1 {
  transform: translate(-50%, -50%) rotate(0deg) translateY(-35vmin);
}

.ray-2 {
  transform: translate(-50%, -50%) rotate(45deg) translateY(-35vmin);
}

.ray-3 {
  transform: translate(-50%, -50%) rotate(90deg) translateY(-35vmin);
}

.ray-4 {
  transform: translate(-50%, -50%) rotate(135deg) translateY(-35vmin);
}

.ray-5 {
  transform: translate(-50%, -50%) rotate(180deg) translateY(-35vmin);
}

.ray-6 {
  transform: translate(-50%, -50%) rotate(225deg) translateY(-35vmin);
}

.ray-7 {
  transform: translate(-50%, -50%) rotate(270deg) translateY(-35vmin);
}

.ray-8 {
  transform: translate(-50%, -50%) rotate(315deg) translateY(-35vmin);
}

@keyframes rayFadeIn {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(var(--ray-angle, 0deg)) translateY(-35vmin) scale(0.5);
  }
  to {
    opacity: 0.6;
    transform: translate(-50%, -50%) rotate(var(--ray-angle, 0deg)) translateY(-35vmin) scale(1);
  }
}

@keyframes xLeftIn {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(45deg) translateX(-140%);
  }
  60% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(45deg) translateX(0);
  }
}

@keyframes xRightIn {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(-45deg) translateX(140%);
  }
  60% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(-45deg) translateX(0);
  }
}

/* Sparking particles around X for lightning effect */
.spark {
  position: absolute;
  width: 4px;
  height: 4px;
  background: #00d4ff;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 0 8px #00d4ff, 0 0 12px #00b8ff;
}

.hero.is-animated .spark {
  animation: sparkFloat 2s ease-in-out infinite;
}

.spark-1 {
  left: 45%;
  top: 30%;
}

.hero.is-animated .spark-1 {
  animation-delay: 0s;
}

.spark-2 {
  left: 55%;
  top: 30%;
}

.hero.is-animated .spark-2 {
  animation-delay: 0.3s;
}

.spark-3 {
  left: 45%;
  top: 70%;
}

.hero.is-animated .spark-3 {
  animation-delay: 0.6s;
}

.spark-4 {
  left: 55%;
  top: 70%;
}

.hero.is-animated .spark-4 {
  animation-delay: 0.9s;
}

.spark-5 {
  left: 30%;
  top: 50%;
}

.hero.is-animated .spark-5 {
  animation-delay: 0.2s;
}

.spark-6 {
  left: 70%;
  top: 50%;
}

.hero.is-animated .spark-6 {
  animation-delay: 0.5s;
}

@keyframes sparkFloat {
  0%, 100% {
    opacity: 0;
    transform: translate(0, 0) scale(0.5);
  }
  50% {
    opacity: 1;
    transform: translate(10px, -10px) scale(1.2);
  }
}

/* A and C letters sliding in then resting behind X */
.letter {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 800;
  font-size: min(22vmin, 180px);
  letter-spacing: 0.08em;
  color: #ff3366;
  text-shadow: 0 0 20px rgba(255, 51, 102, 0.8);
  opacity: 0;
  z-index: 0; /* behind X lines - very low z-index */
}

.letter-a {
  left: -30%;
}

.letter-c {
  right: -30%;
}

@keyframes letterALoop {
  0% {
    opacity: 0;
    transform: translate(-10%, -50%) scale(1.05);
  }
  30% {
    opacity: 1;
    transform: translate(15%, -50%) scale(1.05);
    color: #ff3366;
    text-shadow: 0 0 30px rgba(255, 51, 102, 1);
  }
  50% {
    opacity: 0.9;
    transform: translate(10%, -50%) scale(1.02);
  }
  100% {
    opacity: 0.15;
    transform: translate(-5%, -50%) scale(1);
    color: #ff3366;
    text-shadow: 0 0 10px rgba(255, 51, 102, 0.3);
  }
}

@keyframes letterCLoop {
  0% {
    opacity: 0;
    transform: translate(10%, -50%) scale(1.05);
  }
  30% {
    opacity: 1;
    transform: translate(-15%, -50%) scale(1.05);
    color: #ff3366;
    text-shadow: 0 0 30px rgba(255, 51, 102, 1);
  }
  50% {
    opacity: 0.9;
    transform: translate(-10%, -50%) scale(1.02);
  }
  100% {
    opacity: 0.15;
    transform: translate(5%, -50%) scale(1);
    color: #ff3366;
    text-shadow: 0 0 10px rgba(255, 51, 102, 0.3);
  }
}

/* Around-X words */
.axis-label {
  position: absolute;
  font-size: min(6.5vmin, 40px);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-weight: 900;
  opacity: 0;
  text-decoration: none !important;
  text-decoration-line: none !important;
  text-underline-offset: 0;
  border: none;
  border-bottom: none;
  outline: none;
  cursor: pointer;
  background: linear-gradient(135deg, #0e27e6 0%, #ff3366 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: transform 0.3s ease, filter 0.3s ease, opacity 0.3s ease;
  text-shadow: 0 0 25px rgba(14, 39, 230, 0.7), 
               0 0 35px rgba(255, 51, 102, 0.6),
               0 2px 10px rgba(0, 0, 0, 0.35);
  display: inline-block;
  pointer-events: auto;
  z-index: 10;
  filter: drop-shadow(0 0 8px rgba(14, 39, 230, 0.35)) drop-shadow(0 0 8px rgba(255, 51, 102, 0.3));
}

.axis-label:hover {
  transform: scale(1.2);
  filter: brightness(1.2) drop-shadow(0 0 12px rgba(14, 39, 230, 0.7)) drop-shadow(0 0 16px rgba(255, 51, 102, 0.6));
  text-shadow: 0 0 30px rgba(14, 39, 230, 0.9), 
               0 0 40px rgba(255, 51, 102, 0.8),
               0 2px 12px rgba(0, 0, 0, 0.45);
}

.axis-label:active {
  transform: scale(1.05);
}

@keyframes axisFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Position labels equidistant from center of X, aligned in line */
/* All labels use same distance from center (50%, 50%) */
.axis-label {
  z-index: 5;
  pointer-events: auto;
  --label-distance: 22vmin;
}

.axis-label-top {
  left: 47%;
  top: calc(40% - var(--label-distance));
  transform: translate(-50%, 0);
  /* AIR - aligned with vertical axis, equal distance from center */
}

.axis-label-bottom {
  left: 47%;
  top: calc(60% + var(--label-distance));
  transform: translate(-50%, 0);
  /* SEA - aligned with vertical axis, equal distance from center */
}

.axis-label-right {
  left: calc(55% + var(--label-distance));
  top: 49%;
  transform: translate(0, -50%);
  /* PREP - aligned with horizontal axis, equal distance from center */
}

.axis-label-left {
  left: calc(30% - var(--label-distance));
  top: 49%;

  transform: translate(-100%, -50%);
  /* WAREHOUSE - aligned with horizontal axis, equal distance from center */
  text-align: right;
}

/* When animated, apply keyframed motion via class scope */
.hero.is-animated .x-line-left {
  animation: xLeftIn 1.6s ease-out forwards;
}

.hero.is-animated .x-line-right {
  animation: xRightIn 1.6s ease-out forwards;
  animation-delay: 0.1s;
}

.hero.is-animated .letter-a {
  animation: letterALoop 1.8s ease-out forwards;
  animation-delay: 1.7s; /* after X finishes */
}

.hero.is-animated .letter-c {
  animation: letterCLoop 1.8s ease-out forwards;
  animation-delay: 1.7s;
}

.hero.is-animated .axis-label {
  animation: axisFadeIn 1.1s ease-out forwards;
  animation-delay: 3.6s; /* after A and C complete */
}

@keyframes headerSlideIn {
  from {
    opacity: 0;
    transform: translateY(-100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Header text / tagline */
.site-header {
  position: absolute;
  inset-inline: 0;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  z-index: 10;
  padding: 1.2rem 4%;
  background: linear-gradient(180deg, rgba(10, 26, 58, 0.95) 0%, rgba(10, 20, 50, 0.85) 50%, transparent 100%);
  border-bottom: 2px solid;
  border-image: linear-gradient(90deg, rgba(0, 212, 255, 0.4) 0%, rgba(255, 51, 102, 0.4) 100%) 1;
  opacity: 1;
  transform: translateY(0);
}

/* Only animate header on home page when .is-animated is added */
.hero.is-animated .site-header {
  opacity: 0;
  transform: translateY(-100%);
  animation: headerSlideIn 0.8s ease-out forwards;
  animation-delay: 1.7s; /* when A and C start */
}

.site-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.site-logo {
  height: 72px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 16px rgba(0, 212, 255, 0.6)) drop-shadow(0 0 16px rgba(255, 51, 102, 0.6));
  transition: transform 0.3s ease;
}

.site-logo:hover {
  transform: scale(1.05);
}

.site-header-right {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  font-size: min(1.8vmin, 16px);
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  padding: 0.5rem 1.2rem;
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.15) 0%, rgba(255, 51, 102, 0.15) 100%);
  border: 1px solid;
  border-image: linear-gradient(135deg, rgba(0, 212, 255, 0.5) 0%, rgba(255, 51, 102, 0.5) 100%) 1;
  transition: all 0.3s ease;
}

.nav-link:hover {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.3) 0%, rgba(255, 51, 102, 0.3) 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 212, 255, 0.4), 0 4px 12px rgba(255, 51, 102, 0.4);
}

.site-header-title {
  font-size: min(2.3vmin, 18px);
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(214, 228, 255, 0.9);
}

.site-header-subtitle {
  margin-top: 8px;
  font-size: min(1.9vmin, 16px);
  color: rgba(163, 191, 243, 0.92);
}

/* Bottom small footer info */
.site-footer {
  position: absolute;
  left: 50%;
  bottom: 3%;
  transform: translateX(-50%);
  font-size: min(1.7vmin, 14px);
  color: rgba(180, 191, 225, 0.7);
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
  justify-content: center;
  text-align: center;
}

.site-footer span {
  white-space: nowrap;
}

.pill {
  padding: 0.18rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(74, 146, 255, 0.6);
  background: radial-gradient(circle at top left, rgba(238, 40, 40, 0.45), rgba(15, 40, 106, 0.85));
  box-shadow: 0 0 16px rgba(46, 103, 255, 0.8);
}


/* Responsiveness tweaks */
@media (max-width: 768px) {
  .site-header {
    padding: 1rem 4%;
  }

  .site-header-right {
    gap: 1rem;
  }

  .nav-link {
    font-size: 12px;
    padding: 0.4rem 0.8rem;
  }

  .site-logo {
    height: 56px;
  }

  .axis-label-top {
    top: 6%;
  }
  .axis-label-bottom {
    bottom: 6%;
  }
  .axis-label-left,
  .axis-label-right {
    display: none;
  }

  .site-header-title {
    letter-spacing: 0.22em;
  }

  .letter {
    font-size: min(26vmin, 160px);
  }
}

@media (max-width: 480px) {
  .site-footer {
    gap: 0.75rem;
  }

  .pill {
    display: none;
  }
}


