/* Home presentation and opening share the page-owned liquid-glass atmosphere. */
:root {
  --home-canvas: #eef1f8;
  --home-reading: #f0f2f8;
  --home-reading-card: #fbfcff;
  --home-mist: #f7f5fc;
  --home-ink: #1c2941;
  --home-muted: #52617a;
  --home-accent: #405d82;
  --home-film: #2f5279;
  --home-title-shine-edge: #587ca3;
  --home-title-shine: #7894b0;
  --home-line: rgb(50 67 100 / .18);
  --home-glass-edge: rgb(255 255 255 / .85);
  --home-surface: rgb(253 253 255 / .63);
  --home-panel: rgb(253 253 255 / .82);
  --home-nav: rgb(249 250 254 / .73);
  --home-gold: #d9b978;
  --home-gold-hover: #e8c987;
  --home-display: "Songti SC", "STSong", "Noto Serif CJK SC", "SimSun", serif;
}
html[data-theme="dark"] {
  --home-canvas: #141c30;
  --home-reading: #192136;
  --home-reading-card: #222c43;
  --home-mist: #222b45;
  --home-ink: #f1f4ff;
  --home-muted: #c6cfe5;
  --home-accent: #c2d8fa;
  --home-film: #dbe9ff;
  --home-title-shine-edge: #e7eeff;
  --home-title-shine: #fff7e8;
  --home-line: rgb(178 194 229 / .24);
  --home-glass-edge: rgb(178 194 229 / .29);
  --home-surface: rgb(26 36 58 / .76);
  --home-panel: rgb(23 32 53 / .92);
  --home-nav: rgb(17 24 42 / .89);
}

#view[data-page="home"] > .product-home {
  --ph-canvas: var(--home-canvas);
  --ph-paper: var(--home-panel);
  --ph-soft: var(--home-surface);
  --ph-line: var(--home-line);
  --ph-ink: var(--home-ink);
  --ph-muted: var(--home-muted);
  position: relative;
  isolation: isolate;
  background: transparent;
  color: var(--ph-ink);
  color-scheme: light;
}
html[data-theme="dark"] #view[data-page="home"] > .product-home { color-scheme: dark; }
#app.product-home-shell #view[data-page="home"] {
  background: var(--home-canvas) !important;
  scrollbar-color: var(--home-line) var(--home-canvas);
  scrollbar-width: thin;
}
.product-home .product-home-fluid {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  contain: strict;
  pointer-events: none;
  background: linear-gradient(155deg, var(--home-mist), var(--home-canvas));
}
.product-fluid-plate,
.product-fluid-refraction,
.product-home-fluid::before,
.product-home-fluid::after { position: absolute; pointer-events: none; }

/* The mist, glass and nearest reflection move at distinct speeds. */
.product-home-fluid::before {
  content: "";
  inset: -16%;
  background:
    radial-gradient(ellipse at 33% 28%, rgb(255 252 245 / .86), transparent 47%),
    radial-gradient(ellipse at 16% 69%, color-mix(in srgb, var(--home-far-tone, #b5afe2) 59%, transparent), transparent 49%),
    radial-gradient(ellipse at 83% 59%, rgb(145 181 216 / .63), transparent 54%);
  animation: product-mist-drift 20s ease-in-out -4s infinite;
}
.product-fluid-plate {
  z-index: 1;
  inset: -8% -7% -9%;
  --home-glass-wash: color-mix(in srgb, var(--home-glass-tint, transparent) 64%, transparent);
  background:
    linear-gradient(var(--home-glass-wash), var(--home-glass-wash)),
    url("/creator/assets/home/pearl-glass-20261106.webp") center 55% / cover no-repeat;
  background-blend-mode: color, normal;
  mask-image: linear-gradient(to bottom, transparent 1%, rgb(0 0 0 / .48) 38%, black 69%);
  animation: product-glass-drift 14s ease-in-out -2s infinite;
}
.product-home-fluid::after {
  content: "";
  z-index: 2;
  inset: 0;
  background: radial-gradient(ellipse at 49% 32%, rgb(255 253 252 / .30), transparent 56%);
}
.product-fluid-refraction {
  z-index: 3;
  right: -22%;
  bottom: -41%;
  width: 92%;
  height: 66%;
  border-radius: 50%;
  border-top: 1px solid color-mix(in srgb, var(--home-near-tone, #fffbf3) 85%, transparent);
  background: linear-gradient(172deg, color-mix(in srgb, var(--home-near-tone, #fff9ee) 48%, transparent), rgb(221 233 249 / .15) 24%, transparent 57%);
  box-shadow: 0 -7px 27px rgb(254 239 211 / .22);
  opacity: .31;
  animation: product-near-glint 9s ease-in-out -2.5s infinite;
}
html[data-theme="dark"] .product-home-fluid::before {
  background:
    radial-gradient(ellipse at 30% 27%, color-mix(in srgb, var(--home-far-tone, #6e6bab) 40%, transparent), transparent 52%),
    radial-gradient(ellipse at 75% 74%, rgb(57 110 152 / .49), transparent 55%);
}
html[data-theme="dark"] .product-fluid-plate { filter: brightness(.51) saturate(.83); }
html[data-theme="dark"] .product-fluid-refraction { opacity: .14; }
html[data-theme="dark"] .product-home-fluid::after {
  background: radial-gradient(ellipse at 49% 32%, rgb(18 26 44 / .40), transparent 63%);
}
@keyframes product-mist-drift {
  0%, 100% { transform: translate3d(-2%, -1%, 0) scale(1); }
  50% { transform: translate3d(3%, 1.5%, 0) scale(1.08); }
}
@keyframes product-glass-drift {
  0%, 100% { transform: translate3d(-1%, 1%, 0) scale(1.015) rotate(-1.4deg); }
  47% { transform: translate3d(2.4%, -2.2%, 0) scale(1.06) rotate(.9deg); }
  73% { transform: translate3d(.3%, -1.1%, 0) scale(1.035) rotate(-.2deg); }
}
@keyframes product-near-glint {
  0%, 100% { transform: translate3d(7%, 9%, 0) rotate(-13deg); }
  50% { transform: translate3d(-6%, -3%, 0) rotate(-8deg); }
}

.product-home .product-hero {
  width: 100%;
  min-height: clamp(440px, 71svh, 640px);
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: clamp(52px, 6.8vh, 88px) clamp(24px, 6vw, 100px);
  gap: 0;
  background: transparent;
  text-align: center;
}
.product-home .product-hero-copy {
  width: min(100%, 1050px);
  max-width: none;
  margin: 0 auto;
}
.product-home .product-eyebrow {
  margin: 0 0 15px;
  color: var(--home-accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .13em;
}
.product-home .product-hero-endorsement {
  gap: 12px;
  margin-bottom: clamp(21px, 3.3vh, 29px);
  color: var(--home-muted);
  font-family: inherit;
  font-size: clamp(11px, 1.15vw, 14px);
  font-weight: 650;
  letter-spacing: .16em;
}
.product-home .product-hero-endorsement::before,
.product-home .product-hero-endorsement::after {
  content: "";
  width: 17px;
  height: 1px;
  background: currentColor;
  opacity: .5;
}
.product-home .product-hero h1 {
  max-width: none;
  margin: 0 auto;
  color: var(--home-title-primary, var(--home-ink));
  font-family: var(--home-display);
  font-size: clamp(47px, 6.55vw, 96px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -.045em;
}
.product-home .product-hero h1 > span {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: clamp(18px, 3.1vw, 44px);
  width: max-content;
  max-width: 100%;
  margin-inline: auto;
}
/* Each title phrase travels from its own opening position into the live heading. */
.product-home[data-title-opening] .product-hero { z-index: 1; }
.product-home[data-title-opening] .product-hero h1 > span > * {
  transform-origin: 0 0;
  pointer-events: none;
}
.product-home .product-hero h1 > span > * { white-space: nowrap; }
.product-home .product-hero h1 > span > em {
  display: inline;
  margin: 0;
  color: var(--home-film);
  font: inherit;
  letter-spacing: inherit;
}
.product-home .product-hero-copy > .product-hero-subtitle {
  margin: 21px auto 0;
  color: var(--home-muted);
  font-family: inherit;
  font-size: clamp(16px, 1.57vw, 22px);
  font-weight: 450;
  letter-spacing: .025em;
  line-height: 1.48;
  text-wrap: balance;
}
.product-home .product-hero-actions { justify-content: center; flex-wrap: wrap; gap: 22px; margin: 30px 0 0; }
.product-home :is(.product-primary-cta, .product-secondary-cta) {
  min-width: clamp(148px, 16.5vw, 206px);
  min-height: 52px;
  padding-inline: 24px;
  font-family: var(--home-display);
  font-size: 17px;
  font-weight: 700;
}
.product-home .product-primary-cta {
  color: var(--home-button-ink, #211b12);
  background: linear-gradient(180deg, var(--home-button-start, #f1d49a), var(--home-gold));
  border-color: var(--home-button-border, #eacf97);
  box-shadow: 0 8px 22px rgb(77 67 43 / .13);
}
.product-home .product-primary-cta:hover { color: var(--home-button-ink, #211b12); background: var(--home-gold-hover); border-color: var(--home-gold-hover); }
.product-home .product-secondary-cta { color: var(--home-ink); background: var(--home-surface); border-color: var(--home-glass-edge); }
.product-home .product-secondary-cta:hover { color: var(--home-ink); background: var(--home-panel); border-color: var(--home-accent); }
.product-home :is(a, button, [tabindex="-1"]):focus-visible { outline: 2px solid var(--home-accent); outline-offset: 4px; }

.product-home .product-home-content {
  position: relative;
  isolation: isolate;
  display: flow-root;
  --home-reading-fade: clamp(60px, 8vw, 110px);
}
.product-home .product-content-backdrop {
  position: absolute;
  inset: calc(-1 * var(--home-reading-fade)) 0 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent, var(--home-reading) var(--home-reading-fade));
}

.product-home :is(.product-capabilities-grid, .product-workflow, .product-editing, .product-final-cta) {
  width: min(calc(100% - clamp(36px, 6.5vw, 132px)), 1540px);
  margin-inline: auto;
  scroll-margin-top: 20px;
}
.product-home .product-capabilities-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.product-home :is(.product-capability, .product-workflow, .product-editing) {
  min-height: 0;
  padding: clamp(25px, 3vw, 44px) clamp(26px, 4vw, 58px);
  border: 1px solid var(--home-glass-edge);
  border-radius: 25px;
  --home-section-ink: var(--home-card-ink, var(--home-ink));
  --home-section-muted: var(--home-card-ink, var(--home-muted));
  background: var(--home-reading-card);
  color: var(--home-section-ink);
  box-shadow: 0 14px 48px rgb(32 62 114 / .08);
}
.product-home .product-capabilities-grid .product-capability {
  display: block;
  width: auto;
  margin: 0;
}
.product-home .product-capability::before { content: none; }
.product-home :is(.product-workflow, .product-editing) { display: block; margin-top: 18px; }
.product-home :is(.product-feature-copy, .product-workflow-intro, .product-editing-copy) {
  margin: 0;
  padding: 0;
  text-align: left;
}
.product-home :is(.product-feature-copy, .product-workflow-intro, .product-editing-copy, .product-final-copy) h2 {
  margin: 0;
  color: var(--home-section-ink, var(--home-ink));
  font-family: var(--home-display);
  font-size: clamp(29px, 3.15vw, 45px);
  font-weight: 800;
  line-height: 1.13;
  letter-spacing: -.052em;
  -webkit-text-stroke: .28px currentColor;
}
.product-home :is(.product-feature-copy, .product-workflow-intro, .product-editing-copy) > p {
  margin: 15px 0 0;
  color: var(--home-section-muted, var(--home-muted));
  font-size: clamp(14px, 1.2vw, 16px);
  line-height: 1.7;
}
.product-home :is(.product-feature-copy, .product-workflow-intro, .product-editing-copy) > .product-module-subtitle {
  margin-top: 12px;
  color: var(--home-section-ink, var(--home-ink));
  font-family: var(--home-display);
  font-size: clamp(19px, 1.9vw, 26px);
  font-weight: 600;
  line-height: 1.48;
  letter-spacing: -.018em;
}
.product-home .product-stage-list {
  --home-stage-gap: clamp(24px, 4vw, 55px);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-auto-flow: row;
  grid-auto-columns: auto;
  gap: var(--home-stage-gap);
  margin: 28px 0 0;
  padding: 0;
  border: 0;
  overflow: visible;
}
.product-home .product-stage-list::before { content: none; }
.product-home .product-stage-list li {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 53px;
  padding: 9px 12px;
  border: 1px solid var(--home-glass-edge);
  border-radius: 15px;
  color: var(--home-ink);
  background: var(--home-panel);
}
.product-home .product-stage-list li + li::before {
  content: "";
  position: absolute;
  right: calc(100% + 8px);
  top: 50%;
  width: calc(var(--home-stage-gap) - 16px);
  height: 1px;
  background: var(--home-accent);
  opacity: .48;
}
.product-home .product-stage-list li > span { padding: 0; color: var(--home-accent); background: none; font-family: var(--home-display); font-size: clamp(14px, 1.55vw, 22px); }
.product-home .product-stage-list strong { margin: 0; font-family: var(--home-display); font-size: clamp(14px, 1.55vw, 20px); white-space: nowrap; }
.product-home .product-final-cta {
  --home-section-ink: var(--home-reading-ink, var(--home-ink));
  display: grid;
  place-items: center;
  min-height: 0;
  margin-block: 18px 0;
  padding: clamp(48px, 5.7vw, 82px) 22px;
  background: transparent;
  text-align: center;
}
.product-home .product-final-copy .product-primary-cta { margin-top: 24px; }
.product-home .product-footer { background: #101a31; color: #edf3ff; }
.product-home .product-footer-brand-copy strong { color: #edf3ff; }
.product-home .product-footer :is(small, nav a, nav button) { color: #c4d2ed; }
.product-home .product-footer nav :is(a, button):hover { color: #fff; }

body:has(#view[data-page="home"] > .product-home) :is(#global-nav, #gnMobilePanel) {
  color: var(--home-ink) !important;
  border-color: var(--home-glass-edge) !important;
  background: var(--home-nav) !important;
  backdrop-filter: blur(16px);
}
@media (min-width: 769px) {
  body:has(#view[data-page="home"] > .product-home) #global-nav {
    top: 13px;
    inset-inline: clamp(16px, 3vw, 60px);
    width: auto;
    height: 57px;
    padding-inline: clamp(19px, 2vw, 32px);
    border: 1px solid var(--home-glass-edge);
    border-radius: 19px;
  }
}
body:has(#view[data-page="home"] > .product-home) #global-nav :is(.gn-brand, .gn-board, .gn-eastwise),
body:has(#view[data-page="home"] > .product-home) #gnMobilePanel a { color: var(--home-muted) !important; }
body:has(#view[data-page="home"] > .product-home) #global-nav .gn-brand { -webkit-text-fill-color: var(--home-ink); font-family: var(--home-display); }
body:has(#view[data-page="home"] > .product-home) #global-nav :is(.gn-board.active, .gn-login, .gn-register, .gn-hamburger, .account-entry, .account-recharge) {
  background: var(--home-surface) !important;
  color: var(--home-ink) !important;
  border-color: var(--home-line) !important;
  box-shadow: none;
}
body:has(#view[data-page="home"] > .product-home) #global-nav .gn-board.active { box-shadow: inset 0 -2px 0 var(--home-gold); }
body:has(#view[data-page="home"] > .product-home) #global-nav :is(.gn-board, .gn-login, .gn-register, .gn-hamburger, .account-entry):hover,
body:has(#view[data-page="home"] > .product-home) #global-nav .account-entry[aria-expanded="true"],
body:has(#view[data-page="home"] > .product-home) #gnMobilePanel a:hover {
  background: var(--home-panel) !important;
  color: var(--home-ink) !important;
}
body:has(#view[data-page="home"] > .product-home) #global-nav .account-shell {
  --account-bg: var(--home-panel);
  --account-text: var(--home-ink);
  --account-muted: var(--home-muted);
  --account-line: var(--home-line);
}
body:has(#view[data-page="home"] > .product-home) #global-nav .account-entry-copy strong { color: var(--home-ink); }
body:has(#view[data-page="home"] > .product-home) #global-nav .account-chevron { color: var(--home-muted); }
body:has(#view[data-page="home"] > .product-home) :is(#global-nav, #gnMobilePanel) :focus-visible { outline-color: var(--home-accent); }

@media (prefers-reduced-motion: no-preference) and (forced-colors: none) {
  @supports (background-clip: text) or (-webkit-background-clip: text) {
    .product-home[data-title-opening] .product-hero h1 em {
      background: linear-gradient(111deg,
        var(--home-film) 44%, var(--home-title-shine-edge) 48%, var(--home-title-shine) 50%,
        var(--home-title-shine-edge) 52%, var(--home-film) 56%) 100% 50% / 270% 100% no-repeat;
      background-clip: text;
      -webkit-background-clip: text;
      color: transparent;
      animation: product-title-sweep 440ms ease-in-out 45ms both;
    }
  }
}
@keyframes product-title-sweep {
  from { background-position: 100% 50%; }
  to { background-position: 0% 50%; }
}

@media (max-width: 1050px) {
  .product-home .product-stage-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .product-home .product-stage-list li + li::before { display: none; }
}
@media (max-width: 768px) {
  .product-home .product-hero { min-height: 445px; padding-block: 63px; }
}
@media (max-width: 590px) {
  .product-home .product-capabilities-grid { grid-template-columns: 1fr; }
  .product-home .product-hero h1 { font-size: clamp(44px, 12vw, 65px); line-height: 1.05; }
  .product-home .product-hero h1 > span { flex-direction: column; align-items: center; gap: 7px; }
  .product-home .product-hero-actions { gap: 9px; margin-top: 25px; }
  .product-home .product-hero-actions > * { min-width: 0; min-height: 45px; padding-inline: 16px; font-size: 15px; }
  .product-fluid-plate { background-position: 54% 57%; }
  .product-fluid-refraction { width: 130%; right: -46%; }
  .product-home .product-stage-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-home .product-stage-list li { justify-content: flex-start; min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .product-fluid-plate,
  .product-fluid-refraction,
  .product-home-fluid::before { animation: none; }
  .product-fluid-refraction { transform: rotate(-11deg); }
}

/* The palette belongs to the creator homepage and follows the active theme. */
.product-home .product-hero:has(.product-palette[open]) { z-index: 3; }
.product-home .product-palette {
  position: absolute;
  z-index: 4;
  inset: clamp(15px, 2vw, 29px) clamp(17px, 3.2vw, 53px) auto auto;
  color: var(--home-ink);
  text-align: left;
  font: 500 14px/1.4 system-ui, sans-serif;
}
.product-palette > summary {
  display: flex;
  width: max-content;
  min-height: 36px;
  margin-left: auto;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border: 1px solid var(--home-line);
  border-radius: 11px;
  background: var(--home-panel);
  color: var(--home-ink);
  list-style: none;
  cursor: pointer;
}
.product-palette > summary::-webkit-details-marker { display: none; }
.product-palette > summary:hover,
.product-palette[open] > summary { border-color: var(--home-accent); }
.product-palette > summary:focus-visible,
.product-palette-panel input:focus-visible { outline: 2px solid var(--home-accent); outline-offset: 2px; }
.product-palette-panel {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  box-sizing: border-box;
  width: min(344px, calc(100vw - 37px));
  max-height: min(610px, calc(100dvh - 158px));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 17px;
  border: 1px solid var(--home-glass-edge);
  border-radius: 17px;
  background: #fafbff;
  color: var(--home-ink);
  box-shadow: 0 16px 50px rgb(20 32 56 / .17);
}
html[data-theme="dark"] .product-palette-panel { background: #1c263d; }
.product-palette-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.product-palette-header h2 { margin: 0; color: var(--home-ink); font-size: 17px; font-weight: 700; line-height: 1.25; }
.product-palette-header p { margin: 4px 0 0; color: var(--home-muted); font-size: 12px; }
.product-palette-panel button {
  min-height: 32px;
  padding: 4px 9px;
  border: 1px solid var(--home-line);
  border-radius: 8px;
  background: var(--home-surface);
  color: var(--home-ink);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.product-palette-panel button:hover { border-color: var(--home-accent); }
.product-palette-presets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-block: 13px 10px; }
.product-palette-presets button { display: flex; align-items: center; justify-content: center; gap: 5px; white-space: nowrap; }
.product-palette-presets button[aria-pressed="true"] { border-color: var(--home-accent); box-shadow: inset 0 0 0 1px var(--home-accent); }
.product-palette-presets button span {
  width: 14px;
  height: 14px;
  border: 1px solid var(--home-line);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--palette-chip-light) 0 47%, var(--palette-chip-dark) 53% 100%);
}
.product-palette-fields { border-block: 1px solid var(--home-line); }
.product-palette-row {
  display: grid;
  min-height: 34px;
  grid-template-columns: minmax(0, 1fr) 34px 77px;
  align-items: center;
  gap: 7px;
  color: var(--home-ink);
  font-size: 13px;
}
.product-palette-row + .product-palette-row { border-top: 1px solid color-mix(in srgb, var(--home-line) 62%, transparent); }
.product-palette-row label { cursor: pointer; }
.product-palette-row input {
  box-sizing: border-box;
  min-width: 0;
  width: 100%;
  height: 28px;
  padding: 3px;
  border: 1px solid var(--home-line);
  border-radius: 7px;
  background: var(--home-surface);
  color: var(--home-ink);
  font: 12px ui-monospace, Consolas, monospace;
}
.product-palette-row input[type="color"] { cursor: pointer; }
.product-palette-row input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.product-palette-row input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 4px; }
.product-palette-row input[type="text"] { padding-inline: 6px; }
.product-palette-status { min-height: 17px; margin: 9px 0 0; color: var(--home-muted); font-size: 12px; }
@media (max-width: 590px) {
  .product-palette-row { min-height: 37px; }
  .product-palette-panel {
    position: fixed;
    inset: auto 13px max(12px, env(safe-area-inset-bottom)) 13px;
    width: auto;
    max-height: 41dvh;
    padding: 14px;
  }
}
