/* ==========================================================
   Bergman Technologies, LLC — site styles
   ========================================================== */

:root {
  --bg: #0a0e13;
  --bg-alt: #0e141b;
  --surface: #121a23;
  --surface-2: #17212c;
  --border: #1f2c39;
  --border-strong: #2b3b4c;
  --text: #e6edf3;
  --muted: #8b9aab;
  --faint: #5b6b7c;
  --accent: #3ee6a8;
  --accent-2: #38bdf8;
  --accent-dim: rgba(62, 230, 168, 0.12);
  --danger: #f87171;

  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --radius: 10px;
  --radius-lg: 16px;
  --max: 1160px;
  --gutter: clamp(16px, 4vw, 32px);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.02em; font-weight: 700; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.skip-link {
  position: absolute; left: -9999px; top: 8px;
  background: var(--accent); color: #04120c; padding: 8px 14px; border-radius: 6px; z-index: 100;
}
.skip-link:focus { left: 8px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 14, 19, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }

.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 32px; height: 32px; flex: none; }
.brand-name { font-size: 1.05rem; }
.brand-name span { color: var(--muted); font-weight: 500; }

.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav-links a {
  display: block; padding: 8px 14px; border-radius: 8px;
  color: var(--muted); font-size: 0.95rem; font-weight: 500;
}
.nav-links a:hover { color: var(--text); background: var(--surface); text-decoration: none; }
.nav-links a[aria-current="page"] { color: var(--text); }
.nav-links a[aria-current="page"]::before { content: "~/"; color: var(--accent); font-family: var(--font-mono); font-size: 0.85em; }
.nav-links .btn { margin-left: 8px; }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--border-strong); color: var(--text);
  width: 42px; height: 42px; border-radius: 8px; cursor: pointer; padding: 0;
  align-items: center; justify-content: center;
}
.nav-toggle svg { width: 20px; height: 20px; }

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg-alt); border-bottom: 1px solid var(--border);
    padding: 8px var(--gutter) 16px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 8px; }
  .nav-links .btn { margin: 8px 0 0; text-align: center; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 8px; border: 1px solid transparent;
  font: 600 0.95rem/1 var(--font-sans); cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #04120c; }
.btn-primary:hover { box-shadow: 0 6px 24px rgba(62, 230, 168, 0.25); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { border-color: var(--accent); }
.nav-links .btn-primary { color: #04120c; padding: 10px 16px; }
.nav-links .btn-primary:hover { background: var(--accent); color: #04120c; }

/* ---------- Sections ---------- */
section { padding: clamp(64px, 10vw, 112px) 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.eyebrow {
  display: inline-block; font-family: var(--font-mono); font-size: 0.8rem;
  color: var(--accent); letter-spacing: 0.04em; margin-bottom: 14px;
}
.eyebrow::before { content: "// "; color: var(--faint); }

.section-head { max-width: 680px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.section-head p { color: var(--muted); font-size: 1.08rem; }

.lead { font-size: clamp(1.05rem, 2vw, 1.2rem); color: var(--muted); }

/* ---------- Hero ---------- */
.hero { position: relative; padding-top: clamp(56px, 9vw, 104px); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 30%, transparent 75%);
  opacity: 0.45;
}
.hero::after {
  content: ""; position: absolute; width: 600px; height: 600px; top: -260px; right: -140px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.14), transparent 65%);
  pointer-events: none;
}
.hero-grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 5vw, 64px); align-items: center;
}
.hero h1 { font-size: clamp(2.3rem, 6vw, 4rem); font-weight: 800; letter-spacing: -0.035em; }
.hero h1 .hl {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .lead { max-width: 540px; margin-bottom: 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.page-hero { padding-bottom: clamp(40px, 6vw, 64px); }
.page-hero h1 { font-size: clamp(2.1rem, 5vw, 3.2rem); max-width: 780px; }
.page-hero .lead { max-width: 640px; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
}

/* ---------- Terminal ---------- */
.terminal {
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-lg);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255,255,255,0.02) inset;
  font-family: var(--font-mono); font-size: 0.85rem; overflow: hidden; min-width: 0;
}
.terminal-bar {
  display: flex; align-items: center; gap: 8px; padding: 12px 16px;
  border-bottom: 1px solid var(--border); background: var(--surface-2);
}
.terminal-bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--border-strong); display: block; }
.terminal-bar i:nth-child(1) { background: #f87171; }
.terminal-bar i:nth-child(2) { background: #fbbf24; }
.terminal-bar i:nth-child(3) { background: #34d399; }
.terminal-bar span { margin-left: 10px; color: var(--faint); font-size: 0.78rem; }
.terminal-body { padding: 20px; line-height: 1.8; overflow-x: auto; white-space: pre; color: var(--muted); }
.terminal-body .p { color: var(--accent); }
.terminal-body .c { color: var(--text); }
.terminal-body .ok { color: var(--accent); }
.terminal-body .k { color: var(--accent-2); }
.terminal-body .d { color: var(--faint); }
.cursor { display: inline-block; width: 8px; height: 1.1em; background: var(--accent); vertical-align: text-bottom; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 28px; transition: border-color .2s ease, transform .2s ease;
}
.card:hover { border-color: var(--border-strong); }
.card h3 { font-size: 1.2rem; margin-bottom: 10px; }
.card p { color: var(--muted); margin: 0; }

.icon {
  width: 44px; height: 44px; border-radius: 10px; margin-bottom: 20px;
  display: grid; place-items: center;
  background: var(--accent-dim); color: var(--accent); border: 1px solid rgba(62, 230, 168, 0.22);
}
.icon svg { width: 22px; height: 22px; }

.card-link { display: inline-flex; gap: 6px; margin-top: 18px; font-family: var(--font-mono); font-size: 0.85rem; }

/* ---------- Process ---------- */
.steps { counter-reset: step; }
.step { position: relative; padding-top: 20px; border-top: 1px solid var(--border-strong); }
.step::before {
  counter-increment: step; content: "0" counter(step);
  display: block; font-family: var(--font-mono); color: var(--accent); font-size: 0.85rem; margin-bottom: 12px;
}
.step h3 { font-size: 1.15rem; }
.step p { color: var(--muted); margin: 0; }

/* ---------- Tech list ---------- */
.tags { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; }
.tags li {
  font-family: var(--font-mono); font-size: 0.85rem; color: var(--text);
  padding: 8px 14px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface);
}

/* ---------- Service detail ---------- */
.service {
  display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(24px, 5vw, 64px);
  padding: 48px 0; border-top: 1px solid var(--border);
}
.service:first-child { border-top: 0; padding-top: 0; }
.service h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
.service > div > p { color: var(--muted); }
.checklist { list-style: none; display: grid; gap: 12px; }
.checklist li { position: relative; padding-left: 30px; color: var(--text); }
.checklist li::before {
  content: "✓"; position: absolute; left: 0; top: 1px;
  width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center;
  font-size: 0.75rem; color: var(--accent); background: var(--accent-dim);
}
@media (max-width: 800px) { .service { grid-template-columns: 1fr; } }

/* ---------- About ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.prose p { color: var(--muted); font-size: 1.05rem; }
.prose p strong { color: var(--text); font-weight: 600; }

.founder { display: flex; gap: 20px; align-items: flex-start; }
.avatar {
  flex: none; width: 72px; height: 72px; border-radius: 14px;
  display: grid; place-items: center; font: 700 1.6rem var(--font-mono);
  background: linear-gradient(135deg, var(--accent-dim), rgba(56, 189, 248, 0.14));
  border: 1px solid var(--border-strong); color: var(--accent);
}
.founder h3 { margin-bottom: 2px; }
.founder .role { font-family: var(--font-mono); font-size: 0.82rem; color: var(--accent); margin-bottom: 12px; display: block; }

/* ---------- CTA ---------- */
.cta {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 20px;
  padding: clamp(36px, 6vw, 64px); text-align: center;
}
.cta::before {
  content: ""; position: absolute; inset: -1px; pointer-events: none;
  background: radial-gradient(ellipse 60% 80% at 50% 120%, rgba(62, 230, 168, 0.16), transparent 70%);
}
.cta > * { position: relative; }
.cta h2 { font-size: clamp(1.7rem, 4vw, 2.5rem); }
.cta p { color: var(--muted); max-width: 560px; margin: 0 auto 28px; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(28px, 5vw, 56px); align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

.form { display: grid; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.field { display: grid; gap: 8px; }
.field label { font-size: 0.88rem; font-weight: 600; }
.field label .opt { color: var(--faint); font-weight: 400; }
.field input,
.field select,
.field textarea {
  width: 100%; font: inherit; color: var(--text);
  background: var(--bg); border: 1px solid var(--border-strong); border-radius: 8px;
  padding: 12px 14px; transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { min-height: 160px; resize: vertical; }
.field select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px; }
.field input:focus,
.field select:focus,
.field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.hp { position: absolute; left: -9999px; }
.form-status { font-family: var(--font-mono); font-size: 0.88rem; min-height: 1.4em; margin: 0; }
.form-status.ok { color: var(--accent); }
.form-status.err { color: var(--danger); }

.info-list { list-style: none; display: grid; gap: 22px; }
.info-list dt, .info-label { font-family: var(--font-mono); font-size: 0.8rem; color: var(--faint); margin-bottom: 4px; display: block; }
.info-list a, .info-list span { color: var(--text); font-weight: 500; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 48px 0 32px; background: var(--bg-alt); }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; margin-bottom: 36px; }
.footer-top p { color: var(--muted); max-width: 320px; margin-top: 14px; font-size: 0.95rem; }
.footer-nav { display: flex; gap: 48px; flex-wrap: wrap; }
.footer-nav h4 { font-family: var(--font-mono); font-size: 0.78rem; color: var(--faint); font-weight: 500; letter-spacing: 0.04em; margin-bottom: 12px; }
.footer-nav ul { list-style: none; display: grid; gap: 8px; }
.footer-nav a { color: var(--muted); font-size: 0.95rem; }
.footer-nav a:hover { color: var(--text); }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  padding-top: 24px; border-top: 1px solid var(--border);
  color: var(--faint); font-size: 0.85rem; font-family: var(--font-mono);
}

/* ---------- Motion ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .cursor { animation: none; }
  .btn:hover { transform: none; }
}

/* ---------- Stats ---------- */
.stat {
  padding: 28px; border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--surface), var(--bg-alt));
  border: 1px solid var(--border);
}
.stat strong {
  display: block; font: 700 clamp(2.4rem, 5vw, 3.2rem)/1 var(--font-mono); letter-spacing: -0.03em;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: 10px;
}
.stat span { color: var(--muted); }
.card .founder p { color: var(--muted); margin: 0 0 1em; }
.founder-links { display: flex; gap: 18px; font-family: var(--font-mono); font-size: 0.88rem; margin: 0; }
@media (max-width: 480px) { .founder { flex-direction: column; } }

/* ---------- Testimonials ---------- */
.quote { margin: 0; padding: 28px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent); }
.quote .stars { color: #fbbf24; letter-spacing: 2px; margin-bottom: 12px; }
.quote blockquote { margin: 0 0 14px; font-size: 1.08rem; color: var(--text); }
.quote figcaption { font-family: var(--font-mono); font-size: 0.82rem; color: var(--faint); }

img.avatar { width: 96px; height: 96px; object-fit: cover; }
