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

body,
h1,
h2,
h3,
h4,
p,
ul,
ol,
figure,
blockquote,
dl,
dd {
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

button {
  border: 0;
  border-radius: 0;
  background: none;
  cursor: pointer;
}

:root {
  --color-primary: #0B1D3A;
  --color-accent: #FF6B2C;
  --color-secondary: #3D348B;
  --color-tertiary: #6B2A4E;
  --color-light: #F4F6FA;
  --color-dark: #081020;
  --color-text: #1A1D21;
  --color-muted: #5A6472;
  --color-border: #D0D6E0;
  --color-success: #227A57;
  --font-sans: "Inter", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --shell-width: 1280px;
  --header-height: 72px;
  --space-unit: 8px;
  --scroll-progress: 0;
}

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

body {
  min-height: 100vh;
  background: var(--color-light);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--color-primary);
  text-decoration-color: var(--color-accent);
}

a:hover {
  color: var(--color-accent);
}

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

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

.shell {
  width: 100%;
  max-width: var(--shell-width);
  margin-inline: auto;
  padding-inline: 2rem;
}

.shell-narrow {
  max-width: 900px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 500;
  padding: 0.75rem 1.25rem;
  background: var(--color-accent);
  color: var(--color-primary);
  font-weight: 700;
  text-decoration: none;
  border-radius: 0 0 6px 0;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 140%);
  color: #fff;
  box-shadow: 0 1px 4px rgba(8, 16, 32, 0.3);
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, transparent 60%, rgba(255, 255, 255, 0.04) 60%),
    radial-gradient(circle at 90% 0%, rgba(255, 107, 44, 0.15), transparent 60%);
  pointer-events: none;
  background-size: 100% 100%, 100% 100%;
}

.header-shell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: var(--header-height);
  padding-block: 0.5rem;
}

.scroll-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.12);
  pointer-events: none;
  z-index: 5;
}

.scroll-progress::before {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--color-accent) 0%, #FFB78C 100%);
  transform: scaleX(var(--scroll-progress, 0));
  transform-origin: left center;
  will-change: transform;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
}

.brand:hover,
.brand:focus-visible {
  color: #fff;
}

.brand-mark {
  position: relative;
  display: inline-block;
  width: 1.25em;
  height: 1.25em;
  flex: none;
  color: var(--color-accent);
}

.brand-mark::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 70%;
  height: 2px;
  background: currentColor;
  transform: translateY(-50%);
}

.brand-mark::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;
  width: 0.55em;
  height: 0.55em;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: translateY(-50%) rotate(45deg);
}

.main-nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-list a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.6rem;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.16s ease, background-color 0.16s ease;
}

.nav-list a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.nav-list a[aria-current="page"] {
  color: #fff;
  background: rgba(255, 107, 44, 0.18);
}

.nav-list a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0.6rem;
  right: 0.6rem;
  bottom: 2px;
  height: 2px;
  background: var(--color-accent);
}

.nav-index {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--color-accent);
  letter-spacing: 0.05em;
  opacity: 0.85;
}

.nav-label {
  font-size: inherit;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.quick-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding-right: 1rem;
  border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.quick-label {
  margin-right: 0.25rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.5);
}

.quick-links a {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.5rem;
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.85rem;
  text-decoration: none;
}

.quick-links a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.08s ease;
}

.btn:active {
  transform: scale(0.98);
}

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

.btn-accent:hover {
  background: #FF8650;
  color: var(--color-primary);
}

.btn-outline {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
}

.btn-outline:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.btn-compact {
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
}

.nav-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  color: #fff;
  background: transparent;
}

.nav-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
}

.nav-toggle:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

.toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  margin-block: 3px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .toggle-bar:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .toggle-bar:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}

.content {
  padding-block: 3rem;
}

.prose {
  max-width: 68ch;
  line-height: 1.75;
}

.prose h1,
.prose h2,
.prose h3,
.prose h4 {
  line-height: 1.2;
  color: var(--color-primary);
  font-weight: 700;
}

.prose h1 {
  font-size: 2.25rem;
}

.prose h2 {
  font-size: 1.75rem;
}

.prose h3 {
  font-size: 1.25rem;
}

.prose p + p {
  margin-top: 1em;
}

.breadcrumb {
  margin-bottom: 2rem;
  font-size: 0.85rem;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.breadcrumb li + li::before {
  content: "→";
  margin-inline: 0.25em 0.5em;
  color: var(--color-muted);
}

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

.breadcrumb a:hover {
  color: var(--color-accent);
}

.breadcrumb [aria-current="page"] {
  color: var(--color-text);
  font-weight: 600;
}

.grid {
  display: grid;
  gap: 2rem;
}

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

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

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

.grid-12 {
  grid-template-columns: repeat(12, 1fr);
}

.col-span-3 {
  grid-column: span 3;
}

.col-span-4 {
  grid-column: span 4;
}

.col-span-6 {
  grid-column: span 6;
}

.col-span-8 {
  grid-column: span 8;
}

.col-span-9 {
  grid-column: span 9;
}

.col-span-12 {
  grid-column: span 12;
}

.media-frame {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-primary) 100%);
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
}

.media-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.08) 50%, transparent 65%);
}

.media-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-placeholder {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
}

.status-dot {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  margin-right: 0.4em;
  border-radius: 50%;
  background: var(--color-success);
  vertical-align: middle;
}

.status-dot[data-status="accent"] {
  background: var(--color-accent);
}

.status-dot[data-status="muted"] {
  background: var(--color-muted);
}

.text-muted {
  color: var(--color-muted);
}

.text-accent {
  color: var(--color-accent);
}

.text-primary {
  color: var(--color-primary);
}

.bg-dark {
  background: var(--color-dark);
  color: rgba(255, 255, 255, 0.8);
}

.site-footer {
  background: var(--color-dark);
  color: rgba(255, 255, 255, 0.78);
  padding-top: 3.5rem;
  padding-bottom: 2rem;
  font-size: 0.9rem;
  border-top: 2px solid var(--color-accent);
}

.footer-grid {
  display: grid;
  grid-template-columns: 3fr 2fr 2fr 3fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand .brand {
  margin-bottom: 1rem;
}

.footer-about {
  max-width: 30rem;
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.65);
}

.footer-trust {
  max-width: 30rem;
  padding-left: 0.75rem;
  border-left: 3px solid var(--color-accent);
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.85rem;
}

.footer-heading {
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.footer-list li + li {
  margin-top: 0.5rem;
}

.footer-list a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
}

.footer-list a::before {
  content: "→";
  color: var(--color-accent);
  font-size: 0.8rem;
  opacity: 0.8;
}

.footer-list a:hover {
  color: #fff;
}

.footer-contact p {
  margin-bottom: 0.35rem;
}

.footer-note {
  margin-top: 0.75rem;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.8rem;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.5rem;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
}

.footer-copy,
.footer-icp {
  margin: 0;
}

@media (max-width: 1200px) {
  .quick-links {
    display: none;
  }
}

@media (max-width: 992px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }

  .footer-contact {
    grid-column: span 2;
  }

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

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

  .col-span-3,
  .col-span-4,
  .col-span-6,
  .col-span-8,
  .col-span-9,
  .col-span-12 {
    grid-column: span 12;
  }
}

@media (max-width: 900px) {
  .nav-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    display: block;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    background: rgba(8, 16, 32, 0.98);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .main-nav[data-open] {
    max-height: calc(100vh - var(--header-height));
    overflow-y: auto;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 0;
  }

  .nav-list a {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }
}

@media (max-width: 640px) {
  .shell {
    padding-inline: 1rem;
  }

  .header-shell {
    gap: 0.75rem;
  }

  .brand-text {
    font-size: 1.125rem;
  }

  .btn-compact {
    padding: 0.4rem 0.6rem;
    font-size: 0.75rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-contact {
    grid-column: span 1;
  }

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
