:root {
  --bg:        #0f1221;
  --panel:     #171b31;
  --panel-2:   #1d2340;
  --text:      #eef2ff;
  --muted:     #b7bfd9;
  --accent-1:  #7c3aed;
  --accent-2:  #06b6d4;
  --accent-3:  #f472b6;
  --border:    rgba(255, 255, 255, 0.12);
  --shadow:    0 20px 50px rgba(0, 0, 0, 0.35);
  --cell-delay-ms: 24;
  --anim-duration: 0.7s;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; min-height: 100%; }

body {
  font-family: "IBM Plex Sans", "JP Regular", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans",
    "Liberation Sans", Lato, sans-serif;
  color: var(--text);
  background:
    radial-gradient(ellipse at top left, #1a4a9e 0%, transparent 55%),
    radial-gradient(ellipse at bottom right, #020F1F 0%, transparent 60%),
    linear-gradient(160deg, #042E7A 0%, #021a4a 40%, #020F1F 100%);
  overflow-x: hidden;
}

.hero {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px 20px;
}

.hero__inner {
  width: min(1300px, 100%);
  display: grid;
  grid-template-columns: 0.9fr 1.15fr;
  gap: 40px;
  align-items: center;
}

.intro {
  max-width: 580px;
  text-align: justify;
  /* Prevent text vibration/jitter during adjacent slider animations */
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  -webkit-font-smoothing: antialiased;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  padding: 8px 14px;
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 10px;
  backdrop-filter: blur(8px);
}

.intro h1 {
  font-size: clamp(2rem, 5vw, 4.4rem);
  line-height: 1.2;
  font-weight: 700;
  margin-bottom: 18px;
  letter-spacing: 0.06em;
  text-align: center;
}

.intro p {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.75;
  max-width: 58ch;
}

.highlight {
  position: relative;
  font-weight: 700;
  /* display: inline-block; */
  background: linear-gradient(90deg, var(--accent-3), var(--accent-1), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hint { margin-top: 18px; color: #dbe4ff; opacity: 0.88; font-size: 0.95rem; }
.hint strong { color: #fff; }

/* ─── Slider Shell ───────────────────────────────────────────────────────
   KEY FIX: removed 1/1 aspect-ratio — the shell now sizes to the image's
   natural ratio. width+max-width still constrain it horizontally; height
   is driven by the slide content so images are never cropped.
──────────────────────────────────────────────────────────────────────── */
.slider-shell {
  position: relative;
  width: 100%;
  max-width: 680px;
  margin-inline: auto;
  /* No fixed aspect-ratio — height follows the image naturally */
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.02)),
    rgba(255,255,255,.03);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  overflow: hidden;
}

.slider-shell::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,.08);
  pointer-events: none;
  z-index: 10;
}

/* ─── Swiper ─────────────────────────────────────────────────────────── */
.swiper {
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
}

.swiper-wrapper { align-items: stretch; }

.swiper-slide {
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  background: #101425;
  user-select: none;
  box-shadow: 0 15px 35px rgba(0,0,0,.25);
}

/* ─── Image wrapper ──────────────────────────────────────────────────── */
.img-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: inherit;
  background: #111827;
}

.img-wrapper img {
  width: 100%;
  height: auto;           /* KEY FIX: auto height so the full image shows */
  display: block;
  object-fit: contain;    /* KEY FIX: contain = never crop, always show full */
  transition: opacity 0.25s ease;
}

.img-wrapper.splitting > img { opacity: 0; }

/* Splitting cell grid must also auto-height to match the image */
.img-wrapper .cell {
  opacity: 1;
  will-change: opacity, transform;
}

.swiper-slide-active .img-wrapper.is-animating .cell {
  opacity: 0.04;
  transform: scale(1.08);
  animation: cellFade var(--anim-duration) ease forwards;
  animation-delay: calc(var(--cell-order) * calc(var(--cell-delay-ms) * 1ms));
}

@keyframes cellFade {
  from { opacity: 0.04; transform: scale(1.08); }
  to   { opacity: 1;    transform: scale(1);    }
}

/* ─── Slide overlay / caption ────────────────────────────────────────── */
.slide-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  z-index: 5;
  pointer-events: none;
}

.caption {
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

.tag {
  align-self: flex-end;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.14);
  backdrop-filter: blur(12px);
}

.caption h2 {
  font-size: clamp(1.2rem, 2.4vw, 2rem);
  line-height: 1.12;
  margin-bottom: 6px;
}

.caption p {
  color: rgba(255,255,255,.82);
  font-size: 0.95rem;
  line-height: 1.55;
  max-width: 32ch;
}

/* ─── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 980px) {
  .hero__inner { grid-template-columns: 60% 40%; gap: 28px; }
  .intro h1    { font-size: clamp(1.9rem, 4vw, 3.1rem); }
  .intro p     { font-size: 1rem; }
}

@media (max-width: 760px) {
  .hero          { padding: 15px 5px; }
  .hero__inner   { grid-template-columns: 1fr; gap: 10px; }
  .intro         { max-width: 100%; text-align: center; }
  .eyebrow       { font-size: 0.9rem; padding: 4px 12px; margin-bottom: 8px; }
  .intro h1      { font-size: 1.5rem !important; margin-bottom: 8px; line-height: 1.35; }
  .intro h1 br   { display: none; }
  .intro p       { margin-inline: auto; font-size: 0.9rem; }
  .slider-shell  { max-width: 100%; padding: 4px; border-radius: 12px; }
  .slider-shell::before { inset: 4px; border-radius: 8px; }
  .swiper-slide  { border-radius: 8px; }
  .img-wrapper   { border-radius: 8px; }
  .hint          { text-align: center; font-size: 0.8rem; margin-top: 10px; }
  .tag           { font-size: 0.7rem; padding: 4px 10px; }
}
