/* ════════════════════════════════════════════════════════
   WORLDSCAPE — SHARED DESIGN SYSTEM
   Common styles used across all pages
   Palette: "Terraform" — aurora green / canyon orange / sky blue
   ════════════════════════════════════════════════════════ */

:root {
  /* Core palette */
  --bg-deep:     #06070d;
  --bg-primary:  #0c0f1a;
  --bg-card:     #131727;
  --bg-elevated: #1a1f33;
  --bg-hover:    #232842;

  /* Text */
  --text-primary:   #ecedf3;
  --text-secondary: #8a90a8;
  --text-dim:       #535970;

  /* Accent: aurora green — biome / vegetation / life */
  --accent:        #4ade80;
  --accent-dim:    #22a55e;
  --accent-glow:   rgba(74, 222, 128, 0.18);
  --accent-glow-s: rgba(74, 222, 128, 0.35);

  /* Secondary accent: canyon orange — terrain / sunset / desert */
  --accent2:       #f59e42;
  --accent2-dim:   #d97a26;
  --accent2-glow:  rgba(245, 158, 66, 0.18);
  --accent2-glow-s:rgba(245, 158, 66, 0.35);

  /* Tertiary accent: sky / atmosphere / ocean */
  --accent3:       #38bdf8;
  --accent3-dim:   #0284c7;
  --accent3-glow:  rgba(56, 189, 248, 0.18);

  /* Borders */
  --border:       rgba(255, 255, 255, 0.07);
  --border-hover: rgba(74, 222, 128, 0.25);

  /* Spacing */
  --section-pad: clamp(80px, 10vw, 140px);
  --side-pad:    clamp(24px, 5vw, 80px);

  /* Type */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  --radius: 12px;
  --radius-sm: 8px;
}

/* ─── RESET ─── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font);
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button { border: none; background: none; color: inherit; cursor: pointer; font: inherit; }

/* Subtle starfield background on body */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(74, 222, 128, 0.04), transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(56, 189, 248, 0.04), transparent 50%);
  z-index: 0;
}
main { position: relative; z-index: 1; }

/* ─── SKIP TO CONTENT ─── */
.skip-to-content {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 9999;
  padding: 12px 24px;
  background: var(--accent);
  color: var(--bg-deep);
  font-weight: 700;
  border-radius: var(--radius-sm);
  transition: top 0.2s;
}
.skip-to-content:focus { top: 16px; }

/* ─── SCROLL PROGRESS BAR ─── */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent3), var(--accent2));
  z-index: 10001;
  width: 0%;
  transition: width 0.05s linear;
}

/* ─── NAV ─── */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 0 var(--side-pad);
  backdrop-filter: blur(20px);
  background: rgba(6, 7, 13, 0.7);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}
.nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
}
.logo-icon {
  width: 32px;
  height: 32px;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  filter: drop-shadow(0 0 12px rgba(74, 222, 128, 0.25));
}
.footer-brand .logo-icon { width: 36px; height: 36px; }
.page-header-logo {
  width: 80px;
  height: 80px;
  display: block;
  margin: 0 auto 24px;
  filter: drop-shadow(0 0 32px rgba(74, 222, 128, 0.3));
}
.team-logo-icon {
  width: 96px;
  height: 96px;
  filter: drop-shadow(0 0 32px rgba(74, 222, 128, 0.3));
}
.logo-text { text-transform: lowercase; }
.nav-links { display: flex; gap: 28px; }
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: lowercase;
  letter-spacing: 0.02em;
  transition: color 0.2s;
  position: relative;
}
.nav-links a:hover { color: var(--text-primary); }
.nav-links a.active { color: var(--accent); }
.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}
.nav-cta {
  font-size: 13px;
  font-weight: 600;
  text-transform: lowercase;
  padding: 8px 20px;
  border: 1px solid var(--accent-dim);
  border-radius: 100px;
  color: var(--accent);
  transition: all 0.25s;
}
.nav-cta:hover {
  background: var(--accent);
  color: var(--bg-deep);
  box-shadow: 0 0 24px var(--accent-glow-s);
}

/* ─── HAMBURGER MENU ─── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  cursor: pointer;
  z-index: 1001;
}
.nav-hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.nav-hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.nav-mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(6, 7, 13, 0.96);
  backdrop-filter: blur(24px);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  opacity: 0;
  transition: opacity 0.3s;
}
.nav-mobile-overlay.visible { opacity: 1; }
.nav-mobile-overlay a {
  font-size: 24px;
  font-weight: 600;
  text-transform: lowercase;
  color: var(--text-secondary);
  transition: color 0.2s;
  letter-spacing: -0.01em;
}
.nav-mobile-overlay a:hover { color: var(--accent); }

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  text-transform: lowercase;
  letter-spacing: 0.02em;
  padding: 12px 28px;
  border-radius: 100px;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: pointer;
}
.btn-primary {
  background: var(--accent);
  color: var(--bg-deep);
  box-shadow: 0 0 32px var(--accent-glow);
}
.btn-primary:hover {
  box-shadow: 0 0 48px var(--accent-glow-s), 0 4px 16px rgba(0,0,0,0.4);
  transform: translateY(-2px);
}
.btn-ghost {
  border: 1px solid var(--border-hover);
  color: var(--text-secondary);
}
.btn-ghost:hover {
  border-color: var(--accent-dim);
  color: var(--accent);
  background: rgba(74, 222, 128, 0.04);
}
.btn-large { padding: 16px 36px; font-size: 15px; }
.btn-secondary {
  background: linear-gradient(135deg, var(--accent2), var(--accent2-dim));
  color: #fff;
  box-shadow: 0 0 32px var(--accent2-glow);
}
.btn-secondary:hover {
  box-shadow: 0 0 48px var(--accent2-glow-s), 0 4px 16px rgba(0,0,0,0.4);
  transform: translateY(-2px);
}

/* ─── SECTION COMMON ─── */
section {
  padding: var(--section-pad) var(--side-pad);
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
}
.section-header {
  text-align: center;
  margin-bottom: 64px;
}
.section-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 16px;
  padding: 6px 16px;
  border: 1px solid rgba(74, 222, 128, 0.22);
  border-radius: 100px;
  background: rgba(74, 222, 128, 0.05);
}
.section-header h2 {
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.section-desc {
  max-width: 580px;
  margin: 16px auto 0;
  color: var(--text-secondary);
  font-size: 16px;
}
.accent { color: var(--accent); }
.accent2 { color: var(--accent2); }
.accent3 { color: var(--accent3); }

/* ─── CARDS ─── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  overflow: hidden;
}
.card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), var(--accent-glow), transparent 40%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.card:hover::before { opacity: 1; }

/* ─── FOOTER ─── */
footer {
  border-top: 1px solid var(--border);
  padding: 48px var(--side-pad) 32px;
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
}
.footer-copy {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 400;
  margin-left: 8px;
}
.footer-columns { display: flex; gap: 64px; }
.footer-col h5 {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  margin-bottom: 16px;
}
.footer-col a {
  display: block;
  font-size: 13px;
  color: var(--text-dim);
  text-transform: lowercase;
  transition: color 0.2s;
  margin-bottom: 10px;
}
.footer-col a:hover { color: var(--text-primary); }
.footer-bottom {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-bottom span { font-size: 12px; color: var(--text-dim); }
.footer-social { display: flex; gap: 16px; }
.footer-social a {
  font-size: 13px;
  color: var(--text-dim);
  transition: color 0.2s;
}
.footer-social a:hover { color: var(--accent); }

/* ─── BACK TO TOP ─── */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 900;
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px);
  transition: all 0.3s;
}
.back-to-top.visible { opacity: 1; pointer-events: all; transform: translateY(0); }
.back-to-top:hover { background: var(--accent); border-color: var(--accent); }
.back-to-top:hover svg { stroke: var(--bg-deep); }
.back-to-top svg {
  width: 20px;
  height: 20px;
  stroke: var(--text-secondary);
  stroke-width: 2;
  fill: none;
}

/* ─── ANIMATIONS ─── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes scrollBounce {
  0%, 100% { transform: rotate(45deg) translateY(0); }
  50% { transform: rotate(45deg) translateY(6px); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
@keyframes orbit {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

[data-reveal] {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
[data-reveal].revealed { opacity: 1; transform: translateY(0); }

/* ─── PAGE HEADER (for sub-pages) ─── */
.page-header {
  padding: calc(64px + var(--section-pad)) var(--side-pad) var(--section-pad);
  text-align: center;
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
}
.page-header h1 {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.04em;
  margin-bottom: 16px;
}
.page-header p {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ─── PLACEHOLDER (for missing screenshots) ─── */
.ws-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  background:
    linear-gradient(135deg, rgba(74, 222, 128, 0.04), rgba(56, 189, 248, 0.04)),
    repeating-linear-gradient(45deg, transparent, transparent 12px, rgba(255,255,255,0.02) 12px, rgba(255,255,255,0.02) 13px),
    var(--bg-elevated);
  border: 1px dashed var(--border-hover);
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  min-height: 220px;
  width: 100%;
  font-size: 13px;
  font-family: var(--font-mono);
  text-align: center;
  padding: 24px;
  margin: 12px 0 24px;
}
.ws-placeholder::before {
  content: '◧';
  font-size: 28px;
  color: var(--accent-dim);
  margin-bottom: 4px;
}
.ws-placeholder em {
  color: var(--accent2);
  font-style: normal;
  font-weight: 600;
}

/* ─── FOCUS STYLES ─── */
*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .nav-mobile-overlay { display: flex; }
  .nav-cta { display: none; }
  .footer-columns { gap: 40px; }
}
@media (max-width: 600px) {
  .footer-inner { flex-direction: column; }
  .footer-columns { flex-wrap: wrap; gap: 32px; }
  .footer-bottom { flex-direction: column; text-align: center; }
}
