/* =========================================================================
   Semabytes Corp — corporate site design system
   Modern deep-blue + violet tech. Light-first, with a dark-mode toggle.
   No framework, no build step. One stylesheet, CSS custom properties.
   ========================================================================= */

:root {
  /* Brand — one restrained cobalt accent, used sparingly. */
  --accent: #2f56d9;
  --accent-strong: #2242b0;
  --accent-weak: #7d95ea;
  --accent-tint: rgba(47, 86, 217, 0.10);
  /* Icon chips are a neutral dark tile with a light glyph — high contrast, no
     blue-on-blue. Accent is reserved for interactive elements. */
  --badge-bg: #131a2b;
  --badge-fg: #ffffff;
  /* Back-compat aliases so older rules pick up the new accent. */
  --indigo-600: var(--accent-strong);
  --indigo-500: var(--accent);
  --violet-500: var(--accent);
  --violet-400: var(--accent-weak);
  --cyan-400: var(--accent-weak);
  --brand-grad: linear-gradient(135deg, #3a5be6 0%, #2242b0 100%);
  --brand-grad-soft: linear-gradient(135deg, #3a5be6 0%, #2748bd 100%);

  /* Neutrals (light theme) — warm-cool off-white base, ink text. */
  --navy-950: #0a0f1c;
  --navy-900: #0d1526;
  --navy-800: #141d31;
  --ink: #101623;
  --ink-soft: #3c4658;
  --muted: #6c7789;
  --line: #e3e7ee;
  --line-soft: #edf0f5;
  --bg: #f6f7f9;
  --bg-alt: #eef1f6;
  --card: #ffffff;
  --card-2: #ffffff;
  --on-dark: #e6eaf5;
  --on-dark-muted: #a7b1c6;

  /* Effects */
  --radius: 16px;
  --radius-sm: 12px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(10, 14, 39, 0.06), 0 1px 3px rgba(10, 14, 39, 0.08);
  --shadow: 0 10px 30px -12px rgba(10, 14, 39, 0.18);
  --shadow-lg: 0 30px 60px -20px rgba(10, 14, 39, 0.28);
  --ring: 0 0 0 4px rgba(47, 86, 217, 0.18);
  --maxw: 1280px;
  --nav-h: 72px;

  --ff: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

[data-theme="dark"] {
  --accent: #6b84e8;
  --accent-strong: #8ea6f2;
  --accent-weak: #8ea6f2;
  --accent-tint: rgba(110, 132, 232, 0.14);
  --badge-bg: rgba(255, 255, 255, 0.09);
  --badge-fg: #eef1f7;
  --brand-grad: linear-gradient(135deg, #3f5fe0 0%, #6b84e8 100%);
  --brand-grad-soft: linear-gradient(135deg, #3f5fe0 0%, #5f7ce4 100%);
  --ink: #eef1f7;
  --ink-soft: #c2cad9;
  --muted: #8d97ab;
  --line: #212a3d;
  --line-soft: #1a2234;
  --bg: #0a0f1c;
  --bg-alt: #0d1424;
  --card: #121a2b;
  --card-2: #0f1626;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 16px 40px -16px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 40px 70px -24px rgba(0, 0, 0, 0.7);
}

/* ------------------------------------------------------------------ Reset */
*,
*::before,
*::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}
body {
  margin: 0;
  font-family: var(--ff);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 0.5em; font-weight: 800; }
p { margin: 0 0 1rem; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 8px; }

/* --------------------------------------------------------------- Layout */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }
/* Wide-screen: use more of large monitors without over-widening text columns. */
@media (min-width: 1500px) { :root { --maxw: 1360px; } .container { padding-inline: 40px; } }
@media (min-width: 1760px) { :root { --maxw: 1440px; } }
.section { padding: 88px 0; }
.section--tight { padding: 56px 0; }
.section--alt { background: var(--bg-alt); }
.center { text-align: center; }
.stack > * + * { margin-top: 1rem; }
.grid { display: grid; gap: 24px; }
@media (min-width: 720px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 980px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.92rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--indigo-500);
}
.eyebrow::before { content: ""; width: 22px; height: 2px; border-radius: 2px; background: var(--accent); }
.center .eyebrow::before { display: none; }

.h-display { font-size: clamp(2.3rem, 5.2vw, 3.8rem); }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--ink-soft); max-width: 60ch; }
.section-title { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
.section-intro { color: var(--ink-soft); max-width: 62ch; margin-inline: auto; }
.gradient-text { color: var(--accent); }

/* --------------------------------------------------------------- Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 650; font-size: 0.98rem; padding: 12px 22px; border-radius: 999px;
  border: 1px solid transparent; cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { color: #fff; background: var(--accent); box-shadow: 0 1px 2px rgba(16, 22, 35, 0.14); }
.btn-primary:hover { background: var(--accent-strong); box-shadow: var(--shadow); transform: translateY(-1px); }
.btn-ghost { color: var(--ink); background: transparent; border-color: var(--line); }
.btn-ghost:hover { border-color: var(--indigo-500); color: var(--indigo-600); }
.btn-light { color: var(--navy-900); background: #fff; }
.btn-light:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-outline-light { color: #fff; border-color: rgba(255, 255, 255, 0.35); }
.btn-outline-light:hover { background: rgba(255, 255, 255, 0.1); }
.btn-lg { padding: 15px 30px; font-size: 1.05rem; }
.btn .arrow { transition: transform .18s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* --------------------------------------------------------------- Badges/pills */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.74rem; font-weight: 700; letter-spacing: 0.04em;
  padding: 5px 11px; border-radius: 999px; text-transform: uppercase;
}
.pill-soon { color: var(--muted); background: var(--bg-alt); border: 1px solid var(--line); }
.pill-early { color: var(--accent); background: var(--bg-alt); border: 1px solid var(--line); }
.pill-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* --------------------------------------------------------------- Header */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--nav-h);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.nav { height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 800; font-size: 1.16rem; letter-spacing: -0.02em; }
.brand:hover { opacity: .9; }
.brand-mark { width: 34px; height: 34px; flex: none; }
/* Brighten the cobalt mark wherever it sits on a dark surface. */
.site-footer .brand-mark { filter: brightness(1.55) saturate(1.05); }
[data-theme="dark"] .site-header .brand-mark { filter: brightness(1.55) saturate(1.05); }
.nav-links { display: none; align-items: center; gap: 6px; }
.nav-links a {
  padding: 9px 14px; border-radius: 10px; font-weight: 550; font-size: 0.96rem; color: var(--ink-soft);
  transition: color .15s ease, background .15s ease;
}
.nav-links a:hover { color: var(--ink); background: var(--bg-alt); }
.nav-links a.active { color: var(--indigo-600); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: transparent;
  color: var(--ink-soft); display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  transition: border-color .15s, color .15s;
}
.icon-btn:hover { border-color: var(--indigo-500); color: var(--indigo-600); }
.nav-cta { display: none; }
.theme-toggle .moon { display: none; }
[data-theme="dark"] .theme-toggle .sun { display: none; }
[data-theme="dark"] .theme-toggle .moon { display: block; }

.menu-btn { display: inline-flex; }
@media (min-width: 940px) {
  .nav-links { display: flex; }
  .nav-cta { display: inline-flex; }
  .menu-btn { display: none; }
}

/* Mobile menu */
.mobile-menu {
  display: none; position: fixed; inset: var(--nav-h) 0 0 0; z-index: 40;
  background: var(--bg); padding: 22px 24px 40px; overflow-y: auto;
  border-top: 1px solid var(--line-soft);
}
.mobile-menu.open { display: block; }
.mobile-menu a {
  display: block; padding: 15px 8px; font-size: 1.12rem; font-weight: 600;
  border-bottom: 1px solid var(--line-soft); color: var(--ink);
}
.mobile-menu .btn { width: 100%; margin-top: 22px; }
body.no-scroll { overflow: hidden; }

/* --------------------------------------------------------------- Hero */
.hero {
  position: relative; overflow: hidden; color: var(--on-dark);
  background:
    radial-gradient(1000px 540px at 88% -22%, rgba(47, 86, 217, 0.20), transparent 62%),
    linear-gradient(180deg, #0c1322 0%, #0a1019 100%);
  padding: clamp(72px, 12vh, 128px) 0 clamp(80px, 13vh, 140px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
/* In dark mode the hero must read as its own panel, not meld into the page. */
[data-theme="dark"] .hero {
  background:
    radial-gradient(1000px 540px at 88% -22%, rgba(94, 129, 240, 0.26), transparent 62%),
    linear-gradient(180deg, #131c31 0%, #0e1626 100%);
  border-bottom: 1px solid rgba(157, 178, 240, 0.18);
}
.hero .container { position: relative; z-index: 1; }
.hero .eyebrow { color: #9db2f0; font-size: 1.02rem; }
/* The cobalt mark reads dull on navy — lift it on always-dark surfaces. */
.hero .kicker img { filter: brightness(1.55) saturate(1.05); }
.hero h1 { color: #fff; max-width: 15ch; }
.hero .lead { color: var(--on-dark-muted); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 22px 34px; margin-top: 42px; color: var(--on-dark-muted); font-size: 0.92rem; }
.hero-meta .m { display: flex; align-items: center; gap: 9px; }
.hero-meta svg { color: #9db2f0; flex: none; }

/* Product hero variant */
.phero { padding: clamp(56px, 9vh, 104px) 0; }
.phero .kicker { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-bottom: 18px; }
.phero .kicker .eyebrow { color: #9db2f0; }

/* --------------------------------------------------------------- Cards */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card--hover:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--indigo-500) 40%, var(--line)); }
.card h3 { font-size: 1.2rem; }
.card p { color: var(--ink-soft); margin-bottom: 0; }
.icon-badge {
  width: 46px; height: 46px; border-radius: 12px; flex: none; display: inline-flex; align-items: center; justify-content: center;
  color: var(--badge-fg); background: var(--badge-bg); margin-bottom: 18px;
}
.icon-badge.cyan { color: var(--badge-fg); background: var(--badge-bg); }
.icon-badge svg { width: 21px; height: 21px; }

/* Audience cards */
.aud-card .num { font-size: 0.8rem; font-weight: 800; color: var(--indigo-500); letter-spacing: 0.1em; }

/* Product showcase cards */
.product-card {
  display: flex; flex-direction: column; gap: 18px; position: relative; overflow: hidden;
}
.product-card .pc-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.product-card .pc-logo { display: flex; align-items: center; gap: 12px; }
.product-card .pc-logo .icon-badge { margin: 0; }
.product-card h3 { font-size: 1.5rem; margin: 0; }
.product-card .pc-sub { font-weight: 600; color: var(--indigo-600); font-size: 0.95rem; }
.product-card ul.checks { display: grid; gap: 10px; margin: 4px 0 6px; }
.checks li { display: flex; gap: 10px; align-items: flex-start; color: var(--ink-soft); font-size: 0.97rem; }
.checks svg { color: var(--indigo-500); flex: none; margin-top: 3px; }
.product-card .pc-foot { margin-top: auto; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.link-arrow { display: inline-flex; align-items: center; gap: 7px; font-weight: 650; color: var(--indigo-600); }
.link-arrow .arrow { transition: transform .18s ease; }
.link-arrow:hover .arrow { transform: translateX(3px); }

/* Feature list (product page) */
.feature { display: flex; gap: 16px; }
.feature .icon-badge { margin: 0; width: 44px; height: 44px; border-radius: 12px; }
.feature h3 { font-size: 1.08rem; margin-bottom: 4px; }
.feature p { color: var(--ink-soft); font-size: 0.96rem; margin: 0; }

/* Steps */
.steps { counter-reset: step; display: grid; gap: 22px; }
.step { display: flex; gap: 18px; align-items: flex-start; }
.step .n {
  counter-increment: step; flex: none; width: 40px; height: 40px; border-radius: 12px;
  background: var(--bg-alt); border: 1px solid var(--line); color: var(--indigo-600);
  display: grid; place-items: center; font-weight: 800;
}
.step .n::before { content: counter(step); }
.step h3 { font-size: 1.1rem; margin-bottom: 4px; }
.step p { color: var(--ink-soft); margin: 0; }

/* Stat band */
.stats { display: grid; gap: 20px; }
@media (min-width: 720px) { .stats { grid-template-columns: repeat(3, 1fr); } }
.stat .big { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 850; letter-spacing: -0.03em; }
.stat .lbl { color: var(--ink-soft); font-size: 0.95rem; }

/* --------------------------------------------------------------- CTA band */
.cta-band { position: relative; overflow: hidden; color: #fff; border-radius: var(--radius-lg);
  background:
    radial-gradient(760px 320px at 88% -30%, rgba(255, 255, 255, 0.10), transparent 60%),
    linear-gradient(135deg, #2b4fd0 0%, #1e3aa0 100%);
  padding: clamp(40px, 6vw, 64px); text-align: center; box-shadow: var(--shadow-lg);
}
.cta-band h2 { color: #fff; font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
.cta-band p { color: rgba(255, 255, 255, 0.9); max-width: 52ch; margin-inline: auto; }
.cta-band .hero-cta { justify-content: center; }

/* --------------------------------------------------------------- Contact */
.contact-grid { display: grid; gap: 40px; }
@media (min-width: 880px) { .contact-grid { grid-template-columns: 1fr 1.1fr; align-items: start; } }
.field { display: block; margin-bottom: 18px; }
.field span { display: block; font-weight: 600; font-size: 0.92rem; margin-bottom: 7px; }
.field input, .field textarea, .field select {
  width: 100%; font: inherit; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--indigo-500); box-shadow: var(--ring); outline: none; }
.field textarea { min-height: 130px; resize: vertical; }
.contact-info .ci { display: flex; gap: 14px; align-items: flex-start; padding: 16px 0; border-bottom: 1px solid var(--line-soft); }
.contact-info .ci:last-child { border-bottom: 0; }
.contact-info .icon-badge { margin: 0; width: 42px; height: 42px; border-radius: 11px; }
.contact-info h3 { font-size: 1rem; margin-bottom: 2px; }
.contact-info p, .contact-info a { color: var(--ink-soft); margin: 0; }
.contact-info a:hover { color: var(--indigo-600); }
.form-note { font-size: 0.85rem; color: var(--muted); }

/* --------------------------------------------------------------- Footer */
.site-footer { background: var(--navy-950); color: var(--on-dark); padding: 64px 0 30px; }
[data-theme="dark"] .site-footer { border-top: 1px solid var(--line); }
.footer-top { display: grid; gap: 36px; }
@media (min-width: 820px) { .footer-top { grid-template-columns: 1.6fr 1fr 1fr 1fr; } }
.footer-brand .brand { color: #fff; }
.footer-brand p { color: var(--on-dark-muted); max-width: 34ch; margin-top: 14px; }
.footer-col h4 { color: #fff; font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 14px; }
.footer-col a { display: block; color: var(--on-dark-muted); padding: 6px 0; font-size: 0.95rem; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  margin-top: 44px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between;
  color: var(--on-dark-muted); font-size: 0.88rem;
}
.footer-bottom .legal { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-bottom a:hover { color: #fff; }
.socials { display: flex; gap: 10px; }
.socials a {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.14);
  display: grid; place-items: center; color: var(--on-dark-muted); transition: border-color .15s, color .15s, background .15s;
}
.socials a:hover { color: #fff; border-color: var(--violet-400); background: rgba(255, 255, 255, 0.06); }

/* --------------------------------------------------------------- Misc */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
.notice {
  margin-top: 16px; padding: 12px 16px; border-radius: 10px; font-size: 0.92rem;
  background: var(--bg-alt); border: 1px solid var(--line); border-left: 3px solid var(--accent); color: var(--ink-soft);
}
.hidden { display: none !important; }

/* Contact-form result banners — hidden until the /api/contact PRG redirect
   makes one the :target (#sent / #err). Zero JS required. */
.form-banner { display: none; margin-bottom: 18px; padding: 13px 16px; border-radius: 10px; font-size: 0.92rem; border: 1px solid var(--line); border-left-width: 3px; }
.form-banner strong { display: block; margin-bottom: 2px; }
.form-banner--ok { background: rgba(34, 197, 94, 0.08); border-left-color: #22c55e; color: var(--ink-soft); }
.form-banner--err { background: rgba(239, 68, 68, 0.08); border-left-color: #ef4444; color: var(--ink-soft); }
#sent:target, #err:target { display: block; }
/* Honeypot: off-screen, never focusable/visible to real users. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.mt-0 { margin-top: 0; }
.text-muted { color: var(--muted); }

/* --------------------------------------------------------------- Legal prose */
.prose { max-width: 760px; margin-inline: auto; }
.prose h2 { font-size: 1.35rem; margin-top: 2.4rem; }
.prose h3 { font-size: 1.05rem; margin-top: 1.6rem; }
.prose p, .prose li { color: var(--ink-soft); }
.prose ul { list-style: disc; padding-left: 1.3rem; margin: 0 0 1rem; }
.prose li { margin-bottom: 0.4rem; }
.prose a { color: var(--indigo-600); text-decoration: underline; text-underline-offset: 2px; }
.prose .updated { color: var(--muted); font-size: 0.92rem; }
