/* ==========================================================================
   SpenoTech design system
   Near-black + charcoal + off-white, one restrained electric-green accent.
   Fonts: Space Grotesk (headings), Inter (body), JetBrains Mono (code/labels)
   ========================================================================== */

:root,
[data-bs-theme="dark"] {
  --st-bg: #0a0b0c;
  --st-surface: #111315;
  --st-surface-2: #16191c;
  --st-border: #23272c;
  --st-border-strong: #343a41;
  --st-text: #e8e6e1;
  --st-muted: #9aa0a6;
  --st-accent: #3cf08a;
  --st-accent-rgb: 60, 240, 138;
  --st-accent-soft: rgba(60, 240, 138, 0.1);
  --st-accent-line: rgba(60, 240, 138, 0.35);

  --st-font-head: "Space Grotesk", "Inter", system-ui, sans-serif;
  --st-font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --st-font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* Point Bootstrap's own variables at our palette */
  --bs-body-bg: var(--st-bg);
  --bs-body-bg-rgb: 10, 11, 12;
  --bs-body-color: var(--st-text);
  --bs-body-color-rgb: 232, 230, 225;
  --bs-secondary-color: var(--st-muted);
  --bs-border-color: var(--st-border);
  --bs-body-font-family: var(--st-font-body);
  --bs-font-monospace: var(--st-font-mono);
  --bs-link-color: var(--st-accent);
  --bs-link-color-rgb: var(--st-accent-rgb);
  --bs-link-hover-color-rgb: 140, 255, 188;
}

/* ---------- Base ---------- */
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
body { background: var(--st-bg); color: var(--st-text); font-family: var(--st-font-body); line-height: 1.65; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, h5 { font-family: var(--st-font-head); font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; color: var(--st-text); }
p { color: var(--st-muted); }
.text-muted-st { color: var(--st-muted) !important; }
.text-accent { color: var(--st-accent) !important; }
.font-mono { font-family: var(--st-font-mono); }
::selection { background: var(--st-accent); color: #04110a; }
:focus-visible { outline: 2px solid var(--st-accent); outline-offset: 3px; border-radius: 4px; }

.skip-link { position: absolute; top: 0.5rem; left: 0.5rem; z-index: 2000; background: var(--st-accent); color: #04110a !important; padding: 0.5rem 1rem; border-radius: 8px; font-weight: 600; }

/* ---------- Layout helpers ---------- */
.section { padding: 5.5rem 0; }
.section-alt { background: var(--st-surface); border-top: 1px solid var(--st-border); border-bottom: 1px solid var(--st-border); }
.section-head { max-width: 42rem; margin-bottom: 3rem; }
.section-head h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); margin-bottom: 1rem; }
.eyebrow { display: inline-block; font-family: var(--st-font-mono); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--st-accent); margin-bottom: 0.9rem; }
.eyebrow::before { content: "// "; opacity: 0.6; }
@media (max-width: 767.98px) { .section { padding: 3.75rem 0; } }

/* ---------- Subtle grid background ---------- */
.grid-bg { position: relative; isolation: isolate; overflow: hidden; }
.grid-bg::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 52px 52px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, #000 30%, transparent 78%);
          mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, #000 30%, transparent 78%);
}
.grid-bg::after {
  content: ""; position: absolute; z-index: -1; width: 38rem; height: 24rem; top: -9rem; right: -8rem;
  background: radial-gradient(closest-side, rgba(var(--st-accent-rgb), 0.12), transparent);
  pointer-events: none;
}

/* ---------- Navbar ---------- */
.st-nav { background: rgba(10, 11, 12, 0.82); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--st-border); padding: 0.75rem 0; }
.st-brand { display: inline-flex; align-items: center; gap: 0.6rem; font-family: var(--st-font-head); font-weight: 700; font-size: 1.25rem; letter-spacing: -0.02em; color: var(--st-text) !important; text-decoration: none; }
.st-brand .brand-mark { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 8px; background: var(--st-accent-soft); border: 1px solid var(--st-accent-line); color: var(--st-accent); font-family: var(--st-font-mono); font-size: 0.85rem; font-weight: 500; }
.st-brand .brand-accent { color: var(--st-accent); }
.st-nav .nav-link { color: var(--st-muted); font-size: 0.95rem; padding: 0.5rem 0.9rem !important; transition: color 0.2s; }
.st-nav .nav-link:hover, .st-nav .nav-link.active { color: var(--st-text); }
.st-nav .nav-link.active { box-shadow: inset 0 -2px 0 var(--st-accent); }
.st-nav .navbar-toggler { border-color: var(--st-border-strong); }
.st-nav .navbar-toggler:focus { box-shadow: 0 0 0 2px var(--st-accent-line); }
@media (max-width: 991.98px) {
  .st-nav .navbar-collapse { padding: 1rem 0 0.5rem; }
  .st-nav .nav-link.active { box-shadow: none; color: var(--st-accent); }
}

/* ---------- Buttons ---------- */
.btn-st { font-family: var(--st-font-head); font-weight: 600; padding: 0.8rem 1.5rem; border-radius: 10px; transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s, border-color 0.2s; }
.btn-accent { background: var(--st-accent); border: 1px solid var(--st-accent); color: #04110a; }
.btn-accent:hover { background: #7bf7b2; border-color: #7bf7b2; color: #04110a; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(var(--st-accent-rgb), 0.22); }
.btn-ghost { background: transparent; border: 1px solid var(--st-border-strong); color: var(--st-text); }
.btn-ghost:hover { border-color: var(--st-accent); color: var(--st-accent); transform: translateY(-2px); }

/* ---------- Hero ---------- */
.hero { padding: 6.5rem 0 5.5rem; }
.hero h1 { font-size: clamp(2.3rem, 5.4vw, 4rem); margin-bottom: 1.25rem; }
.hero h1 .accent { color: var(--st-accent); }
.hero .lead { font-size: 1.15rem; max-width: 36rem; color: var(--st-muted); }
@media (max-width: 767.98px) { .hero { padding: 4rem 0 3.5rem; } }

.page-hero { padding: 5rem 0 3rem; }
.page-hero h1 { font-size: clamp(2rem, 4.4vw, 3.25rem); margin-bottom: 1rem; }
.page-hero .lead { max-width: 40rem; color: var(--st-muted); font-size: 1.1rem; }

/* ---------- Terminal component ---------- */
.terminal { background: #0c0e10; border: 1px solid var(--st-border-strong); border-radius: 14px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(var(--st-accent-rgb), 0.04); overflow: hidden; }
.terminal-bar { display: flex; align-items: center; gap: 0.45rem; padding: 0.7rem 1rem; background: var(--st-surface-2); border-bottom: 1px solid var(--st-border); }
.terminal-bar .dot { width: 0.7rem; height: 0.7rem; border-radius: 50%; background: #2c3136; }
.terminal-bar .title { margin-left: 0.6rem; font-family: var(--st-font-mono); font-size: 0.75rem; color: var(--st-muted); }
.terminal-body { padding: 1.25rem 1.25rem 1.4rem; font-family: var(--st-font-mono); font-size: 0.85rem; line-height: 1.8; color: var(--st-text); overflow-x: auto; }
.terminal-body .line { white-space: pre-wrap; }
.terminal-body .prompt { color: var(--st-accent); }
.terminal-body .dim { color: #6b727a; }
.terminal-body .ok { color: var(--st-accent); }
.terminal-body .cursor { display: inline-block; width: 0.55em; height: 1.05em; background: var(--st-accent); vertical-align: text-bottom; animation: st-blink 1.1s steps(1) infinite; }
@keyframes st-blink { 50% { opacity: 0; } }

/* ---------- Cards ---------- */
.st-card { height: 100%; background: var(--st-surface); border: 1px solid var(--st-border); border-radius: 16px; padding: 1.75rem; transition: transform 0.25s, border-color 0.25s, background-color 0.25s; }
.st-card:hover { transform: translateY(-4px); border-color: var(--st-accent-line); background: var(--st-surface-2); }
.st-card h3 { font-size: 1.2rem; margin: 1.1rem 0 0.6rem; }
.st-card p:last-child { margin-bottom: 0; }
a.st-card-link { display: block; color: inherit; text-decoration: none; height: 100%; }
.icon-box { display: inline-grid; place-items: center; width: 2.9rem; height: 2.9rem; border-radius: 12px; background: var(--st-accent-soft); border: 1px solid var(--st-accent-line); color: var(--st-accent); font-size: 1.35rem; }
.card-more { display: inline-flex; align-items: center; gap: 0.35rem; margin-top: 1rem; font-size: 0.9rem; font-weight: 500; color: var(--st-accent); }
.st-card:hover .card-more i { transform: translateX(3px); }
.card-more i { transition: transform 0.2s; }

/* ---------- Lists, steps, tags ---------- */
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { position: relative; padding: 0.35rem 0 0.35rem 1.7rem; color: var(--st-muted); }
.check-list li::before { content: "\F26E"; font-family: "bootstrap-icons"; position: absolute; left: 0; top: 0.4rem; color: var(--st-accent); }
.step-num { font-family: var(--st-font-mono); font-size: 0.9rem; color: var(--st-accent); letter-spacing: 0.05em; }
.step { padding-top: 1.25rem; border-top: 1px solid var(--st-border-strong); height: 100%; }
.step h3 { font-size: 1.15rem; margin: 0.6rem 0 0.5rem; }
.tag { display: inline-block; font-family: var(--st-font-mono); font-size: 0.75rem; padding: 0.25rem 0.65rem; border: 1px solid var(--st-border-strong); border-radius: 999px; color: var(--st-muted); }

/* ---------- Service detail blocks ---------- */
.service-block { padding: 3.5rem 0; border-top: 1px solid var(--st-border); }
.service-block:first-of-type { border-top: 0; }
.service-block h2 { font-size: clamp(1.5rem, 2.8vw, 2.1rem); margin: 1rem 0 0.9rem; }
.service-panel { background: var(--st-surface); border: 1px solid var(--st-border); border-radius: 16px; padding: 1.5rem 1.75rem; }
.service-panel h3 { font-size: 0.8rem; font-family: var(--st-font-mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--st-accent); margin-bottom: 0.75rem; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--st-surface); border: 1px solid var(--st-border-strong); border-radius: 20px; padding: 3.5rem 2rem; text-align: center; position: relative; overflow: hidden; }
.cta-band::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 60% 100% at 50% 0%, rgba(var(--st-accent-rgb), 0.1), transparent 70%); pointer-events: none; }
.cta-band > * { position: relative; }
.cta-band h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); margin-bottom: 0.9rem; }

/* ---------- Footer ---------- */
.st-footer { background: #070809; border-top: 1px solid var(--st-border); padding: 4rem 0 2rem; margin-top: 0; }
.st-footer h4 { font-size: 0.8rem; font-family: var(--st-font-mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--st-muted); margin-bottom: 1rem; }
.st-footer ul { list-style: none; padding: 0; margin: 0; }
.st-footer li { margin-bottom: 0.5rem; }
.st-footer a { color: var(--st-text); text-decoration: none; opacity: 0.85; transition: color 0.2s, opacity 0.2s; }
.st-footer a:hover { color: var(--st-accent); opacity: 1; }
.footer-base { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--st-border); font-size: 0.85rem; color: var(--st-muted); }

/* ---------- Forms ---------- */
.form-label { font-weight: 500; font-size: 0.9rem; color: var(--st-text); }
.form-control, .form-select { background-color: var(--st-surface); border: 1px solid var(--st-border-strong); color: var(--st-text); border-radius: 10px; padding: 0.75rem 1rem; }
.form-control::placeholder { color: #6b727a; }
.form-control:focus, .form-select:focus { background-color: var(--st-surface-2); border-color: var(--st-accent); color: var(--st-text); box-shadow: 0 0 0 3px var(--st-accent-soft); }
.form-text { color: var(--st-muted); }
.form-panel { background: var(--st-surface); border: 1px solid var(--st-border); border-radius: 18px; padding: 2.25rem; }
@media (max-width: 575.98px) { .form-panel { padding: 1.4rem; } }
.field-error { color: #ff8a8a; font-size: 0.85rem; margin-top: 0.35rem; }
.hp-field { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.success-panel { text-align: center; padding: 4rem 1.5rem; }
.success-icon { display: inline-grid; place-items: center; width: 4.5rem; height: 4.5rem; border-radius: 50%; background: var(--st-accent-soft); border: 1px solid var(--st-accent-line); color: var(--st-accent); font-size: 2rem; margin-bottom: 1.5rem; }

/* ---------- Prose (privacy policy etc.) ---------- */
.prose { max-width: 46rem; }
.prose h2 { font-size: 1.4rem; margin: 2.5rem 0 0.8rem; }
.prose li { color: var(--st-muted); margin-bottom: 0.4rem; }

/* ---------- Scroll reveal (only when JS runs and motion is allowed) ---------- */
@media (scripting: enabled) and (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
  .reveal.is-visible { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}