@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@300;400;500;600;700&family=Noto+Sans:wght@300;400;500;600;700&display=swap');

/* ── 变量 ── */
:root {
  --c-bg: #1A1A2E;
  --c-accent: #E94560;
  --c-fg: #F5F5F5;
  --c-bg2: #16213E;
  --c-bg3: #0F3460;
  --c-muted: rgba(245,245,245,0.55);
  --c-border: rgba(245,245,245,0.15);
  --c-card-bg: rgba(255,255,255,0.03);
  --c-accent-dim: rgba(233,69,96,0.18);
  --radius: 28px;
  --radius-sm: 14px;
  --font-main: 'Be Vietnam Pro', 'Noto Sans', system-ui, -apple-system, sans-serif;
  --max-w: 1200px;
  --header-h: 64px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── 重置 ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-main);
  background: var(--c-bg);
  color: var(--c-fg);
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
}
a { color: var(--c-accent); text-decoration: none; transition: opacity var(--transition); }
a:hover { opacity: 0.8; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ── 辅助 ── */
.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;
}

/* ── 全屏导航遮罩 ── */
.nav-aside {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--c-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateX(-100%);
  transition: transform 0.5s cubic-bezier(0.77, 0, 0.175, 1);
  overflow: hidden;
}
.nav-aside::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(233,69,96,0.08) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}
.nav-aside[aria-hidden="false"] {
  transform: translateX(0);
}
.nav-aside nav ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: center;
}
.nav-aside nav ul li a {
  font-size: clamp(1.1rem, 3vw, 1.6rem);
  font-weight: 600;
  color: var(--c-fg);
  letter-spacing: 0.03em;
  padding: 0.6rem 1.2rem;
  display: block;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
  min-height: 44px;
  line-height: 1.4;
}
.nav-aside nav ul li a:hover {
  color: var(--c-accent);
  background: var(--c-accent-dim);
  opacity: 1;
}

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(26,26,46,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--c-border);
}
.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  height: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 1.5rem;
}
.brand-center {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--c-fg);
  letter-spacing: 0.06em;
  text-align: center;
  white-space: nowrap;
}
.brand-center:hover { opacity: 0.85; }
.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
  min-height: 44px;
  min-width: 44px;
  justify-content: center;
  align-items: flex-start;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}
.hamburger:hover { background: var(--c-accent-dim); }
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--c-fg);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition), width var(--transition);
  transform-origin: center;
}
.hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; width: 0; }
.hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.header-spacer { display: block; }

/* ── Dot Grid ── */
.dot-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(233,69,96,0.22) 1.5px, transparent 1.5px);
  background-size: 24px 24px;
  pointer-events: none;
  border-radius: inherit;
}
.dot-grid-sm {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(233,69,96,0.15) 1px, transparent 1px);
  background-size: 18px 18px;
  pointer-events: none;
}

/* ── Site Wrap ── */
.site-wrap {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main { flex: 1; }

/* ── Hero (Home) ── */
.hero-section {
  min-height: 45vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 2rem;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 3rem 1.5rem 2rem;
}
.hero-text {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  z-index: 1;
}
.hero-figure {
  position: relative;
  min-height: 260px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--c-bg2);
  border: 1px solid var(--c-border);
}
.hero-img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); }

.eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--c-accent);
  text-transform: uppercase;
}

.hero-h1 {
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--c-fg);
  background: linear-gradient(135deg, var(--c-fg) 40%, var(--c-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-desc {
  font-size: 1rem;
  color: var(--c-muted);
  max-width: 480px;
}

/* ── Kinetic Typography Animations ── */
@keyframes ktype-in {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes ktype-cursor {
  0%, 100% { border-right-color: var(--c-accent); }
  50%       { border-right-color: transparent; }
}
@keyframes ktype-grad {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes reveal-up {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes scale-in {
  from { opacity: 0; transform: scale(0.94); }
  to   { opacity: 1; transform: scale(1); }
}

.ktype-split {
  animation: ktype-in 0.7s ease both;
}
.ktype-reveal {
  animation: ktype-in 0.6s 0.15s ease both;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ── Buttons ── */
.btn-primary {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  background: var(--c-accent);
  color: var(--c-fg);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  border: 2px solid var(--c-accent);
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  min-height: 44px;
  letter-spacing: 0.03em;
}
.btn-primary:hover {
  background: transparent;
  color: var(--c-accent);
  transform: translateY(-2px);
  opacity: 1;
}
.btn-outline {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  background: transparent;
  color: var(--c-accent);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  border: 2px solid var(--c-accent);
  transition: background var(--transition), color var(--transition), transform var(--transition);
  min-height: 44px;
  letter-spacing: 0.03em;
}
.btn-outline:hover {
  background: var(--c-accent);
  color: var(--c-fg);
  transform: translateY(-2px);
  opacity: 1;
}

/* ── Content Section (home + div) ── */
.content-section,
.article-layout-section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 3rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 3rem;
  align-items: start;
}

/* ── Aside ── */
.content-aside {
  position: sticky;
  top: calc(var(--header-h) + 1.5rem);
  background: var(--c-card-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.content-aside h2 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--c-accent);
  letter-spacing: 0.06em;
  margin-bottom: 0.3rem;
}
.content-aside .subtitle {
  font-size: 0.8rem;
  color: var(--c-muted);
  margin-bottom: 1rem;
}
.aside-links { display: flex; flex-direction: column; gap: 0.3rem; }
.aside-links li a {
  display: block;
  font-size: 0.9rem;
  color: var(--c-fg);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  border-left: 2px solid transparent;
  transition: border-color var(--transition), background var(--transition), color var(--transition);
  min-height: 40px;
  line-height: 1.4;
  display: flex;
  align-items: center;
}
.aside-links li a:hover {
  border-left-color: var(--c-accent);
  background: var(--c-accent-dim);
  color: var(--c-accent);
  opacity: 1;
}

/* ── Prose ── */
.prose {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--c-fg);
  max-width: 780px;
}
.prose h2 { font-size: 1.5rem; font-weight: 700; margin: 2rem 0 0.5rem; color: var(--c-fg); }
.prose h3 { font-size: 1.2rem; font-weight: 600; margin: 1.5rem 0 0.4rem; }
.prose p { margin-bottom: 1rem; }
.prose ul, .prose ol { padding-left: 1.4rem; margin-bottom: 1rem; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-bottom: 0.4rem; }
.prose a { color: var(--c-accent); text-decoration: underline; text-underline-offset: 3px; }
.prose strong { font-weight: 700; color: var(--c-accent); }
.prose blockquote {
  border-left: 3px solid var(--c-accent);
  padding: 0.75rem 1rem;
  margin: 1.5rem 0;
  background: var(--c-accent-dim);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--c-fg);
}
.prose table { width: 100%; border-collapse: collapse; margin-bottom: 1rem; }
.prose th, .prose td { border: 1px solid var(--c-border); padding: 0.6rem 0.8rem; text-align: left; }
.prose th { background: var(--c-bg2); font-weight: 600; }

/* ── Article Meta ── */
.article-meta {
  font-size: 0.82rem;
  color: var(--c-muted);
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
}
.article-meta time { color: var(--c-muted); }

/* ── Cards ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.card {
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius);
  padding: 1.75rem;
  background: var(--c-card-bg);
  transition: border-color var(--transition), transform var(--transition), background var(--transition);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.card:hover {
  border-color: var(--c-accent);
  background: var(--c-accent-dim);
  transform: translateY(-4px);
}
.card-tag {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--c-accent);
  text-transform: uppercase;
}
.card h3 { font-size: 1rem; font-weight: 600; line-height: 1.4; }
.card h3 a { color: var(--c-fg); }
.card h3 a:hover { color: var(--c-accent); opacity: 1; }
.card .subtitle { font-size: 0.88rem; color: var(--c-muted); }
.card time { font-size: 0.78rem; color: var(--c-muted); }

/* ── FAQ Preview Section ── */
.faq-preview-section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}
.section-heading {
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 700;
  background: linear-gradient(135deg, var(--c-fg) 40%, var(--c-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.4rem;
}
.section-sub {
  font-size: 1rem;
  color: var(--c-muted);
  margin-bottom: 0;
}
.section-cta { margin-top: 2.5rem; text-align: center; }

/* ── FAQ DL ── */
.faq-dl {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.faq-dl dt {
  font-size: 1.05rem;
  font-weight: 600;
  border-top: 1px solid var(--c-border);
  padding-top: 1.1rem;
  margin-top: 0.5rem;
}
.faq-dl dt a {
  color: var(--c-fg);
  display: block;
  padding: 0.2rem 0;
  transition: color var(--transition);
  min-height: 44px;
  display: flex;
  align-items: center;
}
.faq-dl dt a:hover { color: var(--c-accent); opacity: 1; }
.faq-dl dd {
  font-size: 0.92rem;
  color: var(--c-muted);
  padding-bottom: 0.6rem;
  padding-left: 0;
}
.faq-dl dd time { color: var(--c-accent); font-size: 0.82rem; margin-left: 0.5rem; }

/* ── FAQ Index Figure ── */
.faq-index-figure {
  position: relative;
  height: 60px;
  overflow: hidden;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
}

/* ── FAQ List Section ── */
.faq-list-section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}
.faq-list-section h2 {
  font-size: clamp(1.3rem, 2.5vw, 1.9rem);
  font-weight: 700;
  margin-bottom: 0.3rem;
}

/* ── Page Hero ── */
.page-hero-section,
.about-hero-section,
.contact-hero-section,
.privacy-hero-section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 1.5rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2rem;
  align-items: center;
  min-height: 45vh;
}
.page-hero-figure,
.about-hero-figure,
.contact-hero-figure,
.privacy-hero-figure {
  position: relative;
  width: 220px;
  min-height: 200px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--c-bg2);
  border: 1px solid var(--c-border);
  flex-shrink: 0;
}
.page-hero-text,
.about-hero-text,
.contact-hero-text,
.privacy-hero-text {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.page-hero-text h1,
.about-hero-text h1,
.contact-hero-text h1,
.privacy-hero-text h1 {
  font-size: clamp(1.5rem, 3.5vw, 2.6rem);
  font-weight: 700;
  line-height: 1.25;
  background: linear-gradient(135deg, var(--c-fg) 40%, var(--c-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.article-hero-img { width: 100%; height: 100%; object-fit: cover; }

/* ── About / Contact Extras ── */
.about-extra-section,
.contact-form-section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
  position: relative;
}
.about-cta-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}
.about-cta-figure,
.contact-form-figure {
  position: relative;
  height: 50px;
  overflow: hidden;
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
}

/* ── Contact Form ── */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  max-width: 560px;
}
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--c-fg);
  letter-spacing: 0.04em;
}
.form-group input,
.form-group textarea {
  background: var(--c-bg2);
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  color: var(--c-fg);
  font-family: var(--font-main);
  font-size: 1rem;
  transition: border-color var(--transition);
  min-height: 44px;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--c-accent);
}
.form-group textarea { resize: vertical; min-height: 120px; }

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--c-border);
  padding: 2rem 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-items: center;
}
.footer-brand {
  font-size: 0.95rem;
  color: var(--c-muted);
  line-height: 1.6;
}
.footer-copy {
  font-size: 0.82rem;
  color: var(--c-muted);
}
.footer-copy a {
  color: var(--c-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.footer-copy a:hover { color: var(--c-accent); }

/* ── Subtitle helper ── */
.subtitle {
  font-size: 0.95rem;
  color: var(--c-muted);
  line-height: 1.6;
}
h2 + .subtitle,
h2 + p.subtitle,
h2 + p.subhead,
h2 + p.desc,
h2 + p.lead {
  margin-top: 0.3rem;
  margin-bottom: 1rem;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .hero-section {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 2rem 1.2rem 1.5rem;
  }
  .hero-figure { min-height: 180px; }

  .content-section,
  .article-layout-section {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .content-aside {
    position: static;
    order: -1;
  }

  .page-hero-section,
  .about-hero-section,
  .contact-hero-section,
  .privacy-hero-section {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 1.5rem 1.2rem 1rem;
  }
  .page-hero-figure,
  .about-hero-figure,
  .contact-hero-figure,
  .privacy-hero-figure {
    width: 100%;
    min-height: 140px;
  }
}

@media (max-width: 600px) {
  :root { --header-h: 56px; }

  .hero-h1 { font-size: 1.7rem; }
  .card-grid { grid-template-columns: 1fr; }

  .header-inner { padding: 0 1rem; }
  .brand-center { font-size: 0.95rem; }

  .faq-preview-section,
  .faq-list-section,
  .about-extra-section,
  .contact-form-section { padding-left: 1rem; padding-right: 1rem; }

  .content-section,
  .article-layout-section { padding: 2rem 1rem; }

  .about-cta-row { flex-direction: column; }
  .about-cta-row .btn-primary,
  .about-cta-row .btn-outline { text-align: center; }

  .nav-aside nav ul li a { font-size: 1.1rem; }
}

/* ── prefers-reduced-motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .ktype-split, .ktype-reveal { animation: none; }
}
