/* ============================================================
   SITEPLIX — Electric Tech Design System v2
   Space Grotesk / Inter · deep-navy atmosphere · hard-edged
   geometric components
   ============================================================ */

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

:root {
  /* Palette */
  --bg-header: #000000;        /* Pitch black header/footer chrome */
  --bg-primary: #0A0F1E;       /* Deep navy page canvas */
  --bg-secondary: #101828;     /* Panel surface */
  --accent-primary: #0047FF;   /* Electric blue */
  --accent-hover: #3B82F6;     /* Focus blue */
  --text-main: #FFFFFF;
  --text-muted: #99A3BA;
  --border-glow: rgba(0, 71, 255, 0.25);

  /* Typography */
  --font-display: 'Space Grotesk', 'Segoe UI', sans-serif;
  --font-body: 'Inter', -apple-system, 'Segoe UI', sans-serif;

  /* Fluid typography matrix */
  --fs-hero:    clamp(2.1rem, 5vw + 0.5rem, 3.6rem);
  --fs-h2:      clamp(1.4rem, 3vw, 1.9rem);
  --fs-h3:      clamp(1.02rem, 2.2vw, 1.18rem);
  --fs-body:    clamp(0.98rem, 1.8vw, 1.05rem);
  --fs-small:   clamp(0.85rem, 1.6vw, 0.94rem);
  --fs-caption: clamp(0.72rem, 1.4vw, 0.8rem);

  --radius: 4px;
  --max-w: 1200px;
}

/* Base */
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  color: var(--text-main);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  background-color: var(--bg-primary);
  background-image:
    radial-gradient(55% 45% at 12% -5%, rgba(0, 71, 255, 0.20), transparent 70%),
    radial-gradient(45% 40% at 92% 8%, rgba(59, 130, 246, 0.10), transparent 70%),
    radial-gradient(60% 55% at 50% 115%, rgba(0, 71, 255, 0.12), transparent 70%);
  background-attachment: fixed;
}
/* Faint engineering grid over the whole canvas */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1;
  background-image:
    linear-gradient(rgba(153, 163, 186, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(153, 163, 186, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  pointer-events: none;
}
img { max-width: 100%; display: block; }
a { color: var(--accent-hover); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Typography */
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; color: var(--text-main); letter-spacing: -0.015em; }
h1, .hero-title { font-size: var(--fs-hero); line-height: 1.08; }
h2, .section-title { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
p, li, span, label, input, select, textarea, button, .btn { font-family: var(--font-body); }

/* Layout containers */
.container { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 5%; }
main { min-height: 60vh; }
main.container { max-width: none; padding: 0; }
section { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 3rem 5%; }

/* Header — stays pitch black */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-glow);
}
nav {
  display: flex; justify-content: space-between; align-items: center;
  width: 100%; max-width: var(--max-w); margin: 0 auto;
  padding: 1rem 5%; flex-wrap: wrap; gap: 1rem;
}
.logo-link { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo-link:hover { text-decoration: none; }
.brand-logo {
  display: block;
  height: clamp(36px, 4vw, 46px);
  width: auto; max-width: 100%;
  object-fit: contain; flex-shrink: 0;
}
.logo-text {
  font-family: var(--font-display); font-weight: 700;
  color: var(--text-main); font-size: clamp(1.15rem, 3vw, 1.45rem);
  letter-spacing: 0.1em;
}
.nav-links { display: flex; flex-wrap: wrap; gap: clamp(14px, 2.5vw, 28px); list-style: none; }
.nav-links a { color: var(--text-muted); font-weight: 500; font-size: var(--fs-small); transition: color 0.15s; }
.nav-links a:hover { color: var(--text-main); text-decoration: none; }
.nav-links a.active { color: var(--text-main); border-bottom: 2px solid var(--accent-primary); padding-bottom: 4px; }
.cta-btn {
  display: inline-block; padding: 12px 26px;
  background: var(--accent-primary); color: var(--text-main);
  font-family: var(--font-display); font-weight: 700; font-size: var(--fs-small);
  text-transform: uppercase; letter-spacing: 0.08em;
  border: none; border-radius: var(--radius);
  transition: transform 0.12s ease-out, box-shadow 0.12s ease-out, background 0.15s;
}
.cta-btn:hover {
  background: var(--accent-hover);
  transform: translate(-3px, -3px);
  box-shadow: 3px 3px 0 0 var(--text-main);
  text-decoration: none;
}

/* Hero banner — atmospheric, no glow text, no floating panels */
.hero-banner {
  position: relative;
  width: 100%; max-width: none;
  overflow: hidden;
  padding: clamp(4rem, 9vw, 7rem) 5% clamp(3rem, 7vw, 5rem);
  border-bottom: 1px solid var(--border-glow);
  background:
    radial-gradient(70% 90% at 78% 40%, rgba(0, 71, 255, 0.22), transparent 65%),
    radial-gradient(40% 55% at 95% 85%, rgba(59, 130, 246, 0.14), transparent 70%);
}
.hero-banner .hero-copy {
  max-width: var(--max-w); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: clamp(2rem, 5vw, 4rem); flex-wrap: wrap;
}
.hero-banner .hero-inner { flex: 1 1 400px; max-width: 600px; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 0.6rem; list-style: none; margin-top: 1.4rem; }
.hero-chips li {
  font-size: 0.8rem; font-weight: 600; color: var(--text-muted);
  background: rgba(16, 24, 40, 0.65); border: 1px solid var(--border-glow);
  padding: 6px 12px; border-radius: var(--radius);
}

/* ---- Centered cinematic hero: gradient headline over a flowing chrome ribbon ---- */
.hero-centered {
  text-align: center;
  padding: clamp(4.5rem, 10vw, 8rem) 5% clamp(3.5rem, 8vw, 6rem);
}
/* Faint vertical grid lines across the hero */
.hero-centered::before {
  content: ""; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(90deg,
    rgba(153, 163, 186, 0.06) 0, rgba(153, 163, 186, 0.06) 1px,
    transparent 1px, transparent 216px);
  pointer-events: none;
}
.hero-center { position: relative; z-index: 2; max-width: 940px; margin: 0 auto; }
.hero-centered .hero-title {
  font-size: clamp(2.6rem, 6.5vw, 4.6rem);
  margin-bottom: 22px;
}
.hero-gradient {
  background: linear-gradient(100deg, #FFFFFF 25%, #9DB8FF 50%, #F2F6FF 70%, #6FA0FF 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hero-centered .hero-subtitle {
  margin: 0 auto 32px; max-width: 620px;
  color: #B9C2D8;
  text-shadow: 0 1px 4px rgba(3, 7, 20, 0.95), 0 2px 18px rgba(3, 7, 20, 0.85);
}
.hero-gradient { filter: drop-shadow(0 3px 16px rgba(2, 6, 18, 0.9)); }
.hero-centered .hero-actions { justify-content: center; }
.hero-centered .hero-chips { justify-content: center; }

/* Flowing chrome ribbons behind the headline */
.hero-ribbon {
  position: absolute; left: -6%; width: 112%; height: 72%;
  z-index: 1; pointer-events: none;
  filter: drop-shadow(0 0 44px rgba(0, 71, 255, 0.35));
}
.ribbon-main { top: 42%; animation: ribbon-drift 14s ease-in-out infinite; }
.ribbon-back {
  top: 0; opacity: 0.4; transform: scaleX(-1);
  filter: drop-shadow(0 0 30px rgba(0, 71, 255, 0.25));
  animation: ribbon-drift 18s ease-in-out infinite reverse;
}
@keyframes ribbon-drift { 0%, 100% { translate: 0 0; } 50% { translate: 0 -16px; } }
@media (prefers-reduced-motion: reduce) {
  .hero-ribbon { animation: none !important; }
}
.hero-mark {
  position: absolute; z-index: -1;
  right: -4%; top: 50%; transform: translateY(-50%) rotate(8deg);
  height: 160%; width: auto; opacity: 0.14;
  pointer-events: none; user-select: none;
}
.hero-title { margin-bottom: 18px; }
.hero-subtitle { font-size: clamp(1rem, 2.2vw, 1.15rem); color: var(--text-muted); margin-bottom: 30px; max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }

/* Generic hero (subpages) */
#hero {
  width: 100%; max-width: 820px; margin: 0 auto;
  padding: clamp(3rem, 7vw, 5rem) 5% clamp(1.5rem, 4vw, 3rem);
  text-align: center;
}
.kicker {
  display: inline-block; text-transform: uppercase; letter-spacing: 0.14em;
  font-family: var(--font-display);
  font-size: var(--fs-caption); font-weight: 700; color: var(--accent-hover);
  background: rgba(16, 24, 40, 0.8); border: 1px solid var(--border-glow);
  padding: 6px 14px; border-radius: var(--radius); margin-bottom: 20px;
}

/* Buttons — hard offset shadow, no blur */
.btn {
  display: inline-block; padding: 13px 28px; border-radius: var(--radius);
  font-family: var(--font-display);
  font-weight: 700; font-size: var(--fs-small); cursor: pointer; border: none;
  transition: transform 0.12s ease-out, box-shadow 0.12s ease-out, background 0.15s;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent-primary); color: var(--text-main); }
.btn-primary:hover {
  background: var(--accent-hover);
  transform: translate(-3px, -3px);
  box-shadow: 3px 3px 0 0 var(--text-main);
}
.btn-outline { background: rgba(16, 24, 40, 0.6); color: var(--text-main); border: 1px solid var(--border-glow); }
.btn-outline:hover {
  border-color: var(--accent-primary);
  transform: translate(-3px, -3px);
  box-shadow: 3px 3px 0 0 var(--accent-primary);
}

/* Cards */
.card {
  background: var(--bg-secondary); border: 1px solid var(--border-glow);
  border-radius: var(--radius); padding: clamp(20px, 3vw, 28px);
  transition: transform 0.12s ease-out, box-shadow 0.12s ease-out, border-color 0.15s;
}
.card:hover {
  border-color: var(--accent-primary);
  transform: translate(-4px, -4px);
  box-shadow: 4px 4px 0 0 var(--accent-primary), 8px 8px 0 0 rgba(0, 71, 255, 0.3);
}
.card h3 { margin-bottom: 10px; }
.card p { color: var(--text-muted); font-size: var(--fs-small); }

.section-title { text-align: center; margin-bottom: 36px; }

/* Fluid auto-wrapping grids */
#services-grid, #portfolio-render-grid, #pricing-grid,
#capabilities-grid, #contact-info, .grid, .grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  width: 100%;
}
#pricing-grid { align-items: start; }
#contact-info { margin-bottom: 40px; }

/* Capability cards — numbered markers, no icons */
.service-num {
  font-family: var(--font-display);
  font-size: 0.85rem; font-weight: 700; letter-spacing: 0.12em;
  color: var(--accent-hover);
  border-bottom: 2px solid var(--accent-primary);
  display: inline-block; padding-bottom: 4px; margin-bottom: 16px;
}
.feature-list { list-style: none; margin-top: 16px; }
.feature-list li { color: var(--text-muted); font-size: 0.9rem; padding: 5px 0 5px 22px; position: relative; }
.feature-list li::before {
  content: ""; position: absolute; left: 0; top: 12px;
  width: 10px; height: 2px; background: var(--accent-primary);
}

/* Portfolio / demo cards */
.portfolio-shot {
  width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top;
  border: 1px solid var(--border-glow); border-radius: var(--radius);
  margin-bottom: 18px; background: var(--bg-primary);
}
.portfolio-thumb {
  aspect-ratio: 16 / 10; border-radius: var(--radius); margin-bottom: 18px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent, #0047FF), transparent 160%);
  background-color: var(--bg-primary);
  border: 1px solid var(--border-glow);
}
.portfolio-thumb span { font-family: var(--font-display); font-size: 3rem; font-weight: 700; color: rgba(255, 255, 255, 0.9); }
.portfolio-category {
  text-transform: uppercase; font-family: var(--font-display);
  font-size: var(--fs-caption); letter-spacing: 0.1em; font-weight: 700;
  color: var(--accent-hover); margin-bottom: 6px;
}
.portfolio-card .btn { margin-top: 18px; }

/* Pricing */
.pricing-card { display: flex; flex-direction: column; gap: 8px; position: relative; }
.pricing-card .btn { margin-top: 18px; text-align: center; }
.pricing-card.featured { border: 2px solid var(--accent-primary); }
.badge {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--accent-primary); color: var(--text-main);
  font-family: var(--font-display);
  font-size: var(--fs-caption); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em; padding: 5px 14px; border-radius: var(--radius);
}
.price { font-family: var(--font-display); font-size: clamp(1.7rem, 4vw, 2.3rem); font-weight: 700; color: var(--text-main) !important; letter-spacing: -0.01em; }
.price .period { font-family: var(--font-body); font-size: 0.92rem; font-weight: 500; color: var(--text-muted); letter-spacing: 0; }

/* Stats */
#stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 2rem;
  width: 100%;
  background: rgba(16, 24, 40, 0.7); border: 1px solid var(--border-glow);
  border-radius: var(--radius); padding: clamp(24px, 4vw, 36px) 24px; text-align: center;
}
.stat-value { font-family: var(--font-display); font-size: clamp(1.5rem, 3.5vw, 2rem); font-weight: 700; color: var(--accent-hover); }
.stat-label { color: var(--text-muted); font-size: 0.88rem; }

/* Contact */
.form-card { display: flex; flex-direction: column; gap: 18px; max-width: 640px; margin: 0 auto; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field label { font-weight: 600; font-size: 0.9rem; }
.form-field input, .form-field select, .form-field textarea {
  width: 100%;
  background: rgba(10, 15, 30, 0.8); border: 1px solid var(--border-glow); border-radius: var(--radius);
  color: var(--text-main); padding: 12px 14px; font: inherit; font-size: 0.95rem;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: none; border-color: var(--accent-primary); box-shadow: 3px 3px 0 0 var(--border-glow);
}
.form-success { color: var(--accent-hover); font-weight: 600; text-align: center; }

/* Footer — black like the header */
.site-footer { background: var(--bg-header); border-top: 1px solid var(--border-glow); padding: 2rem 0; margin-top: 3rem; }
.site-footer .container { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
#footer-meta { color: var(--text-muted); font-size: 0.88rem; }

/* Loading / error states */
main { opacity: 0; transition: opacity 0.35s ease; }
body.content-loaded main { opacity: 1; }
.load-error {
  background: var(--bg-secondary); border: 1px solid #ef4444;
  color: #fca5a5; padding: 14px 18px; border-radius: var(--radius);
  margin: 24px auto; max-width: 640px; text-align: center;
}
body:has(.load-error) main { opacity: 1; }

/* Responsive: compact nav — logo + CTA on one row, scrollable links below (never 3 stacked rows) */
@media (max-width: 900px) {
  nav { flex-wrap: wrap; row-gap: 0.75rem; }
  .logo-link { order: 1; }
  .cta-btn { order: 2; margin-left: auto; padding: 10px 16px; font-size: 0.78rem; }
  .nav-links {
    order: 3; width: 100%;
    flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start;
    gap: 18px; padding-bottom: 4px;
    scrollbar-width: none;
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a { white-space: nowrap; }
}

/* Responsive: small screens */
@media (max-width: 700px) {
  .hero-ribbon { height: 52%; }
  .ribbon-main { top: 40%; }
  .site-footer .container { flex-direction: column; text-align: center; }
}
