/* ========== 0. Reset & Base ========== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scrollbar-color: rgba(0, 240, 255, 0.28) #0A0E1A;
  scrollbar-width: thin;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #0A0E1A;
  color: #E6E8EF;
  font-family: "Noto Sans SC", "Source Han Sans SC", sans-serif;
  font-size: 16px;
  line-height: 1.75;
}

main {
  flex: 1 0 auto;
}

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

ul, ol {
  list-style: none;
}

a {
  color: #00F0FF;
  text-decoration: none;
}

a:hover {
  color: #39FF14;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid #39FF14;
  outline-offset: 3px;
  border-radius: 2px;
}

::selection {
  background: rgba(57, 255, 20, 0.22);
  color: #E6E8EF;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #0A0E1A;
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 240, 255, 0.22);
  border-radius: 8px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(57, 255, 20, 0.32);
}

/* ========== 1. Variables ========== */
:root {
  --color-bg: #0A0E1A;
  --color-bg-alt: #0F1421;
  --color-neon: #39FF14;
  --color-blue: #00F0FF;
  --color-orange: #FF6A00;
  --color-text: #E6E8EF;
  --color-muted: #B0B6C3;
  --gradient-neon: linear-gradient(135deg, #39FF14, #00F0FF);
  --font-title: "Noto Serif SC", "Source Han Serif SC", serif;
  --font-body: "Noto Sans SC", "Source Han Sans SC", sans-serif;
  --font-data: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  --container: 1240px;
  --header-h: 72px;
  --space-lg: 48px;
  --space-xl: 80px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ========== 2. Utilities & Layout ========== */
.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;
}

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

.section-pad {
  padding: var(--space-xl) 0;
}

.section-pad-sm {
  padding: var(--space-lg) 0;
}

.divider-line {
  height: 1px;
  border: none;
  background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.28), transparent);
}

/* ========== 3. Headings & Section Head ========== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  font-weight: 800;
  color: var(--color-text);
  line-height: 1.25;
}

.section-head {
  margin-bottom: 40px;
}

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

.section-tag {
  display: inline-block;
  position: relative;
  padding-left: 14px;
  font-family: var(--font-data);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-blue);
  margin-bottom: 10px;
}

.section-tag::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 8px;
  height: 8px;
  background: var(--color-neon);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  transform: translateY(-50%);
}

.section-title {
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.section-sub {
  margin-top: 12px;
  color: var(--color-muted);
  font-size: 15px;
  max-width: 660px;
}

.section-head-center .section-sub {
  margin-left: auto;
  margin-right: auto;
}

/* ========== 4. Skip Link & Accessibility ========== */
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 999;
  transform: translateY(-200%);
  background: var(--gradient-neon);
  color: #0A0E1A;
  font-weight: 700;
  font-size: 14px;
  padding: 12px 24px;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  transition: transform 0.25s;
}

.skip-link:focus {
  transform: translateY(0);
}

#main-content {
  scroll-margin-top: 80px;
}

/* ========== 5. Header ========== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 14, 26, 0.96);
  border-bottom: 1px solid rgba(0, 240, 255, 0.12);
}

.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  height: var(--header-h);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  background: var(--gradient-neon);
  color: #0A0E1A;
  font-family: var(--font-data);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: -0.04em;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  filter: drop-shadow(0 0 8px rgba(0, 240, 255, 0.28));
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.brand-text strong {
  font-family: var(--font-title);
  font-size: 16px;
  font-weight: 800;
  color: var(--color-text);
  letter-spacing: 0.05em;
}

.brand-text small {
  font-family: var(--font-data);
  font-size: 11px;
  color: var(--color-muted);
  letter-spacing: 0.14em;
}

.brand:hover .brand-mark {
  filter: drop-shadow(0 0 14px rgba(57, 255, 20, 0.4));
}

/* ---------- Navigation ---------- */
.site-nav {
  display: block;
}

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

.nav-link {
  position: relative;
  display: block;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--color-muted);
  transition: color 0.2s;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 4px;
  height: 2px;
  background: var(--gradient-neon);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.28s var(--ease-out);
}

.nav-link:hover {
  color: var(--color-text);
}

.nav-link:hover::after {
  transform: scaleX(1);
}

.nav-link[aria-current="page"] {
  color: var(--color-neon);
}

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

/* ---------- Mobile Nav Toggle ---------- */
.nav-toggle {
  display: none;
  position: relative;
  z-index: 120;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(0, 240, 255, 0.22);
  transition: border-color 0.2s;
}

.nav-toggle:hover {
  border-color: rgba(57, 255, 20, 0.4);
}

.nav-toggle-line {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--color-text);
  transition: transform 0.25s var(--ease-out), opacity 0.2s, background 0.2s;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-line {
  background: var(--color-neon);
}

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

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

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

/* ---------- Ticker ---------- */
.ticker-bar {
  display: flex;
  align-items: center;
  overflow: hidden;
  height: 34px;
  background: rgba(15, 20, 33, 0.88);
  border-top: 1px solid rgba(0, 240, 255, 0.1);
}

.ticker-label {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  align-self: stretch;
  padding: 0 14px;
  gap: 6px;
  background: rgba(0, 240, 255, 0.06);
  border-right: 1px solid rgba(0, 240, 255, 0.15);
  font-family: var(--font-data);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--color-blue);
}

.ticker-label::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--color-orange);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(255, 106, 0, 0.6);
  animation: ticker-pulse 1.6s ease-in-out infinite;
}

.ticker-track {
  display: flex;
  align-items: center;
  height: 100%;
  width: max-content;
  will-change: transform;
}

.ticker-track.is-ready {
  animation: ticker-move 38s linear infinite;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: 32px;
  font-family: var(--font-data);
  font-size: 12px;
  color: var(--color-muted);
  white-space: nowrap;
}

.ticker-dot {
  width: 5px;
  height: 5px;
  background: var(--color-neon);
  border-radius: 50%;
}

.ticker-item b {
  color: var(--color-neon);
  font-weight: 600;
}

.ticker-time {
  color: var(--color-orange);
  font-style: normal;
  font-weight: 600;
}

@keyframes ticker-move {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes ticker-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

/* ========== 6. Footer ========== */
.site-footer {
  position: relative;
  background:
    repeating-linear-gradient(-45deg, transparent 0, transparent 42px, rgba(230, 232, 239, 0.012) 42px, rgba(230, 232, 239, 0.012) 43px),
    linear-gradient(180deg, #0A0E1A, #0F1421);
  border-top: 1px solid rgba(0, 240, 255, 0.1);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0, rgba(57, 255, 20, 0.5) 25%, rgba(0, 240, 255, 0.5) 75%, transparent 100%);
  opacity: 0.6;
}

.footer-grid {
  max-width: var(--container);
  margin: 0 auto;
  padding: 52px 24px 44px;
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 1.1fr;
  gap: 48px;
}

.footer-col,
.footer-brand,
.footer-links,
.footer-contact {
  min-width: 0;
}

.footer-brand {
  display: flex;
  flex-direction: column;
}

.footer-title {
  font-family: var(--font-data);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--color-blue);
  margin-bottom: 16px;
}

.footer-statement {
  margin-top: 20px;
  padding-left: 16px;
  background: linear-gradient(180deg, var(--color-neon), var(--color-blue)) left / 3px 100% no-repeat;
  font-size: 14px;
  color: var(--color-muted);
  line-height: 1.8;
  border: none;
}

.footer-nav li + li,
.footer-contact-list li + li {
  margin-top: 12px;
}

.footer-nav a {
  position: relative;
  display: inline-block;
  padding-left: 16px;
  font-size: 14px;
  color: var(--color-muted);
  transition: color 0.2s;
}

.footer-nav a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 6px;
  height: 6px;
  border-top: 1px solid var(--color-blue);
  border-right: 1px solid var(--color-blue);
  transform: translateY(-50%) rotate(45deg);
  transition: border-color 0.2s;
}

.footer-nav a:hover {
  color: var(--color-neon);
}

.footer-nav a:hover::before {
  border-color: var(--color-neon);
}

.footer-contact-list li {
  display: flex;
  gap: 10px;
  font-size: 14px;
  color: var(--color-muted);
  line-height: 1.7;
}

.contact-label {
  flex-shrink: 0;
  min-width: 34px;
  font-family: var(--font-data);
  font-size: 12px;
  color: var(--color-blue);
}

.footer-bottom {
  border-top: 1px solid rgba(230, 232, 239, 0.07);
  padding: 18px 24px;
  text-align: center;
}

.footer-bottom p {
  font-family: var(--font-data);
  font-size: 12px;
  color: var(--color-muted);
}

.footer-bottom p + p {
  margin-top: 4px;
}

/* ---------- Back to Top ---------- */
.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: rgba(15, 20, 33, 0.92);
  border: 1px solid rgba(0, 240, 255, 0.25);
  color: var(--color-blue);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.3s, transform 0.3s, border-color 0.2s, color 0.2s;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}

.back-to-top:hover {
  border-color: rgba(57, 255, 20, 0.4);
  color: var(--color-neon);
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top span {
  font-size: 18px;
  line-height: 1;
}

/* ========== 7. Buttons ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s, color 0.2s;
}

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

.btn-primary {
  background: var(--gradient-neon);
  color: #0A0E1A;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}

.btn-primary:hover {
  box-shadow: 0 6px 28px rgba(0, 240, 255, 0.28);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text);
  border: 1px solid rgba(0, 240, 255, 0.28);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}

.btn-ghost:hover {
  border-color: rgba(57, 255, 20, 0.45);
  color: var(--color-neon);
  box-shadow: 0 0 24px rgba(57, 255, 20, 0.12);
}

/* ========== 8. Cards ========== */
.card {
  background: var(--color-bg-alt);
  border: 1px solid rgba(230, 232, 239, 0.06);
  padding: 28px;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
  transition: border-color 0.25s, transform 0.25s;
}

.card:hover {
  border-color: rgba(0, 240, 255, 0.28);
  transform: translateY(-2px);
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.35));
}

.card-cut {
  position: relative;
  clip-path: polygon(0 0, calc(100% - 24px) 0, 100% 24px, 100% 100%, 24px 100%, 0 calc(100% - 24px));
}

/* ========== 9. Data Elements ========== */
.data-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  font-family: var(--font-data);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-neon);
  background: rgba(57, 255, 20, 0.08);
  border: 1px solid rgba(57, 255, 20, 0.24);
}

.countdown-chip {
  color: var(--color-orange);
  background: rgba(255, 106, 0, 0.08);
  border-color: rgba(255, 106, 0, 0.32);
}

.data-highlight {
  display: inline-block;
  font-family: var(--font-data);
  font-size: 30px;
  font-weight: 700;
  line-height: 1.25;
  padding: 4px 16px;
  color: #0A0E1A;
  background: var(--gradient-neon);
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
  letter-spacing: -0.03em;
}

/* ========== 10. Breadcrumb ========== */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--color-muted);
}

.breadcrumb a {
  color: var(--color-blue);
  transition: color 0.2s;
}

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

.breadcrumb-sep {
  font-family: var(--font-data);
  font-size: 12px;
  color: rgba(230, 232, 239, 0.25);
}

.breadcrumb-current {
  color: var(--color-muted);
}

/* ========== 11. Grid ========== */
.grid-2,
.grid-3,
.grid-4 {
  display: grid;
}

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

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

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

/* ========== 12. Image Placeholder ========== */
.img-frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(0, 240, 255, 0.08), transparent 55%),
    repeating-linear-gradient(-45deg, transparent 0, transparent 20px, rgba(230, 232, 239, 0.02) 20px, rgba(230, 232, 239, 0.02) 21px),
    var(--color-bg-alt);
  border: 1px solid rgba(0, 240, 255, 0.1);
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
}

.img-frame::before {
  content: attr(data-label);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-data);
  font-size: 13px;
  letter-spacing: 0.14em;
  color: rgba(176, 182, 195, 0.5);
}

.img-ratio-16x9 {
  aspect-ratio: 16 / 9;
}

.img-ratio-4x3 {
  aspect-ratio: 4 / 3;
}

.img-ratio-3x2 {
  aspect-ratio: 3 / 2;
}

.img-ratio-1x1 {
  aspect-ratio: 1 / 1;
}

/* ========== 13. Scroll Reveal ========== */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
  will-change: opacity, transform;
}

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

[data-reveal][data-delay="1"] {
  transition-delay: 0.1s;
}

[data-reveal][data-delay="2"] {
  transition-delay: 0.2s;
}

[data-reveal][data-delay="3"] {
  transition-delay: 0.3s;
}

[data-reveal][data-delay="4"] {
  transition-delay: 0.4s;
}

/* ========== 14. Responsive ========== */
@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-3 {
    gap: 24px;
  }
}

@media (max-width: 960px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(82vw, 360px);
    z-index: 99;
    background: rgba(15, 20, 33, 0.98);
    border-left: 1px solid rgba(0, 240, 255, 0.16);
    transform: translateX(100%);
    transition: transform 0.3s var(--ease-out);
    padding: 88px 28px 32px;
    overflow-y: auto;
    box-shadow: none;
  }

  .site-nav[data-open] {
    transform: translateX(0);
    box-shadow: -16px 0 44px rgba(0, 0, 0, 0.5);
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }

  .nav-link {
    font-size: 16px;
    padding: 15px 12px;
    border-bottom: 1px solid rgba(230, 232, 239, 0.06);
  }

  .nav-link::after {
    display: none;
  }

  .nav-link[aria-current="page"] {
    color: var(--color-neon);
    background: rgba(57, 255, 20, 0.06);
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 36px;
    padding-top: 44px;
  }
}

@media (max-width: 768px) {
  :root {
    --header-h: 64px;
  }

  .header-inner {
    padding: 0 16px;
  }

  .brand-text small {
    display: none;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
    font-size: 12px;
  }

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

  .section-pad {
    padding: 48px 0;
  }

  .ticker-label {
    display: none;
  }

  .back-to-top {
    right: 16px;
    bottom: 16px;
  }
}

/* ========== 15. 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;
  }

  .ticker-track.is-ready {
    animation: none !important;
  }

  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }

  .skip-link {
    transition: none !important;
  }
}
