/* median.bechou.dev — Lapa Ninja x Split-Stage Landing Stylesheet
 * Rules strictly enforced:
 * - Zero gradients, zero resting shadows, zero backdrop-filter glass, zero decorative thin rules
 * - Zero eyebrow badges, zero index numbering, zero icon-topped card grids
 * - Flat stepped tonal fields (--bg, --surface, --surface-2, --field-inv), square architectural buttons
 * - Equal outer margins (--gutter) across all sections, distinct layout per section
 */

/* --- HEADER COMPACT ACTION --- */
.ed-header-cta {
  min-height: 40px;
  padding: 0 18px;
}
@media (max-width: 48rem) {
  .ed-header-cta { display: none; }
}

/* --- SECTION 0: EDITORIAL ASYMMETRIC HERO + DOMINANT 16:9 LIVE CARPLAY STAGE --- */
.ed-hero {
  padding-block: clamp(1.75rem, 3.6vw, 3.25rem) clamp(3.5rem, 7vw, 6rem);
}
.ed-hero__grid {
  display: grid;
  gap: clamp(1.75rem, 3.2vw, 2.75rem);
}
.ed-hero__top {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: clamp(1.25rem, 3.5vw, 3.5rem);
  align-items: end;
}
.ed-hero__title {
  max-width: 14ch;
}
.ed-hero__right {
  display: grid;
  gap: 20px;
  align-content: end;
}
.ed-hero__lead {
  font-size: var(--step-lead);
  color: var(--ink);
  line-height: 1.48;
}
.ed-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
}
.ed-repo-copy {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: var(--step-small);
  font-weight: 500;
  padding: 8px 4px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: color var(--dur-micro) ease;
}
.ed-repo-copy:hover { color: var(--ink); }

/* --- LIVE 16:9 REAL CARPLAY STAGE (data-ui hardware fragment) --- */
.real-shell {
  display: grid;
  gap: 14px;
}
.sim-bezel {
  background: #0c0e11;
  padding: clamp(8px, 1.1vw, 14px);
}
.real-compare {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #080a0d;
  touch-action: pan-y;
  user-select: none;
}
.real-compare__pane { position: absolute; inset: 0; }
.real-compare__pane img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.real-compare__pane--after { z-index: 1; isolation: isolate; }
.real-compare__pane--before {
  clip-path: inset(0 calc(100% - var(--wipe, 28%)) 0 0);
  z-index: 2;
  isolation: isolate;
}
.real-compare.is-smooth .real-compare__pane--before {
  transition: clip-path 320ms var(--ease-spring);
}
.real-night-veil {
  position: absolute;
  inset: 0;
  background: #050807;
  opacity: 0;
  pointer-events: none;
  transition: opacity 280ms ease;
}

/* Sub-pixel centered interactive Play hotspot on real Apple Music ▶ button */
.real-music-hotspot {
  position: absolute;
  left: 74.89%;
  top: 69.0%;
  transform: translate(-50%, -50%);
  width: clamp(40px, 5.2%, 60px);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  border: 2px solid #9fc7b8;
  background: rgba(159, 199, 184, 0.14);
  cursor: pointer;
  z-index: 3;
  display: grid;
  place-items: center;
  padding: 0;
  transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease;
}
.real-compare[data-shot="3pane"] .real-music-hotspot {
  left: 52.97%;
  top: 70.26%;
  width: clamp(32px, 3.8%, 46px);
}
.real-music-hotspot[hidden] { display: none; }
.real-music-hotspot:hover {
  background: rgba(159, 199, 184, 0.28);
  transform: translate(-50%, -50%) scale(1.07);
}
.real-music-hotspot[aria-pressed="true"] {
  border-color: #9fc7b8;
  background: rgba(159, 199, 184, 0.3);
}
.real-music-hotspot__ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1.5px solid rgba(159, 199, 184, 0.65);
  pointer-events: none;
  animation: real-play-pulse 2.2s ease-out infinite;
}
@keyframes real-play-pulse {
  0% { transform: scale(0.96); opacity: 0.75; }
  100% { transform: scale(1.38); opacity: 0; }
}

.real-compare__line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--wipe, 28%);
  width: 2px;
  transform: translateX(-50%);
  background: #9fc7b8;
  z-index: 4;
  pointer-events: none;
}
.real-compare.is-smooth .real-compare__line,
.real-compare.is-smooth .real-compare__handle {
  transition: left 320ms var(--ease-spring);
}
.real-compare[data-full-median="true"] .real-compare__line,
.real-compare[data-full-stock="true"] .real-compare__line { opacity: 0; }

.real-compare__handle {
  position: absolute;
  top: 50%;
  left: clamp(22px, var(--wipe, 28%), calc(100% - 22px));
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  z-index: 6;
  background: transparent;
  border: 0;
  cursor: ew-resize;
  touch-action: none;
  display: grid;
  place-items: center;
  padding: 0;
}
.real-compare__handle span {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #9fc7b8;
  color: #111715;
  font-size: var(--step-small);
  font-weight: 700;
  display: grid;
  place-items: center;
  transition: opacity 180ms ease, transform 180ms ease;
}
.real-compare[data-full-median="true"] .real-compare__handle span,
.real-compare[data-full-stock="true"] .real-compare__handle span {
  opacity: 0.78;
  transform: scale(0.92);
}

/* Minimal Flat Control Bar Beneath Live CarPlay Stage */
.real-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
}
.real-bar__wipe {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}
.real-chip {
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  background: var(--surface);
  color: var(--ink);
  font-size: var(--step-small);
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--dur-micro) ease, color var(--dur-micro) ease;
}
.real-chip:hover { background: var(--surface-2); }
.real-chip[aria-pressed="true"] {
  background: var(--ink);
  color: var(--bg);
}

.real-bar__music {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  padding: 4px 14px 4px 6px;
  min-height: 40px;
}
.real-play-btn,
.real-next-btn {
  width: 32px;
  height: 32px;
  border: 0;
  background: var(--surface-2);
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: var(--step-small);
  padding: 0;
  transition: background-color var(--dur-micro) ease, color var(--dur-micro) ease;
}
.real-play-btn[aria-pressed="true"] {
  background: var(--accent);
  color: var(--accent-ink);
}
.real-track-name {
  font-size: var(--step-small);
  font-weight: 500;
  color: var(--ink);
}
.real-eq {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
  margin-left: 2px;
}
.real-eq i {
  display: block;
  width: 2.5px;
  height: 5px;
  background: var(--muted);
  transition: background-color 180ms ease;
}
.real-eq.is-playing i {
  background: var(--accent);
  animation: eq-bounce 780ms ease-in-out infinite alternate;
}
.real-eq.is-playing i:nth-child(2) { animation-delay: 140ms; }
.real-eq.is-playing i:nth-child(3) { animation-delay: 280ms; }
.real-eq.is-playing i:nth-child(4) { animation-delay: 90ms; }
@keyframes eq-bounce {
  from { transform: scaleY(0.45); transform-origin: bottom; }
  to { transform: scaleY(2.6); transform-origin: bottom; }
}

/* --- SECTION 1: OUTPUT INDEX & LIVE STICKY STAGE (Dealt Blueprint: index) --- */
.ed-index-section {
  padding-block: var(--section-gap);
}
.ed-index-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px 48px;
  align-items: end;
  margin-bottom: clamp(2.25rem, 4.5vw, 3.75rem);
}
.ed-index-header p {
  color: var(--ink);
  font-size: var(--step-body);
}

.ed-index-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 4vw, 4.5rem);
  align-items: start;
}

.ed-index-list {
  display: grid;
  gap: 8px;
}
.ed-index-item {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 18px 20px;
  cursor: pointer;
  display: grid;
  gap: 8px;
  position: relative;
  transition: background-color var(--dur-short) var(--ease-out);
}
.ed-index-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: top center;
  transition: transform var(--dur-short) var(--ease-out);
}
.ed-index-item:hover {
  background: var(--surface);
}
.ed-index-item__title {
  font-family: var(--font-display);
  font-size: var(--step-lead);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--muted);
  transition: color var(--dur-short) ease;
}
.ed-index-item__desc {
  font-size: var(--step-small);
  line-height: 1.5;
  color: var(--muted);
}
.ed-index-item.is-active {
  background: var(--surface);
}
.ed-index-item.is-active::before {
  transform: scaleY(1);
}
.ed-index-item.is-active .ed-index-item__title {
  color: var(--ink);
}
.ed-index-item.is-active .ed-index-item__desc {
  color: var(--ink);
}

/* Sticky Live Stage beside Output Index */
.ed-stage-col {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 0;
  background: var(--surface);
  padding: clamp(16px, 2vw, 28px);
}
.ed-stage-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0c0e11;
}
.ed-stage-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
  transition: opacity 280ms var(--ease-out);
}
.ed-stage-img.is-swapping { opacity: 0; }
.ed-stage-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  padding-top: 18px;
}
.ed-stage-caption {
  font-size: var(--step-small);
  font-weight: 500;
  color: var(--ink);
}
.ed-stage-action {
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: var(--step-small);
  font-weight: 600;
  padding: 6px 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.ed-stage-action:hover { color: var(--ink); }

/* --- SECTION 2: SMALL PROOF BESIDE TEXT (Dealt Blueprint: list on flat --surface field) --- */
.ed-proofs-section {
  background: var(--surface);
  padding-block: var(--section-gap);
}
.ed-proofs-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px 48px;
  align-items: end;
  margin-bottom: clamp(2.5rem, 5vw, 4.25rem);
}
.ed-proofs-head p {
  font-size: var(--step-body);
  color: var(--ink);
}

.ed-proof-list {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4.5rem);
}
.ed-proof-row {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: start;
}
.ed-proof-media {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0c0e11;
}
.ed-proof-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 640ms var(--ease-out);
}
.ed-proof-row:hover .ed-proof-media img {
  transform: scale(1.03);
}
.ed-proof-media--dpi img { object-position: 50% 10%; }
.ed-proof-media--island img { object-position: 50% 6%; }
.ed-proof-media--privacy img { object-position: 78% 48%; }

/* Dedicated Lề x Median real companion panel (data-ui) */
.ed-le-plate {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #111614;
  color: #e8e7df;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.ed-le-plate__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.ed-le-plate__apps {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.ed-le-plate__apps img {
  width: 44px;
  height: 44px;
  border-radius: 10px;
}
.ed-le-plate__badge {
  padding: 5px 10px;
  background: #1f2a26;
  color: #9fc7b8;
  font-size: var(--step-small);
  font-weight: 600;
}
.ed-le-plate__zones {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 10px;
}
.ed-le-zone {
  background: #1b2220;
  padding: 12px 14px;
  display: grid;
  gap: 4px;
}
.ed-le-zone strong { font-size: var(--step-body); color: #edf1ef; }
.ed-le-zone span { font-size: var(--step-small); color: #a8b2ad; }
.ed-le-zone--speed {
  background: #23312c;
}
.ed-le-zone--speed strong { color: #9fc7b8; }

.ed-proof-body {
  display: grid;
  gap: 12px;
  padding-top: 4px;
}
.ed-proof-body p {
  font-size: var(--step-body);
  color: var(--ink);
  line-height: 1.6;
}
.ed-proof-body .ed-proof-note {
  font-size: var(--step-small);
  color: var(--muted);
}

/* --- SECTION 3: TWO PLANS, TWO HARD-EDGE FIELDS (Dealt Blueprint: split) --- */
.ed-pricing-section {
  padding-block: 0;
}
.ed-pricing-split {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: stretch;
}
.ed-plan {
  padding-block: clamp(3.5rem, 6.5vw, 5.75rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(2rem, 4vw, 3.25rem);
}
.ed-plan--pro {
  background: var(--bg);
  color: var(--ink);
  padding-left: max(var(--gutter), calc((100% - var(--container)) / 2 + var(--gutter)));
  padding-right: clamp(24px, 3.2vw, 48px);
}
.ed-plan--b2b {
  background: var(--field-inv);
  color: var(--field-inv-ink);
  padding-left: clamp(24px, 3.2vw, 48px);
  padding-right: max(var(--gutter), calc((100% - var(--container)) / 2 + var(--gutter)));
}
.ed-plan--b2b h2,
.ed-plan--b2b h3,
.ed-plan--b2b strong { color: var(--field-inv-ink); }
.ed-plan--b2b p,
.ed-plan--b2b .ed-plan__sub { color: var(--field-inv-muted); }

.ed-plan__head {
  display: grid;
  gap: 14px;
}
.ed-plan__sub {
  font-size: var(--step-body);
  color: var(--ink);
  line-height: 1.55;
}
.ed-plan__specs {
  font-size: var(--step-small);
  font-weight: 500;
  color: var(--ink);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

/* Two B2C checkout channels inside Pro field */
.ed-pay-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.ed-pay-col {
  background: var(--surface);
  padding: clamp(20px, 2.4vw, 28px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
}
.ed-pay-col--vn {
  background: var(--surface-2);
}
.ed-pay-col__top {
  display: grid;
  gap: 10px;
}
.ed-pay-col__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--step-small);
  font-weight: 600;
  color: var(--ink);
}
.ed-pay-col__price {
  font-family: var(--font-display);
  font-size: var(--step-head);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.ed-pay-col__meta {
  font-size: var(--step-small);
  color: var(--muted);
  line-height: 1.45;
}
.ed-pay-col .btn { width: 100%; }

/* Official VietQR / Havoc brand marks */
.brand-plate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  padding: 3px 7px;
  height: 22px;
  flex-shrink: 0;
}
.brand-plate img { height: 14px; width: auto; display: block; }
.brand-icon { width: 20px; height: 20px; border-radius: 5px; flex-shrink: 0; }

/* B2B Inverted Field Tiers & Full-Width Stacked Actions (0% overflow in all 5 languages) */
.ed-b2b-rails {
  display: grid;
  gap: 12px;
}
.ed-b2b-rail {
  background: var(--field-inv-surface);
  padding: 18px 20px;
  display: grid;
  gap: 6px;
}
.ed-b2b-rail__label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--step-small);
  color: var(--field-inv-muted);
}
.ed-b2b-rail strong {
  font-family: var(--font-display);
  font-size: var(--step-lead);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.ed-b2b-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.ed-b2b-btn-primary {
  background: var(--field-inv-accent);
  color: var(--field-inv-accent-ink);
  width: 100%;
  white-space: normal;
  text-align: center;
  padding: 12px 18px;
}
.ed-b2b-btn-primary:hover { background: var(--field-inv-accent-hover); }
.ed-b2b-btn-quiet {
  background: var(--field-inv-surface);
  color: var(--field-inv-ink);
  width: 100%;
  white-space: normal;
  text-align: center;
  padding: 12px 18px;
}
.ed-b2b-btn-quiet:hover { opacity: 0.9; }

/* --- SECTION 4: ANSWERS AS EDITORIAL READING TEXT (Dealt Blueprint: grid) --- */
.ed-faq-section {
  padding-block: var(--section-gap);
  background: var(--bg);
}
.ed-faq-layout {
  display: grid;
  grid-template-columns: minmax(0, 3.5fr) minmax(0, 8.5fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
.ed-faq-aside {
  display: grid;
  gap: 12px;
}
.ed-faq-aside p {
  font-size: var(--step-small);
  color: var(--muted);
  max-width: 28ch;
}
.ed-faq-reading {
  columns: 2;
  column-gap: clamp(2rem, 4vw, 3.75rem);
}
.ed-faq-item {
  break-inside: avoid;
  margin-bottom: 28px;
  font-size: var(--step-body);
  line-height: 1.6;
  color: var(--ink);
}
.ed-faq-item strong {
  color: var(--ink);
  font-weight: 600;
}
.ed-faq-item a {
  color: var(--accent);
  font-weight: 600;
}

/* --- SECTION 5: SPLIT PHOTOGRAPH & EDITORIAL MENU FOOTER (Dealt Blueprint: split) --- */
.ed-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: min(74vh, 640px);
  background: var(--surface);
}
.ed-footer__photo {
  position: relative;
  overflow: hidden;
  background: #0c0e11;
  min-height: 360px;
}
.ed-footer__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left center;
  animation: footer-drift 22s ease-in-out infinite alternate;
}
@keyframes footer-drift {
  from { transform: scale(1.0); }
  to { transform: scale(1.055); }
}

.ed-footer__menu {
  padding-top: clamp(2.75rem, 6vw, 4.75rem);
  padding-bottom: clamp(2rem, 4vw, 3rem);
  padding-left: clamp(24px, 4vw, 56px);
  padding-right: var(--gutter);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 36px;
}
.ed-footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: var(--step-lead);
  font-weight: 700;
  color: var(--ink);
}
.ed-footer__brand img { width: 26px; height: 26px; border-radius: 6px; }

.ed-footer__nav {
  display: grid;
  gap: 10px;
}
.ed-footer__nav a {
  font-family: var(--font-display);
  font-size: var(--step-head);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.12;
  text-decoration: none;
  color: var(--ink);
  transition: transform var(--dur-short) var(--ease-out), color var(--dur-short) ease;
  width: fit-content;
}
.ed-footer__nav:hover a { color: var(--muted); }
.ed-footer__nav a:hover {
  color: var(--ink);
  transform: translateX(10px);
}

.ed-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px 24px;
  font-size: var(--step-small);
  color: var(--muted);
}
.ed-footer__wordmark {
  font-family: var(--font-display);
  font-size: var(--step-display);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.9;
  color: var(--ink);
  opacity: 0.16;
  user-select: none;
}

/* --- RESPONSIVE BREAKPOINTS (Tablet 768px & Phone 390px) --- */
@media (max-width: 64rem) {
  .ed-hero__top,
  .ed-index-header,
  .ed-index-grid,
  .ed-proofs-head,
  .ed-proof-row,
  .ed-pricing-split,
  .ed-faq-layout,
  .ed-footer {
    grid-template-columns: 1fr;
  }
  .ed-plan--pro,
  .ed-plan--b2b,
  .ed-footer__menu {
    padding-inline: var(--gutter);
  }
  .ed-stage-col {
    position: static;
    order: -1;
  }
  .ed-faq-reading { columns: 1; }
  .ed-footer { min-height: auto; }
  .ed-footer__photo { aspect-ratio: 16 / 9; min-height: 220px; }
}

@media (max-width: 44rem) {
  .ed-pay-cols { grid-template-columns: 1fr; gap: 32px; }
  .ed-pay-col { padding: 28px 22px; }
  .ed-hero__title { max-width: none; }
  .ed-hero__actions .btn { flex: 1 1 auto; }
  .real-bar { gap: 10px; }
  .real-bar__music { width: 100%; justify-content: space-between; }

  /* Phone Output Index: tidy 2-column wrapping selector above crisp 16:9 stage (zero sideways cutoff!) */
  .ed-index-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .ed-index-item {
    width: auto;
    flex: 1 1 calc(50% - 8px);
    min-width: 140px;
    padding: 12px 14px;
    background: var(--surface);
  }
  .ed-index-item__title { font-size: var(--step-small); }
  .ed-index-item__desc { display: none; }
  .ed-index-item.is-active {
    background: var(--ink);
    color: var(--bg);
  }
  .ed-index-item.is-active .ed-index-item__title { color: var(--bg); }
  .ed-index-item::before { display: none; }

  .ed-footer__menu { padding-bottom: 96px; }
}
