/* ═══════════════════════════════════════════════════
   Atomi — Why Choose Us Section
   ═══════════════════════════════════════════════════ */

.why {
  position: relative;
  scroll-margin-top: calc(var(--space-64) + var(--space-24));
  padding: clamp(var(--space-64), 10vh, var(--space-96)) clamp(var(--space-24), 5vw, var(--space-96));
  background:
    radial-gradient(ellipse 48% 52% at 22% 48%, oklch(0.72 0.16 294 / 0.06), transparent 58%),
    radial-gradient(ellipse 38% 34% at 82% 56%, oklch(0.84 0.12 72 / 0.07), transparent 52%),
    linear-gradient(180deg, var(--ivory-clean) 0%, var(--ivory) 50%, var(--rhythm-paper) 100%);
  overflow: hidden;
}

.why-inner {
  width: min(1480px, 100%);
  margin: 0 auto;
}

/* ── Two-column layout ────────────────────────────── */
.why-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(36px, 5.5vw, 68px);
  align-items: center;
}

/* ── Left: AI Illustration ─────────────────────────── */
.why-visual {
  position: relative;
  height: clamp(400px, 52vw, 560px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.why-visual-stage {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}

/* ── Visual elements ──────────────────────────────── */
.why-atom-orbits {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: oklch(0.68 0.14 294 / 0.08);
}

.why-atom-orbits ellipse {
  fill: none;
  stroke: currentColor;
  stroke-width: 0.7;
  stroke-dasharray: 340;
  animation: why-orbit-fade 2.8s var(--ease) forwards;
}

@keyframes why-orbit-fade {
  from { stroke-dashoffset: 340; opacity: 0; }
  to { stroke-dashoffset: 0; opacity: 1; }
}

.why-core-glow {
  position: absolute;
  width: 220px; height: 220px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 44% 38%, oklch(0.86 0.14 48 / 0.16), transparent 42%),
    radial-gradient(circle at 56% 62%, oklch(0.72 0.17 294 / 0.10), transparent 58%);
  animation: why-breathe 5s ease-in-out infinite;
}

@keyframes why-breathe {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.12); opacity: 0.9; }
}

.why-core-node {
  position: relative;
  z-index: 2;
  width: 80px; height: 80px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 26%, oklch(0.99 0.01 84 / 0.9), transparent 28%),
    linear-gradient(145deg, oklch(0.88 0.13 62 / 0.32), oklch(0.7 0.17 294 / 0.16));
  box-shadow:
    0 0 0 1px oklch(0.84 0.14 73 / 0.28),
    0 0 52px oklch(0.82 0.16 62 / 0.28),
    0 0 88px oklch(0.72 0.17 304 / 0.12);
}

.why-floating-card {
  position: absolute;
  padding: 14px 18px;
  border: 1px solid oklch(0.78 0.04 76 / 0.2);
  border-radius: var(--radius-md);
  background:
    radial-gradient(circle at 12% 18%, oklch(0.99 0.01 84 / 0.46), transparent 34%),
    linear-gradient(155deg, oklch(0.994 0.01 82 / 0.42), oklch(0.966 0.018 76 / 0.14));
  backdrop-filter: blur(12px) saturate(1.04);
  -webkit-backdrop-filter: blur(12px) saturate(1.04);
  box-shadow:
    0 10px 32px oklch(0.32 0.05 288 / 0.05),
    inset 0 1px 0 oklch(0.99 0.01 82 / 0.44);
  font-size: 0.82rem;
  font-weight: 560;
  color: var(--ink);
  z-index: 3;
}

.why-floating-card strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.96rem;
  font-weight: 650;
  margin-bottom: 2px;
}

.why-float--top {
  top: 14%; right: 8%;
  animation: why-float 4.8s ease-in-out infinite;
}

.why-float--mid {
  bottom: 22%; left: 4%;
  animation: why-float 5.2s ease-in-out 0.6s infinite;
}

.why-float--bot {
  bottom: 38%; right: 4%;
  animation: why-float 4.6s ease-in-out 1.2s infinite;
}

@keyframes why-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ── Right: feature list ───────────────────────────── */
.why-features {
  display: flex;
  flex-direction: column;
  gap: clamp(18px, 2.4vw, 24px);
}

.why-feature {
  display: flex;
  gap: var(--space-16);
  align-items: flex-start;
}

.why-feature-icon {
  width: 40px; height: 40px;
  flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 24%, oklch(0.99 0.01 84), transparent 34%),
    linear-gradient(145deg, oklch(0.98 0.012 82 / 0.8), oklch(0.86 0.075 300 / 0.18));
  box-shadow:
    0 0 0 1px oklch(0.66 0.15 294 / 0.16),
    0 6px 16px oklch(0.5 0.12 294 / 0.08),
    inset 0 1px 0 oklch(0.99 0.01 84 / 0.54);
  color: oklch(0.3 0.13 292);
}

.why-feature-icon svg {
  width: 18px; height: 18px;
}

.why-feature-text h4 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 650;
  color: var(--ink);
  margin-bottom: 3px;
}

.why-feature-text p {
  font-size: 0.84rem;
  line-height: 1.48;
  color: var(--ink-soft);
}

/* Premium Mimi visual + proof ledger */
@media (min-width: 1121px) {
  .why {
    padding: clamp(72px, 8.8vh, 104px) clamp(24px, 5vw, 96px) clamp(76px, 9vh, 112px);
    background:
      radial-gradient(ellipse 52% 58% at 26% 48%, oklch(0.84 0.12 72 / 0.14), transparent 62%),
      radial-gradient(ellipse 40% 44% at 72% 46%, oklch(0.72 0.16 294 / 0.065), transparent 58%),
      linear-gradient(180deg, var(--ivory-clean) 0%, var(--ivory) 52%, var(--rhythm-paper) 100%);
  }

  .why-inner {
    width: min(1220px, 100%);
    display: grid;
    grid-template-columns: minmax(540px, 1.06fr) minmax(390px, 0.94fr);
    column-gap: clamp(52px, 7vw, 92px);
    align-items: center;
  }

  .why .section-head {
    grid-column: 2;
    grid-row: 1;
    display: block;
    margin: 0 0 24px;
    text-align: left;
  }

  .why .section-label {
    font-size: 0.58rem;
    letter-spacing: 0.24em;
    margin-bottom: 8px;
  }

  .why .section-title {
    max-width: 460px;
    font-size: clamp(2.1rem, 2.8vw, 3.12rem);
    line-height: 1.02;
  }

  .why-body {
    display: contents;
  }

  .why-visual {
    grid-column: 1;
    grid-row: 1 / span 2;
    height: clamp(430px, 39vw, 560px);
    justify-content: flex-start;
  }

  .why-visual-stage {
    width: min(610px, 100%);
    isolation: isolate;
  }

  .why-visual-stage::before,
  .why-visual-stage::after {
    content: "";
    position: absolute;
    pointer-events: none;
  }

  .why-visual-stage::before {
    left: -3%;
    top: -1%;
    width: 110%;
    height: 108%;
    z-index: 0;
    background: url("../../assets/portal-stage-soft.webp") center / 136% auto no-repeat;
    opacity: 0.82;
    filter: saturate(1.06) contrast(1.03);
  }

  .why-visual-stage::after {
    left: 27%;
    bottom: 3%;
    z-index: 2;
    width: 40%;
    height: 82%;
    background: url("../../assets/mimi-target-match-clean.webp") center bottom / contain no-repeat;
    filter:
      saturate(1.02) contrast(1.02) brightness(1.015)
      drop-shadow(0 26px 40px oklch(0.48 0.05 64 / 0.16));
  }

  .why-atom-orbits {
    inset: 6% -4% -2% 0;
    z-index: 1;
    color: oklch(0.76 0.13 42 / 0.24);
    transform: rotate(-9deg) scale(1.08);
  }

  .why-core-glow {
    z-index: 0;
    width: 340px;
    height: 340px;
    background:
      radial-gradient(circle at 46% 34%, oklch(0.86 0.14 48 / 0.22), transparent 40%),
      radial-gradient(circle at 58% 62%, oklch(0.72 0.17 294 / 0.14), transparent 60%);
  }

  .why-core-node {
    display: none;
  }

  .why-floating-card {
    z-index: 4;
    width: auto;
    min-width: 156px;
    max-width: 196px;
    min-height: 0;
    display: block;
    padding: 11px 14px 12px;
    border-radius: 14px;
    font-size: 0.7rem;
    line-height: 1.25;
    color: var(--ink-soft);
    background:
      radial-gradient(circle at 34% 24%, oklch(0.99 0.01 84 / 0.9), transparent 34%),
      linear-gradient(145deg, oklch(0.98 0.012 82 / 0.7), oklch(0.86 0.075 300 / 0.2));
    box-shadow:
      0 10px 26px oklch(0.5 0.12 294 / 0.1),
      inset 0 1px 0 oklch(0.99 0.01 84 / 0.58);
  }

  .why-floating-card strong {
    display: block;
    color: var(--ink);
    font-size: 0.76rem;
    line-height: 1.12;
    margin-bottom: 3px;
  }

  .why-floating-card::before {
    content: none;
  }

  .why-float--top {
    top: 15%;
    right: 4%;
  }

  .why-float--mid {
    bottom: 29%;
    left: 4%;
  }

  .why-float--bot {
    bottom: 13%;
    right: 8%;
  }

  .why-features {
    grid-column: 2;
    grid-row: 2;
    gap: 0;
    padding: 10px 0;
    border-top: 1px solid oklch(0.62 0.035 76 / 0.18);
    border-bottom: 1px solid oklch(0.62 0.035 76 / 0.16);
  }

  .why-feature {
    position: relative;
    gap: 13px;
    padding: 14px 12px 14px 0;
    border-bottom: 1px solid oklch(0.62 0.035 76 / 0.12);
    transition: transform 0.32s var(--ease), background 0.32s var(--ease), border-color 0.32s var(--ease);
  }

  .why-feature:last-child {
    border-bottom: 0;
  }

  .why-feature:hover {
    transform: translateX(5px);
    border-color: oklch(0.72 0.15 304 / 0.18);
    background:
      linear-gradient(90deg, oklch(0.99 0.012 82 / 0.56), transparent 72%);
  }

  .why-feature-icon {
    width: 32px;
    height: 32px;
    color: var(--violet-deep);
  }

  .why-feature-icon svg {
    width: 15px;
    height: 15px;
  }

  .why-feature-text h4 {
    font-size: 0.92rem;
    line-height: 1.16;
    margin-bottom: 5px;
  }

  .why-feature-text p {
    max-width: 430px;
    font-size: 0.74rem;
    line-height: 1.42;
  }
}

@media (min-width: 769px) and (max-width: 1120px) {
  .why .section-head .section-title {
    font-size: clamp(2.08rem, 4.5vw, 2.62rem);
    line-height: 1.05;
    text-wrap: balance;
  }

  .why .why-body {
    gap: 28px;
  }

  .why .why-visual {
    height: clamp(310px, 40vw, 380px);
  }

  .why .why-features {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .why .why-feature {
    padding: 14px 15px 15px;
    border: 1px solid oklch(0.74 0.052 70 / 0.16);
    border-radius: 16px;
    background:
      linear-gradient(145deg, oklch(0.994 0.01 82 / 0.5), oklch(0.966 0.018 76 / 0.16));
    box-shadow: inset 0 1px 0 oklch(0.99 0.01 82 / 0.44);
  }

  .why .why-feature:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .why {
    scroll-margin-top: calc(var(--space-48) + var(--space-24));
  }

  .why .why-visual {
    margin: 4px 0 10px;
  }
}
