:root {
  --bg: #050b1a;
  --bg2: #0a1530;
  --text: #eaf0ff;
  --muted: #9fb0d1;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background:
    radial-gradient(1200px 700px at 12% 12%, #122247 0%, transparent 52%),
    radial-gradient(900px 600px at 85% 80%, #0b1b3b 0%, transparent 50%),
    linear-gradient(160deg, var(--bg) 0%, var(--bg2) 100%);
}

.layout {
  width: min(1180px, 94vw);
  margin: 0 auto;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(1rem, 3vw, 3rem);
  align-items: center;
  padding: clamp(1rem, 3vw, 2.5rem) 0;
}

.left .kicker {
  margin: 0 0 .5rem;
  color: var(--muted);
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: .85rem;
}

.left h1 {
  margin: 0;
  font-size: clamp(2rem, 6vw, 4.6rem);
  line-height: 1.05;
}

.left .lead {
  margin-top: 1rem;
  max-width: 52ch;
  color: #cdd9f3;
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  line-height: 1.3;
}

.lead p { margin: 0 0 .3rem; }
.lead p:last-child { margin-bottom: 0; }

.btn {
  display: inline-block;
  margin-top: 1.2rem;
  text-decoration: none;
  color: #08122b;
  background: linear-gradient(180deg, #9fbcff, #7ea6ff);
  padding: .78rem 1.08rem;
  border-radius: .7rem;
  font-weight: 700;
}

.right { display: grid; place-items: center; }

/* ===== Cards fan wrapper ===== */
.cards-fan {
  position: relative;
  width: min(420px, 90vw);
  aspect-ratio: 3 / 4;
}

/* ===== Card base ===== */
.stack-card {
  position: absolute;
  inset: 0;
  border-radius: 18px;
  overflow: hidden;
  transition: transform .4s ease, opacity .4s ease;
  isolation: isolate;

  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;

  --video-scale-x: 0.693;
  --video-scale: 0.70;
  --video-top: 46%;
  --frame-scale: 1.30;
}

.stack-card::before,
.stack-card::after {
  content: none !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  filter: none !important;
}

/* ===== LAYERS ===== */
.stack-card > video {
  position: absolute;
  top: var(--video-top);
  left: 50%;

  width: calc(100% * var(--video-scale-x));
  height: calc(100% * var(--video-scale));

  /* ✅ SCALE FIX: keep video taller (desktop + mobile) */
  transform: translate(-50%, -50%) scaleY(1.05);
  transform-origin: center;

  object-fit: cover;
  display: block;
  z-index: 0;
  border-radius: 12px;

  filter: none !important;
}

.stack-card > img.card-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  z-index: 2;

  object-fit: contain;
  object-position: center;

  transform: scale(var(--frame-scale)) scaleY(1.01);
  transform-origin: center;

  filter: drop-shadow(0 22px 46px rgba(0, 0, 0, .45));
}

/* ===== Fan transforms for the stack (fan like playing cards) ===== */
.card-back-4 { transform: translate(-130px, 26px) rotate(-30deg) scale(.965); opacity: .32; z-index: 1; }
.card-back-3 { transform: translate(-95px, 18px)  rotate(-22deg) scale(.975); opacity: .46; z-index: 2; }
.card-back-2 { transform: translate(-62px, 10px)  rotate(-14deg) scale(.985); opacity: .62; z-index: 3; }
.card-back-1 { transform: translate(-32px, 4px)   rotate(-7deg)  scale(.995); opacity: .80; z-index: 4; }
.card-front  { transform: translate(0, 0)         rotate(0deg)   scale(1);    opacity: 1;   z-index: 6; }

/* ===== Arrows ===== */
.fan-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 30;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 999px;
  background: rgba(8,12,24,.55);
  color: #eaf0ff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background .2s ease, border-color .2s ease;
}

.fan-arrow:hover {
  background: rgba(159, 188, 255, .15);
  border-color: rgba(159, 188, 255, .4);
}

.fan-arrow-left { left: -56px; }
.fan-arrow-right { right: -56px; }

@media (hover: none), (pointer: coarse) {
  .fan-arrow { display: none; }
}

/* ===== Text block under cards ===== */
.card-text { margin-top: .5rem; }

.card-subtitle {
  margin: 0 0 .3rem;
  color: var(--muted);
  font-size: .9rem;
  letter-spacing: .04em;
}

.card-motto {
  margin: 0 0 .5rem;
  font-style: italic;
  color: #8fa8d4;
  font-size: clamp(.95rem, 1.6vw, 1.05rem);
  line-height: 1.5;
}

.value-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 1rem;
}

.value-label {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

.value-tags .value-label {
  flex-basis: 100%;
  margin-bottom: 6px;
}

.value-tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 14px;
  border-radius: 100px;
  font-size: .82rem;
  font-weight: 500;
  color: #b8ccf0;
  background: rgba(159, 188, 255, .08);
  border: 1px solid rgba(159, 188, 255, .15);
  letter-spacing: .02em;
}

.fade-in { animation: fadeIn .4s ease-out; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.left, .cards-fan {
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
}

/* ===== Mobile overrides ===== */
@media (max-width: 940px) {
  .layout {
    grid-template-columns: 1fr;
    align-items: start;
    padding-top: 1.2rem;
  }

  .right { order: -1; margin-top: .5rem; }
  .left { margin-top: 1.2rem; }

  .cards-fan {
    width: min(360px, 92vw);
    margin: 0 auto;
  }

  .stack-card {
    --video-scale-x: 0.693;
    --video-scale: 0.70;
    --video-top: 47%;
  }

  /* ✅ same scale on mobile */
  .stack-card > video {
    transform: translate(-50%, -50%) scaleY(1.05);
  }

  .card-back-4 { transform: translate(-50px, 6px) rotate(-10deg) scale(.96); }
  .card-back-3 { transform: translate(-36px, 4px) rotate(-7deg)  scale(.97); }
  .card-back-2 { transform: translate(-24px, 2px) rotate(-4deg)  scale(.98); }
  .card-back-1 { transform: translate(-12px, 1px) rotate(-2deg)  scale(.99); }
}