/* 
 * Learning That Adapts - Why Sovi Interactive Showcase
 */

:root {
  --purple: #8c55f2;
  --purple-dark: #7336ea;
  --ink: #0d0e12;
  --copy: #64708b;
  --canvas: #fbfbfe;
  --card: rgba(255, 255, 255, 0.92);
  --border: rgba(121, 91, 192, 0.08);
}

.why-section,
#why-sovi {
  position: relative;
  z-index: 1;
  height: 100vh;
  width: 100%;
  min-height: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  box-sizing: border-box;
  background:
    radial-gradient(ellipse at 49% 48%, rgba(143, 84, 247, 0.055) 0%, rgba(143, 84, 247, 0) 35%),
    radial-gradient(ellipse at 93% 88%, rgba(143, 84, 247, 0.08) 0%, rgba(143, 84, 247, 0) 31%),
    linear-gradient(180deg, #fdfdff 0%, #fbfbfe 63%, #faf9fe 100%);
}

#why-sovi .snap-anim-wrapper {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  padding: clamp(14px, 2.2vh, 26px) clamp(30px, 7.65vw, 128px) clamp(18px, 3vh, 34px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
}

.ambient {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(5px);
}

.ambient-left {
  width: 520px;
  height: 480px;
  left: -280px;
  top: 150px;
  background: radial-gradient(circle, rgba(144, 85, 242, 0.08), rgba(144, 85, 242, 0));
}

.ambient-right {
  width: 560px;
  height: 560px;
  right: -160px;
  bottom: -180px;
  background: radial-gradient(circle, rgba(144, 85, 242, 0.09), rgba(144, 85, 242, 0));
}

.hero-copy {
  position: relative;
  z-index: 5;
  text-align: center;
  transform: translateY(-0.8cm);
}

.eyebrow {
  display: inline-flex;
  margin: 0 0 clamp(9px, 1.4vh, 14px);
  padding: 0;
  color: var(--purple);
  font-size: clamp(12px, 1.7vh, 16px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.17em;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(32px, min(3.2vw, 5.75vh), 54px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.052em;
}

.hero-copy h1 span {
  color: var(--purple-dark);
}

.subtitle {
  margin: clamp(6px, 1.3vh, 12px) auto 0;
  color: #66738c;
  font-size: clamp(13px, min(1.2vw, 2.05vh), 19px);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.024em;
  white-space: nowrap;
}

.comparison-layout {
  position: relative;
  z-index: 4;
  width: 100%;
  max-width: 1420px;
  margin: clamp(10px, 2.2vh, 22px) auto 0;
  display: grid;
  grid-template-columns: minmax(780px, 1fr) 340px;
  gap: clamp(56px, 5.2vw, 88px);
  align-items: center;
}

.comparison-area {
  min-width: 0;
}

.column-headings,
.comparison-row {
  display: grid;
  grid-template-columns: minmax(330px, 1fr) 68px minmax(350px, 1.05fr);
  align-items: center;
}

.comparison-row {
  position: relative;
}

.column-headings {
  margin-bottom: clamp(7px, 1.4vh, 13px);
  align-items: end;
}

.column-headings h2 {
  margin: 0 0 4px;
  font-size: clamp(16px, min(1.55vw, 2.35vh), 22px);
  font-weight: 750;
  line-height: 1.15;
  letter-spacing: -0.045em;
}

.column-headings p {
  margin: 0;
  color: #66738c;
  font-size: clamp(12px, min(1.1vw, 1.7vh), 16px);
  line-height: 1.4;
  letter-spacing: -0.025em;
}

.comparison-rows {
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 1.9vh, 18px);
}

.info-card {
  min-height: clamp(78px, 12.1vh, 114px);
  padding: clamp(10px, 1.9vh, 18px) 20px;
  display: flex;
  align-items: flex-start;
  gap: 23px;
  border: 1px solid var(--border);
  border-radius: 19px;
  background: var(--card);
  box-shadow: 0 12px 28px rgba(86, 63, 135, 0.035), inset 0 1px 0 rgba(255,255,255,0.94);
  backdrop-filter: blur(12px);
  box-sizing: border-box;
}

.number-badge,
.icon-badge {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: clamp(34px, 4.7vh, 44px);
  height: clamp(34px, 4.7vh, 44px);
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(140, 85, 242, 0.1), rgba(140, 85, 242, 0.045));
}

.number-badge {
  color: #65718a;
  font-size: clamp(15px, 2vh, 19px);
  font-weight: 700;
}

.icon-badge {
  width: clamp(50px, 7.65vh, 72px);
  height: clamp(50px, 7.65vh, 72px);
  margin-top: 1px;
  border-radius: 14px;
  color: var(--purple);
  background:
    radial-gradient(circle at 50% 50%, rgba(255,255,255,0.95), rgba(255,255,255,0) 65%),
    linear-gradient(145deg, rgba(140, 85, 242, 0.12), rgba(140, 85, 242, 0.04));
}

.icon-badge svg {
  width: clamp(31px, 4.6vh, 43px);
  height: clamp(31px, 4.6vh, 43px);
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.star-badge svg {
  width: 46px;
  height: 46px;
}

.info-card h3 {
  margin: 1px 0 6px;
  font-size: clamp(14px, min(1.25vw, 1.95vh), 18px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.038em;
}

.info-card p {
  max-width: 330px;
  margin: 0;
  color: #69758f;
  font-size: clamp(12px, min(1.1vw, 1.7vh), 16px);
  line-height: 1.45;
  letter-spacing: -0.024em;
}

.sovi-card {
  position: relative;
  padding-left: 24px;
  gap: 34px;
  transform-origin: center;
  transition: border-color 240ms ease, box-shadow 240ms ease, opacity 240ms ease;
  cursor: pointer;
}

.conventional-card {
  border-color: rgba(90, 95, 108, 0.08);
  background: linear-gradient(145deg, rgba(239, 240, 243, 0.96), rgba(246, 246, 248, 0.94));
  box-shadow: 0 10px 24px rgba(73, 77, 86, 0.035), inset 0 1px 0 rgba(255, 255, 255, 0.76);
}

.conventional-card .number-badge {
  color: #737985;
  background: rgba(124, 129, 141, 0.11);
}

.comparison-row.is-active .sovi-card {
  z-index: 5;
  border-color: rgba(140, 85, 242, 0.34);
  box-shadow:
    0 17px 36px rgba(113, 62, 211, 0.13),
    0 0 0 1px rgba(140, 85, 242, 0.08),
    inset 0 1px 0 rgba(255,255,255,0.96);
  animation: sovi-card-focus 5.6s cubic-bezier(.22,.8,.22,1) both;
}

@keyframes sovi-card-focus {
  0% { transform: scale(1); }
  7% { transform: scale(1.035); }
  16%, 88% { transform: scale(1.018); }
  100% { transform: scale(1); }
}

.phone-link {
  position: absolute;
  z-index: 3;
  left: calc(100% + 8px);
  top: 50%;
  width: clamp(74px, 7.5vw, 126px);
  height: 36px;
  overflow: visible;
  opacity: 0;
  color: #8c55f2;
  pointer-events: none;
  transform: translateY(-50%);
  filter: drop-shadow(0 4px 7px rgba(119, 69, 220, 0.16));
}

.phone-link path,
.phone-link circle {
  vector-effect: non-scaling-stroke;
}

.link-glow {
  fill: none;
  stroke: currentColor;
  stroke-width: 7;
  stroke-linecap: round;
  opacity: 0.08;
}

.link-path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-dasharray: 4 5;
  stroke-dashoffset: 150;
}

.link-arrow {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
}

.link-dot {
  fill: #fff;
  stroke: currentColor;
  stroke-width: 2;
  opacity: 0;
}

.comparison-row.is-active .phone-link {
  animation: link-visibility 5.6s ease both;
}

.comparison-row.is-active .link-path {
  animation: link-flow 5.6s cubic-bezier(.25,.8,.25,1) both;
}

.comparison-row.is-active .link-arrow {
  animation: link-arrow-in 5.6s ease both;
}

.comparison-row.is-active .link-dot {
  animation: link-dot-pulse 5.6s ease both;
}

@keyframes link-visibility {
  0%, 11% { opacity: 0; }
  18%, 89% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes link-flow {
  0%, 12% { stroke-dashoffset: 150; opacity: 0; }
  27%, 88% { stroke-dashoffset: 0; opacity: 1; }
  100% { stroke-dashoffset: -18; opacity: 0; }
}

@keyframes link-arrow-in {
  0%, 23% { opacity: 0; transform: translateX(-7px); }
  30%, 88% { opacity: 1; transform: translateX(0); }
  100% { opacity: 0; transform: translateX(4px); }
}

@keyframes link-dot-pulse {
  0%, 14% { opacity: 0; transform: scale(.5); transform-origin: center; }
  22% { opacity: 1; transform: scale(1.5); }
  31%, 88% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(.7); }
}

.sovi-card h3 {
  margin-top: 3px;
}

.arrow {
  position: relative;
  width: 44px;
  height: 18px;
  margin: 0 auto;
}

.arrow span {
  position: absolute;
  left: 0;
  right: 9px;
  top: 8px;
  border-top: 2px dotted #9d6ff4;
}

.arrow i {
  position: absolute;
  right: 2px;
  top: 3px;
  width: 10px;
  height: 10px;
  border-top: 2px solid #9d6ff4;
  border-right: 2px solid #9d6ff4;
  transform: rotate(45deg);
}

.phone-column {
  position: relative;
  display: grid;
  place-items: center;
  align-self: center;
  min-height: 0;
  height: min(65vh, 620px);
}

.phone-glow {
  position: absolute;
  z-index: 0;
  width: min(480px, 31vw);
  height: min(65vh, 620px);
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(144, 84, 246, 0.13) 0%, rgba(144, 84, 246, 0.055) 42%, rgba(144, 84, 246, 0) 72%);
  filter: blur(8px);
}

.phone-shell {
  position: relative;
  z-index: 2;
  height: min(64.4vh, 606px);
  width: auto;
  aspect-ratio: 310 / 606;
  padding: 8px;
  border: 2px solid #27262c;
  border-radius: 48px;
  background: linear-gradient(105deg, #0b0b0d, #34333b 44%, #08080a 73%);
  box-shadow:
    0 27px 56px rgba(55, 32, 92, 0.2),
    0 0 0 2px rgba(132, 125, 145, 0.48),
    inset 0 0 0 1px rgba(255,255,255,0.22),
    0 0 48px rgba(141, 82, 242, 0.12);
  box-sizing: border-box;
}

.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 15px 14px 11px;
  display: flex;
  flex-direction: column;
  border-radius: 38px;
  overflow: hidden;
  background:
    radial-gradient(circle at 75% 18%, rgba(157, 101, 252, 0.18), transparent 35%),
    radial-gradient(circle at 25% 88%, rgba(109, 71, 231, 0.13), transparent 37%),
    linear-gradient(160deg, #fcfbff 0%, #f6f1ff 52%, #ffffff 100%);
  box-sizing: border-box;
}

.phone-video {
  position: absolute;
  inset: 0;
  top: -5.4%;
  bottom: auto;
  height: 105.4%;
  z-index: 1;
  display: block;
  width: 100%;
  border: 0;
  border-radius: inherit;
  object-fit: cover;
  object-position: 50% 0%;
  opacity: 0;
  pointer-events: none;
  background: #f8f5ff;
  transition: opacity 320ms ease;
}

.phone-screen.is-video-active .phone-video.is-active {
  opacity: 1;
  pointer-events: auto;
}

.phone-screen.is-video-active .video-slot {
  opacity: 0;
  visibility: hidden;
}

.phone-screen.is-video-active .status-row,
.phone-screen.is-video-active .home-indicator {
  opacity: 0;
}

.status-row {
  position: relative;
  z-index: 3;
  height: 23px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 7px;
  font-size: 11px;
  font-weight: 700;
  transition: opacity 220ms ease;
}

.dynamic-island {
  position: absolute;
  top: -2px;
  left: 50%;
  width: 80px;
  height: 24px;
  border-radius: 13px;
  transform: translateX(-50%);
  background: #050506;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
}

.status-icons {
  color: #111;
  font-size: 10px;
  letter-spacing: 1px;
}

.video-slot {
  position: relative;
  flex: 1;
  margin: 18px 0 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 22px 24px;
  border: 1.5px dashed rgba(131, 73, 236, 0.34);
  border-radius: 28px;
  overflow: hidden;
  color: #6e43c4;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.72), rgba(242, 235, 255, 0.9)),
    repeating-linear-gradient(45deg, transparent 0 12px, rgba(140,85,242,0.03) 12px 24px);
  transition: opacity 260ms ease;
  box-sizing: border-box;
}

.video-slot::before,
.video-slot::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
}

.video-slot::before {
  width: 240px;
  height: 240px;
  top: -90px;
  right: -100px;
  background: rgba(148, 89, 247, 0.08);
}

.video-slot::after {
  width: 190px;
  height: 190px;
  left: -100px;
  bottom: -65px;
  background: rgba(108, 80, 232, 0.07);
}

.scene-grid {
  position: absolute;
  inset: 0;
  opacity: 0.34;
  background-image:
    linear-gradient(rgba(140,85,242,0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(140,85,242,0.055) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: linear-gradient(to bottom, transparent, #000 28%, #000 72%, transparent);
}

.scene-orbit {
  position: relative;
  z-index: 2;
  width: clamp(100px, 16vh, 150px);
  height: clamp(100px, 16vh, 150px);
  margin-bottom: clamp(16px, 3vh, 28px);
  display: grid;
  place-items: center;
  border: 1px solid rgba(140,85,242,0.23);
  border-radius: 50%;
  box-shadow: 0 0 0 18px rgba(140,85,242,0.035), 0 20px 42px rgba(111,66,198,0.12);
}

.scene-orbit::before,
.scene-orbit::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px dashed rgba(140,85,242,0.25);
}

.scene-orbit::before { inset: 17px; }
.scene-orbit::after { inset: 33px; }

.scene-orbit > span {
  position: absolute;
  width: 13px;
  height: 13px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--purple);
  box-shadow: 0 4px 12px rgba(110,58,210,0.28);
}

.scene-orbit > span:nth-child(1) { left: 7px; top: 31px; }
.scene-orbit > span:nth-child(2) { right: 4px; top: 50%; }
.scene-orbit > span:nth-child(3) { left: 49%; bottom: 1px; }

.scene-core {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: clamp(48px, 7vh, 66px);
  height: clamp(48px, 7vh, 66px);
  border-radius: 21px;
  color: #fff;
  background: linear-gradient(145deg, #a66aff, #7541e9);
  box-shadow: 0 14px 28px rgba(112,60,217,0.26), inset 0 1px 0 rgba(255,255,255,0.38);
  font-size: clamp(16px, 2.5vh, 22px);
  font-weight: 800;
}

.scene-kicker {
  position: relative;
  z-index: 2;
  margin: 0 0 8px;
  color: var(--purple);
  font-size: clamp(8px, 1.15vh, 10px);
  font-weight: 800;
  letter-spacing: 0.12em;
}

.video-slot .scene-title {
  position: relative;
  z-index: 2;
  margin: 0 0 8px;
  color: #19121f;
  font-size: clamp(17px, 2.45vh, 23px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.04em;
  text-align: center;
}

.video-slot .scene-copy {
  position: relative;
  z-index: 2;
  margin: 0;
  color: #847991;
  font-size: clamp(10px, 1.4vh, 12px);
  font-weight: 500;
  line-height: 1.45;
  text-align: center;
}

.scene-progress {
  position: relative;
  z-index: 2;
  width: 78%;
  height: 5px;
  margin-top: clamp(18px, 3vh, 28px);
  overflow: hidden;
  border-radius: 999px;
  background: rgba(126,82,204,0.1);
}

.scene-progress i {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #a76cff, #7341e9);
  transform: scaleX(0);
  transform-origin: left;
}

.scene-steps {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 6px;
  margin-top: 14px;
}

.scene-steps span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(128,93,191,0.2);
}

.scene-steps span.is-current {
  width: 16px;
  border-radius: 4px;
  background: var(--purple);
}

.video-slot.is-playing .scene-orbit {
  animation: scene-orbit-in 5.6s cubic-bezier(.2,.75,.2,1) both;
}

.video-slot.is-playing .scene-orbit::before {
  animation: orbit-spin 5.6s linear both;
}

.video-slot.is-playing .scene-orbit::after {
  animation: orbit-spin-reverse 5.6s linear both;
}

.video-slot.is-playing .scene-core {
  animation: scene-core-pulse 5.6s ease both;
}

.video-slot.is-playing .scene-kicker,
.video-slot.is-playing .scene-title,
.video-slot.is-playing .scene-copy,
.video-slot.is-playing .scene-progress,
.video-slot.is-playing .scene-steps {
  animation: scene-copy-in 5.6s cubic-bezier(.22,.8,.2,1) both;
}

.video-slot.is-playing .scene-progress i {
  animation: scene-progress 5.6s linear both;
}

@keyframes scene-orbit-in {
  0%, 13% { opacity: 0; transform: translateY(22px) scale(.78); }
  27%, 87% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-14px) scale(.94); }
}

@keyframes scene-copy-in {
  0%, 20% { opacity: 0; transform: translateY(14px); }
  32%, 88% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-8px); }
}

@keyframes scene-core-pulse {
  0%, 23% { transform: scale(.8); }
  31% { transform: scale(1.1); }
  38%, 86% { transform: scale(1); }
  100% { transform: scale(.92); }
}

@keyframes scene-progress {
  0%, 28% { transform: scaleX(0); }
  89%, 100% { transform: scaleX(1); }
}

@keyframes orbit-spin { to { transform: rotate(360deg); } }
@keyframes orbit-spin-reverse { to { transform: rotate(-300deg); } }

.home-indicator {
  width: 108px;
  height: 4px;
  margin: 5px auto 0;
  border-radius: 3px;
  background: #121214;
  transition: opacity 220ms ease;
}

.side-button {
  position: absolute;
  z-index: 1;
  width: 3px;
  border-radius: 2px 0 0 2px;
  background: #3c3b42;
}

.silent { left: -5px; top: 92px; height: 27px; }
.volume-up { left: -5px; top: 135px; height: 47px; }
.volume-down { left: -5px; top: 192px; height: 47px; }
.power { right: -5px; top: 155px; height: 70px; border-radius: 0 2px 2px 0; }

.phone-spark {
  position: absolute;
  z-index: 3;
  top: 16px;
  right: 0;
  width: 54px;
  height: 48px;
  transform: rotate(5deg);
}

.phone-spark i {
  position: absolute;
  display: block;
  width: 4px;
  height: 17px;
  border-radius: 3px;
  background: linear-gradient(#a66cff, #8050f1);
}

.phone-spark i:nth-child(1) { left: 6px; top: 5px; transform: rotate(25deg); }
.phone-spark i:nth-child(2) { left: 23px; top: 17px; transform: rotate(72deg); }
.phone-spark i:nth-child(3) { left: 8px; top: 29px; transform: rotate(112deg); height: 14px; }

@media (max-width: 1240px) {
  .why-section {
    padding-inline: 36px;
  }

  .comparison-layout {
    grid-template-columns: minmax(680px, 1fr) 290px;
    gap: 42px;
  }

  .column-headings,
  .comparison-row {
    grid-template-columns: minmax(290px, 1fr) 52px minmax(310px, 1fr);
  }

  .phone-column {
    transform: none;
  }
}

@media (max-width: 980px) {
  .why-section {
    height: auto;
    min-height: 100vh;
    padding: 32px 24px 70px;
    overflow: visible;
  }

  .comparison-layout {
    grid-template-columns: 1fr;
  }

  .phone-column {
    height: 620px;
    transform: none;
  }

  .sovi-card::before,
  .sovi-card::after,
  .phone-link {
    display: none;
  }

  .subtitle {
    white-space: normal;
  }
}

@media (max-width: 720px) {
  .hero-copy h1 {
    font-size: 38px;
  }

  .desktop-break {
    display: none;
  }

  .column-headings {
    display: none;
  }

  .comparison-rows {
    gap: 28px;
  }

  .comparison-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .arrow {
    height: 28px;
    transform: rotate(90deg);
  }

  .info-card {
    min-height: 108px;
  }

  .phone-column {
    min-height: 560px;
    transform: scale(0.88);
    margin: -30px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .comparison-row.is-active .sovi-card,
  .comparison-row.is-active .phone-link,
  .video-slot.is-playing *,
  .video-slot.is-playing *::before,
  .video-slot.is-playing *::after {
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
  }
}
