/* ===== WorldMesh Global Styles v2.0 ===== */
/* Single source of truth for nav, footer, buttons, typography, layout */

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

:root {
  --bg: #070A0D;
  --bg2: #0D1117;
  --bg3: #121820;
  --bg-light: #1A2230;
  --teal: #00D4A3;
  --teal-dim: #00A37D;
  --teal-faint: rgba(0,212,163,0.08);
  --teal-faint2: rgba(0,212,163,0.04);
  --white: #F0F4F8;
  --muted: #6B7E8F;
  --border: rgba(255,255,255,0.07);
  --border-teal: rgba(0,212,163,0.25);
  --font-head: 'Bebas Neue', sans-serif;
  --font-body: 'Sora', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --max-w: 1200px;
  --nav-h: 64px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}

a { color: var(--teal); text-decoration: none; transition: color 0.2s; }
a:hover { color: #00BF93; }

/* =============================================
   NAV — Fixed top bar, identical on every page
   ============================================= */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  height: var(--nav-h);
  background: rgba(7,10,13,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: var(--font-head);
  font-size: 22px;
  letter-spacing: 0.08em;
  color: var(--white) !important;
  text-decoration: none !important;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.nav-logo:hover { color: var(--white) !important; }

.nav-logo-mark {
  width: 28px; height: 28px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 3px;
  flex-shrink: 0;
}
.nav-logo-mark span {
  background: var(--teal);
  border-radius: 2px;
}
.nav-logo-mark span:nth-child(1) { opacity: 1; }
.nav-logo-mark span:nth-child(2) { opacity: 0.5; }
.nav-logo-mark span:nth-child(3) { opacity: 0.3; }
.nav-logo-mark span:nth-child(4) { opacity: 0.7; }

/* Nav link row */
.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}
.nav-links a {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--muted);
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.2s;
  white-space: nowrap;
}
.nav-links a:hover { color: var(--white); }
.nav-links a.active { color: var(--teal); }

/* Nav CTA button — always last in .nav-links */
.nav-cta {
  background: var(--teal) !important;
  color: #070A0D !important;
  padding: 8px 20px !important;
  border-radius: 4px !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  letter-spacing: 0.05em !important;
  transition: background 0.2s !important;
  margin-left: 4px;
}
.nav-cta:hover {
  background: #00BF93 !important;
  color: #070A0D !important;
}

/* Mobile hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-shrink: 0;
  z-index: 1001;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  margin: 5px 0;
  transition: transform 0.3s, opacity 0.3s;
  border-radius: 1px;
}

/* ===== BUTTONS ===== */
.btn-primary {
  background: var(--teal); color: #070A0D;
  padding: 14px 32px; border-radius: 4px;
  font-family: var(--font-body); font-size: 14px; font-weight: 600;
  letter-spacing: 0.05em; text-transform: uppercase;
  text-decoration: none;
  transition: background 0.2s, transform 0.1s;
  display: inline-block; border: none; cursor: pointer;
}
.btn-primary:hover { background: #00BF93; transform: translateY(-1px); color: #070A0D; }

.btn-secondary {
  color: var(--white); border: 1px solid var(--border);
  padding: 14px 32px; border-radius: 4px;
  font-family: var(--font-body); font-size: 14px; font-weight: 400;
  letter-spacing: 0.05em; text-transform: uppercase;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
  display: inline-block;
}
.btn-secondary:hover { border-color: var(--teal-dim); background: var(--teal-faint); color: var(--white); }

.btn-outline-teal {
  color: var(--teal); border: 1px solid var(--border-teal);
  padding: 12px 28px; border-radius: 4px;
  font-family: var(--font-body); font-size: 13px; font-weight: 500;
  letter-spacing: 0.05em; text-transform: uppercase;
  text-decoration: none; transition: all 0.2s;
  display: inline-block; background: transparent;
}
.btn-outline-teal:hover { background: var(--teal-faint); color: var(--teal); }

/* ===== TYPOGRAPHY ===== */
.section-tag {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em;
  color: var(--teal); text-transform: uppercase; margin-bottom: 16px;
}

h1 {
  font-family: var(--font-head);
  font-size: clamp(48px, 8vw, 96px);
  line-height: 0.95;
  letter-spacing: 0.02em;
  color: var(--white);
  margin-bottom: 24px;
}
h1 .accent { color: var(--teal); }

h2 {
  font-family: var(--font-head);
  font-size: clamp(36px, 5vw, 72px);
  line-height: 1; letter-spacing: 0.02em;
  color: var(--white); margin-bottom: 24px;
}

h3 {
  font-family: var(--font-head);
  font-size: 28px; letter-spacing: 0.04em;
  color: var(--white); margin-bottom: 12px;
}

h4 {
  font-family: var(--font-head);
  font-size: 22px; letter-spacing: 0.03em;
  color: var(--white); margin-bottom: 8px;
}

.section-lead {
  font-size: 17px; font-weight: 300; color: var(--muted);
  max-width: 600px; line-height: 1.8;
}

/* ===== LAYOUT — Standardized spacing ===== */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 48px; }

section {
  padding: 100px 80px;
}

/* Page hero — every subpage uses this for its first section */
.page-hero {
  min-height: 50vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 140px 80px 80px; /* 140 = nav-h(64) + 76px breathing room */
  position: relative;
  overflow: hidden;
}
.page-hero h1 { margin-bottom: 16px; }
.page-hero .section-lead { margin-bottom: 0; }

.page-hero-glow {
  position: absolute;
  width: 600px; height: 400px;
  top: 10%; right: 10%;
  background: radial-gradient(ellipse, rgba(0,212,163,0.08) 0%, transparent 70%);
  pointer-events: none;
}

/* ===== TAGS ===== */
.tag {
  font-family: var(--font-mono); font-size: 11px;
  padding: 4px 10px; border-radius: 2px;
  border: 1px solid var(--border);
  color: var(--muted);
  white-space: nowrap; display: inline-block;
}
.tag.teal { border-color: var(--border-teal); color: var(--teal); background: var(--teal-faint); }

/* ===== CARDS ===== */
.card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 4px; padding: 36px 32px;
  transition: border-color 0.2s, background 0.2s;
}
.card:hover {
  border-color: var(--border-teal);
  background: var(--teal-faint2);
}

/* =============================================
   FOOTER — Identical on every page
   ============================================= */
footer {
  padding: 64px 80px 40px;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
}
.footer-left .footer-logo {
  font-family: var(--font-head);
  font-size: 20px; letter-spacing: 0.08em;
  color: var(--white); margin-bottom: 16px;
  display: block; text-decoration: none;
}
.footer-tagline { font-size: 14px; color: var(--muted); max-width: 320px; line-height: 1.6; }
.footer-email {
  margin-top: 20px;
  font-family: var(--font-mono); font-size: 13px;
  color: var(--teal); text-decoration: none;
}
.footer-email:hover { color: #00BF93; }

.footer-right {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 32px;
}
.footer-col-title {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 16px;
}
.footer-col a {
  display: block; font-size: 14px; color: #5A6A78; text-decoration: none;
  margin-bottom: 8px; transition: color 0.2s;
}
.footer-col a:hover { color: var(--white); }

.footer-bottom {
  padding: 24px 80px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
}
.footer-copy { font-size: 12px; color: var(--muted); }
.footer-legal { display: flex; gap: 24px; }
.footer-legal a { font-size: 12px; color: var(--muted); text-decoration: none; transition: color 0.2s; }
.footer-legal a:hover { color: var(--white); }

/* ===== ANIMATIONS ===== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* =============================================
   RESPONSIVE — Single breakpoint, consistent
   ============================================= */
@media (max-width: 900px) {
  nav {
    padding: 0 24px;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(7,10,13,0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
    z-index: 999;
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    padding: 14px 24px;
    display: block;
    font-size: 14px;
  }
  .nav-links .nav-cta {
    margin: 8px 24px;
    text-align: center;
    display: block;
    padding: 12px 20px !important;
  }

  .nav-toggle { display: block; }

  section { padding: 64px 24px; }
  .page-hero { padding: 110px 24px 48px; }
  .container { padding: 0 24px; }

  footer { grid-template-columns: 1fr; padding: 48px 24px 32px; }
  .footer-right { grid-template-columns: 1fr 1fr; }
  .footer-bottom { padding: 20px 24px; }
}

@media (max-width: 600px) {
  .footer-right { grid-template-columns: 1fr; }
}
