/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
  background: #08080d;
  font-family: 'Outfit', sans-serif;
  color: #ede9f8;
}

/* ── SPLIT ── */
.split {
  display: flex;
  height: 100dvh;
  width: 100vw;
  position: relative;
}

.panel {
  position: relative;
  flex: 1;
  overflow: visible;
  cursor: pointer;
  transition: flex 0.75s cubic-bezier(0.76, 0, 0.24, 1);
}

.panel-inner {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

@media (hover: hover) {
  .split:has(.kai:hover)  .kai  { flex: 1.55; }
  .split:has(.kai:hover)  .mike { flex: 0.45; }
  .split:has(.mike:hover) .mike { flex: 1.55; }
  .split:has(.mike:hover) .kai  { flex: 0.45; }
}

/* ── BACKGROUNDS ── */
.bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-repeat: no-repeat;
  transition: transform 0.75s cubic-bezier(0.76, 0, 0.24, 1), filter 0.55s ease;
  transform: scale(1.05);
  filter: saturate(0.78) brightness(0.65);
  will-change: transform, filter;
}

.panel:hover .bg,
.panel.active .bg {
  transform: scale(1.0);
  filter: saturate(1.0) brightness(0.85);
}

.kai  .bg { background-image: url('kai.webp');  background-position: center 15%; }
.mike .bg { background-image: url('mike.webp'); background-position: center 15%; }

/* ── VIGNETTES ── */
.vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.kai .vignette {
  background:
    linear-gradient(to top, rgba(4,12,18,.96) 0%, rgba(4,14,22,.78) 20%, rgba(6,16,28,.25) 50%, transparent 72%),
    linear-gradient(to right, rgba(4,12,18,.45) 0%, transparent 40%),
    linear-gradient(to bottom, rgba(4,10,16,.38) 0%, transparent 20%);
}

.mike .vignette {
  background:
    linear-gradient(to top, rgba(16,5,10,.96) 0%, rgba(18,6,14,.78) 20%, rgba(22,8,18,.25) 50%, transparent 72%),
    linear-gradient(to left, rgba(16,5,10,.45) 0%, transparent 40%),
    linear-gradient(to bottom, rgba(12,4,8,.38) 0%, transparent 20%);
}

/* ── SEAM ── */
.seam {
  position: absolute;
  top: 0; bottom: 0;
  right: -60px;
  width: 120px;
  z-index: 20;
  pointer-events: none;
  backdrop-filter: blur(22px) saturate(1.4);
  -webkit-backdrop-filter: blur(22px) saturate(1.4);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,.6) 20%, black 40%, black 60%, rgba(0,0,0,.6) 80%, transparent 100%);
  mask-image:         linear-gradient(to right, transparent 0%, rgba(0,0,0,.6) 20%, black 40%, black 60%, rgba(0,0,0,.6) 80%, transparent 100%);
}

.seam::after {
  content: '';
  position: absolute;
  top: 6%; bottom: 6%;
  left: 50%;
  width: 1px;
  transform: translateX(-50%);
  background: linear-gradient(to bottom, transparent, rgba(210,200,255,.5) 18%, rgba(225,215,255,.82) 50%, rgba(210,200,255,.5) 82%, transparent);
  box-shadow: 0 0 12px 2px rgba(200,190,255,.22);
}

.seam-gem {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: .72rem;
  color: rgba(215,208,255,.7);
  background: rgba(8,8,18,.75);
  backdrop-filter: blur(4px);
  padding: .4rem .3rem;
  line-height: 1;
  animation: gemPulse 3.5s ease-in-out infinite;
}

@keyframes gemPulse {
  0%, 100% { opacity: .28; }
  50%       { opacity: .9;  }
}

/* ── CONTENT ── */
.content {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 2.8rem 2.8rem 3.4rem;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.mike .content { align-items: flex-end; text-align: right; }

.name {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: clamp(2.6rem, 5vw, 5rem);
  line-height: 1;
  letter-spacing: .03em;
  opacity: .58;
  transition: opacity .45s ease;
}
.kai  .name { color: rgba(175,245,225,.92); }
.mike .name { color: rgba(255,205,145,.92); }

.character-tag {
  font-size: .68rem;
  letter-spacing: .24em;
  text-transform: uppercase;
  font-weight: 400;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .45s ease .07s, transform .45s ease .07s;
}
.kai  .character-tag { color: rgba(120,215,185,.65); }
.mike .character-tag { color: rgba(235,165,90,.65); }

.rule {
  width: 2.2rem;
  height: 1px;
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left;
  transition: opacity .4s ease .12s, transform .5s cubic-bezier(.22,1,.36,1) .12s;
  margin: .35rem 0 .1rem;
}
.mike .rule { transform-origin: right; }
.kai  .rule { background: rgba(120,215,185,.5); }
.mike .rule { background: rgba(235,165,90,.5); }

.bio {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .45s ease .16s, transform .45s ease .16s;
}
.mike .bio { align-items: flex-end; }

.bio-line {
  font-size: .8rem;
  font-weight: 300;
  color: rgba(225,218,245,.6);
  letter-spacing: .04em;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: .38rem;
  margin-top: .55rem;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .45s ease .23s, transform .45s ease .23s;
}
.mike .pills { justify-content: flex-end; }

.pill {
  font-size: .62rem;
  font-weight: 400;
  letter-spacing: .15em;
  text-transform: uppercase;
  padding: .26rem .72rem;
  border-radius: 999px;
  border: 1px solid;
  backdrop-filter: blur(6px);
}
.kai .pill  { color: rgba(120,220,188,.78); border-color: rgba(120,220,188,.2); background: rgba(20,160,130,.07); }
.mike .pill { color: rgba(245,175,100,.78); border-color: rgba(245,175,100,.2); background: rgba(200,110,40,.07); }

.enter-hint {
  font-size: .62rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  margin-top: .25rem;
  opacity: 0;
  transition: opacity .4s ease .3s;
}
.kai  .enter-hint { color: rgba(120,215,185,.5); }
.mike .enter-hint { color: rgba(245,175,100,.5); }

/* ── REVEAL ON HOVER / ACTIVE ── */
@media (hover: hover) {
  .panel:hover .name          { opacity: 1; }
  .panel:hover .character-tag { opacity: 1; transform: translateY(0); }
  .panel:hover .rule          { opacity: 1; transform: scaleX(1); }
  .panel:hover .bio           { opacity: 1; transform: translateY(0); }
  .panel:hover .pills         { opacity: 1; transform: translateY(0); }
  .panel:hover .enter-hint    { opacity: 1; }
}

.panel.active .name          { opacity: 1; }
.panel.active .character-tag { opacity: 1; transform: translateY(0); }
.panel.active .rule          { opacity: 1; transform: scaleX(1); }
.panel.active .bio           { opacity: 1; transform: translateY(0); }
.panel.active .pills         { opacity: 1; transform: translateY(0); }
.panel.active .enter-hint    { opacity: 1; }

/* ── FOOTER ── */
.footer {
  position: fixed;
  bottom: 1.3rem; left: 50%;
  transform: translateX(-50%);
  font-size: .57rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(200,195,225,.18);
  z-index: 30;
  white-space: nowrap;
  pointer-events: none;
}

/* ── PANEL FADE IN ── */
.panel { animation: panelFade 1.1s ease both; }
.kai   { animation-delay: 0s; }
.mike  { animation-delay: .14s; }

@keyframes panelFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── MOBILE ── */
@media (max-width: 767px) {
  .split { flex-direction: column; }

  .split:has(.kai.active)  .kai  { flex: 1.5; }
  .split:has(.kai.active)  .mike { flex: 0.5; }
  .split:has(.mike.active) .mike { flex: 1.5; }
  .split:has(.mike.active) .kai  { flex: 0.5; }

  .seam {
    right: auto; left: 0;
    width: 100%;
    top: auto; bottom: -45px;
    height: 90px;
    backdrop-filter: blur(22px) saturate(1.4);
    -webkit-backdrop-filter: blur(22px) saturate(1.4);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,.6) 20%, black 40%, black 60%, rgba(0,0,0,.6) 80%, transparent 100%);
    mask-image:         linear-gradient(to bottom, transparent 0%, rgba(0,0,0,.6) 20%, black 40%, black 60%, rgba(0,0,0,.6) 80%, transparent 100%);
  }

  .seam::after {
    top: 50%; bottom: auto;
    left: 6%; right: 6%;
    width: auto; height: 1px;
    transform: translateY(-50%);
    background: linear-gradient(to right, transparent, rgba(210,200,255,.5) 18%, rgba(225,215,255,.82) 50%, rgba(210,200,255,.5) 82%, transparent);
    box-shadow: none;
  }

  .kai .vignette {
    background:
      linear-gradient(to top, rgba(4,12,18,.94) 0%, rgba(4,14,22,.65) 18%, rgba(6,16,28,.18) 42%, transparent 60%),
      linear-gradient(to bottom, rgba(4,10,16,.4) 0%, transparent 20%);
  }
  .mike .vignette {
    background:
      linear-gradient(to top, rgba(16,5,10,.94) 0%, rgba(18,6,14,.65) 18%, rgba(22,8,18,.18) 42%, transparent 60%),
      linear-gradient(to bottom, rgba(12,4,8,.4) 0%, transparent 20%);
  }

  .content { padding: 1.6rem 1.8rem 2rem; }
  .mike .content { align-items: flex-start; text-align: left; }
  .mike .rule    { transform-origin: left; }
  .mike .pills   { justify-content: flex-start; }
  .name { font-size: clamp(2.2rem, 8vw, 3.2rem); }
}

@media (max-width: 380px) {
  .content  { padding: 1.2rem 1.4rem 1.6rem; }
  .bio-line { font-size: .74rem; }
}
