/* ============================================
   ThirdCore Systems — global styles
   Palette derived from logo: charcoal, crimson, steel
   ============================================ */

:root {
  --bg: #0a0d12;
  --bg-2: #0f1319;
  --bg-3: #141922;
  --surface: #181d27;
  --surface-2: #1f2530;
  --border: #2a3140;
  --border-strong: #3a4458;

  --text: #e6e9ef;
  --text-muted: #9aa3b2;
  --text-dim: #6b7385;

  --accent: #c8202b;        /* crimson from logo */
  --accent-hot: #e63946;
  --accent-deep: #8f161e;
  --steel: #8c95a3;

  --font-display: 'Saira Condensed', 'Arial Narrow', sans-serif;
  --font-body: 'Source Sans 3', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --container: 1180px;
  --radius: 2px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}

/* ============================================
   Background atmosphere
   ============================================ */

.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 40%, transparent 90%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 40%, transparent 90%);
}

.bg-glow {
  position: fixed;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 1000px;
  height: 700px;
  background: radial-gradient(ellipse at center, rgba(200, 32, 43, 0.18) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
  filter: blur(40px);
}

main, .site-header, .site-footer { position: relative; z-index: 1; }

/* ============================================
   Header
   ============================================ */

.site-header {
  position: sticky;
  top: 0;
  background: rgba(10, 13, 18, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
}

.brand-logo {
  height: 38px;
  width: auto;
}

.nav {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.2s ease;
  position: relative;
}

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

.nav-cta {
  color: var(--text) !important;
  padding: 10px 20px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  transition: all 0.2s ease;
}

.nav-cta:hover {
  border-color: var(--accent);
  background: rgba(200, 32, 43, 0.08);
}

/* ============================================
   Hero
   ============================================ */

.hero {
  padding: 120px 0 100px;
  position: relative;
}

.hero-inner { max-width: 920px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-bottom: 32px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(20, 25, 34, 0.6);
}

.eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin-bottom: 28px;
  text-transform: uppercase;
}

.accent {
  color: var(--accent);
  position: relative;
}

.hero-sub {
  font-size: 19px;
  color: var(--text-muted);
  max-width: 700px;
  margin-bottom: 40px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 0 rgba(200, 32, 43, 0.5);
}

.btn-primary:hover {
  background: var(--accent-hot);
  box-shadow: 0 8px 24px -8px rgba(200, 32, 43, 0.6);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-ghost:hover {
  border-color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

/* ============================================
   Section structure
   ============================================ */

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

.section-alt {
  background: linear-gradient(180deg, transparent, var(--bg-2) 20%, var(--bg-2) 80%, transparent);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head {
  margin-bottom: 64px;
  max-width: 720px;
}

.section-num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.2em;
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(36px, 4.5vw, 52px);
  text-transform: uppercase;
  letter-spacing: -0.01em;
  margin-bottom: 20px;
  line-height: 1.1;
}

.section-lede {
  font-size: 18px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ============================================
   Capabilities grid
   ============================================ */

.cap-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.cap-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.cap-card {
  background: var(--bg);
  padding: 40px 36px;
  position: relative;
  transition: background 0.3s ease;
}

.cap-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.cap-card:hover {
  background: var(--bg-2);
}

.cap-card:hover::before { width: 100%; }

.cap-icon {
  width: 44px;
  height: 44px;
  color: var(--accent);
  margin-bottom: 24px;
}

.cap-icon svg { width: 100%; height: 100%; }

.cap-card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 12px;
}

.cap-card p {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.6;
}

/* ============================================
   About
   ============================================ */

.about-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 80px;
  align-items: start;
}

.about-head .section-title { margin-bottom: 0; }

.about-lead {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 26px;
  line-height: 1.3;
  color: var(--text);
  margin-bottom: 24px;
  text-transform: none;
}

.about-body p {
  color: var(--text-muted);
  margin-bottom: 18px;
  font-size: 17px;
}

.creds {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 40px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.cred {
  padding: 24px 0;
  padding-right: 24px;
  border-right: 1px solid var(--border);
}

.cred:last-child { border-right: none; padding-right: 0; padding-left: 24px; }
.cred:nth-child(2) { padding-left: 24px; }

.cred-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.cred-value {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* ============================================
   Contact
   ============================================ */

.contact-inner { max-width: 900px; }

.contact-lede {
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 48px;
  max-width: 640px;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.contact-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 28px 24px;
  border-radius: var(--radius);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.contact-card:not(.contact-static):hover {
  border-color: var(--accent);
  background: var(--surface-2);
  transform: translateY(-2px);
}

.contact-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.contact-value {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  color: var(--text);
  letter-spacing: 0.01em;
  word-break: break-word;
}

/* ============================================
   Footer
   ============================================ */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  margin-top: 40px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-mark {
  color: var(--accent);
  font-size: 18px;
}

.footer-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 860px) {
  .nav { gap: 20px; }
  .nav a:not(.nav-cta) { display: none; }

  .hero { padding: 80px 0 60px; }

  .section { padding: 70px 0; }
  .section-head { margin-bottom: 44px; }

  .cap-grid { grid-template-columns: 1fr; }
  .cap-grid-3 { grid-template-columns: 1fr; }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .creds {
    grid-template-columns: 1fr;
  }
  .cred {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 20px 0 !important;
  }
  .cred:last-child { border-bottom: none; }

  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 500px) {
  .container { padding: 0 20px; }
  .brand-logo { height: 30px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .btn { justify-content: center; }
}
