:root {
  /* Radix UI Colors: sage neutrals, teal brand, amber warmth. */
  --sage-1: #fbfdfc;
  --sage-6: #d7dad9;
  --sage-7: #c2c8c5;
  --sage-11: #6a716e;
  --teal-2: #f0fcf9;
  --teal-3: #e0f8f3;
  --teal-7: #83cdc1;
  --teal-8: #53b9ab;
  --teal-9: #12a594;
  --teal-11: #008573;
  --teal-12: #0d3d38;
  --amber-2: #fff9ed;
  --white: #ffffff;

  --paper: var(--sage-1);
  --surface: var(--white);
  --soft: var(--teal-2);
  --hero-mint: var(--teal-3);
  --hero-warm: var(--amber-2);
  --grid-line: #00857312;
  --glass: #fffffff2;
  --ink: var(--teal-12);
  --muted: var(--sage-11);
  --faint: var(--sage-11);
  --accent: var(--teal-9);
  --accent-text: var(--teal-11);
  --accent-soft: var(--teal-3);
  --accent-border: var(--teal-7);
  --accent-border-hover: var(--teal-8);
  /* Step 11 keeps normal-size white button text above WCAG AA. */
  --action: var(--teal-11);
  --action-hover: var(--teal-12);
  --dark: var(--teal-12);
  --on-dark: var(--teal-2);
  --scrim: #0d3d3899;
  --line: var(--sage-6);
  --line-strong: var(--sage-7);
  --rule: .5px;
  --r-sm: 8px;
  --r: 16px;
  --r-lg: 24px;
  --shadow: 0 12px 32px #0d3d380d;
  --shadow-lift: 0 18px 40px #0d3d3817;
  --shadow-device: 0 18px 22px #0d3d3826;
  --frame: 1180px;
  --gutter: clamp(20px, 5vw, 64px);
  --small: .75rem;
  --body: .875rem;
  --section-title: clamp(1.75rem, 3vw, 2.4rem);
  --display: clamp(2.8rem, 5.6vw, 4.5rem);
  font-family: 'PingFang SC', 'HarmonyOS Sans SC', 'Source Han Sans SC', 'Noto Sans CJK SC', 'Microsoft YaHei', system-ui, sans-serif;
  font-size: 16px;
  font-synthesis: weight;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.75;
  scroll-behavior: smooth;
  scrollbar-color: var(--accent) var(--paper);
}
@media (max-resolution: 1.4dppx) { :root { --rule: 1px; } }
*, *::before, *::after { box-sizing: border-box; }
body, figure, p, dl, dd { margin: 0; }
[hidden] { display: none !important; }
img { display: block; max-inline-size: 100%; }
a { color: inherit; text-underline-offset: .28em; }
::selection { background: var(--accent-soft); color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 4px; }
.wrap { width: min(calc(100% - var(--gutter) * 2), var(--frame)); margin-inline: auto; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: fixed; z-index: 30; top: .75rem; left: 1rem; background: var(--action); color: var(--surface); padding: .5rem 1rem; border-radius: var(--r-sm); }
h1, h2, h3 { line-height: 1.2; margin: 0; text-wrap: balance; }
h2 { font-size: var(--section-title); font-weight: 900; letter-spacing: -.05em; }
p, dd { overflow-wrap: anywhere; }

.header { position: sticky; z-index: 20; top: 0; background: var(--glass); backdrop-filter: blur(12px); border-bottom: var(--rule) solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 74px; gap: 22px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; line-height: 1.3; flex: none; }
.brand img { width: 72px; height: auto; }
nav { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(14px, 2.4vw, 34px); }
nav a, .menu { min-height: 42px; display: inline-flex; align-items: center; font-size: var(--body); font-weight: 700; }
nav a { text-decoration: none; }
nav a:hover { color: var(--accent-text); }
nav a.active:not(.nav-cta) { color: var(--accent-text); text-decoration: underline; text-underline-offset: .35em; }
nav a.nav-cta.active { background: var(--action-hover); text-decoration: underline; text-underline-offset: .35em; }
nav a.nav-cta { padding: .45rem 1.1rem; border-radius: var(--r-sm); background: var(--action); color: var(--surface); transition: background-color .25s ease-out, transform .25s ease-out; }
nav a.nav-cta:hover { background: var(--action-hover); color: var(--surface); transform: translateY(-2px); }
.menu { padding: .3rem .8rem; border: var(--rule) solid var(--line-strong); border-radius: var(--r-sm); color: inherit; background: transparent; font-family: inherit; cursor: pointer; }

.hero { position: relative; overflow: hidden; background: radial-gradient(620px 440px at 80% 22%, var(--hero-mint), transparent 72%), radial-gradient(520px 380px at 8% 92%, var(--hero-warm), transparent 72%), var(--paper); }
.hero::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px); background-size: 44px 44px; mask-image: linear-gradient(90deg, transparent, black 45%, transparent); pointer-events: none; }
.hero-inner { position: relative; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(28px, 5vw, 76px); padding-block: clamp(64px, 8vw, 122px); }
h1 { font-size: var(--display); font-weight: 900; line-height: 1.1; letter-spacing: -.06em; }
h1 span { color: var(--accent-text); }
.hero-intro { margin-top: 1.35rem; font-weight: 600; color: var(--ink); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; margin-top: 1.75rem; }
.button { min-height: 46px; display: inline-flex; align-items: center; padding: .65rem 1.3rem; border-radius: var(--r-sm); font-size: var(--body); font-weight: 700; text-decoration: none; transition: background-color .25s ease-out, color .25s ease-out, transform .25s ease-out; }
.primary { background: var(--action); color: var(--surface); }
.primary:hover { background: var(--action-hover); transform: translateY(-2px); }
.secondary { background: var(--surface); color: var(--ink); border: var(--rule) solid var(--line-strong); }
.secondary:hover { border-color: var(--accent-border-hover); color: var(--accent-text); transform: translateY(-2px); }
.hero-tags { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 2.1rem 0 0; padding: 0; list-style: none; }
.hero-tags li { display: inline-flex; align-items: center; gap: 8px; font-size: var(--small); font-weight: 600; color: var(--muted); }
.hero-tags li::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.hero-image { position: relative; isolation: isolate; display: grid; place-items: center; min-height: 470px; padding: 28px; border: var(--rule) solid var(--line); border-radius: var(--r-lg); background: linear-gradient(150deg, var(--hero-mint), var(--surface) 78%); overflow: hidden; }
.hero-glow { position: absolute; z-index: -1; width: 320px; height: 320px; border-radius: 50%; background: var(--accent-soft); filter: blur(48px); }
.hero-image img { width: auto; height: clamp(330px, 35vw, 440px); max-width: 100%; object-fit: contain; filter: drop-shadow(var(--shadow-device)); }
.hero-image figcaption { position: absolute; inset: auto auto 16px 20px; font-size: var(--small); color: var(--ink); }

.section { padding-block: clamp(62px, 7.5vw, 108px); }
.section-head { margin-bottom: clamp(28px, 4vw, 46px); }
.section-head p, .split > div > p, .cta-inner > div:first-child p { color: var(--muted); margin-top: .75rem; max-width: 36em; }
.roles { padding-block: clamp(24px, 3.5vw, 52px); }
.role-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.role-grid article { padding: 26px clamp(20px, 2.5vw, 30px); background: var(--surface); border: var(--rule) solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); transition: transform .25s ease-out, box-shadow .25s ease-out; }
.role-grid article:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.card-index { display: block; margin-bottom: 18px; font-size: var(--small); font-weight: 800; letter-spacing: .08em; color: var(--accent-text); font-variant-numeric: tabular-nums; }
.role-grid h3, .scene-grid h3, .cta-cards h3 { font-size: inherit; font-weight: 800; letter-spacing: -.015em; }
.role-grid p, .scene-grid p, .cta-cards p { color: var(--muted); margin-top: .3rem; }

.demo { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.demo:not(.enhanced) { display: block; }
.demo-stage { background: var(--soft); border: var(--rule) solid var(--line); border-radius: var(--r-lg); min-height: 470px; padding: 24px; display: grid; place-items: center; grid-template-rows: 1fr auto; gap: .55rem; box-shadow: var(--shadow); }
.demo-stage img { width: 100%; height: 390px; object-fit: contain; }
.demo-stage img.swap { animation: swap .25s ease-out; }
@keyframes swap { from { opacity: .4; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.demo-stage figcaption { color: var(--faint); font-size: var(--small); text-align: center; }
.demo-list { display: grid; gap: 10px; align-content: start; }
.demo details { padding: 0 20px; background: var(--surface); border: var(--rule) solid var(--line); border-radius: var(--r); transition: border-color .25s ease-out, box-shadow .25s ease-out, transform .25s ease-out; }
.demo details[open] { border-color: var(--accent-border); box-shadow: var(--shadow); }
.demo summary { display: flex; align-items: center; gap: 14px; padding: 17px 0; font-weight: 700; cursor: pointer; list-style: none; }
.demo summary::-webkit-details-marker { display: none; }
.demo summary::after { content: ''; margin-left: auto; width: 8px; height: 8px; border-bottom: 1.5px solid currentColor; border-right: 1.5px solid currentColor; transform: rotate(45deg); transition: transform .25s ease-out; }
.demo details[open] summary::after { transform: rotate(225deg); }
.demo summary span { font-variant-numeric: tabular-nums; font-size: var(--small); font-weight: 800; color: var(--accent-text); }
.demo details p { padding: 0 0 18px 32px; color: var(--muted); }
.demo details img { max-height: 320px; margin: 0 auto 18px; object-fit: contain; }
.demo.enhanced details img { display: none; }

.scene-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.scene-grid article { background: var(--surface); border: var(--rule) solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow); transition: transform .25s ease-out, box-shadow .25s ease-out; }
.scene-grid article:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.scene-grid img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.scene-grid article > div { padding: 22px 24px 26px; }

.letter-section { text-align: center; }
.letter-image { max-width: 720px; margin-inline: auto; }
.letter-image a { display: block; border: var(--rule) solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow); transition: transform .25s ease-out, box-shadow .25s ease-out; }
.letter-image a:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.letter-image img { width: 100%; height: auto; }

.about { background: var(--soft); border-block: var(--rule) solid var(--line); }
.split { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(30px, 6vw, 88px); }
.why { font-size: inherit; font-weight: 800; margin-bottom: .5rem; }
.feature-list > div { display: grid; grid-template-columns: minmax(140px, .7fr) minmax(0, 1.3fr); gap: .25rem 1.25rem; padding: .8rem 0; border-bottom: var(--rule) solid var(--line); }
.feature-list > div:first-child { border-top: var(--rule) solid var(--line); }
dt { font-weight: 700; }
.feature-list dd { color: var(--muted); }

.cta { position: relative; background: linear-gradient(90deg, var(--glass), transparent 70%), url('assets/cta-bg.png') center / cover no-repeat; padding-block: clamp(64px, 8vw, 110px); }
.cta-inner { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 76px); align-items: center; }
.cta-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.cta-cards article { padding: 24px; background: var(--glass); backdrop-filter: blur(8px); border: var(--rule) solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); transition: transform .25s ease-out, box-shadow .25s ease-out; }
.cta-cards article:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }

.footer { background: var(--dark); color: var(--surface); }
.footer-inner { padding-block: clamp(24px, 3vw, 38px); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: clamp(24px, 4vw, 56px); text-align: center; }
.footer-copy { grid-column: 2; width: 100%; display: grid; gap: .35rem; text-align: center; }
.footer strong { font-size: var(--body); }
.footer p, .footer-qr figcaption { font-size: var(--small); }
.footer p { color: var(--on-dark); }
.footer-qr { grid-column: 3; justify-self: end; margin: 0; display: grid; justify-items: center; gap: 6px; }
.qr-trigger { padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: var(--r-sm); transition: transform .25s ease-out, opacity .25s ease-out; }
.qr-trigger:hover { transform: translateY(-3px); opacity: .9; }
.qr-trigger img { width: 112px; height: 112px; padding: 4px; background: var(--surface); border-radius: var(--r-sm); }
.footer-qr figcaption { color: var(--on-dark); }

.qr-dialog { width: min(80vw, 360px); padding: 28px; border: var(--rule) solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lift); text-align: center; animation: dialog-in .25s ease-out; }
.qr-dialog::backdrop { background: var(--scrim); }
.qr-dialog img { width: 100%; height: auto; margin-inline: auto; }
.qr-dialog p { margin-top: 14px; font-size: var(--small); color: var(--muted); }
.qr-close { position: absolute; top: 10px; right: 10px; display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--muted); cursor: pointer; transition: background-color .25s ease-out, color .25s ease-out; }
.qr-close:hover, .qr-close:focus-visible { background: var(--soft); color: var(--ink); }
.qr-close:focus-visible { outline: none; }
.qr-close svg { width: 18px; height: 18px; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.back-to-top { position: fixed; z-index: 25; right: clamp(16px, 2.5vw, 32px); bottom: clamp(20px, 4vw, 40px); display: grid; place-items: center; width: 46px; height: 46px; border-radius: var(--r); background: var(--surface); color: var(--accent-text); border: var(--rule) solid var(--line); box-shadow: var(--shadow-lift); transition: transform .25s ease-out, opacity .25s ease-out; }
.back-to-top:hover { transform: translateY(-4px); opacity: .9; }
.back-to-top svg { width: 22px; height: 22px; }
.back-to-top-tip { position: absolute; right: calc(100% + 10px); top: 50%; padding: .3rem .65rem; border: var(--rule) solid var(--line); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); font-size: var(--small); font-weight: 700; white-space: nowrap; box-shadow: var(--shadow); opacity: 0; transform: translate(6px, -50%); pointer-events: none; transition: opacity .25s ease-out, transform .25s ease-out; }
.back-to-top:hover .back-to-top-tip, .back-to-top:focus-visible .back-to-top-tip { opacity: 1; transform: translate(0, -50%); }

@media (prefers-reduced-motion: no-preference) {
  html.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .25s ease-out, transform .25s ease-out; }
  html.js .reveal.in { opacity: 1; transform: none; }
  .hero-image { animation: rise .25s ease-out both; }
  @keyframes rise { from { opacity: .4; transform: translateY(10px); } to { opacity: 1; transform: none; } }
}
@media (max-width: 880px) {
  .feature-list > div { grid-template-columns: 1fr; }
  .cta-inner { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .header-inner { flex-wrap: wrap; min-height: 64px; gap: 0 1rem; padding-block: .55rem; }
  nav { flex-basis: 100%; gap: 0 1.1rem; padding-top: .55rem; }
  .js nav { display: none; }
  .js nav.open { display: flex; }
  .brand { gap: 7px; }
  .brand img { width: 60px; }
  .hero-inner, .split, .demo, .scene-grid, .cta-inner, .role-grid, .cta-cards { grid-template-columns: 1fr; }
  .hero-inner { padding-block: 42px 30px; gap: 30px; }
  .hero-intro { margin-top: 1rem; }
  .actions { margin-top: 1.25rem; }
  .hero-tags { margin-top: 1.5rem; }
  .hero-image { min-height: 330px; padding: 18px; }
  .hero-image img { height: clamp(270px, 68vw, 360px); }
  .role-grid { gap: 12px; }
  .section { padding-block: clamp(48px, 10vw, 72px); }
  .demo { gap: 0; }
  .demo.enhanced details img { display: block; }
  .demo-stage { display: none; }
  .scene-grid img { aspect-ratio: 4 / 3; }
  .cta-cards { gap: 12px; }
  .footer-inner { grid-template-columns: minmax(0, 1fr) auto; gap: 14px; padding-inline-end: 54px; }
  .footer-copy { grid-column: 1; }
  .footer-qr { grid-column: 2; justify-self: center; }
  .qr-trigger img { width: 96px; height: 96px; }
}
@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  .demo-stage img.swap { animation: none; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
