/* ===========================================================================
   PILLARS — bazi-transformation.com
   Dark, minimal, typographic, quietly luxurious (Co-Star-adjacent).
   NOT lanterns-and-dragons chinoiserie.
   Element palette: wood-green · fire-vermilion · earth-ochre · metal-white-gold
   · water-deep-blue, glowing softly on charcoal/ink.
   =========================================================================== */

:root {
  color-scheme: dark;

  --bg: #0e0e12;
  --bg-raise: #14141a;
  --card: #16161d;
  --line: #2a2a34;
  --line-soft: #20202a;

  --ink: #eceae3;
  --muted: #a9a59b;
  --faint: #7d7a72;

  --gold: #d6c49a;
  --gold-bright: #e8d9b4;
  --gold-dim: #9c8f6b;

  --wood: #8fbe79;
  --fire: #e2604a;
  --earth: #cf9d4c;
  --metal: #e6d8b8;
  --water: #7badd1;

  --serif: "Cormorant Garamond", "Palatino", "Georgia", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  /* Brush-leaning CJK stack; falls back gracefully where no Kai face exists */
  --cjk: "Kaiti SC", "STKaiti", "KaiTi", "BiauKai", "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap { max-width: 700px; margin: 0 auto; padding: 0 22px; }

::selection { background: rgba(214, 196, 154, .25); }

/* ---------- a11y helpers ---------- */
.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--gold); color: #14130d; padding: 10px 16px; z-index: 99;
  font-weight: 600; text-decoration: none;
}
.skip:focus { left: 12px; top: 12px; }

a { color: var(--gold); text-underline-offset: 3px; }
a:hover { color: var(--gold-bright); }

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

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(14, 14, 18, .86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.topbar .wrap {
  max-width: 980px;
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 13px; padding-bottom: 13px;
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand-txt { line-height: 1.25; }
.brand-txt b {
  font-family: var(--serif);
  font-size: 1.18rem; font-weight: 600;
  letter-spacing: .34em; color: var(--ink);
}
.brand-txt span {
  display: block; font-size: .68rem; color: var(--muted);
  letter-spacing: .08em;
}
.nav-cta {
  font-size: .85rem; font-weight: 600; text-decoration: none;
  color: var(--gold); border: 1px solid var(--gold-dim);
  padding: 8px 14px; border-radius: 999px; white-space: nowrap;
}
.nav-cta:hover { border-color: var(--gold); color: var(--gold-bright); }

/* ---------- shared section chrome ---------- */
section { padding: 64px 0; border-bottom: 1px solid var(--line-soft); }
section:last-of-type { border-bottom: none; }

.eyebrow {
  font-size: .72rem; font-weight: 600; letter-spacing: .3em;
  text-transform: uppercase; color: var(--gold-dim); margin-bottom: 14px;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 600; color: var(--ink); }
h2 { font-size: clamp(1.55rem, 4.6vw, 2.15rem); line-height: 1.25; margin-bottom: 20px; letter-spacing: .01em; }
h3 { font-size: 1.15rem; margin-bottom: 8px; }
p + p { margin-top: 16px; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
em { font-style: italic; }
strong { color: var(--ink); }

.cjk { font-family: var(--cjk); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding: 72px 0 76px;
  background:
    radial-gradient(ellipse 60% 38% at 72% 6%, rgba(62, 84, 122, .20), transparent 70%),
    radial-gradient(ellipse 50% 30% at 18% 88%, rgba(214, 196, 154, .05), transparent 70%),
    var(--bg);
  overflow: hidden;
}
.hero h1 {
  font-size: clamp(1.95rem, 6.4vw, 3.05rem);
  line-height: 1.18; letter-spacing: .005em;
  margin-bottom: 30px;
}
.hero h1 .alt { color: var(--gold); }
.hero .lede { margin-top: 26px; }
.hero .promise { margin-top: 22px; font-weight: 600; color: var(--ink); }
.hero .cta-row { margin-top: 28px; }

/* ---------- the four-pillars chart (code-rendered) ---------- */
.chart {
  display: flex; justify-content: center; gap: clamp(14px, 4vw, 30px);
  margin: 38px auto 10px;
}
.pillar { text-align: center; animation: pillar-rise .9s ease both; }
.pillar:nth-child(2) { animation-delay: .12s; }
.pillar:nth-child(3) { animation-delay: .24s; }
.pillar:nth-child(4) { animation-delay: .36s; }
@keyframes pillar-rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
.pillar .plabel {
  font-size: .62rem; letter-spacing: .26em; color: var(--faint);
  text-transform: uppercase; margin-bottom: 12px;
}
.pillar .plabel .zh { display: block; font-size: .7rem; letter-spacing: .4em; margin-top: 3px; color: var(--faint); }
.glyph {
  display: block;
  font-family: var(--cjk);
  font-size: clamp(2.6rem, 9.5vw, 3.9rem);
  line-height: 1.32;
}
/* element colorways — soft glow, no neon */
.el-wood  { color: var(--wood);  text-shadow: 0 0 26px rgba(143, 190, 121, .38); }
.el-fire  { color: var(--fire);  text-shadow: 0 0 26px rgba(226, 96, 74, .38); }
.el-earth { color: var(--earth); text-shadow: 0 0 26px rgba(207, 157, 76, .38); }
.el-metal { color: var(--metal); text-shadow: 0 0 26px rgba(230, 216, 184, .34); }
.el-water { color: var(--water); text-shadow: 0 0 26px rgba(123, 173, 209, .38); }

.chart-caption {
  text-align: center; font-size: .8rem; color: var(--faint);
  letter-spacing: .04em; margin-bottom: 6px;
}

/* ---------- day-master diagram (section 2) ---------- */
.dm-diagram {
  display: flex; justify-content: center; gap: clamp(10px, 3vw, 22px);
  margin: 34px 0 52px;
}
.dm-pillar { text-align: center; position: relative; }
.dm-pillar .plabel {
  font-size: .58rem; letter-spacing: .22em; color: var(--faint);
  text-transform: uppercase; margin-bottom: 9px;
}
.slot {
  width: clamp(54px, 13vw, 66px); height: clamp(54px, 13vw, 66px);
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 10px;
  font-family: var(--cjk); font-size: clamp(1.7rem, 5.4vw, 2.1rem);
  margin: 0 auto 8px;
  background: var(--bg-raise);
}
.slot.is-dm {
  border: 1px solid var(--gold);
  box-shadow: 0 0 0 3px rgba(214, 196, 154, .14), 0 0 30px rgba(214, 196, 154, .12);
}
.dm-tag {
  /* out of flow so the tag doesn't widen the DAY column */
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  margin-top: 4px; white-space: nowrap;
  font-size: .68rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold); border: 1px solid var(--gold-dim);
  border-radius: 999px; padding: 4px 11px;
}
.dm-caption { text-align: center; font-size: .8rem; color: var(--faint); }

/* ---------- ten day masters chips ---------- */
.dm-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 10px; margin: 22px 0; list-style: none;
}
@media (min-width: 560px) { .dm-grid { grid-template-columns: repeat(5, 1fr); } }
.dm-chip {
  border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 8px; text-align: center; background: var(--bg-raise);
  font-size: .8rem; color: var(--muted); line-height: 1.45;
}
.dm-chip .zi { display: block; font-family: var(--cjk); font-size: 1.55rem; line-height: 1.3; }
.dm-chip.w  .zi { color: var(--wood); }
.dm-chip.f  .zi { color: var(--fire); }
.dm-chip.e  .zi { color: var(--earth); }
.dm-chip.m  .zi { color: var(--metal); }
.dm-chip.wa .zi { color: var(--water); }

/* ---------- mini reading cards ---------- */
.includes { display: grid; gap: 14px; margin-top: 26px; counter-reset: inc; }
.inc-card {
  border: 1px solid var(--line); border-radius: 14px;
  background: var(--card); padding: 22px 22px 20px;
  position: relative;
}
.inc-card .num {
  font-family: var(--serif); font-size: .95rem; color: var(--gold);
  letter-spacing: .12em; display: block; margin-bottom: 6px;
}
.inc-card p { color: var(--muted); }
.inc-card strong { color: var(--ink); }

/* sample element-balance bars */
.bars { margin-top: 16px; display: grid; gap: 7px; }
.bar-row { display: grid; grid-template-columns: 86px 1fr 18px; align-items: center; gap: 10px; font-size: .78rem; color: var(--muted); }
.bar-row .lab { letter-spacing: .06em; }
.bar-row .lab .cjk { margin-right: 5px; }
.track { background: var(--line-soft); border-radius: 99px; height: 7px; overflow: hidden; }
.fill { height: 100%; border-radius: 99px; }
.fill.w  { background: var(--wood); }
.fill.f  { background: var(--fire); }
.fill.e  { background: var(--earth); }
.fill.m  { background: var(--metal); }
.fill.wa { background: var(--water); }
.bars-cap { font-size: .72rem; color: var(--faint); margin-top: 9px; letter-spacing: .05em; }

.delivery { margin-top: 24px; font-weight: 600; }

/* ---------- membership ---------- */
.member-card {
  border: 1px solid var(--gold-dim); border-radius: 16px;
  padding: 28px 24px; background:
    radial-gradient(ellipse 90% 70% at 50% -20%, rgba(214, 196, 154, .07), transparent 70%),
    var(--card);
}
.member-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 14px; margin-bottom: 16px; }
.member-head h2 { margin-bottom: 0; }
.price-tag {
  font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold); border: 1px solid var(--gold-dim);
  padding: 5px 12px; border-radius: 999px; white-space: nowrap;
}
.member-list { list-style: none; display: grid; gap: 13px; }
.member-list li { padding-left: 26px; position: relative; color: var(--muted); }
.member-list li::before {
  content: "◈"; position: absolute; left: 0; top: 0;
  color: var(--gold-dim); font-size: .85rem;
}
.member-list strong { color: var(--ink); }
.member-close { margin-top: 20px; color: var(--ink); font-weight: 600; }

/* ---------- honesty ---------- */
.honesty { border-left: 2px solid var(--gold-dim); padding-left: 22px; }
.honesty .fine { margin-top: 16px; font-size: .92rem; color: var(--muted); }

/* ---------- faq ---------- */
.qa {
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--card); margin-bottom: 10px;
}
.qa summary {
  cursor: pointer; list-style: none; padding: 16px 44px 16px 18px;
  font-weight: 600; position: relative; color: var(--ink);
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: "+"; position: absolute; right: 17px; top: 50%;
  transform: translateY(-52%);
  color: var(--gold-dim); font-size: 1.25rem; font-family: var(--serif);
}
.qa[open] summary::after { content: "–"; }
.qa .a { padding: 0 18px 17px; color: var(--muted); }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; border: none; cursor: pointer;
  background: var(--gold); color: #15130d;
  font-family: var(--sans); font-size: 1.02rem; font-weight: 700;
  letter-spacing: .01em;
  padding: 15px 28px; border-radius: 999px; text-decoration: none;
  transition: background .15s ease, transform .15s ease;
}
.btn:hover { background: var(--gold-bright); color: #15130d; transform: translateY(-1px); }
.btn.full { width: 100%; text-align: center; }
.btn[disabled] { opacity: .55; cursor: default; transform: none; }

/* ---------- form ---------- */
.form-section {
  background:
    radial-gradient(ellipse 70% 50% at 50% 110%, rgba(62, 84, 122, .14), transparent 70%),
    var(--bg);
}
.formcard {
  border: 1px solid var(--line); border-radius: 16px;
  background: var(--card); padding: 26px 22px;
}
.field { margin-bottom: 18px; }
.field label {
  display: block; font-size: .9rem; font-weight: 600;
  margin-bottom: 7px; color: var(--ink);
}
.field .hint { font-weight: 400; color: var(--faint); font-size: .8rem; }
.req { color: var(--fire); }
input[type="text"], input[type="email"], input[type="date"], input[type="time"], select, textarea {
  width: 100%;
  background: var(--bg-raise);
  border: 1px solid var(--line); border-radius: 10px;
  color: var(--ink); font-family: var(--sans); font-size: 1rem;
  padding: 12px 13px;
  transition: border-color .15s ease;
}
textarea { min-height: 86px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); }
input[disabled] { opacity: .45; }

.timegroup { display: flex; flex-direction: column; gap: 9px; }
.checkline { display: flex; align-items: flex-start; gap: 9px; font-size: .9rem; color: var(--muted); }
.checkline input { width: 17px; height: 17px; margin-top: 3px; flex: none; accent-color: var(--gold); }
.checkline label { font-weight: 400; margin: 0; color: var(--muted); }

.consent { display: flex; align-items: flex-start; gap: 10px; }
.consent input { width: 17px; height: 17px; margin-top: 4px; flex: none; accent-color: var(--gold); }
.consent label { font-weight: 400; font-size: .88rem; color: var(--muted); margin: 0; }

.err-msg { display: none; font-size: .8rem; color: var(--fire); margin-top: 6px; }
.field.invalid .err-msg, .consent-wrap.invalid .err-msg { display: block; }
.field.invalid input, .field.invalid select { border-color: var(--fire); }

.form-status { margin-top: 14px; font-size: .92rem; min-height: 1.4em; }
.form-status.err { color: var(--fire); }

/* honeypot — visually gone, present for bots */
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

/* ---------- thanks page ---------- */
.simple { padding: 84px 0; min-height: 52vh; }
.simple h1 {
  font-size: clamp(1.9rem, 6vw, 2.7rem);
  line-height: 1.2; margin-bottom: 18px;
}
.simple .lead { font-size: 1.1rem; }

.waitlist-card {
  margin-top: 34px;
  border: 1px solid var(--gold-dim); border-radius: 16px;
  background:
    radial-gradient(ellipse 90% 80% at 50% -30%, rgba(214, 196, 154, .08), transparent 70%),
    var(--card);
  padding: 28px 24px;
}
.waitlist-card h2 { font-size: 1.35rem; margin-bottom: 12px; }
.waitlist-card .as-line { font-size: .86rem; color: var(--muted); margin-top: 12px; }
.waitlist-card .as-line b { color: var(--gold); font-weight: 600; }
.wl-form { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
@media (min-width: 560px) {
  .wl-form { flex-direction: row; }
  .wl-form input[type="email"] { flex: 1; }
  .wl-form .btn { flex: none; }
}
.wl-success { display: none; }
.wl-success p:first-child { font-weight: 700; color: var(--gold-bright); font-size: 1.08rem; }
.waitlist-card.joined .wl-success { display: block; }
.waitlist-card.joined .wl-live { display: none; }

/* ---------- privacy page ---------- */
.prose { padding: 64px 0; }
.prose h1 { font-size: clamp(1.8rem, 5vw, 2.4rem); margin-bottom: 22px; }
.prose h2 { font-size: 1.25rem; margin: 30px 0 10px; }
.prose ul { margin: 12px 0 12px 22px; color: var(--muted); }
.prose li + li { margin-top: 8px; }
.prose p { color: var(--muted); }
.prose .meta { color: var(--ink); }

/* ---------- footer ---------- */
.footer {
  border-top: 1px solid var(--line-soft);
  padding: 30px 0 44px;
  font-size: .85rem; color: var(--faint);
}
.footer .wrap { display: flex; flex-wrap: wrap; gap: 6px 10px; justify-content: center; text-align: center; }
.footer a { color: var(--muted); }
.footer .sep { color: var(--line); }

/* ---------- larger screens ---------- */
@media (min-width: 760px) {
  section { padding: 84px 0; }
  .hero { padding: 96px 0 100px; }
  .includes { grid-template-columns: repeat(3, 1fr); }
  .inc-card .num { font-size: 1.05rem; }
}
