/* =============================================================
   Xuhu Wan Academy — shared stylesheet
   Inspired by the book's PDF-viewer aesthetic, but tuned for a
   marketing site: lighter background, more whitespace, friendlier
   typography for landing pages.
   ============================================================= */

:root {
  --bg:        #f6f4ef;        /* warm cream */
  --surface:   #ffffff;
  --ink:       #1a1a1a;
  --ink-soft:  #555555;
  --muted:     #888888;
  --rule:      #d8d4ca;
  --accent:    #2a3f5c;        /* navy */
  --accent-2:  #1a4d80;        /* link blue */
  --gold:      #a67b2c;
  --green:     #557a55;
  --red:       #c0392b;
  --gradient:  linear-gradient(135deg, #3c5078 0%, #1f2d4a 100%);
  --gradient-warm: linear-gradient(135deg, #f6f4ef 0%, #ece6d6 100%);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.07);
  --shadow:    0 4px 14px rgba(0,0,0,0.10);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.18);
  --radius:    6px;
  --maxw:      1080px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Georgia", "Charter", "Iowan Old Style", serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-2); text-decoration: underline; text-decoration-color: rgba(26,77,128,0.35); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent-2); }
img { max-width: 100%; }

/* ===================== NAVBAR ===================== */
.nav {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.brand {
  font-family: "Georgia", serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.01em;
}
.brand .dot { color: var(--gold); }
.nav-links {
  display: flex;
  gap: 22px;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
}
.nav-links a {
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.15s;
}
.nav-links a:hover, .nav-links a.active { color: var(--accent); }
.nav-cta {
  background: var(--accent);
  color: white;
  padding: 8px 18px;
  border-radius: 4px;
  text-decoration: none;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.15s;
}
.nav-cta:hover { background: var(--accent-2); color: white; text-decoration: none; }

/* ===================== HERO ===================== */
.hero {
  padding: 80px 24px 60px;
  max-width: var(--maxw);
  margin: 0 auto;
  text-align: center;
}
.hero h1 {
  font-size: 48px;
  line-height: 1.1;
  margin: 0 0 16px 0;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.hero .subtitle {
  font-size: 20px;
  color: var(--ink-soft);
  max-width: 660px;
  margin: 0 auto 32px;
  line-height: 1.5;
}
.hero .cta-row {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 28px;
}
.btn {
  display: inline-block;
  padding: 14px 26px;
  border-radius: 5px;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: all 0.15s;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary {
  background: var(--accent);
  color: white;
}
.btn-primary:hover { background: var(--accent-2); color: white; text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-secondary {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}
.btn-secondary:hover { background: var(--accent); color: white; text-decoration: none; }
.btn-gold {
  background: var(--gold);
  color: white;
}
.btn-gold:hover { background: #8c651f; color: white; }

/* ===================== SECTION ===================== */
section { padding: 60px 24px; }
section .inner {
  max-width: var(--maxw);
  margin: 0 auto;
}
section h2 {
  font-size: 32px;
  color: var(--accent);
  margin: 0 0 12px 0;
  line-height: 1.2;
  font-weight: 700;
}
section h2.center { text-align: center; }
section .lead {
  font-size: 17px;
  color: var(--ink-soft);
  max-width: 700px;
  margin: 0 auto 40px;
  text-align: center;
  line-height: 1.55;
}
.eyebrow {
  display: block;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 10px;
}
.center { text-align: center; }

/* ===================== PILLARS ===================== */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 30px 0;
}
.pillar {
  background: var(--surface);
  padding: 28px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--rule);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s, box-shadow 0.15s;
}
.pillar:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.pillar .icon {
  font-size: 28px;
  margin-bottom: 12px;
  display: block;
  filter: grayscale(0.15);
}
.pillar h3 {
  font-size: 20px;
  color: var(--accent);
  margin: 0 0 10px 0;
  font-weight: 700;
}
.pillar p {
  font-size: 15px;
  color: var(--ink-soft);
  margin: 0;
  line-height: 1.55;
}
@media (max-width: 720px) {
  .pillars { grid-template-columns: 1fr; }
  .hero h1 { font-size: 34px; }
  .hero .subtitle { font-size: 17px; }
}

/* ===================== COURSE CARDS ===================== */
.course-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}
.course-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 24px 26px;
  box-shadow: var(--shadow-sm);
  transition: all 0.15s;
  display: flex;
  flex-direction: column;
}
.course-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.course-card .status {
  display: inline-block;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 12px;
  margin-bottom: 12px;
  font-weight: 700;
}
.status-live   { background: #e7f0e7; color: var(--green); }
.status-soon   { background: #fdf1e1; color: var(--gold); }
.course-card h3 {
  font-size: 22px;
  color: var(--accent);
  margin: 0 0 6px 0;
  line-height: 1.25;
}
.course-card .desc {
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.55;
  margin: 0 0 16px;
  flex-grow: 1;
}
.course-card .meta {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 14px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.course-card .meta span::before { content: "·"; margin-right: 8px; color: var(--rule); }
.course-card .meta span:first-child::before { content: ""; margin-right: 0; }
.course-card .actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.course-card .actions .btn { padding: 9px 16px; font-size: 13px; }
@media (max-width: 720px) { .course-grid { grid-template-columns: 1fr; } }

/* ===================== TIER PRICING ===================== */
.tiers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 30px;
}
.tier {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 30px 26px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all 0.15s;
}
.tier.popular {
  border-color: var(--accent);
  border-width: 2px;
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}
.tier .popular-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: white;
  padding: 4px 16px;
  border-radius: 14px;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.tier h3 {
  font-size: 22px;
  color: var(--accent);
  margin: 0 0 4px 0;
}
.tier .tagline {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 18px;
  min-height: 38px;
}
.tier .price {
  font-size: 42px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
  line-height: 1;
  font-family: "Helvetica Neue", Arial, sans-serif;
}
.tier .price .currency { font-size: 22px; color: var(--ink-soft); }
.tier .price .unit { font-size: 14px; color: var(--muted); font-weight: 400; }
.tier ul {
  list-style: none;
  padding: 0;
  margin: 20px 0;
  flex-grow: 1;
}
.tier li {
  padding: 6px 0;
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.45;
}
.tier li::before {
  content: "✓";
  color: var(--green);
  font-weight: 700;
  margin-right: 8px;
}
.tier li.absent {
  color: var(--muted);
  text-decoration: line-through;
}
.tier li.absent::before { content: "—"; color: var(--muted); }
.tier .btn { width: 100%; text-align: center; }
@media (max-width: 720px) {
  .tiers { grid-template-columns: 1fr; }
  .tier.popular { transform: none; }
}

/* ===================== AI TUTOR CHAT ===================== */
.tutor-frame {
  max-width: 760px;
  margin: 30px auto;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 540px;
}
.tutor-header {
  background: var(--accent);
  color: white;
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: "Helvetica Neue", Arial, sans-serif;
}
.tutor-header .who { font-weight: 700; font-size: 14px; }
.tutor-header .ctx { font-size: 12px; opacity: 0.85; }
.chat-stream {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: #fbfaf6;
}
.msg {
  margin-bottom: 16px;
  display: flex;
  gap: 10px;
}
.msg .avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-weight: 700;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: white;
}
.msg.user .avatar { background: var(--gold); }
.msg.bot .avatar { background: var(--accent); }
.msg .bubble {
  background: white;
  border: 1px solid var(--rule);
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.5;
  max-width: 90%;
}
.msg.user .bubble { background: #f1eee2; }
.msg.bot .bubble code {
  background: #f4f4f0;
  padding: 1px 5px;
  border-radius: 2px;
  font-size: 0.9em;
}
.msg.bot .bubble pre {
  background: #1f2d4a;
  color: #f3ead9;
  padding: 10px 12px;
  border-radius: 5px;
  font-size: 12px;
  overflow-x: auto;
  margin: 8px 0;
}
.tutor-input {
  border-top: 1px solid var(--rule);
  padding: 12px 16px;
  background: white;
  display: flex;
  gap: 10px;
}
.tutor-input input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--rule);
  border-radius: 5px;
  font-family: inherit;
  font-size: 14px;
  outline: none;
  background: #fbfaf6;
}
.tutor-input input:focus { border-color: var(--accent); }
.tutor-input button {
  background: var(--accent);
  color: white;
  border: none;
  padding: 0 22px;
  border-radius: 5px;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}
.tutor-input button:hover { background: var(--accent-2); }

/* ===================== CERTIFICATE ===================== */
.cert-wrap {
  display: flex;
  justify-content: center;
  margin: 40px auto;
}
.cert {
  width: 100%;
  max-width: 760px;
  background: var(--surface);
  position: relative;
  padding: 60px 50px;
  border: 8px solid var(--gold);
  outline: 1px solid var(--gold);
  outline-offset: -16px;
  box-shadow: var(--shadow-lg);
  text-align: center;
  font-family: "Georgia", serif;
}
.cert::before {
  content: "";
  position: absolute;
  top: 24px; left: 24px; right: 24px; bottom: 24px;
  border: 1px solid var(--rule);
  pointer-events: none;
}
.cert .seal {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 14px;
}
.cert h1 {
  font-size: 34px;
  color: var(--accent);
  margin: 0 0 6px 0;
  font-weight: 700;
}
.cert .body {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 18px 0 22px;
  line-height: 1.55;
}
.cert .name {
  font-size: 32px;
  color: var(--ink);
  margin: 18px 0 6px;
  font-style: italic;
}
.cert .course {
  font-size: 22px;
  color: var(--accent);
  margin: 0 0 18px;
  font-weight: 700;
}
.cert .meta {
  display: flex;
  justify-content: space-around;
  margin-top: 36px;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 12px;
  color: var(--muted);
}
.cert .meta div { text-align: center; min-width: 160px; }
.cert .meta strong { display: block; color: var(--ink); font-family: "Georgia", serif; font-size: 14px; }
.cert .signature {
  font-family: "Brush Script MT", "Lucida Handwriting", cursive;
  font-size: 24px;
  color: var(--accent);
  border-bottom: 1px solid var(--ink-soft);
  padding-bottom: 2px;
  width: 200px;
  margin: 0 auto 6px;
}

/* ===================== COHORT SCHEDULE ===================== */
.schedule {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  max-width: 720px;
  margin: 30px auto;
}
.week {
  background: var(--surface);
  border-left: 4px solid var(--accent);
  padding: 14px 18px;
  border-radius: 0 4px 4px 0;
  display: flex;
  gap: 18px;
  box-shadow: var(--shadow-sm);
}
.week .num {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  flex-shrink: 0;
  margin-top: 3px;
  width: 60px;
}
.week .title {
  font-size: 16px;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 3px;
}
.week .desc {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0;
}

/* ===================== FAQ ACCORDION ===================== */
details.faq {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 14px 20px;
  margin-bottom: 10px;
  cursor: pointer;
}
details.faq summary {
  font-weight: 700;
  color: var(--accent);
  font-size: 16px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
details.faq summary::after { content: "+"; color: var(--gold); font-weight: 700; font-size: 22px; }
details.faq[open] summary::after { content: "−"; }
details.faq p {
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.55;
  margin: 12px 0 4px;
}

/* ===================== FOOTER ===================== */
footer {
  background: #2d2d2d;
  color: #d0d0d0;
  padding: 36px 24px 26px;
  margin-top: 80px;
}
footer .inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 13px;
}
footer a { color: #e8e8e8; }
footer .legal { color: #999; font-size: 12px; }

/* ===================== UTILS ===================== */
.spacer-lg { height: 40px; }
.muted { color: var(--muted); }
