:root {
  --color-primary: #062A1E;
  --color-primary-mid: #0B3D2E;
  --color-primary-bright: #145A3D;
  --color-gold: #D4A843;
  --color-gold-light: #F0D88A;
  --color-red: #8E1F2F;
  --color-cream: #F5F2E9;
  --color-gray: #1A1A1A;
  --color-blue: #3E7CB1;
  --font-headline: "Noto Sans SC", "Archivo Black", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Noto Serif SC", Georgia, "Songti SC", SimSun, serif;
  --font-data: "Roboto Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --container-max: 1440px;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2.5rem;
  --space-6: 4rem;
  --radius: 4px;
  --transition-speed: 0.25s;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-cream);
  background-color: var(--color-primary);
  min-height: 100vh;
}

#main-content {
  min-height: 60vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-headline);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--color-cream);
  margin-top: 0;
  margin-bottom: 0.8rem;
}

h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); }
h2 { font-size: clamp(1.7rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.7rem); }
h4 { font-size: 1.1rem; }
h5, h6 { font-size: 1rem; }

p {
  margin-top: 0;
  margin-bottom: 1rem;
}

a {
  color: var(--color-gold);
  text-decoration: none;
  transition: color var(--transition-speed) ease;
}

a:hover {
  color: var(--color-gold-light);
  text-decoration: underline;
}

ul, ol {
  margin: 0;
  padding: 0;
}

img, svg, video {
  display: block;
  max-width: 100%;
}

button, input, select, textarea {
  font: inherit;
}

[hidden] {
  display: none !important;
}

::selection {
  background: var(--color-gold);
  color: var(--color-primary);
}

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

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 300;
  display: inline-block;
  background: var(--color-gold);
  color: var(--color-primary);
  font-family: var(--font-headline);
  font-weight: 700;
  padding: 0.6rem 1rem;
  border-radius: 0 0 var(--radius) 0;
}

.skip-link:focus {
  left: 0;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background-color: var(--color-primary);
  border-top: 4px solid var(--color-gold);
  border-bottom: 2px solid rgba(212, 168, 67, 0.45);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.7rem;
  flex-shrink: 0;
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  font-family: var(--font-headline);
  font-weight: 900;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  color: var(--color-gold);
  line-height: 1;
}

.brand-tagline {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: rgba(245, 242, 233, 0.65);
  line-height: 1;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  list-style: none;
}

.nav-item {
  margin: 0;
}

.nav-link {
  display: inline-block;
  padding: 0.5rem 0.7rem;
  font-family: var(--font-headline);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--color-cream);
  text-decoration: none;
  position: relative;
  white-space: nowrap;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0.7rem;
  right: 0.7rem;
  bottom: 0.1rem;
  height: 2px;
  background: var(--color-gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.nav-link:hover,
.nav-link[aria-current="page"] {
  color: var(--color-gold-light);
  text-decoration: none;
}

.nav-link:hover::after,
.nav-link[aria-current="page"]::after {
  transform: scaleX(1);
}

.nav-cta {
  flex-shrink: 0;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: 2px solid var(--color-gold);
  border-radius: var(--radius);
  color: var(--color-gold);
  padding: 6px 10px;
  cursor: pointer;
  font-family: var(--font-headline);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
}

.nav-toggle:hover {
  background: rgba(212, 168, 67, 0.15);
}

.nav-toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--color-gold);
}

.nav-toggle-label {
  letter-spacing: 0.05em;
}

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  margin-top: var(--space-6);
  background-color: var(--color-primary);
  border-top: 4px solid var(--color-gold);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 0;
  width: 100%;
  height: 1px;
  background: rgba(245, 242, 233, 0.12);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: var(--space-6);
  padding-top: var(--space-6);
  padding-bottom: var(--space-5);
}

.footer-brand .brand {
  margin-bottom: var(--space-3);
}

.site-footer .brand-tagline {
  display: block;
  margin-top: 0.3rem;
}

.footer-about {
  font-size: 0.95rem;
  color: rgba(245, 242, 233, 0.75);
  max-width: 38ch;
}

.footer-trust {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--color-gold-light);
  border-left: 3px solid var(--color-gold);
  padding-left: 0.8rem;
  margin-top: var(--space-4);
  font-style: italic;
}

.footer-column {
  min-width: 0;
}

.footer-title {
  font-family: var(--font-headline);
  font-size: 0.9rem;
  font-weight: 900;
  color: var(--color-gold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--space-3);
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgba(212, 168, 67, 0.3);
}

.footer-list {
  list-style: none;
}

.footer-list li {
  margin-bottom: 0.45rem;
}

.footer-list a {
  color: rgba(245, 242, 233, 0.75);
  text-decoration: none;
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.footer-list a:hover {
  color: var(--color-gold-light);
  padding-left: 4px;
  text-decoration: none;
}

.footer-contact-line {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.footer-contact-label {
  flex-shrink: 0;
  min-width: 2.5rem;
  font-family: var(--font-data);
  font-weight: 700;
  font-size: 0.7rem;
  color: var(--color-gold);
  padding-top: 0.1rem;
  letter-spacing: 0.04em;
}

.footer-contact-value {
  color: rgba(245, 242, 233, 0.85);
  word-break: break-word;
}

.footer-contact-note {
  font-size: 0.82rem;
  color: rgba(245, 242, 233, 0.55);
  margin-top: 0.8rem;
  border-top: 1px solid rgba(245, 242, 233, 0.12);
  padding-top: 0.8rem;
}

.footer-bottom {
  background: rgba(0, 0, 0, 0.3);
  border-top: 1px solid rgba(212, 168, 67, 0.25);
}

.footer-bottom-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  padding-top: var(--space-3);
  padding-bottom: var(--space-3);
  font-family: var(--font-data);
  font-size: 0.78rem;
  color: rgba(245, 242, 233, 0.6);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.6em 1.4em;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-headline);
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.btn:hover {
  text-decoration: none;
}

.btn-gold {
  background: var(--color-gold);
  border-color: var(--color-gold);
  color: var(--color-primary);
}

.btn-gold:hover {
  background: var(--color-gold-light);
  border-color: var(--color-gold-light);
  color: var(--color-primary);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border-color: var(--color-gold);
  color: var(--color-gold);
}

.btn-outline:hover {
  background: rgba(212, 168, 67, 0.12);
  color: var(--color-gold-light);
  border-color: var(--color-gold-light);
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  margin-bottom: var(--space-4);
}

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
  font-family: var(--font-data);
  font-size: 0.8rem;
  color: rgba(245, 242, 233, 0.5);
}

.breadcrumb-list li {
  display: inline-flex;
  align-items: center;
}

.breadcrumb-list li:not(:last-child)::after {
  content: "/";
  margin-left: 0.35rem;
  color: rgba(212, 168, 67, 0.6);
}

.breadcrumb-list a {
  color: var(--color-gold);
  text-decoration: none;
}

.breadcrumb-list a:hover {
  color: var(--color-gold-light);
  text-decoration: underline;
}

/* ---------- Grid ---------- */
.grid {
  display: grid;
  gap: var(--space-4);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- Card ---------- */
.card {
  background: var(--color-primary-mid);
  border: 1px solid rgba(212, 168, 67, 0.25);
  border-radius: var(--radius);
  padding: var(--space-5);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--color-gold);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* ---------- Frame / Tag / Badge ---------- */
.frame-print {
  position: relative;
  border: 2px solid var(--color-gold);
  outline: 1px solid rgba(212, 168, 67, 0.35);
  outline-offset: 4px;
}

.tag {
  display: inline-block;
  padding: 0.25rem 0.8rem;
  border: 1px solid var(--color-gold);
  background: rgba(212, 168, 67, 0.1);
  color: var(--color-gold-light);
  font-family: var(--font-data);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 2px;
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  font-family: var(--font-data);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.4;
  border-radius: 2px;
  vertical-align: middle;
}

.badge--gold {
  background: var(--color-gold);
  color: var(--color-primary);
}

.badge--red {
  background: var(--color-red);
  color: var(--color-cream);
}

/* ---------- Image Figure ---------- */
.figure {
  position: relative;
  overflow: hidden;
  background-color: var(--color-primary-mid);
  border: 1px solid rgba(212, 168, 67, 0.35);
  border-radius: var(--radius);
}

.figure > img,
.figure .figure-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.figure--16-9 { aspect-ratio: 16 / 9; }
.figure--4-3 { aspect-ratio: 4 / 3; }
.figure--1-1 { aspect-ratio: 1 / 1; }

.figure--16-9 > img,
.figure--4-3 > img,
.figure--1-1 > img,
.figure--16-9 .figure-img,
.figure--4-3 .figure-img,
.figure--1-1 .figure-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.figure figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: var(--space-3) var(--space-4);
  background: linear-gradient(to top, rgba(6, 42, 30, 0.92), transparent);
  color: var(--color-cream);
  font-size: 0.85rem;
}

/* ---------- Steps ---------- */
.steps {
  counter-reset: steps;
  list-style: none;
}

.step {
  counter-increment: steps;
  position: relative;
  padding-left: 3rem;
  margin-bottom: var(--space-4);
  min-height: 2rem;
}

.step::before {
  content: counter(steps, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--font-data);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-gold);
  background: rgba(212, 168, 67, 0.08);
  border: 1px solid rgba(212, 168, 67, 0.4);
  border-radius: 50%;
  width: 2.2rem;
  height: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ---------- Edge Slant ---------- */
.edge-slant {
  clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 28px, 100% 100%, 28px 100%, 0 calc(100% - 28px));
}

/* ---------- Filter ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.filter-btn {
  display: inline-block;
  font-family: var(--font-headline);
  font-size: 0.85rem;
  font-weight: 700;
  background: transparent;
  border: 2px solid rgba(212, 168, 67, 0.35);
  border-radius: 999px;
  color: var(--color-cream);
  padding: 0.45em 1.2em;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.filter-btn:hover {
  border-color: var(--color-gold);
  color: var(--color-gold-light);
}

.filter-btn.is-active {
  background: var(--color-gold);
  border-color: var(--color-gold);
  color: var(--color-primary);
}

.filter-btn.is-active:hover {
  background: var(--color-gold-light);
  color: var(--color-primary);
}

/* ---------- Reveal ---------- */
[data-reveal].is-pre {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Back Top ---------- */
.back-top {
  position: fixed;
  right: var(--space-4);
  bottom: var(--space-4);
  z-index: 500;
  width: 48px;
  height: 48px;
  border: 2px solid var(--color-gold);
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-gold);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
}

.back-top:hover {
  background: var(--color-primary-bright);
  color: var(--color-gold-light);
}

.back-top.is-visible,
.back-top:focus-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ---------- Responsive ---------- */
@media (min-width: 861px) {
  .nav-toggle {
    display: none;
  }
}

@media (max-width: 1100px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-5);
  }

  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 860px) {
  .site-header {
    border-top-width: 3px;
  }

  .header-row {
    gap: var(--space-2);
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--color-primary);
    border-bottom: 3px solid var(--color-gold);
    padding: var(--space-3) var(--space-4) var(--space-4);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.45);
  }

  .site-nav[data-open] {
    display: flex;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-bottom: var(--space-3);
  }

  .nav-item {
    border-bottom: 1px solid rgba(245, 242, 233, 0.08);
  }

  .nav-link {
    display: block;
    padding: 0.85rem 0;
    font-size: 1rem;
  }

  .nav-link::after {
    left: 0;
    right: 0;
    bottom: 0;
  }

  .nav-cta {
    text-align: center;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .brand-tagline {
    display: none;
  }

  .brand-mark {
    font-size: 1.3rem;
  }

  .frame-print {
    outline-offset: 3px;
  }
}

@media (max-width: 640px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-5);
    padding-top: var(--space-5);
  }

  .footer-bottom-inner {
    flex-direction: column;
    text-align: center;
    gap: 0.4rem;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .card {
    padding: var(--space-4);
  }

  .back-top {
    right: 1rem;
    bottom: 1rem;
    width: 42px;
    height: 42px;
  }

  .footer-contact-label {
    min-width: 2.2rem;
  }
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  [data-reveal].is-pre {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .card:hover {
    transform: none;
  }

  .back-top {
    transition: none;
  }

  .btn-gold:hover,
  .btn-outline:hover {
    transform: none;
  }
}
