/* ============================================================
   Dragon Link Hub — style.css
   Soft UI Evolution · Inter / Playfair Display · Rose-Crimson
   ============================================================ */


/* ── Custom properties ─────────────────────────────────────── */
:root {
  --primary:    #eb879c;
  --secondary:  #ffb6c1;
  --ink:        #26171a;
  --ink-soft:   #4a2d33;
  --bg:         #fdf6f7;
  --bg-card:    #ffb6c1;
  --bg-surface: #fff0f3;
  --muted:      #7a4a52;
  --radius:     28px;
  --radius-sm:  12px;
  --rail-w:     240px;
  --shadow-sm:  0 2px 4px rgba(38,23,26,.08), 0 1px 2px rgba(38,23,26,.05);
  --shadow-md:  0 4px 12px rgba(38,23,26,.10), 0 2px 6px rgba(38,23,26,.06);
  --shadow-lg:  0 8px 24px rgba(38,23,26,.12), 0 4px 10px rgba(38,23,26,.07);
  --trans:      200ms ease;
  --trans-slow: 300ms ease;
  font-size: 16px;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--primary); text-decoration: underline; }
a:hover { color: var(--ink-soft); }
a:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 3px; }
ul, ol { padding-left: 1.4em; }

/* ── Screen-reader only ────────────────────────────────────── */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ── Site wrap + rail layout ───────────────────────────────── */
.site-wrap {
  display: flex;
  min-height: 100vh;
}

/* LEFT RAIL */
.rail {
  position: fixed;
  top: 0; left: 0;
  width: var(--rail-w);
  height: 100vh;
  background: var(--ink);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 1.5rem 1.25rem;
  gap: 1.25rem;
  z-index: 100;
  box-shadow: var(--shadow-lg);
}

.rail-brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
}
.rail-brand img { border-radius: 8px; flex-shrink: 0; }
.rail-brand-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--secondary);
  line-height: 1.2;
}

/* Hamburger toggle */
.menu-toggle {
  background: none;
  border: 2px solid var(--primary);
  border-radius: 8px;
  padding: .6rem .7rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}
.menu-toggle:focus-visible { outline: 3px solid var(--secondary); outline-offset: 3px; }
.burger-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transition: background var(--trans);
}
.menu-toggle:hover .burger-bar { background: var(--secondary); }

/* CTA buttons in rail */
.rail-ctas {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  width: 100%;
  margin-top: auto;
}

/* ── CTA Buttons ───────────────────────────────────────────── */
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: .55rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  font-weight: 700;
  letter-spacing: .02em;
  text-decoration: none;
  transition: background var(--trans), color var(--trans), box-shadow var(--trans);
  white-space: nowrap;
}
.cta-signup {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.cta-signup:hover { background: #d96e85; color: #fff; }
.cta-login {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.cta-login:hover { background: var(--primary); color: #fff; }

/* ── Overlay menu ──────────────────────────────────────────── */
.overlay-menu {
  position: fixed;
  inset: 0;
  background: rgba(38,23,26,.96);
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  opacity: 0;
  transition: opacity var(--trans-slow);
}
.overlay-menu.is-open { opacity: 1; }
.overlay-menu[hidden] { display: none; }

.overlay-close {
  position: absolute;
  top: 1.5rem; right: 1.5rem;
  background: none;
  border: 2px solid var(--primary);
  color: var(--primary);
  border-radius: 50%;
  width: 44px; height: 44px;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--trans), color var(--trans);
}
.overlay-close:hover { background: var(--primary); color: #fff; }
.overlay-close:focus-visible { outline: 3px solid var(--secondary); outline-offset: 3px; }

.overlay-search {
  width: min(400px, 90vw);
}
.overlay-search input {
  width: 100%;
  padding: .75rem 1rem;
  border: 2px solid var(--primary);
  border-radius: var(--radius-sm);
  background: var(--ink-soft);
  color: #fff;
  font-size: 1rem;
  font-family: inherit;
}
.overlay-search input::placeholder { color: var(--secondary); opacity: .7; }
.overlay-search input:focus { outline: 3px solid var(--secondary); outline-offset: 2px; }

.overlay-nav { width: min(480px, 90vw); }
.overlay-nav dl { list-style: none; }
.overlay-nav .nav-section-label {
  font-size: .7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--ink-soft);
  margin-bottom: .75rem;
}
.overlay-nav dd { margin: 0; }
.overlay-nav dd a {
  display: block;
  padding: .65rem 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--secondary);
  text-decoration: none;
  border-bottom: 1px solid rgba(255,182,193,.1);
  transition: color var(--trans), padding-left var(--trans);
}
.overlay-nav dd a:hover { color: #fff; padding-left: .5rem; }
.overlay-nav dd a[aria-current="page"] { color: var(--primary); }

/* ── Page body (offset from rail) ──────────────────────────── */
.page-body {
  margin-left: var(--rail-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* ── Hero (home) ───────────────────────────────────────────── */
.hero--home {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--ink);
  position: relative;
  overflow: hidden;
  padding: 4rem 3rem;
  gap: 3rem;
}

.hero-copy {
  flex: 0 0 50%;
  max-width: 560px;
  position: relative;
  z-index: 2;
}
.hero-copy .eyebrow {
  display: inline-block;
  font-size: .7rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: .75rem;
  font-weight: 700;
}
.hero-copy h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.15;
  color: #fff;
  margin-bottom: 1rem;
}
.hero-lead {
  font-size: 1.05rem;
  color: var(--secondary);
  margin-bottom: 2rem;
  max-width: 480px;
}

.hero-media {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
}
.hero-bg-text {
  position: absolute;
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: clamp(6rem, 18vw, 16rem);
  font-weight: 700;
  color: rgba(235,135,156,.08);
  user-select: none;
  pointer-events: none;
  white-space: nowrap;
  z-index: 0;
}
.hero-img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  max-height: 70vh;
  object-fit: cover;
  position: relative;
  z-index: 1;
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: .75rem 1.75rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: background var(--trans), box-shadow var(--trans);
}
.btn--primary {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-md);
}
.btn--primary:hover { background: #d96e85; color: #fff; box-shadow: var(--shadow-lg); }

/* ── Inner page hero ───────────────────────────────────────── */
.page-hero {
  background: var(--ink);
  padding: 4rem 3rem 3rem;
  border-bottom: 3px solid var(--primary);
}
.page-hero-copy .eyebrow {
  display: inline-block;
  font-size: .7rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: .6rem;
  font-weight: 700;
}
.page-hero-copy h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: clamp(1.6rem, 3vw, 2.8rem);
  color: #fff;
  line-height: 1.2;
  margin-bottom: .75rem;
  max-width: 780px;
}
.page-hero-copy .hero-lead {
  font-size: 1rem;
  color: var(--secondary);
  max-width: 640px;
  margin-bottom: 0;
}
.page-hero-copy .byline {
  font-size: .85rem;
  color: var(--muted);
  margin-bottom: .5rem;
}

/* ── Main content layout ───────────────────────────────────── */
main { padding: 2.5rem 0 3rem; }

.wrap {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

.content-section { width: 100%; }

/* div = flex row: aside left, article-body right */
.prose {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
}

/* ── Sidebar (left) ────────────────────────────────────────── */
.sidebar--left {
  flex: 0 0 220px;
  position: sticky;
  top: 1.5rem;
}
.sidebar-inner {
  background: var(--bg-surface);
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem;
  box-shadow: var(--shadow-sm);
}
.sidebar-heading {
  font-size: .95rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: .25rem;
}
.sidebar-heading + p.subtitle {
  font-size: .78rem;
  color: var(--muted);
  margin-bottom: .9rem;
}
.sidebar-links {
  list-style: none;
  padding: 0;
}
.sidebar-links li { margin-bottom: .25rem; }
.sidebar-links a {
  display: block;
  padding: .4rem .5rem;
  border-radius: 8px;
  font-size: .88rem;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  transition: background var(--trans), color var(--trans);
}
.sidebar-links a:hover { background: var(--secondary); color: var(--ink); }
.sidebar-parent a {
  font-size: .85rem;
  color: var(--primary);
  text-decoration: none;
  display: block;
  margin-bottom: .75rem;
}

/* ── Article body ──────────────────────────────────────────── */
.article-body {
  flex: 1;
  min-width: 0;
  max-width: 720px;
}
.article-body h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: clamp(1.5rem, 2.5vw, 2.4rem);
  color: var(--ink);
  line-height: 1.2;
  margin-bottom: .5rem;
}
.article-body h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ink);
  margin: 2rem 0 .25rem;
  padding-bottom: .35rem;
  border-bottom: 2px solid var(--secondary);
}
.article-body h2 + p.subtitle {
  font-size: .9rem;
  color: var(--muted);
  margin-bottom: 1rem;
  font-style: italic;
}
.article-body h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
  margin: 1.5rem 0 .4rem;
}
.article-body p { margin-bottom: 1rem; font-size: 1rem; }
.article-body ul, .article-body ol { margin-bottom: 1rem; }
.article-body li { margin-bottom: .3rem; }
.article-body a { color: var(--primary); text-decoration: underline; }
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: .9rem;
}
.article-body th {
  background: var(--ink);
  color: #fff;
  padding: .6rem .8rem;
  text-align: left;
}
.article-body td {
  padding: .55rem .8rem;
  border-bottom: 1px solid var(--secondary);
}
.article-body tr:nth-child(even) td { background: var(--bg-surface); }

/* Byline */
.byline {
  font-size: .85rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}
.byline time { font-weight: 600; }

/* Article header */
.article-header { margin-bottom: 1.5rem; }
.article-hero-wrap { margin: 1.25rem 0; border-radius: var(--radius); overflow: hidden; }
.article-hero-img { width: 100%; object-fit: cover; max-height: 380px; }

/* Stage badge */
.stage-badge {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .25rem .65rem;
  border-radius: 999px;
  margin-bottom: .5rem;
}
.stage-badge--awareness  { background: #fde8ec; color: var(--ink-soft); }
.stage-badge--consideration { background: var(--secondary); color: var(--ink); }
.stage-badge--decision   { background: var(--primary); color: #fff; }

/* ── Card grid ─────────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  transition: transform var(--trans), box-shadow var(--trans);
  animation: cardFadeIn 400ms ease both;
}
@keyframes cardFadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card h3 { font-size: 1rem; font-weight: 700; margin-bottom: .5rem; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--ink-soft); }
.card p { font-size: .88rem; color: var(--ink-soft); margin-bottom: .75rem; }
.read-more {
  font-size: .82rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  letter-spacing: .03em;
}
.read-more:hover { text-decoration: underline; }

/* ── Child page list (topic) ───────────────────────────────── */
.child-pages { margin-top: 2.5rem; }
.child-dl { margin-top: 1rem; }
.child-dl dt {
  margin-top: 1rem;
  font-weight: 700;
}
.child-dl dt a {
  color: var(--ink);
  text-decoration: none;
  font-size: 1rem;
}
.child-dl dt a:hover { color: var(--primary); text-decoration: underline; }
.child-dl dd {
  margin: .2rem 0 0 0;
  font-size: .88rem;
  color: var(--muted);
}
.child-date { font-size: .78rem; color: var(--primary); }

/* ── Author article ────────────────────────────────────────── */
.author-section { margin-top: 2.5rem; padding-top: 2rem; border-top: 2px solid var(--secondary); }
.author-card {
  background: var(--bg-surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  margin-top: 1rem;
}
.author-name { font-size: 1.1rem; font-weight: 700; margin-bottom: .25rem; }
.author-credentials {
  font-size: .85rem;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: .75rem;
}
.author-bio { font-size: .93rem; color: var(--ink-soft); }

/* ── Footer nav wrap (outside <footer>) ────────────────────── */
.footer-nav-wrap {
  background: var(--ink-soft);
  padding: 2.5rem 3rem;
}
.footer-nav dl {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: .25rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
}
.footer-nav dt {
  margin-top: .75rem;
}
.footer-nav dt a {
  font-weight: 700;
  font-size: .95rem;
  color: var(--secondary);
  text-decoration: none;
  transition: color var(--trans);
}
.footer-nav dt a:hover { color: #fff; }
.footer-nav dt a[aria-current="page"] { color: var(--primary); }
.footer-nav dd {
  margin: .1rem 0 0 0;
  font-size: .78rem;
  color: var(--muted);
  line-height: 1.4;
}

/* ── Footer (only p + small) ───────────────────────────────── */
.site-footer {
  background: var(--ink);
  padding: 2rem 3rem;
  border-top: 3px solid var(--primary);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem 2rem;
}
.footer-wordmark-line { flex: 0 0 100%; }
.footer-wordmark {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: 2rem;
  color: var(--secondary);
  opacity: .35;
  user-select: none;
}
.footer-rg { flex: 1; }
.footer-rg small { font-size: .78rem; color: var(--muted); }
.footer-trust small { font-size: .78rem; }
.footer-trust small a { color: var(--secondary); }
.footer-copy { margin-left: auto; }
.footer-copy small { font-size: .78rem; color: var(--muted); }

/* ── Eyebrow ───────────────────────────────────────────────── */
.eyebrow {
  display: inline-block;
  font-size: .7rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 700;
}

/* ── Subtitle / subhead ────────────────────────────────────── */
.subtitle, p.subtitle, p.subhead, p.desc, p.lead {
  font-size: .9rem;
  color: var(--muted);
  font-style: italic;
  margin-bottom: .75rem;
}

/* ── Responsive — tablet / mobile ─────────────────────────── */
@media (max-width: 1024px) {
  :root { --rail-w: 200px; }
  .hero--home { padding: 3rem 2rem; }
}

@media (max-width: 768px) {
  :root { --rail-w: 0px; }

  .site-wrap { flex-direction: column; }

  /* Rail becomes a top bar */
  .rail {
    position: fixed;
    top: 0; left: 0; right: 0;
    width: 100%;
    height: auto;
    min-height: 60px;
    flex-direction: row;
    align-items: center;
    padding: .6rem 1rem;
    gap: .75rem;
    z-index: 100;
  }
  .rail-brand { flex: 1; }
  .rail-brand-name { font-size: .9rem; }
  .rail-ctas {
    flex-direction: row;
    gap: .4rem;
    margin-top: 0;
    width: auto;
  }
  .cta { padding: .45rem .7rem; font-size: .78rem; min-height: 44px; }

  .page-body {
    margin-left: 0;
    margin-top: 60px;
  }

  /* Hero */
  .hero--home {
    flex-direction: column;
    min-height: auto;
    padding: 2.5rem 1.25rem 2rem;
    gap: 1.5rem;
  }
  .hero-copy { flex: none; max-width: 100%; }
  .hero-media { min-height: 200px; width: 100%; }
  .hero-bg-text { font-size: 5rem; }

  /* Page hero */
  .page-hero { padding: 2rem 1.25rem 1.5rem; }

  /* Content */
  .wrap { padding: 0 1rem; }
  .prose { flex-direction: column; gap: 1.25rem; }
  .sidebar--left { position: static; flex: none; width: 100%; }
  .sidebar-inner { border-radius: var(--radius-sm); }
  .article-body { max-width: 100%; }

  /* Footer nav */
  .footer-nav-wrap { padding: 1.75rem 1rem; }
  .footer-nav dl { grid-template-columns: 1fr 1fr; }

  /* Footer */
  .site-footer { padding: 1.5rem 1rem; }
  .footer-wordmark { font-size: 1.4rem; }
}

@media (max-width: 480px) {
  .card-grid { grid-template-columns: 1fr; }
  .footer-nav dl { grid-template-columns: 1fr; }
  .rail-brand-name { display: none; }
}

/* ── Reduced motion ────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* 2026-09-26 移动端 tap 目标 ≥40px：页脚 dl 链接、侧栏链接、卡片 Read more */
.footer-nav dt a, .footer-nav dd a, .read-more { display: inline-block; padding: 0.65rem 0; }
.sidebar-links a { padding: 0.65rem 0.5rem; }
.footer-trust a { display: inline-block; padding: 0.7rem 0; }
nav[aria-label="Page sections"] a { display: inline-block; padding: 0.65rem 0; }

a[data-cta],button[aria-controls]{min-height:44px;min-width:44px;box-sizing:border-box}main p a{text-decoration:underline}