/* ============================================================
   tiltshow: "Always on, in every chat"
   A 3D-tilted dark phone over a violet→fuchsia glow, with
   feature rows beside it. Namespaced with .tiltshow-*.
   Reuses site tokens + .reveal / .eyebrow / .container.
   ============================================================ */

.tiltshow-section {
  position: relative;
  overflow: hidden; /* keep the glow bleed from causing horizontal scroll */
}

.tiltshow-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 44px;
  align-items: center;
}

/* ---------- Phone visual ---------- */
.tiltshow-visual {
  position: relative;
  display: flex;
  justify-content: center;
  min-width: 0;
}

.tiltshow-glow {
  position: absolute;
  left: 50%;
  top: 54%;
  width: 128%;
  height: 122%;
  transform: translate(-50%, -50%);
  z-index: 0;
  pointer-events: none;
  filter: blur(16px);
  background:
    radial-gradient(40% 42% at 50% 42%, rgba(124, 58, 237, calc(var(--glow-a) * 0.6)), transparent 70%),
    radial-gradient(36% 38% at 63% 60%, rgba(217, 70, 239, calc(var(--glow-a) * 0.5)), transparent 72%),
    radial-gradient(52% 34% at 50% 86%, rgba(160, 70, 240, calc(var(--glow-a) * 0.42)), transparent 74%);
  animation: tiltshow-breathe 9s ease-in-out infinite;
}

@keyframes tiltshow-breathe {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.88; }
  50% { transform: translate(-50%, -52%) scale(1.06); opacity: 1; }
}

.tiltshow-persp {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  justify-content: center;
  perspective: 1500px;
}

.tiltshow-phone {
  position: relative;
  width: min(300px, 72vw);
  padding: 12px;
  border-radius: 46px;
  background: linear-gradient(152deg, #191921 0%, #0b0b10 58%, #050507 100%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow:
    0 44px 90px -34px rgba(0, 0, 0, 0.78),
    0 22px 48px -26px rgba(124, 58, 237, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transform-style: preserve-3d;
  transform: rotateY(-20deg) rotateX(7deg) rotateZ(-1.5deg);
  transition: transform 0.85s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
}

/* Side buttons on the frame (subtle, seat the device in 3D) */
.tiltshow-phone::before {
  content: "";
  position: absolute;
  right: -3px;
  top: 30%;
  width: 3px;
  height: 60px;
  border-radius: 3px;
  background: linear-gradient(#282830, #0c0c11);
}

.tiltshow-phone::after {
  content: "";
  position: absolute;
  left: -3px;
  top: 26%;
  width: 3px;
  height: 40px;
  border-radius: 3px;
  background: linear-gradient(#242430, #0c0c11);
  box-shadow: 0 54px 0 -7px #0c0c11, 0 54px 0 0 rgba(255,255,255,0.02);
}

/* Settle slightly when it scrolls into view (.in added by site observer) */
.tiltshow-visual.in .tiltshow-phone {
  transform: rotateY(-16deg) rotateX(5deg) rotateZ(-1deg);
}

/* Straighten toward the viewer on hover */
.tiltshow-visual:hover .tiltshow-phone {
  transform: rotateY(-8deg) rotateX(3deg) rotateZ(0deg);
}

.tiltshow-screen {
  position: relative;
  border-radius: 34px;
  overflow: hidden;
  aspect-ratio: 780 / 1688;
  background: #ffffff;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    inset 0 0 22px rgba(0, 0, 0, 0.28);
}

.tiltshow-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

/* Lit-screen sheen so the light screenshot reads as a glowing display */
.tiltshow-sheen {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 2;
  background:
    linear-gradient(133deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 30%),
    radial-gradient(130% 55% at 50% -12%, rgba(255, 255, 255, 0.16), transparent 62%);
  mix-blend-mode: screen;
}

/* Punch-hole camera */
.tiltshow-cam {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #050507;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16), 0 0 6px rgba(0, 0, 0, 0.6);
  z-index: 4;
}

/* ---------- Copy column ---------- */
.tiltshow-copy {
  min-width: 0;
}

.tiltshow-title {
  font-size: clamp(1.8rem, 2.4vw + 1rem, 2.5rem);
  line-height: 1.18;
  margin: 0 0 26px;
}

.tiltshow-rows {
  display: grid;
  gap: 20px;
}

.tiltshow-row {
  display: flex;
  gap: 15px;
  align-items: flex-start;
}

.tiltshow-ic {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--bubble-out-border);
  background: var(--bubble-out);
  color: var(--text);
}

.tiltshow-rowtext {
  min-width: 0;
}

.tiltshow-rowtext strong {
  display: block;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
  letter-spacing: -0.01em;
}

.tiltshow-rowtext span {
  display: block;
  color: var(--text-2);
  font-size: 0.94rem;
  line-height: 1.5;
}

/* ---------- Desktop layout: phone left, copy right ---------- */
@media (min-width: 900px) {
  .tiltshow-grid {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: 60px;
  }

  .tiltshow-phone {
    width: min(320px, 34vw);
  }
}

/* ---------- Reduced motion: hold a static tilt, no breathing ---------- */
@media (prefers-reduced-motion: reduce) {
  .tiltshow-glow {
    animation: none;
  }

  .tiltshow-phone,
  .tiltshow-visual.in .tiltshow-phone {
    transition: none;
    transform: rotateY(-15deg) rotateX(5deg) rotateZ(-1deg);
  }

  /* Keep the hover straighten available but instant */
  .tiltshow-visual:hover .tiltshow-phone {
    transform: rotateY(-8deg) rotateX(3deg) rotateZ(0deg);
  }
}
