:root {
  --pink: #e43aa5; /* extracted from CREATE pill */
  --blue: #338cc8; /* extracted from EXPLORE pill */
  --text: #ffffff;
  --icon-circle: #ffffff;
  --icon-mark: #090909;
  --expand-duration: 3500ms;
  --expand-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100svh;
}

body {
  margin: 0;
  background: #000;
  font-family: "Work Sans", "Montserrat", system-ui, -apple-system, Segoe UI,
    Roboto, Helvetica, Arial, sans-serif;
  font-weight: 400;
}

.stage {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100svh;
  display: flex;
  overflow: hidden;
}

.panel {
  flex: 0 0 50%;
  position: relative;
  overflow: hidden;
  transition: flex-basis var(--expand-duration) var(--expand-ease);
  will-change: flex-basis;
  cursor: pointer;
}

/* Inner visual layer that can extend into the neighboring panel
   without affecting the hover hit areas (the outer .panel elements). */
.panelMedia {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: visible;
  transition: left var(--expand-duration) var(--expand-ease),
    right var(--expand-duration) var(--expand-ease),
    top var(--expand-duration) var(--expand-ease),
    bottom var(--expand-duration) var(--expand-ease),
    transform var(--expand-duration) var(--expand-ease);
  will-change: left, right, top, bottom, transform;
}

.panelMedia::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center center;
  transform: scale(1);
  transform-origin: center center;
  transition: transform var(--expand-duration) var(--expand-ease);
}

/* Subtle background zoom on hover/press (only on the hovered side).
   .is-touch-hover is toggled from JS on touchstart/touchend to mirror :hover. */
.panel:hover .panelMedia::before,
.panel.is-touch-hover .panelMedia::before,
.panel:active .panelMedia::before {
  transform: scale(1.02);
}

.panel:hover .panelOverlay,
.panel.is-touch-hover .panelOverlay,
.panel:active .panelOverlay {
  transform: scale(1.02);
}

.panelMedia--left::before {
  background-image: url("./20260331_110913.webp");
}

.panelMedia--right::before {
  background-image: url("./Frame.webp");
}

.panelContent {
  position: absolute;
  left: 0;
  right: 0;
  top: 54%;
  transform: translateY(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 26px;
  width: 100%;
  /* Responsive side padding without a dedicated media query:
     - 0px on wide desktop
     - ramps up as the viewport gets smaller
     - maxes at ~40px on narrow mobile/tablet */
  padding: 0 clamp(0px, calc((900px - 100vw) / 3), 40px);
}

.panelBlock {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 26px;
}

.panelBlock--create {
  transform: none; /* placeholder for interaction-based adjustments */
}

.panelBlock--explore {
  transform: none; /* placeholder for interaction-based adjustments */
}

.panelOverlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: rgba(0, 0, 0, 0.48);
  pointer-events: none;
  transform-origin: center center;
  transform: scale(1);
  transition: transform var(--expand-duration) var(--expand-ease);
}

.pill {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.02em;
  border-radius: 999px;
  transition: background-color 160ms ease, color 160ms ease,
    transform 160ms ease, box-shadow 160ms ease;
}

.pill--create {
  width: 136px;
  height: 54px;
  background: var(--pink);
  border: 2px solid var(--pink);
}

/* Pointer hover is covered by the parent panel; keep :focus-visible on the link for keyboard. */
.panel--left:hover .pill--create,
.panel--left.is-touch-hover .pill--create,
.pill--create:focus-visible {
  background: #ffffff;
  color: var(--pink);
}

.panel--left:active .pill--create,
.pill--create:active {
  background: #ffffff;
  color: var(--pink);
  transform: translateY(1px) scale(0.98);
}

.pill--explore {
  width: 145px;
  height: 52px;
  background: var(--blue);
  border: 2px solid var(--blue);
}

.panel--right:hover .pill--explore,
.panel--right.is-touch-hover .pill--explore,
.pill--explore:focus-visible {
  background: #ffffff;
  color: var(--blue);
}

.panel--right:active .pill--explore,
.pill--explore:active {
  background: #ffffff;
  color: var(--blue);
  transform: translateY(1px) scale(0.98);
}

.panelDesc {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.22;
  font-weight: 400;
  max-width: 420px;
}

/* Divider line (two versions):
   - vertical for desktop/tablet
   - horizontal for mobile
   We keep transitions off by default to avoid "media query kicks". */
.brandDivider {
  position: absolute;
  background: rgba(255, 255, 255, 0.95);
  z-index: 5;
}

.brandDivider--vertical {
  top: 0;
  bottom: 0;
  left: 50%; /* seam between the two panels */
  width: 2px;
  transform: translateX(-50%);
  transition: left var(--expand-duration) var(--expand-ease);
}

.brandDivider--horizontal {
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  transform: none;
  display: none;
  transition: top var(--expand-duration) var(--expand-ease);
}

.brandIcon {
  position: absolute;
  left: 50%;
  top: 52%;
  transform: translate(-50%, -50%);
  width: 62px;
  height: 62px;
  pointer-events: none;
  z-index: 6;
  transition: left var(--expand-duration) var(--expand-ease),
    top var(--expand-duration) var(--expand-ease);
}

.brandIcon svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Recolor the inline svg elements. */
.brandIcon svg .cls-1 {
  fill: var(--icon-circle) !important;
}
.brandIcon svg .cls-2 {
  fill: var(--icon-mark) !important;
}

/* Expand hovered/pressed panel ~5% into the neighboring panel.
   Divider + icon shift to match the seam. */
@media (min-width: 601px) {
.panel--left:hover ~ .brandDivider--vertical,
.panel--left.is-touch-hover ~ .brandDivider--vertical,
.panel--left:active ~ .brandDivider--vertical {
  left: 51%;
  transition: left var(--expand-duration) var(--expand-ease);
}

.panel--left:hover ~ .brandIcon,
.panel--left.is-touch-hover ~ .brandIcon,
.panel--left:active ~ .brandIcon {
  left: 51%;
  transition: left var(--expand-duration) var(--expand-ease);
}

/* Expand visuals by extending the inner media layer.
   Outer .panel elements are kept fixed and only used as hover hit areas. */
.panel--left:hover .panelMedia,
.panel--left.is-touch-hover .panelMedia,
.panel--left:active .panelMedia {
  right: 0%;
}

.panel--right:hover .panelMedia,
.panel--right.is-touch-hover .panelMedia,
.panel--right:active .panelMedia {
  left: 0%;
}

/* When hovering the right panel, move the seam + icon. */
.panel--right:hover ~ .brandDivider--vertical,
.panel--right.is-touch-hover ~ .brandDivider--vertical {
  left: 49%;
  transition: left var(--expand-duration) var(--expand-ease);
}

.panel--right:hover ~ .brandIcon,
.panel--right.is-touch-hover ~ .brandIcon {
  left: 49%;
  transition: left var(--expand-duration) var(--expand-ease);
}

@supports selector(:has(*)) {
  /* Right-side hover seam is handled by .panel--right:hover ~ … (sibling combinator). */

  /* Press/hold based on the active pill. */
  /* seam + logo movement is handled below; panels themselves remain fixed */
  .stage:has(.pill--create:active) .brandDivider--vertical {
    left: 51%;
    transition: left var(--expand-duration) var(--expand-ease);
  }
  .stage:has(.pill--create:active) .brandIcon {
    left: 51%;
    transition: left var(--expand-duration) var(--expand-ease);
  }

  .stage:has(.pill--create:active) .panel--left .panelMedia {
    right: 0%;
  }

  /* seam + logo movement is handled below; panels themselves remain fixed */
  .stage:has(.pill--explore:active) .brandDivider--vertical {
    left: 49%;
    transition: left var(--expand-duration) var(--expand-ease);
  }
  .stage:has(.pill--explore:active) .brandIcon {
    left: 49%;
    transition: left var(--expand-duration) var(--expand-ease);
  }

  .stage:has(.pill--explore:active) .panel--right .panelMedia {
    left: 0%;
  }

  .stage:has(.pill--create:active) .panel--left .panelMedia::before,
  .stage:has(.pill--explore:active) .panel--right .panelMedia::before {
    transform: scale(1.02);
  }

  .stage:has(.pill--create:active) .panel--left .panelOverlay,
  .stage:has(.pill--explore:active) .panel--right .panelOverlay {
    transform: scale(1.02);
  }
}
}

/* Tablet backgrounds (side-by-side) */
@media (max-width: 900px) {
  .brandDivider--vertical {
    left: 50%;
  }

  .brandIcon {
    left: 50%;
  }
}

/* Mobile: stacked panels, divider becomes horizontal. */
@media (max-width: 600px) {
  .stage {
    flex-direction: column;
  }

  .panelContent {
    left: 0;
    top: 0;
    transform: none;
    inset: 0;
    width: 100%;
    height: 100%;
    gap: 0;
    justify-content: center;
  }

  .panelBlock {
    gap: 22px;
  }

  .panelDesc {
    max-width: 100%;
    font-size: 18px;
  }

  .brandDivider--vertical {
    display: none;
  }

  .brandDivider--horizontal {
    display: block;
  }

  .brandIcon {
    left: 50%;
    top: 50%;
  }

  /* Extend visuals vertically by extending the child media layer only. */
  .panel--left:hover .panelMedia,
  .panel--left.is-touch-hover .panelMedia,
  .panel--left:active .panelMedia {
    bottom: 0%;
  }

  .panel--left:hover ~ .brandDivider--horizontal,
  .panel--left.is-touch-hover ~ .brandDivider--horizontal,
  .panel--left:active ~ .brandDivider--horizontal {
    top: 51%;
    transition: top var(--expand-duration) var(--expand-ease);
  }

  .panel--left:hover ~ .brandIcon,
  .panel--left.is-touch-hover ~ .brandIcon,
  .panel--left:active ~ .brandIcon {
    top: 51%;
    transition: top var(--expand-duration) var(--expand-ease);
  }

  /* Explore panel extends upward when hovered/pressed. */
  .panel--right:hover,
  .panel--right.is-touch-hover,
  .panel--right:active {
    z-index: auto;
  }

  .panel--right:hover .panelMedia,
  .panel--right.is-touch-hover .panelMedia,
  .panel--right:active .panelMedia {
    top: 0%;
  }

  /* Mobile: neutralize sticky :hover only — JS-driven .is-touch-hover keeps full “hover” styling. */
  .panel--left:hover:not(.is-touch-hover) .pill--create,
  .panel--right:hover:not(.is-touch-hover) .pill--explore {
    color: var(--text);
    transform: none;
  }

  .panel--left:hover:not(.is-touch-hover) .pill--create {
    background: var(--pink);
    border-color: var(--pink);
  }

  .panel--right:hover:not(.is-touch-hover) .pill--explore {
    background: var(--blue);
    border-color: var(--blue);
  }

  .panel--left:hover:not(.is-touch-hover) .panelMedia,
  .panel--right:hover:not(.is-touch-hover) .panelMedia {
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
  }

  .panel--left:hover:not(.is-touch-hover) ~ .brandDivider--horizontal,
  .panel--left:hover:not(.is-touch-hover) ~ .brandIcon,
  .panel--right:hover:not(.is-touch-hover) ~ .brandDivider--horizontal,
  .panel--right:hover:not(.is-touch-hover) ~ .brandIcon {
    top: 50%;
  }

  @supports selector(:has(*)) {
    .stage:has(.panel--left:hover:not(.is-touch-hover)) .brandDivider--horizontal,
    .stage:has(.panel--left:hover:not(.is-touch-hover)) .brandIcon,
    .stage:has(.panel--right:hover:not(.is-touch-hover)) .brandDivider--horizontal,
    .stage:has(.panel--right:hover:not(.is-touch-hover)) .brandIcon {
      top: 50%;
    }

    .stage:has(.panel--left:hover:not(.is-touch-hover)) .panel--left .panelMedia,
    .stage:has(.panel--right:hover:not(.is-touch-hover)) .panel--right .panelMedia {
      left: 0;
      right: 0;
      top: 0;
      bottom: 0;
    }

    .stage:has(.panel--right:hover:not(.is-touch-hover)) .brandDivider--horizontal {
      top: 49%;
      transition: top var(--expand-duration) var(--expand-ease);
    }

    .stage:has(.panel--right:hover:not(.is-touch-hover)) .brandIcon {
      top: 49%;
      transition: top var(--expand-duration) var(--expand-ease);
    }

    .stage:has(.panel--right.is-touch-hover) .brandDivider--horizontal {
      top: 49%;
      transition: top var(--expand-duration) var(--expand-ease);
    }

    .stage:has(.panel--right.is-touch-hover) .brandIcon {
      top: 49%;
      transition: top var(--expand-duration) var(--expand-ease);
    }

    .stage:has(.pill--create:active) .brandDivider--horizontal {
      top: 51%;
      transition: top var(--expand-duration) var(--expand-ease);
    }
    .stage:has(.pill--create:active) .brandIcon {
      top: 51%;
      transition: top var(--expand-duration) var(--expand-ease);
    }

    .stage:has(.pill--create:active) .panel--left .panelMedia {
      bottom: 0%;
    }

    .stage:has(.pill--explore:active) .brandDivider--horizontal {
      top: 49%;
      transition: top var(--expand-duration) var(--expand-ease);
    }
    .stage:has(.pill--explore:active) .brandIcon {
      top: 49%;
      transition: top var(--expand-duration) var(--expand-ease);
    }

    .stage:has(.pill--explore:active) .panel--right .panelMedia {
      top: 0%;
    }

    /* Final mobile hover lockout (sticky :hover only; not .is-touch-hover). */
    .stage:has(.panel--left:hover:not(.is-touch-hover)) .brandDivider--horizontal,
    .stage:has(.panel--left:hover:not(.is-touch-hover)) .brandIcon,
    .stage:has(.panel--right:hover:not(.is-touch-hover)) .brandDivider--horizontal,
    .stage:has(.panel--right:hover:not(.is-touch-hover)) .brandIcon {
      top: 50% !important;
    }
  }
}

/* State-driven 50/50 resize to avoid background overlap. */
.stage.state-left .panel--left {
  flex-basis: 51%;
}
.stage.state-left .panel--right {
  flex-basis: 49%;
}
.stage.state-right .panel--left {
  flex-basis: 49%;
}
.stage.state-right .panel--right {
  flex-basis: 51%;
}

/* Desktop/tablet: keep divider + logo aligned to the seam. */
@media (min-width: 601px) {
  .stage.state-left .brandDivider--vertical,
  .stage.state-left .brandIcon {
    left: 51% !important;
  }

  .stage.state-right .brandDivider--vertical,
  .stage.state-right .brandIcon {
    left: 49% !important;
  }
}

/* Mobile: stacked panels; seam becomes horizontal. */
@media (max-width: 600px) {
  .stage.state-left .brandDivider--horizontal,
  .stage.state-left .brandIcon {
    top: 51% !important;
  }

  .stage.state-right .brandDivider--horizontal,
  .stage.state-right .brandIcon {
    top: 49% !important;
  }

  .stage.state-left .brandIcon,
  .stage.state-right .brandIcon {
    left: 50% !important;
  }
}

