/* === Custom Properties === */
:root {
  --bg:        #090d0c;
  --surface:   #111917;
  --surface2:  #1a2420;
  --text:      #e8f0ed;
  --muted:     #6b8a80;
  --accent:    #00d4aa;
  --accent-dim:#003829;
  --border:    #1f2e29;

  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, 'Courier New', monospace;

  --radius:    8px;
  --container: 1200px;
}

/* === Reset === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: var(--font-sans); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* === Focus === */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* === Container === */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* === Header === */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(9, 13, 12, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

nav {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}
.logo-bracket { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}
.nav-links a {
  font-size: 0.875rem;
  color: var(--muted);
  transition: color 0.18s;
}
.nav-links a:hover { color: var(--text); }

/* === Buttons === */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  background: var(--accent);
  color: #031a14;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background 0.18s, transform 0.12s, box-shadow 0.18s;
  box-shadow: 0 0 0 0 rgba(0, 212, 170, 0);
}
.btn-primary:hover {
  background: #00bfa0;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0, 212, 170, 0.2);
}
.btn-primary:active { transform: translateY(0); }

/* === Section shared === */
section { padding: 96px 0; }

.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin-bottom: 16px;
}

.section-sub {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 580px;
  line-height: 1.75;
  margin-bottom: 56px;
}

/* === Hero === */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background-color: var(--bg);
  background-image: radial-gradient(var(--border) 1.2px, transparent 1.2px);
  background-size: 28px 28px;
}

#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 120% 80% at 50% 50%, transparent 20%, var(--bg) 75%),
    linear-gradient(to bottom, var(--bg) 0%, transparent 12%),
    linear-gradient(to top,    var(--bg) 0%, transparent 12%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--container);
  width: 100%;
  margin: 0 auto;
  padding: 80px 24px 64px;
}

.hero-content h1 {
  font-size: clamp(2.4rem, 6.5vw, 4.5rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.035em;
  max-width: 800px;
  margin-bottom: 28px;
}

.hero-content h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero-content p {
  font-size: clamp(1rem, 2vw, 1.18rem);
  color: var(--muted);
  max-width: 540px;
  margin-bottom: 44px;
  line-height: 1.75;
}

/* === Services === */
#services { background: var(--bg); }

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 640px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .services-grid { grid-template-columns: repeat(4, 1fr); }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px 28px;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.card:hover {
  background: var(--surface2);
  border-color: rgba(0, 212, 170, 0.4);
  transform: translateY(-3px);
}

.card-icon {
  width: 36px;
  height: 36px;
  color: var(--accent);
  margin-bottom: 20px;
}

.card h3 {
  font-size: 0.975rem;
  font-weight: 600;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.card p {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.7;
}

/* === Why Bulkhead === */
#why {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.pillars {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

@media (min-width: 640px) {
  .pillars { grid-template-columns: repeat(3, 1fr); }
}

.pillar {
  padding-left: 20px;
  border-left: 2px solid var(--accent);
}

.pillar h3 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.pillar p {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.7;
}

/* === Social Proof (hidden — remove display:none to reveal, then fill in HTML content) === */
#social-proof { display: none; }

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 40px;
}

.metric {
  background: var(--surface);
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.metric-value {
  font-family: var(--font-mono);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.03em;
}

.metric-label {
  font-size: 0.875rem;
  color: var(--muted);
}

.case-study-placeholder {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 28px 32px;
  font-size: 0.95rem;
  color: var(--muted);
  font-style: italic;
  line-height: 1.7;
}

.case-study-placeholder cite {
  display: block;
  margin-top: 12px;
  font-style: normal;
  font-size: 0.825rem;
  color: var(--muted);
  opacity: 0.7;
}

/* === Contact === */
#contact {
  background: var(--accent-dim);
  border-top: 1px solid rgba(0, 212, 170, 0.12);
  text-align: center;
}

#contact h2 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin-bottom: 16px;
}

#contact p {
  color: var(--muted);
  font-size: 1.05rem;
  margin-bottom: 40px;
}

/* === Footer === */
footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
}

.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

@media (min-width: 640px) {
  .footer-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.footer-logo {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--muted);
}
.footer-logo .logo-bracket { color: var(--accent); }

.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 0.825rem;
  color: var(--muted);
  transition: color 0.18s;
}
.footer-links a:hover { color: var(--text); }

.footer-meta {
  font-size: 0.8rem;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

@media (min-width: 640px) {
  .footer-meta { text-align: right; }
}

/* === Responsive adjustments === */
@media (max-width: 639px) {
  section { padding: 72px 0; }
  .hero-content { padding-top: 56px; }
  nav { height: 56px; }
  .nav-links { gap: 16px; }
  .nav-links a { font-size: 0.8rem; }
  .metrics { grid-template-columns: 1fr; }
  .nav-cta { display: none; }
}

/* ═══════════════════════════════════════════════════════════
   NEW COMPONENTS — Landing page redesign per ТЗ
   ═══════════════════════════════════════════════════════════ */

/* === Secondary / Ghost Button === */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  background: transparent;
  color: var(--accent);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  border-radius: var(--radius);
  border: 1.5px solid var(--accent);
  cursor: pointer;
  transition: background 0.18s, color 0.18s, transform 0.12s;
  text-decoration: none;
}
.btn-secondary:hover {
  background: rgba(0, 212, 170, 0.08);
  transform: translateY(-1px);
}
.btn-secondary:active { transform: translateY(0); }

/* === Nav CTA (smaller ghost button in header) === */
.nav-cta {
  padding: 7px 16px;
  font-size: 0.8rem;
  white-space: nowrap;
  flex-shrink: 0;
}

/* === Hero Two-Column Grid === */
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-visual { display: none; }
  .nav-cta { display: none; }
}

/* p.hero-sub1 and p.hero-sub2 use element+class (0-1-1) to beat .hero-content p (also 0-1-1)
   via source order, overriding its margin-bottom: 44px and max-width: 540px */
p.hero-sub1 {
  font-size: clamp(1rem, 1.8vw, 1.1rem);
  color: var(--text);
  font-weight: 500;
  line-height: 1.5;
  margin-bottom: 12px;
  max-width: 100%;
}

p.hero-sub2 {
  font-size: clamp(0.9rem, 1.5vw, 1rem);
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 0;
  max-width: 100%;
}

.hero-ctas {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 36px;
}

/* === Terminal Block === */
.terminal {
  background: #0d1117;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.9;
  overflow: hidden;
}

.terminal-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
}

.terminal-dots {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.terminal-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.td-red    { background: #ff5f57; }
.td-yellow { background: #ffbd2e; }
.td-green  { background: #28c840; }

.terminal-title {
  flex: 1;
  text-align: center;
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.terminal-body {
  padding: 20px 22px 24px;
  color: #cdd9e5;
}

.terminal-line {
  opacity: 0;
  animation: termFadeIn 0.15s forwards;
  white-space: pre;
}

.tl-1 { animation-delay: 0.3s; }
.tl-2 { animation-delay: 0.6s; }
.tl-3 { animation-delay: 1.1s; }
.tl-4 { animation-delay: 1.7s; }
.tl-5 { animation-delay: 2.3s; }
.tl-6 { animation-delay: 2.9s; }
.tl-7 { animation-delay: 3.5s; }

@keyframes termFadeIn { to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .terminal-line { opacity: 1; animation: none; }
  .terminal-cursor { animation: none; }
}

/* Terminal syntax colors */
.t-tag { color: var(--accent); }
.t-ok  { color: #3fb950; }
.t-val { color: #e3b341; }
.t-str { color: #a5d6ff; }

.terminal-cursor {
  display: inline-block;
  width: 8px;
  height: 1.1em;
  background: var(--accent);
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}

@keyframes blink { 50% { opacity: 0; } }

/* === The Wedge section === */
#wedge {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

.comparison-table thead tr {
  border-bottom: 2px solid var(--border);
}

.comparison-table th {
  padding: 14px 20px;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface2);
}

.comparison-table th.col-label {
  width: 160px;
}

.comparison-table th.col-bad {
  color: var(--muted);
}

.comparison-table th.col-good {
  color: var(--accent);
  border-left: 2px solid var(--accent);
}

.comparison-table .col-tag {
  display: block;
  font-size: 0.62rem;
  opacity: 0.55;
  text-transform: none;
  letter-spacing: 0;
  margin-top: 2px;
  font-weight: 400;
}

.comparison-table td {
  padding: 16px 20px;
  vertical-align: top;
  font-size: 0.875rem;
  line-height: 1.65;
  border-bottom: 1px solid var(--border);
}

.comparison-table tr:last-child td { border-bottom: none; }

.comparison-table td.col-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  background: var(--surface2);
}

.comparison-table td.col-bad {
  color: var(--muted);
}

.comparison-table td.col-good {
  color: var(--text);
  border-left: 2px solid var(--accent);
  background: rgba(0, 212, 170, 0.03);
}

/* === Core Capabilities section === */
#capabilities { background: var(--bg); }

/* === AI in SDLC section === */
#sdlc {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.sdlc-list {
  display: flex;
  flex-direction: column;
}

.sdlc-item {
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}
.sdlc-item:last-child { border-bottom: none; }

.sdlc-command {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 10px;
}

.sdlc-desc {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.7;
  max-width: 680px;
  margin: 0;
}

/* === Engineering Process section === */
#process { background: var(--bg); }

.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 56px;
}

@media (max-width: 900px) {
  .process-steps { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 639px) {
  .process-steps { grid-template-columns: 1fr; }
}

.process-step-num {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  opacity: 0.22;
  line-height: 1;
  margin-bottom: 16px;
}

.process-step h3 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.process-step-duration {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--accent);
  opacity: 0.65;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.process-step p {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.7;
}

/* === Audit / Lead Capture section === */
#audit {
  background: var(--accent-dim);
  border-top: 1px solid rgba(0, 212, 170, 0.12);
  text-align: center;
}

#audit h2 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin-bottom: 16px;
}

.audit-sub {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.75;
}

.audit-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 520px;
  margin: 40px auto 0;
  text-align: left;
}

.audit-form input[type="email"],
.audit-form input[type="url"] {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  width: 100%;
  transition: border-color 0.18s, outline 0.18s;
}

.audit-form input[type="email"]::placeholder,
.audit-form input[type="url"]::placeholder {
  color: var(--muted);
}

.audit-form input[type="email"]:focus,
.audit-form input[type="url"]:focus {
  outline: 2px solid var(--accent);
  outline-offset: 0;
  border-color: transparent;
}

.audit-challenges {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  background: var(--surface);
}

.audit-challenges legend {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0 8px;
}

.audit-challenges label {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 0.875rem;
  color: var(--muted);
  cursor: pointer;
  padding: 6px 0;
  transition: color 0.18s;
}

.audit-challenges label:hover { color: var(--text); }

.audit-challenges input[type="radio"] {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  cursor: pointer;
}

.audit-form .btn-primary {
  align-self: flex-start;
}
