/* ============================================================
   SinoDestiny — visual system
   Deep ink blue + bronze gold · five-element accents
   ============================================================ */
:root {
  --bg: #0b1020;
  --bg-2: #111a33;
  --panel: #141d38;
  --line: #26325c;
  --gold: #c9a227;
  --gold-light: #e6c76a;
  --text: #e9e7de;
  --muted: #98a2bd;
  --wood: #4f9d69;
  --fire: #d24a43;
  --earth: #c98a2d;
  --metal: #d9d9d9;
  --water: #4a7fb5;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, "Courier New", monospace;
  --grid: #1b2748;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Avenir Next", "Helvetica Neue", "PingFang SC", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* technical grid, fading out downward */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 72px 72px;
  opacity: .5;
  -webkit-mask-image: radial-gradient(ellipse 90% 55% at 50% 0%, #000 0%, transparent 72%);
  mask-image: radial-gradient(ellipse 90% 55% at 50% 0%, #000 0%, transparent 72%);
}
.site-header, main, .site-footer { position: relative; z-index: 1; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 680px; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: rgba(11,16,32,.9); position: sticky; top: 0; z-index: 10; backdrop-filter: blur(8px); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand-mark { width: 32px; height: 32px; display: block; flex-shrink: 0; }
.brand-name { font-weight: 600; letter-spacing: .12em; font-size: 15px; text-transform: uppercase; }
nav a { color: var(--muted); text-decoration: none; margin-left: 24px; font-size: 14px; }
nav a:hover { color: var(--gold-light); }

/* Hero */
.hero { padding: 72px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 48px; align-items: center; }
.eyebrow { color: var(--gold); font-size: 12px; letter-spacing: .22em; text-transform: uppercase; margin-bottom: 14px; }
h1 { font-size: clamp(34px, 5vw, 54px); line-height: 1.12; font-weight: 600; }
h1 em { font-style: normal; color: var(--gold-light); }
.lede { color: var(--muted); font-size: 17px; margin: 18px 0 26px; max-width: 46ch; }
.lede-wide { max-width: 78ch; margin: -6px 0 26px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-note { color: var(--muted); font-size: 13px; margin-top: 14px; }
.hero-art svg { width: 100%; max-width: 340px; display: block; margin: 0 auto; }
.wuxing-ring g { animation: spin 60s linear infinite; transform-origin: 160px 160px; }
.scan-ring { transform-origin: 160px 160px; animation: spin 18s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Buttons */
.btn { display: inline-block; padding: 12px 26px; border-radius: 6px; text-decoration: none; font-size: 15px; font-weight: 600; cursor: pointer; border: none; text-align: center; transition: transform .15s ease, box-shadow .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-gold { background: linear-gradient(135deg, var(--gold), #a8841b); color: #0b1020; box-shadow: 0 4px 18px rgba(201,162,39,.25); }
.btn-ghost { background: transparent; color: var(--gold-light); border: 1px solid var(--line); }
.btn-wide { width: 100%; }
.btn-lg { padding: 15px 34px; font-size: 16px; }
.btn-disabled { background: var(--bg-2); color: var(--muted); cursor: default; }
.backlink { display: inline-block; margin-top: 18px; color: var(--muted); font-size: 14px; text-decoration: none; }
.backlink:hover { color: var(--gold-light); }

/* Instrument typography + system strip */
.mono { font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.sys-strip { display: flex; flex-wrap: wrap; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: 42px; }
.sys-item { flex: 1 1 180px; padding: 13px 20px 14px; border-right: 1px solid var(--line); }
.sys-item:last-child { border-right: none; }
.sys-item em { font-style: normal; display: block; font-family: var(--mono); font-size: 9.5px; letter-spacing: .18em; text-transform: uppercase; color: #6d7a99; margin-bottom: 5px; }
.sys-item b { font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: .1em; color: var(--text); text-transform: uppercase; }
.sys-item b i { font-style: normal; color: var(--gold); }

/* Engine pipeline */
.pipeline { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 22px; }
.pipe-card { position: relative; border: 1px solid var(--line); border-radius: 10px; padding: 22px; background: linear-gradient(180deg, #131c36 0%, #101830 100%); }
.pipe-step { font-family: var(--mono); font-size: 10px; letter-spacing: .2em; color: var(--gold); }
.pipe-card h3 { font-size: 16px; margin: 12px 0 8px; }
.pipe-card p { color: var(--muted); font-size: 13.5px; }
.pipe-card::after {
  content: ""; position: absolute; right: -16px; top: 50%; width: 16px; height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
}
.pipeline .pipe-card:last-child::after { display: none; }

/* Terminal */
.terminal { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #0c1326; box-shadow: inset 0 1px 0 rgba(255,255,255,.03); }
.term-bar { display: flex; justify-content: space-between; padding: 9px 16px; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: #6d7a99; background: #0f1730; }
.term-body { padding: 18px; font-family: var(--mono); font-size: 12.5px; line-height: 1.95; color: #c3cde3; white-space: pre-wrap; overflow-x: auto; }
.term-body .ok { color: #6fbf8b; }
.term-body .key { color: var(--gold-light); }
.term-body .dim { color: #566187; }
.term-body .arrow { color: var(--gold); }

/* chart meta line */
.chart-meta { display: flex; flex-wrap: wrap; gap: 20px; font-family: var(--mono); font-size: 10px; letter-spacing: .13em; text-transform: uppercase; color: #6d7a99; margin: 4px 0 18px; }
.chart-meta i { font-style: normal; color: var(--gold); }

/* Sections */
.section { padding: 48px 0; }
.section-title { font-size: 26px; margin-bottom: 28px; font-weight: 600; }
.page-title { font-size: clamp(28px, 4vw, 38px); margin-bottom: 10px; font-weight: 600; }
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step-card, .product-card, .panel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 24px; }
.step-card h3 { font-size: 16px; margin: 10px 0 6px; }
.step-card p { color: var(--muted); font-size: 14px; }
.step-num { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--gold); color: var(--gold-light); font-size: 13px; }

/* Products */
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: stretch; }
.product-card { display: flex; flex-direction: column; position: relative; }
.product-card.featured { border-color: var(--gold); box-shadow: 0 0 30px rgba(201,162,39,.12); }
.product-card .tag { position: absolute; top: -11px; left: 24px; background: var(--gold); color: #0b1020; font-size: 11px; font-weight: 700; padding: 2px 10px; border-radius: 10px; letter-spacing: .06em; }
.product-card h3 { font-size: 17px; }
.price { font-size: 30px; font-weight: 700; color: var(--gold-light); margin: 10px 0 14px; }
.price.free { color: var(--text); }
.price .soon { font-size: 12px; color: var(--muted); font-weight: 400; }
.product-card ul { list-style: none; margin-bottom: 20px; flex: 1; }
.product-card li { padding: 5px 0; color: var(--muted); font-size: 14px; border-bottom: 1px dashed var(--line); }
.product-card li:last-child { border-bottom: none; }
.muted-card { opacity: .65; }

/* Form */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 14px; margin-bottom: 6px; color: var(--text); }
.field label .optional { color: var(--muted); font-size: 12px; }
.field input { width: 100%; padding: 12px 14px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 6px; color: var(--text); font-size: 15px; }
.field input:focus { outline: none; border-color: var(--gold); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.check { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 14px; color: var(--muted); cursor: pointer; }
.check input { width: auto; }
.form-error { color: #e07b7b; font-size: 14px; margin-bottom: 14px; }
#birth-form .btn { margin-top: 6px; }

/* Pillars chart */
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 28px 0; }
.pillar-col { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 18px 12px; text-align: center; }
.pillar-label { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.pillar-gan { font-size: 44px; font-weight: 700; margin: 12px 0 2px; font-family: "Songti SC", "SimSun", serif; }
.pillar-zhi { font-size: 44px; font-weight: 700; margin: 6px 0 2px; font-family: "Songti SC", "SimSun", serif; }
.pillar-sub { font-size: 12px; color: var(--muted); }
.pillar-hidden { font-size: 11px; color: var(--muted); margin-top: 8px; }
.pillar-nayin { font-size: 11px; color: var(--gold); margin-top: 6px; }

/* Preview */
.preview-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 18px; margin-bottom: 18px; }
.panel h3 { font-size: 15px; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); margin-bottom: 16px; }
.panel p { color: var(--muted); font-size: 15px; }
.daymaster { display: flex; align-items: center; gap: 16px; }
.dm-char { width: 84px; height: 84px; border-radius: 12px; display: grid; place-items: center; font-size: 44px; font-weight: 700; font-family: "Songti SC", "SimSun", serif; flex-shrink: 0; }
.dm-info strong { font-size: 18px; display: block; }
.dm-info span { color: var(--muted); font-size: 14px; }
.el-row { display: grid; grid-template-columns: 92px 1fr 40px; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 13px; }
.el-name { color: var(--text); }
.el-name .cn { margin-right: 6px; font-family: "Songti SC", "SimSun", serif; }
.el-bar { height: 10px; border-radius: 5px; background: var(--bg-2); overflow: hidden; }
.el-bar i { display: block; height: 100%; border-radius: 5px; }
.el-pct { color: var(--muted); text-align: right; font-family: var(--mono); font-size: 11.5px; }

/* Locked */
.locked-wrap { position: relative; margin: 34px 0; border-radius: 12px; overflow: hidden; }
.locked { padding: 30px 26px; filter: blur(5px); opacity: .35; pointer-events: none; user-select: none; }
.locked-row { height: 14px; background: var(--line); border-radius: 7px; margin-bottom: 14px; }
.locked-row.short { width: 62%; }
.locked-cta { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 24px; background: linear-gradient(180deg, rgba(11,16,32,.55), rgba(11,16,32,.85)); }
.locked-cta h2 { font-size: 24px; margin-bottom: 10px; }
.locked-cta p { color: var(--muted); max-width: 52ch; margin-bottom: 20px; font-size: 15px; }
.fineprint { color: var(--muted); font-size: 12px; margin: 20px 0 40px; }

/* Checkout */
.order-line { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.order-line.total { font-weight: 700; font-size: 17px; border-bottom: none; }
.demo-note { background: rgba(201,162,39,.08); border: 1px solid var(--gold); border-radius: 8px; padding: 14px 16px; font-size: 13px; color: var(--gold-light); margin: 16px 0; }

/* Report */
.report-doc { background: #f7f4ec; color: #23283a; border-radius: 12px; padding: 48px 44px; margin: 34px auto; }
.view:not(#view-home) { padding-top: 40px; }
.report-head { border-bottom: 2px solid var(--gold); padding-bottom: 22px; margin-bottom: 28px; }
.report-logo { width: 268px; height: auto; display: block; margin-bottom: 22px; }
.report-head .eyebrow { color: #a8841b; }
.report-head h1 { color: #1a2033; font-size: 32px; }
.report-meta { color: #6a7186; font-size: 14px; margin-top: 8px; }
.report-sec { margin-bottom: 26px; }
.report-sec h2 { font-size: 19px; color: #1a2033; margin-bottom: 8px; padding-left: 12px; border-left: 3px solid var(--gold); }
.report-sec p { font-size: 15px; color: #3c4257; }
.report-foot { border-top: 1px solid #d8d2c0; padding-top: 16px; margin-top: 30px; }
.report-foot p { font-size: 12px; color: #8a8f9f; }
.report-actions { display: flex; gap: 16px; align-items: center; margin-bottom: 50px; }

/* Methodology */
.panel ul { margin: 14px 0 14px 20px; }
.panel li { color: var(--muted); font-size: 15px; margin-bottom: 8px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 40px; margin-top: 20px; }
.site-footer .fineprint { margin: 6px 0 0; }

@media (max-width: 800px) {
  .hero-grid, .preview-grid, .steps-grid, .product-grid { grid-template-columns: 1fr; }
  .pillars { grid-template-columns: repeat(2, 1fr); }
  .field-row { grid-template-columns: 1fr; }
  .report-doc { padding: 28px 22px; }
}

@media print {
  body { background: #fff; }
  body::before { display: none; }
  .site-header, .site-footer, .report-actions, .locked-wrap,
  .preview-grid, .pillars, .chart-meta, .sys-strip, .pipeline, .terminal { display: none !important; }
  .view:not(#view-report) { display: none !important; }
  #view-report { display: block !important; }
  .report-doc { border-radius: 0; margin: 0; padding: 16px 0; background: #fff; }
  .report-sec { break-inside: avoid; }
}
