/* ============================================
   AXION-TEC DEMO SITE — Core Styles
   ============================================ */

:root {
  --bg-primary: #0a0a12;
  --bg-card: #10101c;
  --bg-card-hover: #161628;
  --bg-surface: #1a1a2e;
  --axion-red: #CC0000;
  --axion-red-bright: #E60000;
  --axion-blue: #1A3CA0;
  --axion-blue-bright: #2550CC;
  --accent-green: #CC0000;
  --accent-blue: #1A3CA0;
  --accent-cyan: #2550CC;
  --text-primary: #f0f0f5;
  --text-secondary: #8888a0;
  --text-muted: #55556a;
  --border-subtle: rgba(255,255,255,0.06);
  --glow-green: 0 0 30px rgba(204,0,0,0.2);
  --glow-blue: 0 0 30px rgba(26,60,160,0.2);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---- Typography ---- */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.15; }
h1 { font-size: clamp(2.2rem, 5vw, 4rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.8rem); letter-spacing: -0.02em; }
h3 { font-size: clamp(1.2rem, 2vw, 1.6rem); }
p { color: var(--text-secondary); max-width: 640px; }

.label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--axion-red);
}

/* ---- Layout ---- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 100px 0;
  position: relative;
}

/* ---- Navigation ---- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(10,10,15,0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  transition: var(--transition-fast);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
}

.nav-logo img {
  height: 32px;
  width: auto;
}

.nav-logo span {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.nav-logo .tec {
  color: var(--text-muted);
  font-weight: 400;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  transition: var(--transition-fast);
  position: relative;
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--axion-red);
  transition: var(--transition-fast);
}

.nav-links a:hover::after {
  width: 100%;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  text-decoration: none;
}

.btn-primary {
  background: var(--axion-red);
  color: #fff;
}

.btn-primary:hover {
  background: var(--axion-red-bright);
  transform: translateY(-2px);
  box-shadow: var(--glow-green);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid rgba(255,255,255,0.15);
}

.btn-secondary:hover {
  border-color: var(--axion-blue);
  color: var(--axion-blue-bright);
}

.btn-ghost {
  background: rgba(255,255,255,0.05);
  color: var(--text-primary);
  border: 1px solid transparent;
}

.btn-ghost:hover {
  background: rgba(255,255,255,0.1);
}

/* ---- Cards ---- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: var(--transition-smooth);
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(204,0,0,0.2);
  transform: translateY(-4px);
  box-shadow: var(--glow-green);
}

/* ---- Animated gradient mesh background ---- */
.gradient-mesh {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.gradient-mesh::before,
.gradient-mesh::after {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.15;
}

.gradient-mesh::before {
  background: var(--accent-green);
  top: -200px;
  right: -100px;
  animation: meshFloat 12s ease-in-out infinite;
}

.gradient-mesh::after {
  background: var(--accent-blue);
  bottom: -200px;
  left: -100px;
  animation: meshFloat 15s ease-in-out infinite reverse;
}

@keyframes meshFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -40px) scale(1.1); }
  66% { transform: translate(-20px, 20px) scale(0.9); }
}

/* ---- Stat counters ---- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px;
}

.stat-item {
  text-align: center;
  padding: 24px;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--axion-blue-bright);
  font-variant-numeric: tabular-nums;
}

.stat-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ---- Pillar cards ---- */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 48px;
}

.pillar-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 16px;
}

.pillar-icon.green { background: rgba(204,0,0,0.1); color: var(--axion-red); }
.pillar-icon.blue { background: rgba(26,60,160,0.1); color: var(--axion-blue); }
.pillar-icon.cyan { background: rgba(37,80,204,0.12); color: var(--axion-blue-bright); }

.pillar-standard {
  display: inline-block;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  background: rgba(255,255,255,0.04);
  padding: 3px 8px;
  border-radius: 4px;
  margin-top: 12px;
}

/* ---- Sport photo grid ---- */
.sport-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  margin-top: 48px;
}

.sport-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/3;
  cursor: pointer;
}

.sport-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.sport-card:hover img {
  transform: scale(1.05);
}

.sport-card .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 40%, rgba(0,0,0,0.85));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
}

.sport-card .zone-badge {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-green);
  margin-bottom: 4px;
}

.sport-card .zone-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: white;
}

/* ---- Site map section ---- */
.site-map-wrapper {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.site-map-wrapper img {
  width: 100%;
  display: block;
}

.map-hotspot {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--axion-red);
  cursor: pointer;
  animation: pulse-dot 2s ease-in-out infinite;
}

.map-hotspot::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid var(--axion-red);
  opacity: 0.4;
  animation: pulse-ring 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.8; }
}

@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 0.4; }
  100% { transform: scale(2.5); opacity: 0; }
}

/* ---- Phase timeline ---- */
.timeline {
  position: relative;
  padding-left: 40px;
  margin-top: 48px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--axion-red), var(--axion-blue), var(--axion-blue-bright), transparent);
}

.timeline-item {
  position: relative;
  padding-bottom: 40px;
}

.timeline-dot {
  position: absolute;
  left: -34px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 3px solid var(--axion-red);
  background: var(--bg-primary);
}

.timeline-item:nth-child(2) .timeline-dot { border-color: var(--accent-blue); }
.timeline-item:nth-child(3) .timeline-dot { border-color: var(--accent-cyan); }
.timeline-item:nth-child(4) .timeline-dot { border-color: #ff6d00; }

.timeline-phase {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-green);
  margin-bottom: 4px;
}

.timeline-item:nth-child(2) .timeline-phase { color: var(--accent-blue); }
.timeline-item:nth-child(3) .timeline-phase { color: var(--accent-cyan); }
.timeline-item:nth-child(4) .timeline-phase { color: #ff6d00; }

.timeline-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.timeline-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 500px;
}

/* ---- CTA section ---- */
.cta-section {
  text-align: center;
  padding: 120px 0;
}

.cta-section .gradient-mesh::before {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

/* ---- Footer ---- */
.footer {
  border-top: 1px solid var(--border-subtle);
  padding: 40px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* ---- Theme toggle button ---- */
.theme-toggle {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  flex-shrink: 0;
  line-height: 1;
}

.theme-toggle:hover {
  border-color: var(--axion-red);
  color: var(--text-primary);
  background: var(--bg-card-hover);
}

/* ---- Light mode ---- */
[data-theme="light"] {
  --bg-primary: #ffffff;
  --bg-card: #f7f8fa;
  --bg-card-hover: #eef0f4;
  --bg-surface: #e8eaf0;
  --text-primary: #1a1a2e;
  --text-secondary: #555570;
  --text-muted: #8888a0;
  --border-subtle: rgba(0,0,0,0.08);
  --glow-green: 0 4px 20px rgba(204,0,0,0.06);
  --glow-blue: 0 4px 20px rgba(26,60,160,0.06);
}

[data-theme="light"] body {
  background: #ffffff;
}

[data-theme="light"] .nav {
  background: rgba(255,255,255,0.92);
  border-bottom-color: rgba(0,0,0,0.06);
}

[data-theme="light"] .btn-secondary {
  border-color: rgba(0,0,0,0.12);
}

[data-theme="light"] .btn-ghost {
  background: rgba(0,0,0,0.03);
}

[data-theme="light"] .btn-ghost:hover {
  background: rgba(0,0,0,0.06);
}

[data-theme="light"] .gradient-mesh::before,
[data-theme="light"] .gradient-mesh::after {
  opacity: 0.06;
}

[data-theme="light"] .card {
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

[data-theme="light"] .card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

[data-theme="light"] .pillar-standard {
  background: rgba(0,0,0,0.04);
}

[data-theme="light"] .theme-toggle {
  background: #fff;
}

[data-theme="light"] .theme-toggle:hover {
  background: #f0f1f5;
}

[data-theme="light"] .footer {
  background: #f7f8fa;
}

/* ---- Light mode: journey page specifics ---- */
[data-theme="light"] .phone-frame {
  background: #f7f8fa;
  border-color: rgba(0,0,0,0.1);
  box-shadow: 0 20px 60px rgba(0,0,0,0.1), inset 0 0 0 1px rgba(0,0,0,0.05);
}

[data-theme="light"] .phone-notch {
  background: #ddd;
}

[data-theme="light"] .activity-screen {
  background: #f0f1f5;
}

[data-theme="light"] .context-card {
  background: var(--bg-card);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

/* ---- Light mode: index page specifics ---- */
[data-theme="light"] .how-step {
  background: var(--bg-card);
}

[data-theme="light"] .how-step:hover {
  background: var(--bg-card-hover);
}

[data-theme="light"] .map-section {
  background: var(--bg-card);
}

[data-theme="light"] .map-stat-pill {
  background: rgba(255,255,255,0.92);
  border-color: rgba(0,0,0,0.08);
}

[data-theme="light"] .schema-preview {
  background: #1a1a2e;
}

[data-theme="light"] .schema-tabs {
  border-bottom-color: rgba(255,255,255,0.08);
}

[data-theme="light"] .schema-tab {
  color: rgba(255,255,255,0.4);
}

[data-theme="light"] .schema-tab.active {
  color: var(--axion-blue-bright);
}

[data-theme="light"] .schema-code {
  color: #aab;
}

/* ---- Scroll reveal ---- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  section { padding: 60px 0; }
  .nav-links { display: none; }
  .pillars-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .sport-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .sport-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
}
