/* 家缘官网 · 中式雅致。背景只用冷灰白，不用宣纸白。 */

:root {
  --daiqing: #3A5A5C;
  --daiqing-deep: #2C4648;
  --vermillion: #B43A34;
  --vermillion-deep: #8F2E29;
  --bg: #F2F3F5;
  --card: #F8F9FA;
  --text: #2C4648;
  --muted: #5E6868;
  --line: rgba(58, 90, 92, 0.16);
  --line-strong: rgba(58, 90, 92, 0.28);
  --shadow: 0 12px 32px rgba(44, 70, 72, 0.08);
  --serif: "Songti SC", "STSong", "Source Han Serif SC", "Noto Serif SC", "SimSun", "Times New Roman", serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", "Noto Sans SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  --space: 1.25rem;
  --wide: 1120px;
  --readable: 40rem;
  --radius: 12px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.8;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  border-top: 3px solid var(--vermillion);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--daiqing);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--vermillion);
}

:focus-visible {
  outline: 2px solid var(--vermillion);
  outline-offset: 3px;
}

::selection {
  background: var(--daiqing);
  color: var(--bg);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 20;
  padding: 0.4rem 0.8rem;
  background: var(--daiqing-deep);
  color: var(--bg);
  text-decoration: none;
}

.skip-link:focus {
  top: 0.6rem;
}

.wrap {
  width: min(var(--wide), calc(100% - 2.5rem));
  margin-inline: auto;
}

/* —— 导航 —— */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(242, 243, 245, 0.92);
  backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  min-height: 4.25rem;
  padding: 0.6rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: inherit;
  text-decoration: none;
  flex-shrink: 0;
}

.brand:hover {
  color: inherit;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.brand-name {
  font-family: var(--serif);
  font-size: 1.35rem;
  letter-spacing: 0.22em;
  line-height: 1;
  margin-right: -0.22em;
}

.lang-switch {
  order: 3;
  margin-left: 0;
  flex-shrink: 0;
}

.nav-end {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-left: auto;
  order: 2;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.92rem;
}

.nav-links a {
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.06em;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--vermillion);
}

.nav-links a[aria-current="page"] {
  box-shadow: inset 0 -1px 0 var(--vermillion);
}

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  overflow: hidden;
  background: var(--card);
}

.lang-switch button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  padding: 0.22rem 0.7rem;
  cursor: pointer;
  line-height: 1.4;
}

.lang-switch button[aria-pressed="true"] {
  background: var(--daiqing);
  color: var(--bg);
}

/* —— 章节通用 —— */

.section {
  padding: 8.5rem 0;
}

.section + .section {
  border-top: 1px solid var(--line);
}

[data-scroll="hero-kicker"] {
  overflow: visible;
  padding-inline-start: 0.65em;
  margin-inline-start: -0.25em;
}

.kicker {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin: 0 0 1rem;
  padding-inline-start: 0.15em;
  overflow: visible;
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  color: var(--vermillion);
  text-transform: uppercase;
}

.chapter {
  font-family: var(--serif);
  font-size: 1rem;
  letter-spacing: 0.2em;
  color: var(--vermillion);
  padding-inline-start: 0.35em;
  overflow: visible;
}

.kicker-text {
  color: var(--muted);
  letter-spacing: 0.22em;
}

.section h1,
.section h2,
.hero h1 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: 0.08em;
  color: var(--daiqing-deep);
  margin: 0 0 1.25rem;
}

.section h2 {
  font-size: clamp(2rem, 4.2vw, 3.05rem);
  max-width: 16em;
}

.lede,
.prose p {
  color: var(--muted);
}

.lede,
.cta-note,
.prose p,
.screens-note {
  line-break: strict;
  word-break: keep-all;
  overflow-wrap: anywhere;
  word-wrap: break-word;
  white-space: normal;
  min-width: 0;
  max-width: 100%;
}

.lede {
  font-size: 1.18rem;
  line-height: 1.95;
  max-width: 40rem;
  margin: 0;
}

/* —— 首页英雄区 —— */

.hero {
  padding: 0;
  min-height: 170vh;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(1.6rem, 4vw, 4rem);
  align-items: center;
}

.hero h1 {
  font-size: clamp(4rem, 11vw, 7.1rem);
  letter-spacing: 0.22em;
  margin: 0 0 0.6rem;
  line-height: 1.05;
  font-weight: 500;
}

.hero .tagline {
  font-family: var(--serif);
  font-size: clamp(1.45rem, 3vw, 2.15rem);
  letter-spacing: 0.12em;
  margin: 0 0 1.8rem;
  color: var(--daiqing);
}

.hero .lede {
  margin-bottom: 2.25rem;
}

.hero-cta {
  display: flex;
  align-items: flex-start;
  gap: 1.1rem 1.4rem;
  flex-wrap: wrap;
}

.qr-slot {
  width: 168px;
  height: 168px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background:
    linear-gradient(var(--card), var(--card)) padding-box,
    radial-gradient(rgba(58, 90, 92, 0.08) 1px, transparent 1px) 0 0 / 10px 10px;
  color: var(--muted);
  text-align: center;
  padding: 1rem;
}

.qr-slot img {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  opacity: 0.88;
}

.qr-caption {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  margin: 0;
}

.qr-pending {
  font-family: var(--serif);
  font-size: 0.95rem;
  letter-spacing: 0.18em;
  color: var(--daiqing);
  margin: 0;
}

.cta-note {
  flex: 1 1 14rem;
  min-width: min(100%, 14rem);
  max-width: 22rem;
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.75;
  box-sizing: border-box;
}

.cta-note .aside {
  display: block;
  margin-top: 0.55rem;
}

.logo-plaque {
  justify-self: center;
  width: min(100%, 320px);
  aspect-ratio: 1;
  padding: 1.75rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  position: relative;
}

.logo-plaque::after {
  content: "";
  position: absolute;
  right: 1.15rem;
  bottom: 1.15rem;
  width: 14px;
  height: 14px;
  background: var(--vermillion);
  border-radius: 2px;
}

.logo-plaque img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 20px;
}

/* —— 故事 —— */

.story .wrap {
  width: min(var(--wide), calc(100% - 2.5rem));
  margin-inline: auto;
}

.hero + .story {
  padding-top: 3.25rem;
}

.story h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  max-width: 22em;
  margin-bottom: 1.8rem;
}

.story-title-rest {
  display: block;
}

.story .prose {
  max-width: var(--readable);
}

.story .prose p {
  font-size: 1.18rem;
  line-height: 2;
}

.prose p + p {
  margin-top: 1.15rem;
}

/* —— 四柱 —— */

.section-pillars h2 {
  max-width: 22em;
}

.pillars-title-rest {
  display: block;
}

.pillar-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.15rem;
  margin-top: 3.2rem;
}

.pillar {
  position: relative;
  background: transparent;
  border: 0;
  padding: 0;
  min-height: 0;
  background-image: none;
}

.pillar::before {
  display: none;
}

.pillar-inner {
  height: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 2px rgba(44, 70, 72, 0.04);
  background-image: radial-gradient(rgba(58, 90, 92, 0.055) 1px, transparent 1px);
  background-size: 12px 12px;
}

.pillar-icon {
  position: relative;
  width: 4rem;
  height: 4rem;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 1.15rem;
  color: var(--daiqing-deep);
  background: rgba(58, 90, 92, 0.08);
  flex: none;
}

.pillar-icon svg {
  width: 2.5rem;
  height: 2.5rem;
  display: block;
}

.pillar-icon::after {
  content: "";
  position: absolute;
  top: 0.42rem;
  right: 0.42rem;
  width: 5px;
  height: 5px;
  background: var(--vermillion);
  border-radius: 1px;
}

.pillar-body {
  position: relative;
  padding: 0;
  flex: 1;
  min-width: 0;
}

.pillar-body h3 {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  margin: 0 0 0.7rem;
  color: var(--daiqing-deep);
}

.pillar-body p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.8;
}

.pillar.reveal {
  opacity: 0;
  transform: translateY(28px) scale(0.97);
  transition:
    opacity 1.05s var(--ease-out),
    transform 1.05s var(--ease-out);
}

.pillar.reveal.is-in {
  opacity: 1;
  transform: none;
}

.pillar-grid .pillar.reveal:nth-child(1) { transition-delay: 0s; }
.pillar-grid .pillar.reveal:nth-child(2) { transition-delay: 0.1s; }
.pillar-grid .pillar.reveal:nth-child(3) { transition-delay: 0.2s; }
.pillar-grid .pillar.reveal:nth-child(4) { transition-delay: 0.3s; }

html.is-motion .pillar-inner {
  transition:
    transform 0.7s var(--ease-out),
    box-shadow 0.7s var(--ease-out);
}

html.is-motion .pillar:hover .pillar-inner,
html.is-motion .pillar:focus-within .pillar-inner {
  transform: translateY(-6px);
  box-shadow: 0 16px 36px rgba(44, 70, 72, 0.12);
}

html.is-motion .pillar-icon svg {
  animation: pillar-icon-breath 14s ease-in-out var(--breath-delay, 0s) infinite;
}

@keyframes pillar-icon-breath {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

/* —— 用法 —— */

.step-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem 1.25rem;
  margin: 2.4rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.step-list li {
  position: relative;
  padding-top: 0.2rem;
}

.step-index {
  display: block;
  font-family: var(--serif);
  font-size: 1.2rem;
  letter-spacing: 0.12em;
  color: var(--vermillion);
  margin-bottom: 0.55rem;
}

.step-list h3 {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  margin: 0 0 0.5rem;
}

.step-list p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* —— 关于 / 法律页 —— */

.page-hero {
  padding: 3.5rem 0 2.2rem;
}

.page-hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  letter-spacing: 0.16em;
  font-weight: 500;
  margin: 0 0 1.1rem;
}

.narrow {
  width: min(44rem, calc(100% - 2.5rem));
  margin-inline: auto;
}

.about-block {
  padding: 0 0 3.2rem;
}

.about-block h2 {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  margin: 0 0 0.8rem;
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.4rem;
  margin: 0.6rem 0 0;
  padding: 0;
  list-style: none;
}

.legal-en {
  padding: 0.9rem 1rem;
  margin: 0 0 1.6rem;
  background: var(--card);
  border-left: 3px solid var(--vermillion);
  color: var(--muted);
  font-size: 0.95rem;
}

.legal-body {
  padding-bottom: 3rem;
}

.legal-body h1 {
  margin-bottom: 1rem;
}

.legal-body h2 {
  font-family: var(--serif);
  font-size: 1.12rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  margin: 1.7rem 0 0.5rem;
  color: var(--daiqing-deep);
}

.legal-body p {
  margin: 0 0 0.85rem;
  color: var(--text);
  line-height: 1.9;
}

.legal-meta {
  color: var(--muted);
}

/* —— 页脚 —— */

.site-footer {
  background: var(--daiqing-deep);
  color: #e6eaeb;
  margin-top: 2rem;
  padding: 3rem 0 2.2rem;
}

.site-footer a {
  color: #e6eaeb;
}

.site-footer a:hover {
  color: #fff;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 2rem;
  align-items: start;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
  margin-bottom: 0.8rem;
}

.footer-brand:hover {
  color: inherit;
}

.footer-brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.footer-brand span {
  font-family: var(--serif);
  font-size: 1.25rem;
  letter-spacing: 0.22em;
}

.footer-tagline {
  margin: 0 0 1.2rem;
  color: rgba(242, 243, 245, 0.78);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-meta {
  margin: 0;
  font-size: 0.88rem;
  color: rgba(242, 243, 245, 0.68);
}

.footer-meta + .footer-meta {
  margin-top: 0.35rem;
}

.footer-meta a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.footer-meta a:hover,
.footer-meta a:focus-visible {
  color: #F2F3F5;
}

.placeholder {
  border-bottom: 1px dashed rgba(180, 58, 52, 0.7);
  padding-bottom: 0.05em;
}

.footer-note {
  margin: 1.6rem 0 0;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(242, 243, 245, 0.14);
  font-size: 0.82rem;
  color: rgba(242, 243, 245, 0.55);
}

/* —— 响应式 —— */

@media (max-width: 900px) {
  .pillar-grid,
  .step-list,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .logo-plaque {
    order: -1;
    width: min(100%, 240px);
  }

  .hero-grid {
    justify-items: start;
  }
}

@media (max-width: 680px) {
  html,
  body {
    font-size: 16px;
  }

  .wrap,
  .story .wrap,
  .narrow {
    width: calc(100% - 2rem);
  }

  .nav {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: 0.6rem;
    row-gap: 0.45rem;
    padding: 0.7rem 0 0.8rem;
  }

  .brand {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
  }

  .lang-switch {
    grid-column: 2;
    grid-row: 1;
    order: 0;
    margin-left: 0;
    justify-self: end;
    flex-shrink: 0;
  }

  .nav-end {
    grid-column: 1 / -1;
    grid-row: 2;
    flex: none;
    order: 0;
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    justify-content: flex-start;
  }

  .page-hero {
    padding-top: 3.5rem;
    padding-bottom: 3rem;
  }

  .hero-grid,
  .pillar-grid,
  .step-list,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .logo-plaque {
    width: min(100%, 200px);
    padding: 1.1rem;
    border-radius: 20px;
    justify-self: start;
  }

  .pillar {
    min-height: 0;
  }

  .hero h1 {
    letter-spacing: 0.16em;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition: none !important;
    animation: none !important;
  }
}

@media print {
  .site-header,
  .site-footer,
  .skip-link,
  .lang-switch,
  .hero-cta,
  .logo-plaque {
    display: none !important;
  }

  body {
    border-top: 0;
    background: #fff;
    color: #000;
    font-size: 12pt;
  }

  a {
    color: inherit;
    text-decoration: none;
  }

  .legal-body,
  .about-block,
  .page-hero {
    padding: 0;
  }
}

/* —— 卷动叙事、分层视差与呼吸（可感知，无回弹） —— */

html {
  overflow-x: clip;
}

body {
  overflow-x: clip;
}

.atmosphere {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.atmosphere--quiet .atm-blob {
  opacity: 0.55;
}

.site-header,
main,
.site-footer {
  position: relative;
  z-index: 1;
}

.site-header { z-index: 10; }

.atm-layer {
  position: absolute;
  inset: -18% -12%;
  will-change: transform;
}

.atm-blob {
  position: absolute;
  border-radius: 50%;
  animation: site-breath 13s ease-in-out infinite;
}

.atm-blob.b1 {
  width: min(78vw, 900px);
  height: min(78vw, 900px);
  left: -18%;
  top: -14%;
  background: radial-gradient(circle, rgba(58, 90, 92, 0.26) 0%, rgba(58, 90, 92, 0) 70%);
}

.atm-blob.b2 {
  width: min(68vw, 780px);
  height: min(68vw, 780px);
  right: -16%;
  top: 12%;
  background: radial-gradient(circle, rgba(180, 58, 52, 0.16) 0%, rgba(180, 58, 52, 0) 68%);
  animation-duration: 15s;
  animation-delay: -5s;
}

.atm-blob.b3 {
  width: min(62vw, 720px);
  height: min(62vw, 720px);
  left: 22%;
  bottom: -22%;
  background: radial-gradient(circle, rgba(44, 70, 72, 0.18) 0%, rgba(44, 70, 72, 0) 70%);
  animation-duration: 16s;
  animation-delay: -9s;
}

.atm-grain {
  position: absolute;
  inset: 0;
  opacity: 0.4;
  background-image:
    radial-gradient(rgba(58, 90, 92, 0.07) 0.9px, transparent 0.9px);
  background-size: 16px 16px;
}

@keyframes site-breath {
  0%, 100% { transform: scale(1); opacity: 0.62; }
  50% { transform: scale(1.14); opacity: 1; }
}

.brand img {
  animation: logo-breath 12s ease-in-out infinite;
}

@keyframes logo-breath {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.06); opacity: 0.86; }
}

.pillar {
  animation: card-breath 12s ease-in-out infinite;
}

.pillar:nth-child(2) { animation-delay: -3s; }
.pillar:nth-child(3) { animation-delay: -6s; }
.pillar:nth-child(4) { animation-delay: -9s; }

@keyframes card-breath {
  0%, 100% {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(34, 38, 42, 0.03), 0 10px 24px rgba(34, 38, 42, 0.04);
  }
  50% {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(34, 38, 42, 0.05), 0 22px 44px rgba(44, 70, 72, 0.12);
  }
}

.hero-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: flex;
  align-items: center;
  box-sizing: border-box;
  padding: 4.75rem 0 1.75rem;
  overflow: visible;
}

.hero-copy,
.hero-device,
[data-scroll="hero-kicker"],
[data-scroll="hero-title"],
[data-scroll="hero-tagline"],
[data-scroll="hero-lede"],
[data-scroll="hero-cta"] {
  will-change: transform, opacity;
}

.hero-copy,
.hero-device {
  min-width: 0;
  max-width: 100%;
}

.hero-device {
  justify-self: stretch;
  transform-origin: 50% 80%;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}

html.is-motion [data-scroll="hero-phone"] {
  transform: translate3d(0, 20px, 0) scale(0.96);
}

.hero-device .phone {
  /* Stable length only: px, vw, svh. Height follows the design aspect. */
  --phone-w: min(268px, 22vw, calc((100svh - 14rem) * 834 / 1752));
  --phone-w: max(180px, var(--phone-w));
  width: var(--phone-w);
  min-width: 180px;
  flex: none;
  filter: drop-shadow(0 calc(14px + var(--lift, 0) * 16px) calc(28px + var(--lift, 0) * 20px) rgba(44, 70, 72, calc(0.12 + var(--lift, 0) * 0.1)));
}

.device-breath {
  animation: device-breath 12s ease-in-out infinite;
  animation-delay: var(--float-delay, 0s);
  will-change: transform;
}

@keyframes device-breath {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-11px) scale(1.018); }
}

.section-screens {
  padding: 0;
  min-height: 190vh;
}

.screens-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: flex;
  align-items: center;
  box-sizing: border-box;
  padding: 4.75rem 2rem 2rem;
  overflow: visible;
}

.section-screens .wrap {
  width: min(1180px, calc(100% - 2.5rem));
}

.screens-copy {
  margin-bottom: 2.4rem;
}

.section-screens .phone-col {
  margin-bottom: 0;
}

html.is-motion [data-scroll="enter"],
html.is-motion [data-scroll="screens-copy"] {
  opacity: 0;
  will-change: transform, opacity;
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 1.25s var(--ease-out), transform 1.25s var(--ease-out);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

html.is-ready .hero-copy {
  animation: hero-arrive 1.45s var(--ease-out) both;
}

html.is-ready .hero-device .device-breath {
  animation:
    hero-arrive 1.45s var(--ease-out) 0.12s both,
    device-breath 12s ease-in-out 1.45s infinite;
}

@keyframes hero-arrive {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 899px) {
  .hero {
    min-height: 0;
    padding: 5.5rem 0 4.25rem;
  }

  .hero-stage {
    position: static;
    height: auto;
    padding: 0 1.25rem;
    overflow: visible;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.4rem;
    justify-items: start;
  }

  .hero-device {
    justify-self: start;
  }

  .hero-cta {
    flex-direction: column;
  }

  .cta-note {
    width: 100%;
    max-width: 36rem;
    min-width: 0;
  }

  .section-screens {
    min-height: 0;
    padding: 8.5rem 0;
  }

  .screens-stage {
    position: static;
    height: auto;
    padding: 0 1.25rem;
    overflow: visible;
  }
}

@media (max-height: 799px) {
  .hero {
    min-height: 0;
    padding: 5.25rem 0 3.5rem;
  }

  .hero-stage {
    position: static;
    height: auto;
    padding: 0 1.5rem;
    overflow: visible;
  }

  .section-screens {
    min-height: 0;
    padding: 7rem 0;
  }

  .screens-stage {
    position: static;
    height: auto;
    padding: 0 1.5rem;
    overflow: visible;
  }
}

@media (max-width: 680px) {
  .section {
    padding: 5.75rem 0;
  }

  .section-screens {
    padding: 5.75rem 0;
  }

  .hero {
    padding: 5.25rem 0 3.25rem;
  }

  .hero-stage {
    padding: 0 1rem;
  }

  .hero h1 {
    letter-spacing: 0.14em;
  }

  .hero .lede {
    font-size: 1.05rem;
  }

  .nav {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: 0.6rem;
    row-gap: 0.45rem;
  }

  .brand {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
  }

  .lang-switch {
    grid-column: 2;
    grid-row: 1;
    order: 0;
    margin-left: 0;
    justify-self: end;
    flex-shrink: 0;
  }

  .nav-end {
    grid-column: 1 / -1;
    grid-row: 2;
    flex: none;
    order: 0;
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    justify-content: flex-start;
  }
}



@media (min-width: 900px) and (min-height: 800px) and (max-height: 899px) {
  .hero {
    padding: 0;
    min-height: 152vh;
  }

  .hero-stage {
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100svh;
    padding: 4.5rem 0 1.5rem;
    overflow: visible;
  }

  .section-screens {
    padding: 0;
    min-height: 160vh;
  }

  .screens-stage {
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100svh;
    padding: 4.5rem 1.5rem 1.5rem;
    overflow: visible;
  }


  .hero-grid {
    gap: 1.5rem 2rem;
    align-items: center;
  }

  .hero h1 {
    font-size: clamp(3.4rem, 7vw, 5.4rem);
  }

  .hero .tagline {
    font-size: clamp(1.2rem, 2.2vw, 1.7rem);
    margin-bottom: 1rem;
  }

  .hero .lede {
    margin-bottom: 1.2rem;
    font-size: 1.05rem;
  }

  .qr-slot {
    width: 132px;
    height: 132px;
  }

  .hero-device .phone {
    --phone-w: max(176px, min(228px, 22vw, calc((100svh - 12.5rem) * 834 / 1752)));
  }
}

@media (max-width: 899px) and (max-height: 899px) {
  .hero {
    padding: 4.5rem 0 1.4rem;
  }

  .hero-grid {
    gap: 1.4rem;
  }

  .hero h1 {
    font-size: clamp(3.2rem, 8.5vw, 5rem);
  }

  .hero .tagline {
    font-size: clamp(1.2rem, 2.6vw, 1.65rem);
    margin-bottom: 1rem;
  }

  .hero .lede {
    margin-bottom: 1.15rem;
    font-size: 1.05rem;
  }

  .qr-slot {
    width: 128px;
    height: 128px;
  }

  .hero-device .phone {
    --phone-w: max(168px, min(230px, 42vw, calc((100svh - 14rem) * 834 / 1752)));
  }
}


@media (min-width: 1100px) and (min-height: 900px) {
  .hero-grid {
    gap: clamp(1.8rem, 3vw, 2.8rem);
    align-items: center;
  }

  .hero-device {
    justify-self: end;
  }

  .hero-device .phone {
    --phone-w: max(200px, min(320px, 24vw, calc((100svh - 14rem) * 834 / 1752)));
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero {
    min-height: 0;
    padding: 5rem 0 4rem;
  }

  .hero-stage,
  .screens-stage {
    position: static;
    height: auto;
    min-height: 0;
    padding: 0;
    overflow: visible;
  }

  .section-screens {
    min-height: 0;
    padding: 5.5rem 0;
  }

  .atm-blob,
  .brand img,
  .pillar,
  .pillar-inner,
  .pillar-icon svg,
  .device-breath,
  html.is-ready .hero-copy,
  html.is-ready .hero-device {
    animation: none !important;
  }

  .reveal,
  .reveal.is-in,
  html.is-motion [data-scroll="enter"],
  html.is-motion [data-scroll="screens-copy"],
  html.is-motion [data-scroll="hero-phone"] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .atm-layer,
  .hero-copy,
  .hero-device,
  [data-scroll] {
    transform: none !important;
  }
}
.section-screens .phone-row {
  overflow: visible;
  padding: 0.75rem 0.5rem 0.5rem;
  gap: clamp(0.8rem, 1.6vw, 1.6rem);
}

.section-screens .phone-col {
  overflow: visible;
}

.section-screens .phone {
  --phone-w: max(160px, min(236px, 18vw, calc((100svh - 18rem) * 834 / 1752)));
  width: var(--phone-w);
  min-width: 160px;
  flex: none;
}

.phone-caption {
  flex-shrink: 0;
  padding-inline: 0.2em;
}

@media (min-height: 800px) and (max-height: 899px) {
  .section-screens .phone {
    --phone-w: max(152px, min(220px, 18vw, calc((100svh - 17rem) * 834 / 1752)));
  }
}


/* —— 手机与窄屏适配（放在文件末尾，以便覆盖前面互相重叠的媒体查询） —— */

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}

.site-header {
  padding-top: env(safe-area-inset-top, 0px);
}

.site-footer {
  padding-bottom: calc(2.2rem + env(safe-area-inset-bottom, 0px));
}

@media (max-width: 899px) {
  .nav-links a {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    padding: 0.2rem 0.05rem;
  }

  .lang-switch button {
    min-height: 2.5rem;
    padding: 0.35rem 0.8rem;
  }

  .hero {
    padding: 0.85rem 0 2.25rem;
  }

  .hero-stage {
    padding: 0;
  }

  .hero-grid {
    gap: 1.35rem;
  }

  .hero .lede {
    margin-bottom: 1.25rem;
    font-size: 1.05rem;
  }

  .hero-cta {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .qr-slot {
    width: 120px;
    height: 120px;
    padding: 0.7rem;
  }

  .cta-note {
    flex: 1 1 8rem;
    min-width: 0;
  }

  html.is-motion [data-scroll="hero-phone"] {
    transform: none;
  }

  .hero-device .phone {
    --phone-w: max(160px, min(230px, 72vw, calc((100svh - 16rem) * 834 / 1752)));
    max-width: 100%;
  }

  .screens-stage {
    padding: 0;
  }

  .section-screens .phone-row {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 1rem;
    padding: 0.35rem 0 1.15rem;
    margin-inline: 0;
    scrollbar-width: thin;
  }

  .section-screens .phone-col {
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  .page-hero {
    padding: 2rem 0 1.6rem;
  }
}

@media (max-width: 680px) {
  .hero h1 {
    font-size: clamp(2.7rem, 16vw, 3.35rem);
    letter-spacing: 0.12em;
  }

  .hero .tagline {
    font-size: clamp(1.12rem, 4.6vw, 1.4rem);
    letter-spacing: 0.06em;
    margin-bottom: 1rem;
  }

  .section-screens .wrap {
    width: calc(100% - 2rem);
  }

  .section-screens .phone-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-items: center;
    align-items: start;
    overflow: visible;
    scroll-snap-type: none;
    gap: 1.3rem 0.8rem;
    padding: 0.2rem 0 0.4rem;
  }

  .section-screens .phone-col {
    flex: none;
    width: 100%;
    max-width: 176px;
    min-width: 0;
    justify-self: center;
  }

  .section-screens .phone {
    --phone-w: 160px;
    width: 160px;
    max-width: 100%;
  }
}


/* Phone shots use aspect-ratio 834 / 1752 on .phone-shot; width is --phone-w only. */
/* Allow grid items to shrink so long words wrap instead of forcing overflow. */
.pillar,
.pillar-body,
.pillar-body h3,
.pillar-body p,
.step-list li,
.step-list h3,
.step-list p,
.section h2,
.hero h1,
.hero .tagline,
.footer-tagline {
  min-width: 0;
  max-width: 100%;
}


/* —— English layout (tracking and boxes were sized for short CJK strings) —— */
html[data-lang="en"] {
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", Times, serif;
  --sans: "Segoe UI", "Helvetica Neue", -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif;
}

html[data-lang="en"] .brand-name,
html[data-lang="en"] .footer-brand span {
  letter-spacing: 0.06em;
  margin-right: -0.06em;
}

html[data-lang="en"] .nav-links a {
  letter-spacing: 0.02em;
}

html[data-lang="en"] .kicker,
html[data-lang="en"] .kicker-text,
html[data-lang="en"] .chapter {
  letter-spacing: 0.14em;
}

html[data-lang="en"] .hero h1 {
  letter-spacing: 0.04em;
  font-size: clamp(3.4rem, 8.5vw, 5.8rem);
  line-height: 1.08;
  overflow-wrap: normal;
  word-break: normal;
}

html[data-lang="en"] .hero .tagline {
  letter-spacing: 0.03em;
  overflow-wrap: break-word;
}

html[data-lang="en"] .section h1,
html[data-lang="en"] .section h2,
html[data-lang="en"] .page-hero h1,
html[data-lang="en"] .about-block h2,
html[data-lang="en"] .pillar-body h3,
html[data-lang="en"] .step-list h3,
html[data-lang="en"] .legal-body h2 {
  letter-spacing: 0.03em;
  overflow-wrap: break-word;
  word-break: normal;
}

html[data-lang="en"] .story-title-rest,
html[data-lang="en"] .pillars-title-rest {
  display: inline;
}

html[data-lang="en"] .lede,
html[data-lang="en"] .cta-note,
html[data-lang="en"] .prose p,
html[data-lang="en"] .screens-note,
html[data-lang="en"] .pillar-body p,
html[data-lang="en"] .step-list p,
html[data-lang="en"] .footer-tagline,
html[data-lang="en"] .footer-note {
  word-break: normal;
  overflow-wrap: break-word;
  line-break: auto;
}

html[data-lang="en"] .qr-slot {
  width: auto;
  height: auto;
  min-width: 168px;
  min-height: 168px;
  max-width: 100%;
}

html[data-lang="en"] .qr-caption,
html[data-lang="en"] .qr-pending {
  letter-spacing: 0.04em;
  overflow-wrap: break-word;
  max-width: 100%;
  line-height: 1.35;
}

html[data-lang="en"] .phone-caption {
  letter-spacing: 0.06em;
  text-align: center;
  overflow-wrap: break-word;
}

@media (min-width: 900px) and (max-height: 899px) {
  html[data-lang="en"] .hero h1 {
    font-size: clamp(3rem, 6.5vw, 4.8rem);
  }

  html[data-lang="en"] .qr-slot {
    min-width: 132px;
    min-height: 132px;
  }
}

@media (max-width: 899px) {
  html[data-lang="en"] .qr-slot {
    min-width: 120px;
    min-height: 120px;
  }
}

@media (max-width: 680px) {
  html[data-lang="en"] .hero h1 {
    font-size: clamp(2.6rem, 14vw, 3.35rem);
    letter-spacing: 0.03em;
  }

  html[data-lang="en"] .hero .tagline {
    letter-spacing: 0.02em;
  }

  html[data-lang="en"] .kicker,
  html[data-lang="en"] .kicker-text,
  html[data-lang="en"] .chapter {
    letter-spacing: 0.1em;
  }
}

/* Phone slot: stable width, reserved caption, no circular container sizing. */
.hero-device .phone-col,
.section-screens .phone-col {
  width: max-content;
  max-width: 100%;
  overflow: visible;
}

.phone-caption {
  flex-shrink: 0;
  white-space: nowrap;
}

/* Too little viewport height: unstick and let the section grow instead of clipping. */
@media (max-height: 799px) {
  .hero {
    min-height: 0;
    padding: 5.25rem 0 3.5rem;
  }

  .section-screens {
    min-height: 0;
    padding: 7rem 0;
  }

  .hero-stage,
  .screens-stage {
    position: static;
    height: auto;
    min-height: 0;
    overflow: visible;
    padding: 0 1.5rem;
  }

  .hero-grid {
    align-items: start;
  }

  .hero-device .phone {
    --phone-w: max(168px, min(228px, 22vw, calc((100svh - 12rem) * 834 / 1752)));
  }

  .section-screens .phone {
    --phone-w: max(144px, min(200px, 18vw, calc((100svh - 16rem) * 834 / 1752)));
  }
}

@media (max-width: 899px) {
  .section-screens .phone-row {
    overflow-x: auto;
    padding-top: 0.6rem;
    padding-bottom: 2.4rem;
  }
}
