/* 知行录 site. Colors follow the app's default 「晨曦」 theme (zhixinglu-ios: Core/NativeTheme.swift). */
:root {
  color-scheme: light dark;
  --bg: #faf7f2;
  --bg-2: #f1e8db;
  --surface: #fffdfc;
  --surface-2: #f5eee5;
  --border: #e8ddd0;
  --text: #2f241f;
  --muted: #7c685b;
  --accent: #be6b43;
  --accent-ink: #a95a35;
  --accent-soft: #f1d5c6;
  --success: #6a8e74;
  --ink: #2f241f;
  --on-ink: #f4ebe0;
  --shadow: 0 1px 2px rgb(47 36 31 / 6%), 0 12px 32px -12px rgb(47 36 31 / 18%);
  --phone-shadow: 0 2px 6px rgb(47 36 31 / 10%), 0 30px 60px -24px rgb(47 36 31 / 38%);
  --header-bg: rgb(250 247 242 / 72%);
  --hero-image: image-set(url("/img/hero-morning-900.webp") 1x, url("/img/hero-morning.webp") 2x);
  --hero-veil: linear-gradient(180deg, rgb(250 247 242 / 55%) 0%, rgb(250 247 242 / 82%) 46%, var(--bg) 100%);
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --serif: ui-serif, "Songti SC", "Noto Serif SC", "Source Han Serif SC", "STSong", Georgia, "Times New Roman", serif;
  --radius: 20px;
  --container: 1120px;
  --gutter: clamp(20px, 5vw, 40px);
  --header-h: 60px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1714;
    --bg-2: #26201a;
    --surface: #2e2720;
    --surface-2: #3a3129;
    --border: #4d4137;
    --text: #f4ebe0;
    --muted: #a89485;
    --accent: #d4845c;
    --accent-ink: #e39a74;
    --accent-soft: #4a3024;
    --success: #7da887;
    --ink: #f4ebe0;
    --on-ink: #1c1714;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 12px 32px -12px rgb(0 0 0 / 60%);
    --phone-shadow: 0 2px 6px rgb(0 0 0 / 40%), 0 30px 60px -24px rgb(0 0 0 / 80%);
    --header-bg: rgb(28 23 20 / 72%);
    --hero-image: image-set(url("/img/hero-evening-900.webp") 1x, url("/img/hero-evening.webp") 2x);
    --hero-veil: linear-gradient(180deg, rgb(28 23 20 / 45%) 0%, rgb(28 23 20 / 80%) 46%, var(--bg) 100%);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1.0625rem/1.75 var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--accent-ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right));
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 12px;
  z-index: 100;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--on-ink);
  font-size: 0.875rem;
  text-decoration: none;
}

.skip-link:focus {
  top: 10px;
}

/* Header: a translucent layer that content scrolls under. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding-top: env(safe-area-inset-top);
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--border) 70%, transparent);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-family: var(--serif);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.brand img {
  border-radius: 7px;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--border) 80%, transparent);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 3vw, 28px);
  font-size: 0.9375rem;
}

.nav-link {
  color: var(--muted);
  text-decoration: none;
  transition: color 150ms ease;
}

.nav-link:hover {
  color: var(--text);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 150ms ease, transform 100ms ease-out;
}

.lang-switch:hover {
  background: var(--surface-2);
}

.lang-switch:active,
.store-badge:active {
  transform: scale(0.97);
}

@media (max-width: 640px) {
  .nav-link {
    display: none;
  }
}

/* Shared text pieces */
.eyebrow {
  margin-bottom: 14px;
  color: var(--accent-ink);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
}

html[lang="en"] .eyebrow {
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.8125rem;
}

.section-head {
  max-width: 640px;
  margin: 0 auto clamp(40px, 6vw, 64px);
  text-align: center;
}

.section-head h2,
.cta h2 {
  font-family: var(--serif);
  font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.625rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.section-lead {
  margin-top: 16px;
  color: var(--muted);
  font-size: 1.0625rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 24px;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--on-ink);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform 100ms ease-out, opacity 150ms ease;
}

a.store-badge:hover {
  opacity: 0.9;
}

.store-badge.is-soon {
  background: var(--surface);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--border);
}

.store-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.text-link {
  color: var(--text);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}

.text-link:hover {
  color: var(--accent-ink);
}

/* Phone frame around raw app screenshots */
.phone {
  margin: 0;
  padding: 2.2%;
  border-radius: 15% / 7%;
  background: #1d1916;
  box-shadow: var(--phone-shadow), inset 0 0 0 1px rgb(255 255 255 / 8%);
}

.phone img {
  width: 100%;
  border-radius: 13% / 6%;
  background: var(--surface-2);
}

/* Hero */
.hero {
  position: relative;
  overflow: clip;
  padding: clamp(40px, 8vw, 96px) 0 clamp(56px, 8vw, 104px);
  background: var(--hero-veil), var(--hero-image) center top / cover no-repeat;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: clamp(32px, 6vw, 80px);
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.25rem, 1.2rem + 4.2vw, 4rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

/* H1 = 品牌品类小标签 + 口号；小标签沿用 eyebrow 的视觉 */
.hero h1 .hero-eyebrow {
  display: block;
  font-family: var(--sans, inherit);
  line-height: 1.5;
}

.hero h1 .slogan {
  display: block;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

html[lang="en"] .hero h1 {
  line-height: 1.08;
}

.hero-lead {
  max-width: 34em;
  margin: 24px 0 36px;
  color: var(--muted);
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
}

.hero-meta {
  margin-top: 28px;
  color: var(--muted);
  font-size: 0.875rem;
  white-space: pre-wrap;
}

.hero-phone {
  justify-self: center;
  width: min(320px, 72vw);
  rotate: 3deg;
}

@media (max-width: 860px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-lead {
    margin-inline: auto;
  }

  .hero .actions {
    justify-content: center;
  }

  .hero-phone {
    width: min(280px, 70vw);
    rotate: 0deg;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-text > *,
  .hero-phone {
    animation: rise 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .hero-text > :nth-child(2) {
    animation-delay: 60ms;
  }

  .hero-text > :nth-child(3) {
    animation-delay: 120ms;
  }

  .hero-text > :nth-child(n + 4) {
    animation-delay: 180ms;
  }

  .hero-phone {
    animation-delay: 160ms;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    translate: 0 16px;
  }
}

/* Quote */
.quote {
  padding: clamp(56px, 8vw, 96px) 0;
  border-block: 1px solid var(--border);
  background: var(--surface);
}

.quote-inner {
  display: grid;
  justify-items: center;
  max-width: calc(760px + var(--gutter) * 2);
  text-align: center;
}

.quote-mark {
  width: 56px;
  height: 56px;
  margin-bottom: 24px;
  border-radius: 14px;
  box-shadow: 0 0 0 1px var(--border);
}

.quote figure {
  margin: 0;
}

.quote blockquote {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.25rem);
  line-height: 1.4;
  letter-spacing: 0.04em;
}

html[lang="en"] .quote blockquote {
  letter-spacing: -0.005em;
}

.quote figcaption {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.9375rem;
}

.quote-note {
  max-width: 36em;
  margin-top: 28px;
  color: var(--muted);
}

/* Sections */
.section {
  padding: clamp(72px, 10vw, 128px) 0;
}

.section-tint {
  background: var(--bg-2);
}

.moment-list {
  display: grid;
  gap: clamp(64px, 9vw, 112px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.moment {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 6vw, 96px);
}

.moment:nth-child(even) .moment-text {
  order: 2;
}

.moment-text {
  max-width: 30em;
  justify-self: end;
}

.moment:nth-child(even) .moment-text {
  justify-self: start;
}

.moment-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--accent-ink);
  font-size: 0.9375rem;
  font-weight: 600;
}

.moment-kicker span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent-soft);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}

.moment h3 {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.moment-text p:last-child {
  margin-top: 14px;
  color: var(--muted);
}

.moment-phone {
  justify-self: start;
  width: min(290px, 70vw);
}

.moment:nth-child(even) .moment-phone {
  justify-self: end;
}

@media (max-width: 760px) {
  .moment {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .moment:nth-child(even) .moment-text {
    order: 0;
  }

  .moment-text,
  .moment:nth-child(even) .moment-text,
  .moment-phone,
  .moment:nth-child(even) .moment-phone {
    justify-self: center;
  }

  .moment-kicker {
    justify-content: center;
  }

  .moment-phone {
    width: min(250px, 66vw);
  }
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 980px) {
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .card-grid-3 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .card-grid {
    grid-template-columns: 1fr;
  }
}

.card,
.glass-card {
  padding: 28px 24px;
  border-radius: var(--radius);
}

.card {
  background: var(--surface);
  box-shadow: var(--shadow), inset 0 0 0 1px color-mix(in srgb, var(--border) 60%, transparent);
}

.card h3,
.glass-card h3 {
  margin-top: 18px;
  font-size: 1.125rem;
  line-height: 1.4;
}

.card p,
.glass-card p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.9688rem;
  line-height: 1.7;
}

.icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Privacy band: an ink panel with translucent cards over the evening artwork. */
.privacy-band {
  --text: #f4ebe0;
  --muted: #c9b8aa;
  --accent-ink: #e8a37f;
  position: relative;
  isolation: isolate;
  color: var(--text);
  background: #221c18;
}

.privacy-band::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgb(34 28 24 / 30%), rgb(34 28 24 / 92%) 70%),
    image-set(url("/img/hero-evening-900.webp") 1x, url("/img/hero-evening.webp") 2x) center / cover no-repeat;
  opacity: 0.9;
}

.glass-card {
  background: rgb(255 255 255 / 8%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 14%), inset 0 0 0 1px rgb(255 255 255 / 8%);
}

.glass-card .icon {
  background: rgb(232 163 127 / 18%);
}

.band-link {
  margin-top: 40px;
  text-align: center;
}

.band-link a {
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
}

.band-link a:hover {
  color: var(--accent-ink);
}

@media (prefers-reduced-transparency: reduce) {
  .site-header {
    background: var(--bg);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .glass-card {
    background: #3a3129;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

.fine-print {
  max-width: 44em;
  margin: 32px auto 0;
  color: var(--muted);
  font-size: 0.875rem;
  text-align: center;
}

/* FAQ */
.faq-list {
  max-width: 760px;
  margin-inline: auto;
  border-top: 1px solid var(--border);
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 16px 4px;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  border-right: 1.6px solid var(--muted);
  border-bottom: 1.6px solid var(--muted);
  rotate: 45deg;
  translate: 0 -3px;
  transition: rotate 200ms ease, translate 200ms ease;
}

.faq-item[open] summary::after {
  rotate: 225deg;
  translate: 0 3px;
}

.faq-item p {
  padding: 0 4px 22px;
  color: var(--muted);
}

/* Closing call to action */
.cta {
  padding: clamp(72px, 10vw, 128px) 0;
  text-align: center;
}

.cta .container {
  display: grid;
  justify-items: center;
}

.cta .actions {
  justify-content: center;
  margin-top: 32px;
}

/* Footer */
.site-footer {
  padding: 48px 0 calc(40px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.875rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px 32px;
  align-items: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-brand img {
  border-radius: 10px;
  box-shadow: 0 0 0 1px var(--border);
}

.footer-brand strong {
  font-family: var(--serif);
  font-size: 1rem;
}

.footer-brand p,
.footer-legal {
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.footer-links a {
  color: var(--text);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--accent-ink);
}

.footer-legal {
  grid-column: 1 / -1;
  font-size: 0.8125rem;
}

@media (max-width: 640px) {
  .footer-inner {
    grid-template-columns: 1fr;
  }
}

/* Legal documents (body comes from the in-app pages) */
.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(32px, 6vw, 64px) 0 clamp(64px, 9vw, 112px);
  overflow-wrap: anywhere;
}

.legal-back {
  display: inline-block;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 0.9375rem;
  text-decoration: none;
}

.legal-back:hover {
  color: var(--text);
}

.legal h1 {
  font-family: var(--serif);
  font-size: clamp(1.875rem, 1.4rem + 2vw, 2.625rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.legal h2 {
  margin: 48px 0 12px;
  padding-top: 8px;
  font-size: 1.3125rem;
  line-height: 1.45;
}

.legal h3 {
  margin: 28px 0 8px;
  font-size: 1.0625rem;
}

.legal p,
.legal ul,
.legal table,
.legal .box {
  margin: 0 0 14px;
}

.legal ul {
  padding-left: 1.4em;
}

.legal li {
  margin-bottom: 6px;
}

.legal li::marker {
  color: var(--accent);
}

.legal .meta {
  margin: 14px 0 32px;
  color: var(--muted);
  font-size: 0.875rem;
}

.legal .box {
  padding: 16px 20px;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--border);
}

.legal .box p:last-child {
  margin-bottom: 0;
}

.legal table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.legal th,
.legal td {
  padding: 10px 12px;
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
  overflow-wrap: normal;
}

.legal th {
  background: var(--surface-2);
  font-weight: 600;
  white-space: nowrap;
}

.legal-other {
  margin-top: 56px !important;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.legal-other a {
  font-weight: 500;
  text-decoration: none;
}

.legal blockquote {
  margin: 18px 0 28px;
  padding: 14px 18px;
  border-left: 3px solid var(--accent);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--border);
}

.legal blockquote p {
  margin: 0;
  color: var(--muted);
}

.legal pre {
  margin: 0 0 14px;
  padding: 16px 20px;
  overflow-x: auto;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--border);
  font: 0.9375rem/1.7 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  white-space: pre;
}

.legal ol {
  margin: 0 0 14px;
  padding-left: 1.4em;
}

.legal ol li {
  margin-bottom: 6px;
}

.legal ol li::marker {
  color: var(--accent);
}

.guide-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.moment h3 a {
  color: inherit;
}

.faq-more {
  max-width: 760px;
  margin: 8px auto 0;
}

/* 404 */
.not-found-main {
  display: grid;
  justify-items: center;
  gap: 12px;
  min-height: 60vh;
  min-height: 60svh;
  align-content: center;
  padding-block: 64px;
  text-align: center;
}

.not-found-main h1 {
  font-family: var(--serif);
  font-size: 2rem;
}

.not-found-main p {
  color: var(--muted);
}

.not-found-main .actions {
  justify-content: center;
  margin-top: 20px;
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}

@media (prefers-contrast: more) {
  :root {
    --muted: color-mix(in srgb, var(--text) 82%, var(--bg));
    --border: color-mix(in srgb, var(--text) 40%, var(--bg));
  }
}
