/* SecHive Labs -- shared site stylesheet
   Colors are pulled directly from the ScanHive dashboard's own dark-mode
   theme tokens (frontend/src/theme/ScanHiveThemeProvider.tsx -- the AntD
   colorPrimary, colorBg, colorText, and colorBorder token families), not
   approximated, so the parent brand and its flagship product are the same
   palette, not just a similar one. --primary-light is the one deliberate
   exception: it's the violet-400 gradient stop from the actual logo files
   (scanhive-logo.svg, scanhive-favicon.svg), used for text and accents on
   dark backgrounds where the dashboard's more saturated colorPrimary would
   be lower-contrast. */

:root {
  --bg: #09090b;              /* colorBgBase (dark) */
  --bg-elevated: #27272a;     /* colorBgElevated (dark) */
  --surface: #18181b;         /* colorBgContainer (dark) */
  --surface-hover: var(--bg-elevated);
  --border: #3f3f46;          /* colorBorder (dark) */
  --border-soft: rgba(255, 255, 255, 0.08);
  --text: #fafafa;            /* colorText (dark) */
  --text-secondary: #a1a1aa;  /* colorTextSecondary (dark) */
  --text-faint: #71717a;      /* colorTextSecondary (light) -- reused as a third, dimmer tier */
  --primary: #7c3aed;         /* colorPrimary */
  --primary-hover: #6d28d9;   /* colorPrimaryHover */
  --primary-active: #5b21b6;  /* colorPrimaryActive */
  --primary-light: #a78bfa;   /* logo gradient stop, not an AntD token -- see note above */
  --primary-soft: rgba(124, 58, 237, 0.16);
  --success: #16a34a;         /* colorSuccess */
  --warning: #d97706;         /* colorWarning */
  --danger: #dc2626;          /* colorError */
  --radius-sm: 6px;           /* borderRadius */
  --radius: 10px;
  --radius-lg: 18px;
  --container: 1180px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

html, body { max-width: 100%; overflow-x: hidden; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 0.5em; font-weight: 800; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.2rem, 4.4vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; color: var(--text-secondary); }
p:last-child { margin-bottom: 0; }

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary-light);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary-light);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #ffffff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-primary:active { background: var(--primary-active); }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--primary-light); color: var(--primary-light); }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-block { width: 100%; }

.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; }

/* Header / nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(8, 7, 11, 0.78);
  border-bottom: 1px solid var(--border-soft);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.brand img { width: 30px; height: 30px; }
.brand .accent { color: var(--primary-light); }
.brand-sub {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--text-faint);
  text-transform: uppercase;
  margin-left: 4px;
  padding-left: 10px;
  border-left: 1px solid var(--border);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-secondary);
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 14px; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 40px;
  height: 40px;
  color: var(--text);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

/* Products nav dropdown -- one entry (ScanHive) today, built to take more
   list items as additional products ship, without any markup changes. */
.nav-dropdown { position: relative; }
.nav-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
}
.nav-dropdown-trigger:hover,
.nav-dropdown-trigger.active { color: var(--text); }
.nav-dropdown-trigger .chevron { transition: transform 0.15s ease; }
.nav-dropdown.open .nav-dropdown-trigger .chevron,
.nav-dropdown:hover .nav-dropdown-trigger .chevron { transform: rotate(180deg); }

.nav-dropdown-menu {
  list-style: none;
  margin: 0;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav-dropdown-menu a {
  display: block;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  white-space: nowrap;
}
.nav-dropdown-menu a:hover { background: var(--surface-hover); color: var(--text); }

@media (min-width: 861px) {
  .nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 16px);
    left: 50%;
    min-width: 160px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(-4px);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
    z-index: 60;
  }
  .nav-dropdown.open .nav-dropdown-menu,
  .nav-dropdown:hover .nav-dropdown-menu,
  .nav-dropdown:focus-within .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
  }
}

@media (max-width: 860px) {
  /* flex-start + margin-left: auto instead of space-between: with
     space-between, toggling .nav-toggle's display inside this media query
     left the flex item mispositioned/unpainted in testing. */
  .nav { justify-content: flex-start; }
  .nav-actions { margin-left: auto; }
  .nav-actions .btn-secondary,
  .nav-actions .btn-primary { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-soft);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 24px 18px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 12px 0; border-bottom: 1px solid var(--border-soft); }
  .brand-sub { display: none; }

  /* Inline, indented expand instead of a floating panel -- the mobile
     drawer is already a vertical list, so the dropdown just becomes a
     nested one instead of an absolutely-positioned overlay. */
  .nav-dropdown-trigger {
    width: 100%;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-soft);
  }
  .nav-dropdown-menu {
    display: none;
    padding: 4px 0 4px 16px;
  }
  .nav-dropdown.open .nav-dropdown-menu { display: flex; }
  .nav-dropdown-menu a { padding: 10px 0; border-bottom: none; color: var(--text-secondary); }
}

/* Hero */
.hero {
  position: relative;
  padding: 96px 0 88px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 60% at 50% -10%, rgba(124, 58, 237, 0.25), transparent),
    var(--bg);
}
.hero-grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-soft) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
  opacity: 0.5;
  pointer-events: none;
}
.hero-inner { position: relative; max-width: 760px; }
.hero.hero-wide .hero-inner { max-width: 820px; }
.hero p.lead {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 620px;
  margin-bottom: 28px;
}

/* Sections */
.section { padding: 88px 0; }
.section-tight { padding: 64px 0; }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-alt { background: var(--bg-elevated); border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); }

/* Card grid */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: background-color 0.15s ease;
}
.card:hover { background: var(--surface-hover); }
.card-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--primary-soft);
  color: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.card-icon svg { width: 22px; height: 22px; }

/* Product card brand row (homepage "Our products" card, etc.) */
.spotlight-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.spotlight-brand img { width: 44px; height: 44px; border-radius: 10px; }
.spotlight-brand strong { font-size: 1.3rem; }

/* Steps */
.steps { counter-reset: step; display: grid; gap: 28px; }
.step { display: flex; gap: 20px; }
.step-number {
  flex: none;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--primary);
  color: var(--primary-light);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-family: var(--font-mono);
}

/* CTA banner */
.cta-banner {
  background: linear-gradient(135deg, #1a1425, #241a35 60%, #1a1425);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 56px;
  text-align: center;
}
@media (max-width: 640px) { .cta-banner { padding: 36px 22px; } }
.cta-banner h2 { margin-bottom: 10px; }
.cta-banner p { max-width: 480px; margin: 0 auto 24px; }
.cta-banner .cta-row { justify-content: center; }

/* Footer */
.site-footer { border-top: 1px solid var(--border-soft); padding: 64px 0 32px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 40px;
}
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
.footer-brand .brand { margin-bottom: 12px; }
.footer-brand p { max-width: 280px; font-size: 0.9rem; }
.footer-col h4 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-col a { font-size: 0.92rem; color: var(--text-secondary); }
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 28px;
  border-top: 1px solid var(--border-soft);
  font-size: 0.82rem;
  color: var(--text-faint);
}

/* Simple content pages (about, privacy, terms) */
.prose { max-width: 720px; }
.prose h2 { margin-top: 2em; }
.prose ul { color: var(--text-secondary); padding-left: 1.2em; }
.prose li { margin-bottom: 0.5em; }

/* Forms */
.form-field { margin-bottom: 18px; }
.form-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}
.form-field input, .form-field textarea, .form-field select {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.95rem;
}
.form-field input:focus, .form-field textarea:focus, .form-field select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}
.form-field textarea { resize: vertical; min-height: 130px; }
.form-field-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.form-note { font-size: 0.82rem; color: var(--text-faint); margin-top: 14px; }
.form-status { font-size: 0.9rem; margin-top: 14px; display: none; }
.form-status.success { color: var(--success); display: block; }
.form-status.error { color: var(--danger); display: block; }

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-info .card { margin-bottom: 16px; }
.contact-info .card h3 { margin-bottom: 6px; }

/* 404 */
.error-page { min-height: 60vh; display: flex; align-items: center; }
.error-code {
  font-family: var(--font-mono);
  font-size: 5rem;
  font-weight: 800;
  color: var(--primary-light);
  margin-bottom: 8px;
}

/* Utilities */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
[hidden] { display: none !important; }
