/* ============================================
   Hangzhou Foldable Light Technology Co., Ltd
   halfsugar-tech.com — shared stylesheet
   ============================================ */

:root {
  /* Fonts — editorial serif for display, sans for body */
  --font-display: 'Fraunces', 'Noto Serif SC', 'Songti SC', 'Source Han Serif SC', serif;
  --font-body:    'Noto Sans SC', 'Nunito', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --font-num:     'Fraunces', 'Nunito', ui-monospace, serif;

  /* Easing tokens (ease-out family; no bounce/elastic) */
  --ease-out-quart: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out-quint: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-out-expo:  cubic-bezier(0.16, 1, 0.3, 1);

  --cream: #fffbf5;
  --cream-2: #fff5e8;
  --cream-3: #ffeedc;
  --ink: #1A1208;
  --ink-2: #3d2d1e;
  --muted: #6b5a48;        /* WCAG AA 4.5:1 on cream */
  --muted-2: #9a8770;      /* secondary, not for body text */
  --line: #ecdfd0;
  --line-2: #f3e8d9;
  --rose: #ff6b81;
  --rose-2: #ff8fa3;
  --rose-soft: #ffe0e6;
  --amber: #f7b26a;

  --shadow-sm: 0 1px 2px rgba(60, 40, 20, 0.06), 0 2px 8px rgba(60, 40, 20, 0.04);
  --shadow-md: 0 4px 12px rgba(60, 40, 20, 0.08), 0 12px 32px rgba(60, 40, 20, 0.06);
  --shadow-lg: 0 10px 24px rgba(60, 40, 20, 0.10), 0 30px 60px rgba(60, 40, 20, 0.08);
  --shadow-rose: 0 8px 24px rgba(255, 107, 129, 0.22);

  --r-sm: 14px;
  --r-md: 20px;
  --r-lg: 28px;
  --r-xl: 36px;
  --r-pill: 999px;

  --container: 1180px;
  --pad: clamp(20px, 4vw, 40px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 16px;
  line-height: 1.7;
}

/* Subtle washi-paper texture via layered radial tints + SVG noise */
body {
  background-image:
    radial-gradient(ellipse 1200px 600px at 80% -10%, rgba(255, 200, 180, 0.22), transparent 60%),
    radial-gradient(ellipse 1000px 500px at -10% 30%, rgba(255, 220, 200, 0.16), transparent 55%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' seed='7'/><feColorMatrix values='0 0 0 0 0.9  0 0 0 0 0.86  0 0 0 0 0.78  0 0 0 0.06 0'/></filter><rect width='160' height='160' filter='url(%23n)'/></svg>");
  background-attachment: fixed, fixed, scroll;
  background-size: auto, auto, 160px 160px;
}

/* Editorial display type: Fraunces + Noto Serif SC for Latin + CJK */
h1, h2, h3,
.section-title,
.toc-title,
.product-name,
.product-tagline,
.hero h1,
.editorial { font-family: var(--font-display); font-optical-sizing: auto; }
.num { font-family: var(--font-num); font-variant-numeric: tabular-nums oldstyle-nums; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

.num { font-family: 'Nunito', -apple-system, sans-serif; font-variant-numeric: tabular-nums; }

/* ============ Container ============ */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* ============ Nav ============ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  background: rgba(255, 251, 245, 0.82);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
.nav.scrolled {
  border-bottom-color: var(--line);
  background: rgba(255, 251, 245, 0.94);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
}
.brand-lockup .logo-mark { width: 40px; height: 40px; }
.brand-lockup .wordmark {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.brand-lockup .wordmark .cn {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.02em;
  color: var(--ink);
}
.brand-lockup .wordmark .en {
  font-family: 'Nunito', sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--ink);
}
.nav-links {
  display: flex;
  gap: 4px;
  align-items: center;
}
.nav-links a {
  padding: 10px 14px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  border-radius: var(--r-pill);
  transition: background 0.18s, color 0.18s;
}
.nav-links a { position: relative; }
.nav-links a:hover { background: var(--cream-3); color: var(--ink); }
.nav-links a.active { color: var(--rose); background: transparent; }
.nav-links a.active:hover { background: transparent; color: var(--rose); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  bottom: 4px;
  left: 14px;
  right: 14px;
  height: 2px;
  background: var(--rose);
  border-radius: 2px;
  transform-origin: center;
  animation: nav-underline-in 0.22s ease-out;
}
@keyframes nav-underline-in {
  from { transform: scaleX(0.4); opacity: 0; }
  to { transform: none; opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .nav-links a.active::after { animation: none; }
}
.nav-cta {
  background: var(--ink) !important;
  color: var(--cream) !important;
  padding: 12px 20px !important;
}
.nav-cta:hover { background: var(--ink-2) !important; color: var(--cream) !important; }

.lang {
  position: relative;
  margin-left: 6px;
}
.lang-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--r-pill);
  background: var(--cream-3);
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s, color 0.18s;
}
.lang-btn:hover { background: var(--rose-soft); color: var(--rose); }
.lang-btn[aria-expanded="true"] { background: var(--rose-soft); color: var(--rose); }
.lang-btn svg { width: 20px; height: 20px; }
.lang-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 160px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  padding: 6px;
  display: none;
  z-index: 60;
}
.lang-menu.open { display: block; }
.lang-menu button {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  text-align: left;
  transition: background 0.15s;
}
.lang-menu button:hover { background: var(--cream-3); }
.lang-menu button.active { color: var(--rose); font-weight: 700; }
.lang-menu button .tick { opacity: 0; color: var(--rose); }
.lang-menu button.active .tick { opacity: 1; }

/* Bilingual visibility */
html[data-lang="cn"] .i18n-en { display: none !important; }
html[data-lang="en"] .i18n-cn { display: none !important; }

.menu-toggle { display: none; }

@media (max-width: 860px) {
  .nav-links {
    display: none;
  }
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--r-pill);
    background: var(--cream-3);
  }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    padding: 16px var(--pad) 24px;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
    gap: 4px;
  }
  .nav-links.open a { padding: 14px 16px; font-size: 15px; min-height: 44px; }
  .nav-links.open .lang { margin-left: 0; align-self: flex-start; }
}

/* ============ Section base ============ */
section {
  padding: clamp(32px, 5vw, 64px) 0;
  position: relative;
}
.section-intro { max-width: 820px; margin-bottom: 28px; }
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rose);
  margin-bottom: 16px;
}
.section-eyebrow::before {
  content: "";
  width: 24px;
  height: 2px;
  background: var(--rose);
  border-radius: 2px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.6vw, 54px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  color: var(--ink);
  text-wrap: balance;
}
.section-title em { font-style: italic; color: var(--rose); font-weight: 500; }
.section-lede {
  font-size: clamp(16px, 1.7vw, 18px);
  color: var(--ink-2);
  max-width: 720px;
  margin: 0 0 8px;
}

/* ============ Hero ============ */
.hero {
  padding-top: clamp(48px, 6vw, 80px);
  padding-bottom: clamp(60px, 8vw, 100px);
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; }
}

/* Hero editorial typography — CJK-safe sizing */
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.4vw, 56px);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.18;
  margin: 20px 0 28px;
  color: var(--ink);
  font-variation-settings: "opsz" 120, "SOFT" 40;
  word-break: keep-all;
  overflow-wrap: normal;
}
.hero h1 em { font-style: italic; font-weight: 500; white-space: nowrap; }
.hero h1 em.accent { color: var(--rose); }
.hero h1 .accent, .hero h1 em.accent { color: var(--rose); }

.hero-sub {
  font-size: 16.5px;
  color: var(--ink-2);
  margin: 0 0 40px;
  max-width: 520px;
  line-height: 1.8;
}
.hero-sub strong { color: var(--ink); font-weight: 700; }

.cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  min-height: 48px;
  border-radius: var(--r-pill);
  font-size: 15px;
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s;
  white-space: nowrap;
}
.btn-primary {
  background: var(--rose);
  color: #fff;
  box-shadow: var(--shadow-rose);
}
.btn-primary:hover { transform: translateY(-2px); background: var(--rose-2); box-shadow: 0 12px 28px rgba(255,107,129,0.3); }
.btn-ghost {
  background: var(--cream);
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-ghost:hover { background: var(--cream-3); }
.btn-arrow { width: 20px; height: 20px; }

/* Hero right — editorial photograph/plate figure */
figure.hero-visual {
  position: relative;
  margin: 0;
  padding: 0 0 0 clamp(0px, 3vw, 40px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
figure.hero-visual img {
  width: 100%;
  max-width: 480px;
  height: auto;
  display: block;
  border-radius: 2px;
  filter: drop-shadow(0 20px 40px rgba(60, 40, 20, 0.10)) drop-shadow(0 4px 12px rgba(255, 107, 129, 0.08));
  transform: rotate(-0.8deg);
}
figure.hero-visual figcaption {
  margin-top: 24px;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}
figure.hero-visual figcaption .num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0;
  color: var(--rose);
}
/* Company → Product → Domain bridge */
/* ============ Editorial: Issue mark, Chapter mark, Masthead ============ */
.issue-mark {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
  padding: 0 0 36px;
  border-bottom: 1px solid var(--ink);
  margin-bottom: clamp(32px, 5vw, 64px);
  position: relative;
}
.issue-mark .num {
  font-variant-numeric: oldstyle-nums;
  font-size: 13px;
  font-style: italic;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--rose);
  text-transform: none;
}
.issue-mark .dot-sep { opacity: 0.35; }
.issue-mark .issue-rule { display: none; }

.chapter-mark {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--rose);
  margin-bottom: 16px;
}
.chapter-mark .num {
  font-style: italic;
  font-size: 14px;
  letter-spacing: 0.02em;
  text-transform: none;
}
.chapter-mark .sep {
  width: 24px;
  height: 1px;
  background: var(--rose);
  display: inline-block;
  opacity: 0.5;
}


/* ============ About — Editorial essay + side meta ============ */
.about {
  background: linear-gradient(180deg, transparent 0%, var(--cream-2) 20%, var(--cream-2) 80%, transparent 100%);
}
.about-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
  margin-top: clamp(40px, 5vw, 64px);
}
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } }

.about-essay p {
  font-size: 16px;
  line-height: 1.85;
  color: var(--ink-2);
  margin: 0 0 18px;
}
.about-essay .lede {
  font-family: var(--font-display);
  font-size: clamp(18px, 1.9vw, 20px);
  font-weight: 500;
  color: var(--ink);
  line-height: 1.55;
  margin: 0 0 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.about-essay .closer {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
  color: var(--ink);
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.about-side {
  position: sticky;
  top: 96px;
  padding: 28px 0 0;
  border-top: 1px solid var(--ink);
}
.side-meta {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin: 0 0 32px;
}
.side-meta > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.side-meta dt {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.side-meta dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.side-meta dd.italic { font-style: normal; }
.side-meta dd a { color: var(--ink); border-bottom: 1px dotted var(--muted); }
.side-meta dd a:hover { color: var(--rose); border-bottom-color: var(--rose); }

.side-ornament {
  display: flex;
  justify-content: flex-end;
  opacity: 0.85;
}
.side-ornament img {
  transform: rotate(6deg);
  filter: drop-shadow(0 12px 24px rgba(255,107,129,0.15));
}
@media (max-width: 860px) {
  .about-side { position: static; }
}

/* ============ Colophon (Contact) ============ */
.colophon .section-intro {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}
.colophon .section-intro .chapter-mark { justify-content: center; }

.colophon-body {
  max-width: 640px;
  margin: clamp(32px, 5vw, 56px) auto 0;
  text-align: center;
}
.colophon-line {
  font-family: var(--font-display);
  font-size: clamp(17px, 1.8vw, 20px);
  font-weight: 500;
  line-height: 1.6;
  color: var(--ink);
  margin: 0 0 24px;
}
.colophon-email {
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 500;
  color: var(--rose);
  margin: 0 0 16px;
  letter-spacing: -0.01em;
  border-bottom: 1px solid var(--rose);
  padding-bottom: 4px;
  transition: color 0.2s, border-color 0.2s;
}
.colophon-email:hover { color: var(--ink); border-bottom-color: var(--ink); }

.colophon-divider {
  font-family: var(--font-display);
  color: var(--rose);
  font-size: 20px;
  margin: 40px 0 0;
  opacity: 0.55;
  letter-spacing: 1em;
}

.about-copy p {
  font-size: 16px;
  line-height: 1.85;
  color: var(--ink-2);
  margin: 0 0 18px;
}
.about-copy .emphasis {
  font-size: clamp(20px, 2.4vw, 24px);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.4;
  margin: 0 0 20px;
  letter-spacing: -0.005em;
}
.about-copy .team-lede {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.7;
  margin: 0 0 20px;
}
.about-copy .team-lede strong { color: var(--rose); font-weight: 700; }
.about-copy .highlight {
  display: inline-block;
  background: linear-gradient(180deg, transparent 62%, var(--rose-soft) 62%);
  padding: 0 4px;
  font-weight: 700;
  color: var(--ink);
  font-size: 18px;
  margin-top: 8px;
}

/* ============ Products — Magazine spread ============ */
.spread {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
  margin-top: clamp(40px, 5vw, 64px);
}
@media (max-width: 900px) { .spread { grid-template-columns: 1fr; } }

figure.spread-photo {
  margin: 0;
  position: relative;
}
figure.spread-photo img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 2px;
  filter: drop-shadow(0 16px 40px rgba(60, 40, 20, 0.12));
}
figure.spread-photo figcaption {
  margin-top: 14px;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
figure.spread-photo figcaption .num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 14px;
  text-transform: none;
  letter-spacing: 0;
  color: var(--rose);
  font-weight: 500;
}
figure.spread-photo figcaption .dot-sep { opacity: 0.35; }

.spread-text { padding-top: 8px; }

.product-title-block { margin-bottom: 20px; }
.product-name {
  font-family: var(--font-display);
  font-size: clamp(36px, 4.2vw, 52px);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1;
  margin: 0 0 8px;
  color: var(--ink);
}
.product-name em { font-style: italic; font-weight: 300; color: var(--rose); }
.product-byline {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin: 0;
}

.product-tagline {
  font-family: var(--font-display);
  font-size: clamp(18px, 1.9vw, 21px);
  font-weight: 500;
  color: var(--ink);
  line-height: 1.45;
  margin: 24px 0 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.spread-body p {
  font-size: 16px;
  line-height: 1.85;
  color: var(--ink-2);
  margin: 0 0 18px;
}

.pull-quote {
  margin: 24px 0;
  padding: 0 0 0 20px;
  border-left: 2px solid var(--rose);
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(17px, 1.8vw, 20px);
  font-weight: 400;
  line-height: 1.55;
  color: var(--ink);
  quotes: none;
}

.product-meta {
  margin: 36px 0 0;
  padding: 24px 0 0;
  border-top: 1px solid var(--ink);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.product-meta > div { display: flex; flex-direction: column; gap: 6px; }
.product-meta dt {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.product-meta dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 6px;
}
.product-meta .live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--rose);
  animation: live-pulse 2.2s ease-in-out infinite;
}
.product-meta strong { font-weight: 700; color: var(--rose); }
@media (max-width: 640px) { .product-meta { grid-template-columns: 1fr; } }

/* ============ Features — Table of Contents ============ */
.features {
  background: linear-gradient(180deg, transparent, var(--cream-2) 20%, var(--cream-2) 80%, transparent);
}

.toc-list {
  list-style: none;
  margin: clamp(40px, 6vw, 72px) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--ink);
  /* Center book-fold divider */
  background-image: linear-gradient(to right,
    transparent calc(50% - 0.5px),
    var(--line) calc(50% - 0.5px),
    var(--line) calc(50% + 0.5px),
    transparent calc(50% + 0.5px));
}
.toc-entry {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: clamp(14px, 1.6vw, 24px);
  align-items: center;
  padding: clamp(22px, 2.4vw, 32px) clamp(18px, 2.4vw, 36px);
  border-bottom: 1px solid var(--line);
  transition: background 0.3s ease;
}
.toc-entry:hover { background: rgba(255, 224, 230, 0.22); }
.toc-num {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(36px, 3.6vw, 52px);
  color: var(--rose);
  line-height: 0.95;
  letter-spacing: -0.02em;
  font-variant-numeric: oldstyle-nums;
}
.toc-seal {
  width: clamp(44px, 4vw, 56px);
  height: clamp(44px, 4vw, 56px);
  object-fit: contain;
  transition: transform 320ms var(--ease-out-quart);
  mix-blend-mode: multiply;
}
.toc-entry:hover .toc-seal { transform: rotate(-6deg) scale(1.06); }
.toc-body { min-width: 0; }
.toc-title {
  font-family: var(--font-display);
  font-size: clamp(17px, 1.6vw, 21px);
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.005em;
  line-height: 1.3;
  margin: 0 0 6px;
  word-break: keep-all;
}
.toc-desc {
  font-family: var(--font-body);
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--ink-2);
  margin: 0;
}

/* Mobile: single column stack */
@media (max-width: 720px) {
  .toc-list {
    grid-template-columns: 1fr;
    background-image: none;
  }
  .toc-entry {
    grid-template-columns: auto auto 1fr;
    padding: 24px 8px;
  }
  .toc-num { font-size: 36px; }
}

/* Stagger toc entries on reveal */
.toc-entry.reveal { transition: opacity 0.75s var(--ease-out-quart), transform 0.75s var(--ease-out-quart); }
.toc-entry.reveal:nth-child(1) { transition-delay: 0ms; }
.toc-entry.reveal:nth-child(2) { transition-delay: 80ms; }
.toc-entry.reveal:nth-child(3) { transition-delay: 160ms; }
.toc-entry.reveal:nth-child(4) { transition-delay: 240ms; }
.toc-entry.reveal:nth-child(5) { transition-delay: 320ms; }
.toc-entry.reveal:nth-child(6) { transition-delay: 400ms; }

/* ============ Plate — horizontal photo strip for app screenshots ============ */
.plate {
  margin: clamp(60px, 8vw, 100px) 0 0;
  padding: 0;
}
.plate-cap {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--ink);
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.plate-cap .num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 14px;
  text-transform: none;
  letter-spacing: 0;
  color: var(--rose);
  font-weight: 500;
}
.plate-cap .plate-pill {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--rose-soft);
  color: var(--rose);
  border-radius: var(--r-pill);
  font-size: 11px;
  letter-spacing: 0.12em;
}
.plate-cap .s-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: live-pulse 2.2s ease-in-out infinite;
}
/* Plate III — 3 featured phones, center larger, sides tilted */
.plate-three {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  gap: clamp(16px, 2vw, 36px);
  align-items: end;
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(16px, 2vw, 32px) 0;
}
.phone-card {
  display: flex;
  flex-direction: column;
  gap: 40px;
  align-items: center;
}
.phone-card img {
  width: 100%;
  max-width: 220px;
  aspect-ratio: 9 / 19.5;
  object-fit: cover;
  object-position: top center;
  border-radius: 20px;
  border: 5px solid var(--ink);
  box-shadow: 0 10px 24px rgba(60, 40, 20, 0.12), 0 24px 48px rgba(60, 40, 20, 0.06);
  background: var(--cream-3);
  transition: transform 0.32s var(--ease-out-quart), box-shadow 0.32s var(--ease-out-quart);
  will-change: transform;
}
.phone-card.phone-side:nth-child(1) img { transform: translateY(14px) rotate(-2.5deg); }
.phone-card.phone-center img { transform: translateY(0) scale(1.04); position: relative; z-index: 2; }
.phone-card.phone-side:nth-child(3) img { transform: translateY(14px) rotate(2.5deg); }
/* Hover — higher specificity to override the default transforms on all 3 */
.phone-card.phone-side:nth-child(1):hover img { transform: translateY(-4px) rotate(0) scale(1.03); }
.phone-card.phone-center:hover img { transform: translateY(-4px) scale(1.08); }
.phone-card.phone-side:nth-child(3):hover img { transform: translateY(-4px) rotate(0) scale(1.03); }
.phone-card:hover img {
  box-shadow: 0 18px 40px rgba(60, 40, 20, 0.16), 0 32px 64px rgba(255, 107, 129, 0.1);
}
.phone-label {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--font-display);
  font-size: clamp(14px, 1.3vw, 17px);
  color: var(--ink);
  font-weight: 500;
}
.phone-label .num {
  font-style: italic;
  color: var(--rose);
  font-size: 14px;
  letter-spacing: 0;
}

@media (max-width: 820px) {
  .plate-three {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 20px 0;
  }
  .phone-card.phone-center { grid-column: 1 / -1; max-width: 240px; margin: 0 auto; }
  .phone-card.phone-side:nth-child(1) img,
  .phone-card.phone-side:nth-child(3) img { transform: none; }
  .phone-card.phone-center img { transform: none; scale: 1; }
}
@media (max-width: 480px) {
  .plate-three { grid-template-columns: 1fr; }
  .phone-card { max-width: 260px; margin: 0 auto; }
}
/* ============ Team collage (used inside merged About) ============ */
.team-collage {
  position: relative;
  min-height: 440px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 14px;
}
.team-collage .cell {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  position: relative;
}
.team-collage .cell .tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rose);
}
.team-collage .cell .big {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.35;
  margin-top: auto;
}
.team-collage .cell.mascot-cell {
  background: var(--rose-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.team-collage .cell.mascot-cell img { width: 78%; height: 78%; object-fit: contain; }
.team-collage .cell.dark { background: var(--ink); color: var(--cream-2); border-color: var(--ink); }
.team-collage .cell.dark .big { color: var(--cream); }
.team-collage .cell.dark .tag { color: var(--rose-2); }

/* ============ Contact ============ */
/* ============ Footer — warm brown with SVG wave transition ============ */
footer.site-footer {
  position: relative;
  background: #3a2818;
  color: #e8ddd0;
  padding: clamp(44px, 5vw, 64px) 0 24px;
  margin-top: 64px; /* reserve room for the wave above */
}
/* Soft wave shape curving cream→brown, sitting above the footer body */
footer.site-footer::before {
  content: "";
  position: absolute;
  top: -64px;
  left: 0; right: 0;
  height: 64px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 80' preserveAspectRatio='none'><path d='M0,80 C240,10 480,70 720,36 C960,4 1200,66 1440,30 L1440,80 Z' fill='%233a2818'/></svg>") top center / 100% 100% no-repeat;
  pointer-events: none;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1.4fr;
  gap: 40px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
@media (max-width: 760px) { .footer-top { grid-template-columns: 1fr; gap: 28px; } }

.footer-brand .brand-lockup .wordmark .cn,
.footer-brand .brand-lockup .wordmark .en { color: #fff; font-size: 13px; }
.footer-brand .brand-lockup .wordmark .en { color: #B8A898; font-size: 11px; margin-top: 2px; }
.footer-brand .footer-tag {
  font-size: 13px;
  color: #B8A898;
  margin: 14px 0 0;
  line-height: 1.7;
}

.footer-col h4 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #ffb6a3;
  margin: 0 0 12px;
}
.footer-col address {
  font-style: normal;
  font-size: 13px;
  line-height: 1.75;
  color: #e8ddd0;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col ul li { font-size: 12.5px; line-height: 1.8; }
.footer-col ul a {
  color: #e8ddd0;
  transition: color 0.2s;
  display: inline-block;
  padding: 1px 0;
}
.footer-col ul a:hover { color: var(--rose-2); }

/* Navigate column: compact two-column grid to reduce vertical footprint */
.footer-col.footer-nav ul {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 20px;
  row-gap: 2px;
}
.footer-col.footer-nav ul li.full { grid-column: 1 / -1; }
.footer-col.footer-nav ul li.full a { font-size: 12px; color: #B8A898; }

.footer-bottom {
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12px;
  color: #B8A898;
}
.footer-bottom .credentials {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  align-items: center;
}
.footer-bottom .credentials span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.footer-bottom .credentials strong {
  color: #e8ddd0;
  font-weight: 600;
}

/* ============ Legal pages ============ */
.legal-hero {
  padding: 80px 0 40px;
  border-bottom: 1px solid var(--line);
}
.legal-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 60px;
  padding: 60px 0 80px;
}
@media (max-width: 860px) {
  .legal-layout { grid-template-columns: 1fr; gap: 32px; }
}
.legal-toc {
  position: sticky;
  top: 90px;
  align-self: start;
  font-size: 13px;
}
.legal-toc h4 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 16px;
}
.legal-toc ol {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: toc;
}
.legal-toc ol li {
  counter-increment: toc;
  margin-bottom: 6px;
}
.legal-toc ol li a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--ink-2);
  font-weight: 500;
  transition: background 0.18s, color 0.18s;
  min-height: 40px;
}
.legal-toc ol li a::before {
  content: counter(toc, decimal-leading-zero) "  ";
  color: var(--muted-2);
  font-family: 'Nunito', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
}
.legal-toc ol li a:hover { background: var(--cream-3); color: var(--ink); }

.legal-body h2 {
  font-size: 24px;
  font-weight: 800;
  color: var(--ink);
  margin: 48px 0 4px;
  letter-spacing: -0.01em;
  scroll-margin-top: 90px;
}
.legal-body h2:first-child { margin-top: 0; }
.legal-body h2 .num {
  color: var(--rose);
  font-size: 13px;
  font-weight: 700;
  display: block;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  text-transform: uppercase;
}
.legal-body p, .legal-body ul {
  font-size: 15.5px;
  line-height: 1.85;
  color: var(--ink-2);
  margin: 14px 0;
}
.legal-body ul { padding-left: 22px; }
.legal-body li { margin-bottom: 6px; }
.legal-updated {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: var(--cream-3);
  border-radius: var(--r-pill);
  font-size: 13px;
  color: var(--ink-2);
  font-weight: 500;
  margin-top: 16px;
}

/* ============ Reveal animation ============ */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ============ Language switch cross-fade ============ */
main, footer.site-footer {
  transition: opacity 0.22s ease, filter 0.22s ease;
}
html.lang-switching main,
html.lang-switching footer.site-footer {
  opacity: 0.15;
  filter: blur(2px);
}
.i18n-cn, .i18n-en {
  animation: lang-fade-in 0.32s ease both;
}
@keyframes lang-fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}
html.lang-switching .i18n-cn, html.lang-switching .i18n-en {
  animation: none;
}
@media (prefers-reduced-motion: reduce) {
  main, footer.site-footer { transition: none; }
  html.lang-switching main, html.lang-switching footer.site-footer { opacity: 1; filter: none; }
  .i18n-cn, .i18n-en { animation: none; }
}

/* ============ Anchors ============ */
section[id] { scroll-margin-top: 84px; }

/* ============================================================
   Hero orchestrated entrance (editorial cover, ~1s)
   Issue-mark → chapter → H1 → subtitle → CTAs
   Watercolor plate lifts in parallel
   ============================================================ */
.hero .issue-mark,
.hero .chapter-mark,
.hero h1,
.hero .hero-sub,
.hero .cta-row {
  opacity: 0;
  animation: stage-rise 760ms var(--ease-out-quart) both;
}
.hero .issue-mark    { animation-delay: 0ms;   animation-duration: 620ms; }
.hero .chapter-mark  { animation-delay: 160ms; animation-duration: 560ms; }
.hero h1             { animation-delay: 280ms; animation-duration: 920ms; }
.hero .hero-sub      { animation-delay: 520ms; }
.hero .cta-row       { animation-delay: 680ms; animation-duration: 620ms; }

@keyframes stage-rise {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}

/* Watercolor plate — lifts with gentle scale, slight counter-rotation settle */
.hero figure.hero-visual {
  opacity: 0;
  animation: plate-lift 1100ms var(--ease-out-quart) 180ms both;
}
.hero figure.hero-visual img {
  animation: plate-settle 1400ms var(--ease-out-quart) 180ms both;
}
.hero figure.hero-visual figcaption {
  opacity: 0;
  animation: stage-rise 600ms var(--ease-out-quart) 1000ms both;
}
@keyframes plate-lift {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: none; }
}
@keyframes plate-settle {
  from { transform: rotate(-3deg) scale(0.96); }
  to   { transform: rotate(-0.8deg) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .hero .issue-mark, .hero .chapter-mark, .hero h1, .hero .hero-sub,
  .hero .cta-row,
  .hero figure.hero-visual, .hero figure.hero-visual img, .hero figure.hero-visual figcaption {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}


/* ============================================================
   CTA arrow slide on hover (delight detail)
   ============================================================ */
.btn .btn-arrow { transition: transform 260ms var(--ease-out-quart); }
.btn-primary:hover .btn-arrow,
.btn-primary:focus-visible .btn-arrow { transform: translateX(4px); }

/* Nav logo gentle hover */
.brand-lockup .logo-mark { transition: transform 280ms var(--ease-out-quart); }
.brand-lockup:hover .logo-mark { transform: rotate(-6deg) scale(1.06); }

/* Live-dot pulse (used by plate-cap .s-dot and .product-meta .live-dot) */
@keyframes live-pulse {
  0%, 60%, 100% { opacity: 1; transform: scale(1); }
  30% { opacity: 0.55; transform: scale(0.78); }
}
@media (prefers-reduced-motion: reduce) {
  .plate-cap .s-dot, .product-meta .live-dot { animation: none; }
  .brand-lockup .logo-mark,
  .btn .btn-arrow { transition: none; }
}

/* ============ Focus states ============ */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--rose);
  outline-offset: 2px;
  border-radius: 4px;
}
