/* ========================
   Design Tokens & Reset
   ======================== */
:root {
  --color-bg-deep: #0A192F;
  --color-bg-surface: #112240;
  --color-bg-card: #172A45;
  --color-bg-elevated: #1E3A5F;
  --color-text-primary: #CCD6F6;
  --color-text-secondary: #8892B0;
  --color-accent: #FF7A3C;
  --color-accent-hover: #E66A2E;
  --color-accent-light: rgba(255, 122, 60, 0.15);
  --color-border: rgba(204, 214, 246, 0.08);
  --color-border-hover: rgba(204, 214, 246, 0.2);
  
  --font-sans: 'SF Pro Display', 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Menlo', 'Consolas', ui-monospace, monospace;
  
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-xxl: 6rem;
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --shadow-card: 0 12px 32px -8px rgba(2, 12, 27, 0.6);
  --shadow-focus: 0 0 0 3px rgba(255, 122, 60, 0.4);
  
  --max-width: 1200px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg-deep);
  color: var(--color-text-primary);
  line-height: 1.65;
  overflow-x: hidden;
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

ul, ol {
  list-style: none;
}

/* ========================
   Typography
   ======================== */
h1, h2, h3, h4 {
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: #E6F1FF;
  text-wrap: balance;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); margin-bottom: var(--space-md); }
h3 { font-size: clamp(1.3rem, 3vw, 1.6rem); margin-bottom: var(--space-sm); }
p { margin-bottom: var(--space-sm); color: var(--color-text-primary); }
.text-secondary { color: var(--color-text-secondary); }
.text-mono {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

/* ========================
   Layout & Utilities
   ======================== */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section {
  padding: var(--space-xxl) 0;
  position: relative;
}

.section-alt {
  background-color: var(--color-bg-surface);
}

.grid-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}

@media (max-width: 900px) {
  .grid-split { grid-template-columns: 1fr; gap: var(--space-lg); }
}

.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;
}

/* ========================
   Header & Navigation
   ======================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 25, 47, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-sm) 0;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.brand-name {
  font-weight: 600;
  font-size: 1.1rem;
  color: #E6F1FF;
}

nav ul {
  display: flex;
  gap: var(--space-md);
}

nav a {
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

nav a:hover, nav a:focus-visible {
  color: var(--color-accent);
  background: var(--color-accent-light);
}

nav a[aria-current="page"] {
  color: var(--color-accent);
  font-weight: 600;
}

/* ========================
   Components: Buttons & Cards
   ======================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.25s ease;
  border: 1px solid transparent;
  outline: none;
}

.btn:focus-visible {
  box-shadow: var(--shadow-focus);
}

.btn-primary {
  background-color: var(--color-accent);
  color: #FFFFFF;
}

.btn-primary:hover {
  background-color: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 122, 60, 0.35);
}

.btn-secondary {
  background-color: transparent;
  border-color: var(--color-border-hover);
  color: var(--color-text-primary);
}

.btn-secondary:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--color-accent);
  box-shadow: var(--shadow-card);
}

.card-icon {
  width: 48px;
  height: 48px;
  margin-bottom: var(--space-sm);
  color: var(--color-accent);
}

/* ========================
   Tables
   ======================== */
.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th, td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}

th {
  background: var(--color-bg-surface);
  font-weight: 600;
  color: var(--color-accent);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.03em;
}

td {
  background: var(--color-bg-card);
  color: var(--color-text-primary);
}

tr:last-child td {
  border-bottom: none;
}

/* ========================
   Details / FAQ
   ======================== */
details {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  overflow: hidden;
}

summary {
  padding: 16px 20px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s;
}

summary::-webkit-details-marker { display: none; }

summary::after {
  content: '+';
  font-family: var(--font-mono);
  font-size: 1.2rem;
  color: var(--color-accent);
  transition: transform 0.2s;
}

details[open] summary::after {
  transform: rotate(45deg);
}

details[open] summary {
  background: var(--color-bg-surface);
}

details p {
  padding: 0 20px 16px;
  color: var(--color-text-secondary);
  margin: 0;
  line-height: 1.6;
}

/* ========================
   SVG Animations
   ======================== */
.anim-float-card {
  animation: card-float 6s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}

.anim-float-card.delay-1 { animation-delay: 1.2s; }
.anim-float-card.delay-2 { animation-delay: 2.4s; }

@keyframes card-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

.anim-draw-line {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: draw-path 8s ease-in-out infinite alternate;
}

@keyframes draw-path {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}

.pulse-dot {
  animation: pulse-opacity 4s ease-in-out infinite;
}

@keyframes pulse-opacity {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
