/* =============================================================
   Meridian Cold Wallet — bespoke layer (cold.css)
   Loaded AFTER styles.css. Additive, override-only refinements
   on the shared "future city" system + cold-wallet specifics
   (two-product grid, card-face visual, comparison table).
   ============================================================= */

:root {
  --read: #dee5f2;        /* high-contrast ink for long-form prose */
  --measure: 66ch;        /* comfortable line length */
}

/* ===================== typography · measure · rhythm · focus ===================== */
.section-copy { color: var(--muted); max-width: 62ch; line-height: 1.8; }
body.zh .section-copy { line-height: 1.95; letter-spacing: 0.01em; }

.warm-prose { max-width: var(--measure); }
.warm-prose p { color: var(--read); font-size: 1.07rem; line-height: 1.86; margin: 0 0 1.05em; }
body.zh .warm-prose p { font-size: 1.05rem; line-height: 2.0; letter-spacing: 0.01em; }

.hero-copy { line-height: 1.72; }
body.zh .hero-copy { line-height: 1.95; }
.hero-soft-line { color: var(--muted); font-size: 1.04rem; line-height: 1.8; max-width: 50ch; }
body.zh .hero-soft-line { line-height: 1.95; }

h1, h2, h3, .hero-title { text-wrap: balance; }
p, li, .pdesc { text-wrap: pretty; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

.section-heading { margin-bottom: clamp(26px, 3.4vw, 44px); }
.definition-grid, .assurance-grid, .pricing-grid { margin-top: clamp(10px, 2vw, 22px); }
.closing-cta p { color: var(--read); line-height: 1.85; max-width: 60ch; }
body.zh .closing-cta p { line-height: 2.0; }

a:focus-visible, .button:focus-visible, button:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--gold-bright); outline-offset: 3px; border-radius: 6px;
}

/* ===================== card craft + motion ===================== */
.definition-card, .assurance-item, .pricing-card, .boundary-panel {
  transition: transform 0.32s cubic-bezier(0.16,0.84,0.32,1), border-color 0.32s ease, box-shadow 0.32s ease, background 0.32s ease;
}
.definition-card:hover, .assurance-item:hover, .pricing-card:hover {
  transform: translateY(-4px); border-color: var(--line-gold); box-shadow: var(--shadow-soft);
}
.next-step a, .warm-prose a {
  text-decoration: none;
  background-image: linear-gradient(var(--gold-bright), var(--gold-bright));
  background-size: 0% 1px; background-position: 0 100%; background-repeat: no-repeat;
  transition: background-size 0.3s cubic-bezier(0.22,0.61,0.36,1), color 0.2s ease;
}
.next-step a:hover, .next-step a:focus-visible,
.warm-prose a:hover, .warm-prose a:focus-visible { background-size: 100% 1px; color: var(--gold-bright); }
.button:active { transform: translateY(0); transition-duration: 0.06s; }

@media (prefers-reduced-motion: no-preference) {
  .hero-title { background-size: 100% 220%; animation: cwDawn 16s ease-in-out infinite alternate; }
  @keyframes cwDawn { from { background-position: 50% 4%; } to { background-position: 50% 40%; } }
}
@media (prefers-reduced-motion: reduce) {
  .hero-title { animation: none; }
  .definition-card:hover, .assurance-item:hover, .pricing-card:hover { transform: none; }
}

/* ===================== Cold-wallet specifics ===================== */

/* Two products sit side-by-side on desktop, stack on mobile */
@media (min-width: 761px) { #products .pricing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Product "card-face" visual — a quiet device mock that lives in the product cards */
.cw-face {
  position: relative; border-radius: 16px; overflow: hidden; min-height: 188px;
  border: 1px solid var(--line-gold); background: linear-gradient(160deg, #0b1426, #070d1a);
  display: flex; flex-direction: column; justify-content: space-between; padding: 20px; margin-top: 18px;
}
.cw-face .cw-chip { width: 40px; height: 30px; border-radius: 6px; background: linear-gradient(135deg, #caa64a, #f3e3a6); opacity: 0.92; }
.cw-face .cw-name { font-family: "Cormorant Garamond", Georgia, serif; font-size: 1.5rem; color: #f3e7c4; line-height: 1.1; }
.cw-face .cw-sub { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.cw-face .cw-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
/* the color e-ink flagship hints at six-colour pigment without shouting */
.cw-face.cw-color { background: linear-gradient(150deg, #13294a 0%, #2f2a44 40%, #5a3320 72%, #15233a 100%); }
.cw-face.cw-mono { background: linear-gradient(160deg, #0c1426, #0a1120); }
.cw-face .cw-qr {
  width: 50px; height: 50px; border-radius: 8px; opacity: 0.20;
  background:
    repeating-linear-gradient(0deg, #e8eef7 0 3px, transparent 3px 6px),
    repeating-linear-gradient(90deg, #e8eef7 0 3px, transparent 3px 6px);
}
.cw-face .cw-strip { display: flex; gap: 6px; }
.cw-face .cw-strip i { width: 16px; height: 6px; border-radius: 3px; display: inline-block; }
.cw-color .cw-strip i:nth-child(1){background:#e3563f;} .cw-color .cw-strip i:nth-child(2){background:#e8b54a;}
.cw-color .cw-strip i:nth-child(3){background:#3f8f6a;} .cw-color .cw-strip i:nth-child(4){background:#3f6fae;}
.cw-mono .cw-strip i { background: rgba(220,229,242,0.55); }

/* Comparison table — matches the dark/gold system */
.compare-wrap { overflow-x: auto; margin-top: clamp(14px, 2.4vw, 26px); -webkit-overflow-scrolling: touch; }
.compare-table { width: 100%; border-collapse: collapse; font-size: 0.96rem; min-width: 540px; }
.compare-table th, .compare-table td { text-align: left; padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,0.09); vertical-align: top; }
.compare-table thead th { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-bright); border-bottom: 1px solid var(--line-gold); }
.compare-table tbody th { color: var(--muted); font-weight: 500; width: 26%; }
.compare-table td { color: var(--read); }
.compare-table .col-flag { color: #f3e7c4; }
body.zh .compare-table { line-height: 1.9; }
@media (max-width: 520px) { .compare-table { font-size: 0.9rem; } .compare-table th, .compare-table td { padding: 11px 12px; } }

/* ===================== a11y · responsive ===================== */
@media (forced-colors: active) {
  .button, .definition-card, .pricing-card, .assurance-item, .cw-face { border-color: CanvasText; }
  a:focus-visible, .button:focus-visible, button:focus-visible { outline-color: Highlight; }
}
.brand-logo, .packet-logo { image-rendering: -webkit-optimize-contrast; }

/* ===================== 中文阅读体验 (CJK) ===================== */
body.zh .hero-copy { font-size: clamp(1.1rem, 1.6vw, 1.34rem); line-height: 2.0; letter-spacing: 0.02em; max-width: 30em; }
body.zh .hero-soft-line { font-size: 1.08rem; line-height: 2.0; letter-spacing: 0.02em; max-width: 32em; }
body.zh .notice { line-height: 1.9; }
body.zh .section-copy { max-width: 40rem; line-height: 2.0; letter-spacing: 0.02em; }
body.zh .warm-prose { max-width: 40rem; }
body.zh .warm-prose p { font-size: 1.1rem; line-height: 2.05; letter-spacing: 0.02em; margin: 0 0 1.25em; }
body.zh .closing-cta p { font-size: 1.12rem; line-height: 2.05; letter-spacing: 0.02em; max-width: 38rem; }
body.zh .definition-card p, body.zh .assurance-item p, body.zh .pricing-card .pdesc { line-height: 1.95; letter-spacing: 0.015em; }
body.zh .section-heading h2 { line-height: 1.42; }

/* ===================== mobile polish ===================== */
@media (max-width: 600px) {
  .section-band { padding: clamp(46px, 12vw, 74px) 0; }
  .hero { padding-top: clamp(82px, 22vw, 120px); padding-bottom: clamp(52px, 14vw, 92px); }
}
@media (max-width: 520px) {
  body:not(.zh) .hero-title, body.zh .hero-title { font-size: clamp(2.6rem, 13vw, 4rem); line-height: 1.05; }
  .hero-actions { gap: 10px; }
  .hero-actions .button { width: 100%; justify-content: center; }
}
.menu-button { min-width: 44px; min-height: 44px; }

/* ===================== device illustrations (inline SVG) ===================== */
.cw-device { display: block; width: 100%; max-width: 340px; height: auto; margin: 20px auto 0; border-radius: 14px; filter: drop-shadow(0 16px 38px rgba(0,0,0,0.45)); }

/* ===================== concept-stage spec note ===================== */
.spec-note {
  display: block; margin: 16px 0 0; padding: 11px 16px;
  border-left: 2px solid var(--line-gold); background: rgba(227,189,99,0.06);
  color: var(--muted); font-size: 0.84rem; line-height: 1.7; letter-spacing: 0.01em;
  border-radius: 0 8px 8px 0; max-width: 64ch;
}
body.zh .spec-note { font-size: 0.86rem; line-height: 1.9; max-width: 42rem; }
.compare-caption { margin-top: 12px; color: var(--muted); font-size: 0.82rem; line-height: 1.7; }
body.zh .compare-caption { font-size: 0.84rem; line-height: 1.85; }

/* ===================== register-interest note ===================== */
.cta-note { margin-top: 14px; color: var(--muted); font-size: 0.86rem; line-height: 1.7; max-width: 56ch; }
body.zh .cta-note { line-height: 1.9; max-width: 38rem; }

/* ===================== v3 · visual craft ===================== */
/* device illustrations: shape-accurate depth + a gentle lift on hover */
.cw-device { transition: transform 0.45s cubic-bezier(0.16,0.84,0.32,1), filter 0.45s ease; }
.pricing-card:hover .cw-device { transform: scale(1.015); filter: drop-shadow(0 24px 54px rgba(0,0,0,0.62)); }

/* flagship card: a quiet gold edge + glow so the eye lands on M Folio */
.pricing-card.anchor { border-color: rgba(227,189,99,0.42); box-shadow: 0 0 0 1px rgba(227,189,99,0.10), 0 22px 56px rgba(0,0,0,0.42); }
.pricing-card.anchor .ptag { color: var(--gold-bright); }

.ptag { letter-spacing: 0.08em; }

@media (prefers-reduced-motion: reduce) { .pricing-card:hover .cw-device { transform: none; } }

