:root {
  --c-primary: #0A2540;
  --c-accent: #FF6B35;
  --c-green: #00C853;
  --c-yellow: #FFC107;
  --c-bg: #F7F4EF;
  --c-gray: #8B8C89;
  --c-terracotta: #B5705C;
  --c-moss: #6A8E5A;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --container: 1240px;
  --radius: 8px;
  --transition: 0.2s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--c-bg);
  color: var(--c-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

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

button {
  font: inherit;
}

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--c-primary);
  color: #fff;
  padding: 8px 16px;
  z-index: 1000;
  border-radius: 0 0 8px 0;
  font-weight: 700;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--c-primary);
  color: #fff;
  box-shadow: 0 4px 20px rgba(10, 37, 64, 0.25);
}

.header-top {
  background: var(--c-accent);
  color: var(--c-primary);
  font-size: 14px;
  font-weight: 700;
  border-bottom: 2px solid var(--c-primary);
}

.header-top-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-block: 6px;
}

.header-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.live-dot {
  width: 8px;
  height: 8px;
  background: var(--c-green);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(0, 200, 83, 0.7);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(0, 200, 83, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(0, 200, 83, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 200, 83, 0); }
}

.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 16px;
  position: relative;
}

.brand {
  font-size: 32px;
  font-weight: 900;
  line-height: 1;
  display: inline-flex;
  align-items: flex-start;
  gap: 4px;
  letter-spacing: -0.02em;
}

.brand-badge {
  font-size: 12px;
  background: var(--c-yellow);
  color: var(--c-primary);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-weight: 700;
  line-height: 1.4;
}

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

.nav-link {
  padding: 10px 16px;
  font-weight: 700;
  font-size: 15px;
  border-radius: 6px;
  transition: background var(--transition), color var(--transition);
}

.nav-link:hover {
  background: rgba(255, 107, 53, 0.15);
  color: var(--c-accent);
}

.nav-link[aria-current="page"] {
  background: var(--c-accent);
  color: #fff;
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
}

.header-cta {
  margin-left: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: 2px solid transparent;
  border-radius: 8px;
  font-weight: 800;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.btn-primary {
  background: var(--c-accent);
  color: #fff;
  box-shadow: 0 4px 14px rgba(255, 107, 53, 0.3);
}

.btn-primary:hover {
  background: #e55a2b;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 107, 53, 0.4);
}

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

.btn-outline:hover {
  background: var(--c-accent);
  color: #fff;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 100%;
  height: 3px;
  background: #fff;
  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(8px) 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(-8px) rotate(-45deg);
}

.scroll-progress {
  position: absolute;
  bottom: -2px;
  left: 0;
  height: 3px;
  width: 100%;
  background: var(--c-yellow);
  transform-origin: 0 50%;
  transform: scaleX(var(--scroll-pct, 0));
}

.site-footer {
  background: var(--c-primary);
  color: #fff;
  margin-top: 80px;
  position: relative;
  overflow: hidden;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--c-accent), var(--c-yellow), var(--c-green), var(--c-accent));
  background-size: 200% 100%;
  animation: slide 4s linear infinite;
}

@keyframes slide {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 32px;
  padding: 48px 0;
}

.footer-brand {
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 12px;
}

.footer-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--c-accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

.footer-link {
  display: block;
  padding: 6px 0;
  opacity: 0.8;
  transition: opacity 0.15s ease, transform 0.15s ease, color 0.15s ease;
  cursor: default;
}

a.footer-link {
  cursor: pointer;
}

.footer-link:hover {
  opacity: 1;
  color: var(--c-accent);
  transform: translateX(4px);
}

.footer-address {
  display: block;
  margin-top: 8px;
  opacity: 0.8;
  font-style: normal;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-block: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 14px;
}

.footer-icp {
  opacity: 0.8;
}

.footer-icp:hover {
  opacity: 1;
  color: var(--c-accent);
}

.section {
  padding: 48px 0;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 24px;
}

.section-title {
  font-size: 28px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  border-left: 4px solid var(--c-accent);
  padding-left: 16px;
}

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

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

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

.card {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 16px rgba(10, 37, 64, 0.06);
  border: 1px solid rgba(139, 140, 137, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(10, 37, 64, 0.12);
}

.media-frame {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--c-gray) 0%, var(--c-terracotta) 100%);
  aspect-ratio: 16 / 9;
}

.media-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.2) 0px,
    rgba(255, 255, 255, 0.2) 2px,
    transparent 2px,
    transparent 8px
  );
  mix-blend-mode: overlay;
}

.tag,
.tag-accent,
.tag-warning {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.6;
}

.tag {
  background: var(--c-moss);
  color: #fff;
}

.tag-accent {
  background: var(--c-accent);
  color: #fff;
}

.tag-warning {
  background: var(--c-yellow);
  color: var(--c-primary);
}

.data-chip {
  display: inline-block;
  background: var(--c-primary);
  color: var(--c-yellow);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 400;
  padding: 4px 12px;
  border-radius: 6px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 0;
  font-size: 14px;
}

.breadcrumbs li:not(:last-child)::after {
  content: '/';
  margin-left: 8px;
  color: var(--c-gray);
}

.breadcrumbs a {
  color: var(--c-gray);
}

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

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

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

@media (max-width: 1024px) {
  .main-nav {
    gap: 0;
  }
  .nav-link {
    padding: 8px 12px;
    font-size: 14px;
  }
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    row-gap: 40px;
  }
  .footer-about {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .header-main {
    flex-wrap: wrap;
    gap: 12px;
  }
  .nav-toggle {
    display: flex;
    order: 3;
  }
  .header-cta {
    order: 2;
    margin-left: auto;
    font-size: 14px;
    padding: 10px 16px;
  }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--c-primary);
    flex-direction: column;
    align-items: stretch;
    padding: 16px 24px;
    gap: 8px;
    border-top: 2px solid var(--c-accent);
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.3);
  }
  .main-nav[data-open] {
    display: flex;
  }
  .nav-link {
    font-size: 16px;
    padding: 12px 16px;
  }
  .header-top-inner {
    justify-content: center;
  }
  .header-live {
    display: none;
  }
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .brand {
    font-size: 24px;
  }
  .header-main {
    padding-block: 12px;
  }
}

@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;
  }
  .live-dot {
    animation: none;
  }
  .scroll-progress {
    transition: none;
  }
}
