/* ============================================================
   Arknights: Origin Point — Shared Theme & Design Tokens
   Extracted from the design mockup head; used across all pages.
   Default theme: DARK (matches the design mockup's visual intent).
   ============================================================ */

:root {
  /* Brand primary scale: Originium Amber */
  --aop-primary-50: #fff8f0;
  --aop-primary-100: #ffead1;
  --aop-primary-200: #ffd0a3;
  --aop-primary-300: #ffad6b;
  --aop-primary-400: #ff8a3d;
  --aop-primary-500: #f97316;
  --aop-primary-600: #ea580c;
  --aop-primary-700: #c2410c;
  --aop-primary-800: #9a3412;
  --aop-primary-900: #7c2d12;

  /* Neutral scale: Deep space */
  --aop-neutral-50: #f6f6f8;
  --aop-neutral-100: #e7e7ec;
  --aop-neutral-200: #d1d1db;
  --aop-neutral-300: #a9a9b8;
  --aop-neutral-400: #7a7a8f;
  --aop-neutral-500: #55556b;
  --aop-neutral-600: #3f3f54;
  --aop-neutral-700: #2a2a3f;
  --aop-neutral-800: #181826;
  --aop-neutral-900: #0b0b10;

  /* Cyan accent for data/tech highlights */
  --aop-cyan-300: #67e8f9;
  --aop-cyan-400: #22d3ee;
  --aop-cyan-500: #06b6d4;
  --aop-cyan-600: #0891b2;

  /* Semantic aliases — dark mode default */
  --aop-background: var(--aop-neutral-900);
  --aop-foreground: var(--aop-neutral-50);
  --aop-card: var(--aop-neutral-800);
  --aop-card-foreground: var(--aop-neutral-100);
  --aop-popover: var(--aop-neutral-800);
  --aop-popover-foreground: var(--aop-neutral-100);
  --aop-primary: var(--aop-primary-500);
  --aop-primary-foreground: #ffffff;
  --aop-muted: var(--aop-neutral-800);
  --aop-muted-foreground: var(--aop-neutral-400);
  --aop-border: rgba(231, 231, 236, 0.12);
  --aop-input: rgba(231, 231, 236, 0.14);
  --aop-ring: var(--aop-primary-500);
  --aop-radius-small: 4px;
  --aop-radius-medium: 8px;
  --aop-radius-large: 12px;

  /* State colors */
  --state-success: #22c55e;
  --state-warning: #eab308;
  --state-error: #ef4444;
  --state-info: var(--aop-cyan-500);

  /* Typography */
  --aop-font-title: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --aop-font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --aop-font-mono: "JetBrains Mono", "SF Mono", Consolas, monospace;

  /* Spacing */
  --aop-section-py: 6rem;

  /* Layout */
  --aop-nav-h: 4rem;
}

/* Light theme override (available for future toggle; not active by default) */
html.light {
  --aop-background: var(--aop-neutral-50);
  --aop-foreground: var(--aop-neutral-900);
  --aop-card: #ffffff;
  --aop-card-foreground: var(--aop-neutral-900);
  --aop-popover: #ffffff;
  --aop-popover-foreground: var(--aop-neutral-900);
  --aop-primary: var(--aop-primary-600);
  --aop-primary-foreground: #ffffff;
  --aop-muted: var(--aop-neutral-100);
  --aop-muted-foreground: var(--aop-neutral-500);
  --aop-border: rgba(11, 11, 16, 0.12);
  --aop-input: rgba(11, 11, 16, 0.14);
}

body {
  font-family: var(--aop-font-body);
  background-color: var(--aop-background);
  color: var(--aop-foreground);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Typography helpers ---------- */
.aop-title {
  font-family: var(--aop-font-title);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
}
.aop-heading-xl {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.aop-heading-lg {
  font-size: clamp(1.75rem, 3vw, 2.75rem);
  font-weight: 700;
  line-height: 1.2;
}
.aop-heading-md {
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  font-weight: 600;
  line-height: 1.3;
}
.aop-body-lg {
  font-size: 1.125rem;
  color: var(--aop-muted-foreground);
}
.aop-body {
  font-size: 1rem;
  color: var(--aop-muted-foreground);
}
.aop-caption {
  font-family: var(--aop-font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--aop-primary);
}

/* ---------- Layout helpers ---------- */
.aop-section {
  padding-top: var(--aop-section-py);
  padding-bottom: var(--aop-section-py);
}
.aop-container {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* ---------- Components ---------- */
.aop-card {
  background-color: var(--aop-card);
  color: var(--aop-card-foreground);
  border: 1px solid var(--aop-border);
  border-radius: var(--aop-radius-large);
}
.aop-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: var(--aop-radius-medium);
  background-color: var(--aop-primary);
  color: var(--aop-primary-foreground);
  transition: all 0.2s ease;
}
.aop-button:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}
.aop-button-ghost {
  background-color: transparent;
  color: var(--aop-foreground);
  border: 1px solid var(--aop-border);
}
.aop-button-ghost:hover {
  background-color: var(--aop-muted);
}
.aop-gradient-text {
  background: linear-gradient(135deg, var(--aop-primary-400), var(--aop-cyan-400));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.aop-glow {
  box-shadow: 0 0 40px rgba(249, 115, 22, 0.15);
}
.aop-border-glow {
  border-color: rgba(249, 115, 22, 0.35);
}

/* ---------- Semantic token fallback (color/border/ring utilities) ---------- */
.bg-background { background-color: var(--aop-background); }
.text-background { color: var(--aop-background); }
.border-background { border-color: var(--aop-background); }
.ring-background { --tw-ring-color: var(--aop-background); }
.bg-foreground { background-color: var(--aop-foreground); }
.text-foreground { color: var(--aop-foreground); }
.border-foreground { border-color: var(--aop-foreground); }
.ring-foreground { --tw-ring-color: var(--aop-foreground); }
.bg-card { background-color: var(--aop-card); }
.text-card { color: var(--aop-card); }
.border-card { border-color: var(--aop-card); }
.ring-card { --tw-ring-color: var(--aop-card); }
.bg-card-foreground { background-color: var(--aop-card-foreground); }
.text-card-foreground { color: var(--aop-card-foreground); }
.border-card-foreground { border-color: var(--aop-card-foreground); }
.ring-card-foreground { --tw-ring-color: var(--aop-card-foreground); }
.bg-popover { background-color: var(--aop-popover); }
.text-popover { color: var(--aop-popover); }
.border-popover { border-color: var(--aop-popover); }
.ring-popover { --tw-ring-color: var(--aop-popover); }
.bg-popover-foreground { background-color: var(--aop-popover-foreground); }
.text-popover-foreground { color: var(--aop-popover-foreground); }
.border-popover-foreground { border-color: var(--aop-popover-foreground); }
.ring-popover-foreground { --tw-ring-color: var(--aop-popover-foreground); }
.bg-primary { background-color: var(--aop-primary); }
.text-primary { color: var(--aop-primary); }
.border-primary { border-color: var(--aop-primary); }
.ring-primary { --tw-ring-color: var(--aop-primary); }
.bg-primary-foreground { background-color: var(--aop-primary-foreground); }
.text-primary-foreground { color: var(--aop-primary-foreground); }
.border-primary-foreground { border-color: var(--aop-primary-foreground); }
.ring-primary-foreground { --tw-ring-color: var(--aop-primary-foreground); }
.bg-muted { background-color: var(--aop-muted); }
.text-muted { color: var(--aop-muted); }
.border-muted { border-color: var(--aop-muted); }
.ring-muted { --tw-ring-color: var(--aop-muted); }
.bg-muted-foreground { background-color: var(--aop-muted-foreground); }
.text-muted-foreground { color: var(--aop-muted-foreground); }
.border-muted-foreground { border-color: var(--aop-muted-foreground); }
.ring-muted-foreground { --tw-ring-color: var(--aop-muted-foreground); }
.bg-border { background-color: var(--aop-border); }
.text-border { color: var(--aop-border); }
.border-border { border-color: var(--aop-border); }
.ring-border { --tw-ring-color: var(--aop-border); }
.bg-input { background-color: var(--aop-input); }
.text-input { color: var(--aop-input); }
.border-input { border-color: var(--aop-input); }
.ring-input { --tw-ring-color: var(--aop-input); }
.bg-ring { background-color: var(--aop-ring); }
.text-ring { color: var(--aop-ring); }
.border-ring { border-color: var(--aop-ring); }
.ring-ring { --tw-ring-color: var(--aop-ring); }

/* ---------- Base utility: hide scrollbars / icon masks ---------- */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
[data-icon] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  background-color: currentColor;
}

/* ============================================================
   Interaction enhancements (added on top of the design)
   ============================================================ */

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

/* Header gets a stronger shadow/blur once the page is scrolled */
.nav-scrolled {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
  border-bottom-color: rgba(249, 115, 22, 0.25) !important;
}

/* Entrance animation for hero content (CSS-only, no flash risk) */
@keyframes aop-rise {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.aop-animate {
  animation: aop-rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.aop-animate-delay-1 { animation-delay: 0.15s; }
.aop-animate-delay-2 { animation-delay: 0.3s; }
.aop-animate-delay-3 { animation-delay: 0.45s; }

/* Back-to-top button */
.aop-to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 9999px;
  background-color: var(--aop-primary);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 10px 30px rgba(249, 115, 22, 0.35);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.2s ease;
}
.aop-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.aop-to-top:hover { filter: brightness(1.1); }
.aop-to-top:focus-visible { outline: 2px solid var(--aop-primary); outline-offset: 3px; }

/* Image lightbox */
.aop-lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(7, 7, 10, 0.92);
  backdrop-filter: blur(8px);
}
.aop-lightbox.is-open { display: flex; }
.aop-lightbox img {
  max-width: 92vw;
  max-height: 88vh;
  border-radius: var(--aop-radius-large);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  border: 1px solid var(--aop-border);
}
.aop-lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.aop-lightbox-close:hover { background: var(--aop-primary); }

/* Responsive: slightly tighter section padding on small screens */
@media (max-width: 640px) {
  :root { --aop-section-py: 4rem; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .aop-animate { animation: none; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
