/* ==========================================================================
   Orion Omega — orionomega.dev
   Shared stylesheet. Modern dark theme with light-mode support.
   ========================================================================== */

:root {
  /* Palette — dark (default) */
  --bg:            #0a0b12;
  --bg-elev:       #12141f;
  --surface:       #161a29;
  --surface-2:     #1c2136;
  --border:        rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);

  --text:          #eef0f8;
  --text-muted:    #9aa1bd;
  --text-faint:    #6b7192;

  --accent:        #7c6cff;   /* indigo-violet */
  --accent-2:      #22d3ee;   /* cyan */
  --accent-gold:   #f5b642;
  --accent-soft:   rgba(124, 108, 255, 0.14);

  --danger:        #f87171;
  --success:       #34d399;

  --radius:        14px;
  --radius-lg:     22px;
  --radius-sm:     9px;
  --maxw:          1120px;
  --gutter:        clamp(20px, 5vw, 40px);

  --shadow:        0 10px 40px -12px rgba(0, 0, 0, 0.55);
  --shadow-soft:   0 4px 24px -8px rgba(0, 0, 0, 0.4);

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

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg:            #f7f8fc;
    --bg-elev:       #ffffff;
    --surface:       #ffffff;
    --surface-2:     #f1f3fa;
    --border:        rgba(15, 20, 40, 0.10);
    --border-strong: rgba(15, 20, 40, 0.18);

    --text:          #14182a;
    --text-muted:    #545c78;
    --text-faint:    #808aa6;

    --accent-soft:   rgba(124, 108, 255, 0.10);
    --shadow:        0 10px 40px -14px rgba(20, 24, 48, 0.18);
    --shadow-soft:   0 4px 20px -8px rgba(20, 24, 48, 0.12);
  }
}

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

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

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

/* Ambient background glow */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60% 50% at 15% -5%, rgba(124, 108, 255, 0.16), transparent 60%),
    radial-gradient(50% 45% at 90% 0%, rgba(34, 211, 238, 0.10), transparent 55%);
}

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

a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.2rem, 5.5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.2rem; }
p  { margin: 0 0 1rem; color: var(--text-muted); }

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

/* Accessibility: skip link */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

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

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(160%) blur(12px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; height: 68px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 700; color: var(--text); letter-spacing: -0.02em; font-size: 1.08rem; }
.brand:hover { text-decoration: none; }
.brand .mark { width: 30px; height: 30px; flex: none; }
.brand .brand-omega { color: var(--accent); }

.nav-links { display: flex; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  color: var(--text-muted); padding: 8px 13px; border-radius: 9px; font-size: 0.95rem; font-weight: 500;
  transition: color .15s, background .15s;
}
.nav-links a:hover { color: var(--text); background: var(--surface); text-decoration: none; }

.nav-toggle { display: none; background: none; border: 1px solid var(--border-strong); color: var(--text);
  border-radius: 9px; width: 42px; height: 42px; cursor: pointer; font-size: 1.2rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-weight: 600; font-size: 0.98rem; padding: 12px 22px; border-radius: 11px;
  border: 1px solid transparent; cursor: pointer; transition: transform .12s, box-shadow .18s, background .18s, border-color .18s;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: linear-gradient(135deg, var(--accent), #5b7cff); color: #fff; box-shadow: 0 8px 24px -10px var(--accent); }
.btn-primary:hover { box-shadow: 0 12px 30px -8px var(--accent); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--surface-2); }

/* ---------- Sections ---------- */
section { padding: clamp(56px, 9vw, 104px) 0; }
.eyebrow {
  display: inline-block; font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent-2); margin-bottom: 14px; font-weight: 600;
}
.section-head { max-width: 680px; margin-bottom: 48px; }
.section-head.center { margin-inline: auto; text-align: center; }
.lead { font-size: 1.15rem; color: var(--text-muted); }

/* ---------- Hero ---------- */
.hero { padding-top: clamp(60px, 10vw, 120px); position: relative; }
.hero-inner { max-width: 820px; }
.hero .badge {
  display: inline-flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--text-muted);
  background: var(--surface); border: 1px solid var(--border); padding: 6px 14px; border-radius: 999px; margin-bottom: 26px;
}
.hero .badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px rgba(52,211,153,.18); }
.hero h1 { margin-bottom: 20px; }
.hero h1 .grad {
  background: linear-gradient(120deg, var(--accent) 10%, var(--accent-2) 90%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero .lead { max-width: 620px; margin-bottom: 34px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Stat strip ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 64px; }
.stat { border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius); padding: 22px; }
.stat .num { font-size: 1.9rem; font-weight: 800; letter-spacing: -0.03em; }
.stat .num .grad { background: linear-gradient(120deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat .label { color: var(--text-muted); font-size: 0.9rem; }

/* ---------- Cards / services ---------- */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 30px; transition: transform .18s, border-color .18s, box-shadow .18s;
  position: relative; overflow: hidden;
}
.card:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow-soft); }
.card .icon {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 18px;
  background: var(--accent-soft); color: var(--accent-2); border: 1px solid var(--border);
}
.card .icon svg { width: 24px; height: 24px; }
.card h3 { margin-bottom: 8px; }
.card p { margin-bottom: 0; font-size: 0.98rem; }
.card ul { margin: 14px 0 0; padding-left: 18px; color: var(--text-muted); font-size: 0.94rem; }
.card ul li { margin-bottom: 5px; }

/* ---------- Feature split ---------- */
.split { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.feature-list { list-style: none; margin: 24px 0 0; padding: 0; }
.feature-list li { display: flex; gap: 13px; margin-bottom: 18px; }
.feature-list .tick {
  flex: none; width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-2); font-size: 0.8rem; margin-top: 2px;
}
.feature-list strong { color: var(--text); display: block; }
.feature-list span { color: var(--text-muted); font-size: 0.95rem; }

.panel {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 26px; box-shadow: var(--shadow);
}
.code-block {
  font-family: var(--font-mono); font-size: 0.86rem; color: var(--text-muted);
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px;
  overflow-x: auto; line-height: 1.7;
}
.code-block .k { color: var(--accent); } .code-block .s { color: var(--success); } .code-block .c { color: var(--text-faint); }

/* ---------- CTA band ---------- */
.cta-band { text-align: center; }
.cta-card {
  background: linear-gradient(135deg, rgba(124,108,255,.16), rgba(34,211,238,.10));
  border: 1px solid var(--border-strong); border-radius: var(--radius-lg);
  padding: clamp(40px, 6vw, 68px); box-shadow: var(--shadow);
}

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 12px; }
.contact-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.contact-card .role { font-family: var(--font-mono); font-size: 0.76rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-faint); }
.contact-card a { font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 56px 0 40px; margin-top: 40px; background: var(--bg-elev); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 40px; }
.site-footer h4 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-faint); margin-bottom: 14px; font-weight: 600; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer ul li { margin-bottom: 9px; }
.site-footer ul a { color: var(--text-muted); font-size: 0.95rem; }
.site-footer ul a:hover { color: var(--text); }
.footer-brand p { max-width: 300px; font-size: 0.95rem; margin-top: 12px; }
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between;
  border-top: 1px solid var(--border); padding-top: 24px; color: var(--text-faint); font-size: 0.88rem;
}
.footer-bottom a { color: var(--text-muted); }

/* ---------- Legal / document pages ---------- */
.doc { padding: clamp(48px, 7vw, 80px) 0; }
.doc-inner { max-width: 780px; margin-inline: auto; }
.doc .meta { color: var(--text-faint); font-size: 0.92rem; font-family: var(--font-mono); margin-bottom: 8px; }
.doc h1 { margin-bottom: 10px; }
.doc h2 { font-size: 1.4rem; margin-top: 44px; padding-top: 8px; scroll-margin-top: 90px; }
.doc h3 { font-size: 1.1rem; margin-top: 28px; }
.doc p, .doc li { color: var(--text-muted); }
.doc ul, .doc ol { padding-left: 22px; margin-bottom: 1rem; }
.doc li { margin-bottom: 8px; }
.doc a { color: var(--accent-2); text-decoration: underline; text-underline-offset: 2px; }
.doc strong { color: var(--text); }
.toc {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px 26px; margin: 28px 0 40px;
}
.toc h4 { margin: 0 0 12px; font-size: 0.8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-faint); }
.toc ol { margin: 0; padding-left: 20px; columns: 2; column-gap: 32px; }
.toc li { margin-bottom: 6px; }
.toc a { color: var(--text-muted); text-decoration: none; }
.toc a:hover { color: var(--accent-2); }
.callout {
  border-left: 3px solid var(--accent); background: var(--accent-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 16px 20px; margin: 22px 0;
}
.callout p { margin: 0; color: var(--text); }
.data-table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 0.94rem; }
.data-table th, .data-table td { text-align: left; padding: 12px 14px; border: 1px solid var(--border); vertical-align: top; }
.data-table th { background: var(--surface); color: var(--text); font-weight: 600; }
.data-table td { color: var(--text-muted); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid-3, .contact-grid { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; gap: 36px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav-links {
    position: fixed; inset: 68px 0 auto 0; flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--bg-elev); border-bottom: 1px solid var(--border); padding: 12px var(--gutter) 20px;
    transform: translateY(-120%); transition: transform .22s ease; box-shadow: var(--shadow);
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: 12px 14px; }
  .nav-toggle { display: block; }
  .grid-3, .grid-2, .contact-grid, .footer-grid { grid-template-columns: 1fr; }
  .toc ol { columns: 1; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

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