:root {
  --bg: #0b0b0f;
  --bg-elevated: #14141a;
  --bg-card: #1a1a22;
  --text: #f2f2f5;
  --text-muted: #a8a8b3;
  --accent: #e63946;
  --accent-soft: #ff5a67;
  --border: #2a2a35;
  --link: #ff7a84;
  --max: 1120px;
  --radius: 10px;
  --font-display: "Noto Serif SC", "Source Han Serif SC", "Songti SC", serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(230, 57, 70, 0.18), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 0%, rgba(255, 122, 132, 0.08), transparent 50%),
    linear-gradient(180deg, #0d0d12 0%, var(--bg) 40%, #09090c 100%);
  color: var(--text);
  line-height: 1.75;
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--link);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-soft);
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 11, 15, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.brand span {
  font-family: var(--font-display);
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 8px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  align-items: center;
}

.site-nav a {
  color: var(--text-muted);
  font-size: 0.95rem;
  padding: 0.25rem 0;
  position: relative;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--text);
}

.site-nav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

/* Hero */
.hero {
  padding: 3.5rem 0 2.5rem;
  border-bottom: 1px solid var(--border);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem;
  align-items: center;
}

.hero-copy h1 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.55rem);
  line-height: 1.25;
  margin: 0 0 1rem;
  font-weight: 700;
}

.hero-copy .lead {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin: 0 0 1.5rem;
  max-width: 36em;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #c62839);
  color: #fff;
}

.btn-primary:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--accent-soft), var(--accent));
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent-soft);
}

.hero-visual {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.hero-visual img {
  width: 100%;
  aspect-ratio: 9 / 14;
  object-fit: cover;
  object-position: top;
  max-height: 480px;
}

/* Sections */
.section {
  padding: 3rem 0;
}

.section + .section {
  border-top: 1px solid var(--border);
}

.section-head {
  margin-bottom: 1.75rem;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  margin: 0 0 0.5rem;
}

.section-head p {
  margin: 0;
  color: var(--text-muted);
  max-width: 48em;
}

.prose {
  color: var(--text-muted);
}

.prose h2,
.prose h3 {
  color: var(--text);
  font-family: var(--font-display);
  margin-top: 2rem;
}

.prose h2:first-child,
.prose h3:first-child {
  margin-top: 0;
}

.prose p {
  margin: 0 0 1.1rem;
}

.prose ul,
.prose ol {
  padding-left: 1.25rem;
  margin: 0 0 1.25rem;
}

.prose li {
  margin-bottom: 0.45rem;
}

.prose strong {
  color: var(--text);
  font-weight: 600;
}

/* Feature / category grids */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.feature-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.feature-card:hover {
  border-color: rgba(230, 57, 70, 0.45);
  transform: translateY(-3px);
}

.feature-card a.card-link {
  color: inherit;
  display: block;
}

.feature-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: top;
  background: var(--bg-card);
}

.feature-card .card-body {
  padding: 1rem 1.1rem 1.2rem;
}

.feature-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
  color: var(--text);
}

.feature-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Two column media */
.media-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
  margin: 1.5rem 0;
}

.media-row img {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  width: 100%;
  aspect-ratio: 9 / 16;
  max-height: 520px;
  object-fit: cover;
  object-position: top;
}

.media-row .text-col h3 {
  margin-top: 0;
}

.shot-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
}

.shot-grid figure {
  margin: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.shot-grid img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: top;
}

.shot-grid figcaption {
  padding: 0.65rem 0.75rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Tags / category chips */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 1rem 0 1.5rem;
}

.tag-cloud a {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.tag-cloud a:hover {
  border-color: var(--accent);
  color: var(--accent-soft);
}

/* TOC */
.toc {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  margin: 1.5rem 0 2rem;
}

.toc h2 {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
}

.toc ol {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--text-muted);
}

.toc a {
  color: var(--link);
}

/* Breadcrumb */
.breadcrumb {
  padding: 1rem 0 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: var(--accent-soft);
}

.page-hero {
  padding: 1.5rem 0 0.5rem;
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0 0 0.5rem;
}

.page-hero p {
  margin: 0;
  color: var(--text-muted);
}

.legal-content {
  padding: 1.5rem 0 3rem;
  max-width: 48rem;
}

/* Error pages */
.error-page {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1rem;
}

.error-page .code {
  font-family: var(--font-display);
  font-size: clamp(4rem, 12vw, 7rem);
  line-height: 1;
  color: var(--accent);
  margin: 0 0 0.5rem;
}

.error-page h1 {
  margin: 0 0 0.75rem;
  font-size: 1.5rem;
}

.error-page p {
  color: var(--text-muted);
  margin: 0 0 1.5rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: #08080b;
  padding: 2.5rem 0 1.5rem;
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.footer-brand img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.footer-brand h3 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
  font-family: var(--font-display);
}

.footer-brand p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.footer-col h4 {
  margin: 0 0 0.75rem;
  font-size: 0.92rem;
  color: var(--text);
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col li {
  margin-bottom: 0.4rem;
}

.footer-col a {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-col a:hover {
  color: var(--accent-soft);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  justify-content: space-between;
}

/* Animations */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-copy {
  animation: fadeUp 0.7s ease both;
}

.hero-visual {
  animation: fadeUp 0.7s ease 0.15s both;
}

.feature-card {
  animation: fadeUp 0.55s ease both;
}

@media (prefers-reduced-motion: reduce) {
  .hero-copy,
  .hero-visual,
  .feature-card {
    animation: none;
  }
  html {
    scroll-behavior: auto;
  }
}

/* Responsive */
@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-visual img {
    max-height: 420px;
    aspect-ratio: 3 / 4;
  }

  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .shot-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    padding-bottom: 0.75rem;
  }

  .site-nav.open {
    display: flex;
  }

  .header-inner {
    flex-wrap: wrap;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .media-row {
    grid-template-columns: 1fr;
  }

  .media-row img {
    max-height: 420px;
  }

  .shot-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .hero {
    padding: 2rem 0 1.75rem;
  }
}
