/* ==========================================================================
   Decfour Systems Inc. — D4Spec Multi-Page Design System (www.decfour.com)
   ========================================================================== */

:root {
  --bg-dark: #060a12;
  --bg-dark-card: #0d1424;
  --bg-dark-elevated: #131c31;
  --border-dark: rgba(148, 163, 184, 0.15);
  --bg-light: #f8fafc;
  --surface: #ffffff;
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-light: #f8fafc;
  --text-dim: #94a3b8;
  --accent: #2563eb;
  --accent-light: #60a5fa;
  --cyan: #06b6d4;
  --emerald: #10b981;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-family: var(--sans); color: var(--text-main); background: var(--bg-light); }
body { overflow-x: hidden; line-height: 1.65; }
.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* Navigation Bar */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(6, 10, 18, 0.86); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-dark);
}
.nav-inner { height: 72px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-weight: 700; font-size: 14px; color: #fff;
  box-shadow: 0 0 24px rgba(37, 99, 235, 0.45);
}
.brand-name { font-weight: 700; font-size: 18px; letter-spacing: -0.02em; }
.brand-sub { font-size: 12px; color: var(--text-dim); margin-left: 8px; padding-left: 8px; border-left: 1px solid rgba(255,255,255,0.16); }
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-link {
  color: var(--text-dim); text-decoration: none; font-size: 14px; font-weight: 500;
  padding: 8px 14px; border-radius: 8px; transition: all 0.2s;
}
.nav-link:hover { color: #fff; background: rgba(255,255,255,0.05); }
.nav-link.active { color: #fff; background: rgba(59, 130, 246, 0.16); border: 1px solid rgba(59, 130, 246, 0.35); }
.btn-nav {
  margin-left: 10px; padding: 9px 18px; border-radius: 8px; font-size: 13px; font-weight: 600;
  background: linear-gradient(135deg, #2563eb 0%, #0284c7 100%); color: #fff !important;
  text-decoration: none; transition: opacity 0.2s;
}
.btn-nav:hover { opacity: 0.92; }

/* Hero Section */
.hero {
  position: relative; background: var(--bg-dark); color: var(--text-light);
  padding: 160px 0 104px; overflow: hidden; text-align: center;
  background-image:
    radial-gradient(circle at 50% 15%, rgba(37, 99, 235, 0.26) 0%, transparent 52%),
    radial-gradient(circle at 80% 75%, rgba(6, 182, 212, 0.14) 0%, transparent 45%),
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 48px 48px, 48px 48px;
}
.hero-compact { padding: 148px 0 84px; }
.hero-center { max-width: 860px; margin: 0 auto; }
.eyebrow-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 16px; border-radius: 999px;
  background: rgba(59, 130, 246, 0.12); border: 1px solid rgba(59, 130, 246, 0.35);
  color: var(--accent-light); font-size: 12px; font-weight: 600; letter-spacing: 0.05em;
  text-transform: uppercase; margin-bottom: 24px;
}
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.hero h1 { font-size: clamp(38px, 5vw, 62px); font-weight: 800; line-height: 1.08; letter-spacing: -0.03em; margin-bottom: 22px; }
.text-gradient { background: linear-gradient(135deg, #60a5fa 0%, #22d3ee 55%, #34d399 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-lead { font-size: 18.5px; color: var(--text-dim); line-height: 1.68; margin: 0 auto 36px; max-width: 720px; }
.hero-lead strong { color: #fff; }
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 60px; }
.btn-primary {
  padding: 14px 28px; border-radius: 10px; font-size: 15px; font-weight: 600;
  background: linear-gradient(135deg, #2563eb 0%, #0284c7 100%); color: #fff;
  text-decoration: none; box-shadow: 0 10px 28px -6px rgba(37, 99, 235, 0.6);
  transition: transform 0.18s, box-shadow 0.18s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 32px -6px rgba(37, 99, 235, 0.8); }
.btn-secondary {
  padding: 14px 26px; border-radius: 10px; font-size: 15px; font-weight: 600;
  background: rgba(255,255,255,0.06); color: #e2e8f0; text-decoration: none;
  border: 1px solid rgba(255,255,255,0.14); transition: background 0.2s;
}
.btn-secondary:hover { background: rgba(255,255,255,0.12); }

.hero-metrics {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
  padding: 28px 32px; background: rgba(13, 20, 36, 0.82);
  border: 1px solid var(--border-dark); border-radius: 16px; text-align: left;
}
.metric-val { font-size: 26px; font-weight: 800; color: #fff; font-family: var(--mono); }
.metric-lbl { font-size: 13px; color: var(--text-dim); margin-top: 4px; }

/* Sections & Typography */
section { padding: 92px 0; }
.section-dark { background: var(--bg-dark); color: var(--text-light); }
.section-header { text-align: center; max-width: 740px; margin: 0 auto 56px; }
.section-tag {
  display: inline-block; font-family: var(--mono); font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent);
  background: #eff6ff; padding: 5px 13px; border-radius: 99px; margin-bottom: 14px;
}
.section-dark .section-tag { background: rgba(59, 130, 246, 0.16); color: var(--accent-light); }
.section-title { font-size: clamp(28px, 3.2vw, 40px); font-weight: 800; letter-spacing: -0.025em; margin-bottom: 14px; }
.section-desc { font-size: 17px; color: var(--text-muted); }
.section-dark .section-desc { color: var(--text-dim); }

/* Grids & Cards */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.card {
  background: var(--surface); border: 1px solid #e2e8f0; border-radius: 18px;
  padding: 32px; transition: transform 0.2s, box-shadow 0.2s; display: flex; flex-direction: column; justify-content: space-between;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.08); }
.card-dark {
  background: var(--bg-dark-card); border: 1px solid var(--border-dark);
  border-radius: 20px; padding: 36px; color: #fff; display: flex; flex-direction: column; justify-content: space-between;
}
.step-num {
  width: 44px; height: 44px; border-radius: 12px; background: #eff6ff; color: var(--accent);
  font-family: var(--mono); font-weight: 700; font-size: 16px;
  display: flex; align-items: center; justify-content: center; margin-bottom: 20px;
}
.card h3, .card-dark h3 { font-size: 21px; font-weight: 700; margin-bottom: 12px; line-height: 1.3; }
.card p { font-size: 15px; color: var(--text-muted); margin-bottom: 20px; }
.card-dark p { font-size: 15px; color: var(--text-dim); margin-bottom: 22px; }
.pill {
  display: inline-block; align-self: flex-start; font-family: var(--mono); font-size: 12px;
  color: #0f172a; background: #f1f5f9; padding: 5px 11px; border-radius: 6px; font-weight: 500;
}
.track-badge {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  font-family: var(--mono); font-size: 11.5px; color: #22d3ee;
  background: rgba(6, 182, 212, 0.12); border: 1px solid rgba(6, 182, 212, 0.3);
  padding: 5px 12px; border-radius: 99px; margin-bottom: 18px;
}

/* Feature Lists & Pipelines */
.spec-list { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.spec-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--text-muted); }
.card-dark .spec-list li { color: #cbd5e1; }
.spec-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-top: 8px; flex-shrink: 0; }
.card-dark .spec-dot { background: var(--cyan); }

/* Interactive Tabs for Permit Preview */
.tabs-bar { display: flex; justify-content: center; gap: 12px; margin-bottom: 32px; flex-wrap: wrap; }
.tab-btn {
  padding: 11px 22px; border-radius: 10px; font-family: var(--mono); font-size: 13px; font-weight: 600;
  border: 1px solid #cbd5e1; background: #fff; color: var(--text-muted); cursor: pointer; transition: all 0.2s;
}
.tab-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 8px 20px -4px rgba(37, 99, 235, 0.45); }
.permit-preview {
  background: #fff; border: 1px solid #cbd5e1; border-radius: 18px; padding: 36px;
  box-shadow: 0 20px 50px -15px rgba(15, 23, 42, 0.08); max-width: 920px; margin: 0 auto;
}
.permit-header {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
  padding-bottom: 18px; margin-bottom: 24px; border-bottom: 2px solid #0f172a;
}
.permit-stamp { font-family: var(--mono); font-size: 12px; color: #059669; background: #ecfdf5; border: 1px solid #a7f3d0; padding: 4px 10px; border-radius: 6px; }
.permit-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.permit-cell { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: 16px; }
.permit-cell-lbl { font-size: 12px; color: var(--text-muted); text-transform: uppercase; font-family: var(--mono); }
.permit-cell-val { font-size: 17px; font-weight: 700; color: var(--text-main); margin-top: 4px; font-family: var(--mono); }

/* Architecture Flow */
.arch-flow {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 56px;
}
.arch-node {
  background: var(--bg-dark-elevated); border: 1px solid var(--border-dark);
  border-radius: 14px; padding: 22px; position: relative;
}
.arch-node-step { font-family: var(--mono); font-size: 11px; color: var(--cyan); margin-bottom: 6px; }
.arch-node h4 { font-size: 16px; color: #fff; margin-bottom: 6px; }
.arch-node p { font-size: 13px; color: var(--text-dim); }

/* Minimal Footer */
footer { background: #04070d; color: var(--text-dim); padding: 44px 0; border-top: 1px solid var(--border-dark); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; font-size: 13.5px; }
.footer-links { display: flex; align-items: center; gap: 24px; }
.footer-links a { color: var(--text-dim); text-decoration: none; transition: color 0.2s; padding: 6px 0; }
.footer-links a:hover { color: #fff; }

@media (max-width: 960px) {
  .hero-metrics, .grid-3, .grid-2, .permit-grid, .arch-flow { grid-template-columns: 1fr; }
  .nav-links { gap: 4px; }
  .brand-sub, .btn-nav { display: none; }
}

/* Phone widths: the navigation and the footer links wrap instead of running past the screen */
@media (max-width: 640px) {
  .nav-inner { height: auto; padding: 10px 0; flex-wrap: wrap; row-gap: 8px; }
  .nav-links { flex-wrap: wrap; }
  .nav-link { padding: 6px 10px; font-size: 13px; }
  .footer-links { flex-wrap: wrap; gap: 12px 20px; }
}
