/* Product-home composition: Living Studio System.
 *
 * marketing.css remains the shared PWE marketing contract used by /pricing.
 * This sheet is deliberately page-scoped so the spatial story can be bold
 * without turning the pricing page into a second, drifting implementation.
 */

.product-home {
  --scene-navy: #09101f;
  --scene-raised: #121e34;
  --scene-line: rgba(245, 179, 53, .28);
  --scene-line-strong: rgba(245, 179, 53, .72);
  --scene-paper: rgba(247, 245, 242, .92);
  overflow-x: clip;
}

.product-home .nav {
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.product-home .hero {
  min-height: min(940px, 100svh);
  padding-block: clamp(84px, 10vw, 132px) clamp(72px, 9vw, 110px);
  isolation: isolate;
  background:
    radial-gradient(70% 80% at 88% 45%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 70%),
    radial-gradient(50% 60% at 6% 24%, color-mix(in srgb, var(--family-navy-soft) 42%, transparent), transparent 72%),
    var(--surface);
}

.product-home .hero::before,
.product-home .hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.product-home .hero::before {
  z-index: -2;
  opacity: .28;
  background-image:
    linear-gradient(var(--hairline) 1px, transparent 1px),
    linear-gradient(90deg, var(--hairline) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: linear-gradient(90deg, #000, transparent 54%);
  mask-image: linear-gradient(90deg, #000, transparent 54%);
}

.product-home .hero::after {
  z-index: -1;
  background: linear-gradient(90deg, var(--surface) 0%, transparent 38%, transparent 100%);
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(360px, .86fr) minmax(560px, 1.14fr);
  align-items: center;
  gap: clamp(34px, 4.6vw, 72px);
  width: min(100%, 1380px);
  max-width: none;
}

.hero-copy {
  position: relative;
  z-index: 3;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 var(--s-3);
  color: var(--accent);
  font-size: var(--f-sm);
  font-weight: 650;
  letter-spacing: .08em;
}

.hero-kicker::before {
  content: "";
  width: 34px;
  height: 1px;
  background: currentColor;
}

.product-home .hero h1 {
  max-width: 10.5ch;
  font-size: clamp(3.2rem, 6.25vw, 6.55rem);
  line-height: .96;
  letter-spacing: -.035em;
  text-wrap: balance;
}

.product-home html[lang="zh-Hans"] .hero h1,
html[lang="zh-Hans"] .product-home .hero h1 {
  max-width: 7em;
  line-height: 1.05;
  letter-spacing: 0;
}

.hero-copy .lead {
  max-width: 37rem;
  margin-top: var(--s-4);
  font-size: clamp(1.05rem, 1.45vw, 1.3rem);
}

.hero-value {
  max-width: 35rem;
  margin-top: var(--s-3);
  color: var(--ink-faint);
  font-size: var(--f-sm);
  line-height: 1.65;
}

.hero-copy .btns {
  margin-top: var(--s-4);
}

.hero-copy .proof {
  margin-top: var(--s-4);
  padding: 0 0 0 var(--s-3);
}

.system-stage {
  position: relative;
  min-width: 0;
  aspect-ratio: 1.38 / 1;
  overflow: hidden;
  border: 1px solid rgba(247, 245, 242, .16);
  border-radius: clamp(18px, 2.5vw, 34px);
  background: var(--scene-navy);
  box-shadow: 0 42px 100px rgba(0, 0, 0, .42);
  contain: layout paint;
}

.system-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(9, 16, 31, .2), transparent 38%, rgba(9, 16, 31, .78)),
    linear-gradient(90deg, rgba(9, 16, 31, .28), transparent 30%, transparent 70%, rgba(9, 16, 31, .18));
}

.system-stage::after {
  content: "";
  position: absolute;
  inset: 12px;
  z-index: 5;
  border: 1px solid rgba(245, 179, 53, .12);
  border-radius: max(10px, calc(clamp(18px, 2.5vw, 34px) - 8px));
  pointer-events: none;
}

.system-poster,
.system-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.system-poster {
  z-index: 0;
  display: block;
  opacity: .86;
  transition: opacity .6s var(--ease), transform 1s var(--ease);
}

.system-poster img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.system-canvas {
  z-index: 1;
  display: block;
  pointer-events: none;
}

.system-canvas-three {
  z-index: 1;
  opacity: 0;
  transition: opacity .6s var(--ease);
}

.system-stage.three-ready .system-poster { opacity: .14; transform: scale(1.025); }
.system-stage.three-ready #livingSystemCanvas { opacity: 0; }
.system-stage.three-ready .system-canvas-three { opacity: 1; }

.system-stage-meta {
  position: absolute;
  left: 50%;
  bottom: 2.7%;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--scene-paper);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  transform: translateX(-50%);
  white-space: nowrap;
}

.system-stage-meta span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.system-stage-meta span:first-child::before {
  content: "";
  width: 8px;
  height: 8px;
  border: 1px solid var(--family-amber);
  border-radius: 50%;
  box-shadow: 0 0 18px rgba(245, 179, 53, .8);
}

.system-stage-meta [data-renderer-label] {
  display: none;
}

.system-core-label {
  position: absolute;
  left: 50%;
  top: 28.5%;
  z-index: 6;
  width: 29%;
  min-height: 10.5%;
  padding: 10px 14px;
  border: 1px solid rgba(245, 179, 53, .72);
  border-radius: 10px;
  background: rgba(9, 16, 31, .88);
  color: var(--warm-paper);
  line-height: 1.35;
  text-align: center;
  transform: translate(-50%, -50%);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.system-core-label strong,
.system-core-label small { display: block; }
.system-core-label strong { color: var(--family-amber); font-size: 12px; font-weight: 650; }
.system-core-label small { margin-top: 3px; color: rgba(247, 245, 242, .58); font-size: 9px; }

.system-stage-controls {
  position: absolute;
  inset: 0;
  z-index: 7;
  pointer-events: none;
}

.system-chip {
  position: absolute;
  min-width: 0;
  width: 22%;
  min-height: 9.5%;
  padding: 9px 11px;
  border: 1px solid rgba(245, 179, 53, .6);
  border-radius: 9px;
  background: rgba(9, 16, 31, .87);
  color: rgba(247, 245, 242, .72);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  pointer-events: auto;
  transform: translate(-50%, -50%);
  transition: color .2s var(--ease), border-color .2s var(--ease), background .2s var(--ease), transform .2s var(--ease);
}

.system-chip:nth-child(1) { left: 21.5%; top: 8%; }
.system-chip:nth-child(2) { left: 78.4%; top: 8%; }
.system-chip:nth-child(3) { left: 16.4%; top: 58%; }
.system-chip:nth-child(4) { left: 82.2%; top: 58%; }

.system-chip span {
  display: block;
  overflow: hidden;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.system-chip small {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: rgba(247, 245, 242, .48);
  font-size: 10px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.system-chip:hover,
.system-chip:focus-visible,
.system-chip[data-active] {
  border-color: rgba(245, 179, 53, .8);
  background: rgba(22, 35, 61, .9);
  color: var(--family-amber);
  transform: translate(-50%, -54%);
}

/* The problem section becomes an editorial field rather than four equal
 * feature cards: the interruption is the primary pain, the other three are
 * evidence around it. */
.product-home #why .head {
  max-width: 58rem;
}

.product-home #why .g4 {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
}

.product-home #why .g4 .card {
  position: relative;
  min-height: 220px;
  justify-content: flex-end;
  overflow: hidden;
}

.product-home #why .g4 .card::before {
  content: attr(data-index);
  position: absolute;
  right: 18px;
  top: 8px;
  color: color-mix(in srgb, var(--accent) 24%, transparent);
  font-family: var(--serif);
  font-size: clamp(4rem, 8vw, 7.2rem);
  line-height: 1;
}

.product-home #why .g4 .card:nth-child(1) { grid-column: span 5; }
.product-home #why .g4 .card:nth-child(2) { grid-column: span 4; }
.product-home #why .g4 .card:nth-child(3) { grid-column: span 3; }
.product-home #why .g4 .card:nth-child(4) { grid-column: 6 / span 7; min-height: 180px; }

/* One system, four surfaces. The map is sticky only on wide viewports; the
 * chapters remain ordinary document flow and all links work without JS. */
.product-home #product {
  position: relative;
  background:
    radial-gradient(55% 50% at 16% 38%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 75%),
    var(--surface);
}

.system-story-head {
  display: grid;
  grid-template-columns: 61.8fr 38.2fr;
  align-items: end;
  gap: var(--s-5);
  margin-bottom: var(--s-6);
}

.system-story-head .head { max-width: 48rem; }
.system-story-head .lead { margin: 0; }

.system-story-grid {
  display: grid;
  grid-template-columns: minmax(360px, 38.2fr) minmax(0, 61.8fr);
  gap: clamp(34px, 6vw, 89px);
  align-items: start;
}

.system-map {
  position: sticky;
  top: 96px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid var(--card-line);
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 28%),
    linear-gradient(145deg, var(--card), var(--surface-2));
  box-shadow: var(--shadow-strong);
}

.system-map::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .4;
  background-image:
    linear-gradient(var(--hairline) 1px, transparent 1px),
    linear-gradient(90deg, var(--hairline) 1px, transparent 1px);
  background-size: 34px 34px;
  -webkit-mask-image: radial-gradient(circle, #000, transparent 78%);
  mask-image: radial-gradient(circle, #000, transparent 78%);
}

.map-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: var(--accent);
  opacity: .52;
}

.system-map-core,
.system-map-node {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  border: 1px solid var(--card-line);
  background: color-mix(in srgb, var(--card) 88%, transparent);
  text-align: center;
}

.system-map-core {
  left: 50%;
  top: 50%;
  width: 31%;
  aspect-ratio: 1;
  border-color: var(--accent);
  border-radius: 50%;
  color: var(--ink);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 48px color-mix(in srgb, var(--accent) 18%, transparent);
}

.system-map-core strong {
  display: block;
  font-family: var(--serif);
  font-size: clamp(1.05rem, 2vw, 1.5rem);
  font-weight: 500;
}

.system-map-core small {
  display: block;
  margin-top: 4px;
  color: var(--ink-faint);
  font-size: 10px;
}

.system-map-node {
  width: 28%;
  min-height: 17%;
  padding: 12px 8px;
  border-radius: 13px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.2;
  transition: color .24s var(--ease), border-color .24s var(--ease), background .24s var(--ease), transform .24s var(--ease);
}

.system-map-node:nth-of-type(1) { left: 7%; top: 9%; }
.system-map-node:nth-of-type(2) { right: 7%; top: 9%; }
.system-map-node:nth-of-type(3) { left: 7%; bottom: 9%; }
.system-map-node:nth-of-type(4) { right: 7%; bottom: 9%; }

.system-map-node:hover,
.system-map-node:focus-visible,
.system-map-node[data-active] {
  z-index: 3;
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 11%, var(--card));
  color: var(--accent);
  transform: translateY(-3px);
}

.surface-chapters {
  border-top: 1px solid var(--hairline);
}

.surface-chapter {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: var(--s-3);
  min-height: 250px;
  padding: clamp(34px, 5vw, 64px) 0;
  border-bottom: 1px solid var(--hairline);
  scroll-margin-top: 110px;
}

.surface-number {
  color: var(--accent);
  font-size: var(--f-sm);
  font-weight: 700;
  letter-spacing: .12em;
}

.surface-chapter h3 {
  max-width: 20ch;
  margin: 0 0 var(--s-2);
  font-size: clamp(1.65rem, 3.2vw, 2.7rem);
  line-height: 1.08;
}

.surface-chapter p {
  max-width: 58ch;
  font-size: 1rem;
  line-height: 1.7;
}

.surface-chapter .surface-detail {
  display: block;
  margin-top: var(--s-2);
  color: var(--ink-faint);
  font-size: var(--f-sm);
}

.surface-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: var(--s-3);
  color: var(--accent);
  font-size: var(--f-sm);
  font-weight: 650;
}

.surface-link::after {
  content: "→";
  margin-left: 10px;
  transition: transform .2s var(--ease);
}

.surface-link:hover::after { transform: translateX(4px); }

.system-platform-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--s-3);
  align-items: start;
  margin-top: var(--s-5);
  padding: var(--s-4);
  border: 1px solid var(--card-line);
  border-left: 2px solid var(--accent);
  border-radius: var(--r);
  background: var(--card);
}

.system-platform-note .num {
  color: var(--accent);
  font-size: var(--f-sm);
  font-weight: 700;
}

.system-platform-note p { font-size: var(--f-sm); line-height: 1.7; }
.system-platform-note a { color: var(--accent); }

.product-home .industries {
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 12px;
}

.product-home .industries .card { grid-column: span 2; min-height: 190px; }

.product-home #trust .g3 .card {
  position: relative;
  min-height: 290px;
  padding-top: var(--s-6);
}

.product-home #trust .g3 .card::before {
  content: "";
  position: absolute;
  left: var(--s-4);
  top: var(--s-4);
  width: 34px;
  height: 3px;
  background: var(--accent);
}

.product-home #plans .plan,
.product-home #launch .card,
.product-home #faq .faq-aside,
.product-home #contact .form {
  box-shadow: 0 22px 60px color-mix(in srgb, var(--family-navy) 12%, transparent);
}

.product-home #contact {
  position: relative;
  overflow: hidden;
}

.product-home #contact::before {
  content: "";
  position: absolute;
  right: -8%;
  top: 16%;
  width: min(44vw, 560px);
  aspect-ratio: 1;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  border-radius: 50%;
  box-shadow:
    0 0 0 55px color-mix(in srgb, var(--accent) 5%, transparent),
    0 0 0 110px color-mix(in srgb, var(--accent) 3%, transparent);
  pointer-events: none;
}

@media (max-width: 1180px) {
  .hero-layout {
    grid-template-columns: minmax(340px, .82fr) minmax(500px, 1.18fr);
    gap: 34px;
  }
  .product-home .hero h1 { font-size: clamp(3rem, 6vw, 5.25rem); }
  .system-chip { width: 24%; }
}

@media (max-width: 980px) {
  .product-home .hero { min-height: auto; }
  .hero-layout { grid-template-columns: 1fr; }
  .hero-copy { max-width: 46rem; }
  .product-home .hero h1 { max-width: 11ch; font-size: clamp(3.4rem, 10vw, 5.8rem); }
  .system-stage { width: min(100%, 780px); justify-self: center; }
  .system-story-grid { grid-template-columns: 1fr; }
  .system-map { position: relative; top: auto; width: min(100%, 620px); margin-inline: auto; }
  .product-home .industries { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .product-home .industries .card { grid-column: span 2; }
  .product-home .industries .card:nth-child(4),
  .product-home .industries .card:nth-child(5) { grid-column: span 3; }
}

@media (max-width: 880px) {
  .product-home .brand { flex-shrink: 0; }
  .product-home .brand span { white-space: nowrap; }
  .product-home .menu-btn { display: grid; }
  .product-home .nav-links {
    position: fixed;
    inset: 56px 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: calc(100dvh - 56px);
    padding: var(--s-2) clamp(21px, 4vw, 34px) var(--s-3);
    overflow-y: auto;
    border-bottom: 1px solid var(--hairline);
    background: var(--nav-panel);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    font-size: var(--f-0);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .26s var(--ease), transform .26s var(--ease), visibility .26s;
  }
  .product-home.menu-open .nav-links { opacity: 1; visibility: visible; transform: none; }
  .product-home .nav-links a { min-height: 52px; border-bottom: 1px solid var(--hairline); }
  .product-home .nav-links a::after { display: none; }
  .product-home .nav-links .lang,
  .product-home .nav-links .nav-cta {
    justify-content: center;
    min-height: 48px;
    margin-top: var(--s-2);
    border-bottom: 0;
  }
}

@media (max-width: 760px) {
  .product-home .hero { padding-top: 82px; }
  .product-home .hero::before { background-size: 42px 42px; }
  .system-story-head { grid-template-columns: 1fr; gap: var(--s-3); }
  .product-home #why .g4 { grid-template-columns: 1fr; }
  .product-home #why .g4 .card:nth-child(n) { grid-column: auto; min-height: 188px; }
  .product-home .industries { grid-template-columns: 1fr 1fr; }
  .product-home .industries .card:nth-child(n) { grid-column: auto; min-height: 165px; }
  .system-core-label { top: 34%; width: 42%; }
  .system-stage-meta { display: none; }
  .system-stage-controls {
    inset: auto 12px 12px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    pointer-events: auto;
  }
  .system-chip:nth-child(n) {
    position: relative;
    left: auto;
    top: auto;
    width: auto;
    min-height: 58px;
    transform: none;
  }
  .system-chip:hover,
  .system-chip:focus-visible,
  .system-chip[data-active] { transform: translateY(-2px); }
}

@media (max-width: 560px) {
  .hero-layout { padding-inline: 18px; }
  .product-home .hero h1 { font-size: clamp(3rem, 16vw, 4.35rem); }
  .hero-kicker { align-items: flex-start; font-size: .75rem; line-height: 1.4; }
  .hero-kicker::before { margin-top: .52em; }
  .system-stage {
    aspect-ratio: .82 / 1;
    border-radius: 20px;
  }
  .system-poster { object-position: 50% 50%; }
  .system-stage-meta { bottom: 2.4%; }
  .system-stage-meta [data-renderer-label] { display: none; }
  .system-core-label { top: 32%; }
  .system-chip small { display: none; }
  .system-map-node { width: 30%; min-height: 18%; font-size: 11px; }
  .system-map-core { width: 34%; }
  .surface-chapter { grid-template-columns: 42px minmax(0, 1fr); min-height: auto; }
  .product-home .industries { grid-template-columns: 1fr; }
}

@media (prefers-color-scheme: light) {
  .product-home .system-stage {
    background: #f7f5f2;
    border-color: rgba(14, 23, 41, .2);
    box-shadow: 0 42px 90px rgba(14, 23, 41, .18);
  }
  .system-stage::before {
    background:
      linear-gradient(180deg, rgba(247, 245, 242, .06), transparent 38%, rgba(247, 245, 242, .28)),
      linear-gradient(90deg, rgba(247, 245, 242, .18), transparent 30%, transparent 70%, rgba(247, 245, 242, .12));
  }
  .system-stage-meta { color: var(--family-navy); }
  .system-stage-meta [data-renderer-label] { color: rgba(14, 23, 41, .56); }
  .system-core-label,
  .system-chip {
    border-color: rgba(161, 98, 7, .58);
    background: rgba(247, 245, 242, .9);
    color: var(--family-navy);
    box-shadow: 0 9px 24px rgba(14, 23, 41, .1);
  }
  .system-core-label strong { color: var(--family-amber-text); }
  .system-core-label small,
  .system-chip small { color: rgba(14, 23, 41, .6); }
  .system-chip:hover,
  .system-chip:focus-visible,
  .system-chip[data-active] {
    border-color: var(--family-amber-text);
    background: rgba(255, 255, 255, .96);
    color: var(--family-amber-text);
  }
}

@media (prefers-reduced-motion: reduce) {
  .system-poster,
  .system-canvas-three,
  .system-chip,
  .system-map-node,
  .surface-link::after { transition: none; }
  .system-chip:hover,
  .system-chip:focus-visible,
  .system-chip[data-active],
  .system-map-node:hover,
  .system-map-node:focus-visible,
  .system-map-node[data-active] { transform: none; }
}
/* ── Glass fallback ────────────────────────────────────────────────────────
 * See backend/frontend/assets/ui-tokens.css for the full note. Short version:
 * a translucent ground plus `backdrop-filter` has two failure modes — a
 * browser without blur support keeps the transparency and loses the blur, and
 * a person with Reduce Transparency on has told the operating system that
 * this effect is the thing they cannot read. Both want an opaque ground.
 * These are the sticky bars that carry navigation; nothing else on the page
 * puts text over a blur. */
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  .product-home .nav, .product-home .nav-links,
  .system-core-label, .system-chip {
    -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
  }
}
