/* tenant/ops_ marketing site -- shared chrome + layout.
   Colors come from CSS vars set by JS from MK_PALETTES (single source of
   truth). Structural layout lives here; components carry token colors inline.
   Dark is the canonical default (no-flash baseline below). */

:root {
  /* dark baseline -- overwritten by JS, but present so first paint is correct */
  --bg:#0F1419; --bgPanel:#161B22; --bgRaised:#1C232C; --bgSubtle:#1A2028;
  --border:#2A3340; --borderStrong:#3A4656;
  --fg:#E5E9EE; --fgDim:#B6BFCC; --fgMuted:#8A96A6; --fgFaint:#5B6878;
  --accent:#C2A882; --accentDeep:#A8906E; --accentInk:#1E1A16; --accentBg:#26201A;
  --ok:#7DC383; --okBg:#1A2820; --warn:#E0B060; --warnBg:#2A2218;
  --err:#D27B6E; --errBg:#2A1C18; --info:#7DA8D8; --infoBg:#1A2230;
  --boxLine:#3A4656;
  --maxw:1160px; --pad:32px;
}

* { box-sizing: border-box; }
html, body { margin:0; padding:0; }
html { scroll-behavior:smooth; -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility; }
body {
  background:var(--bg); color:var(--fg);
  font-family:'IBM Plex Sans', system-ui, sans-serif;
  font-size:14px; line-height:1.6;
}
a { color:inherit; text-decoration:none; }
::selection { background:var(--accent); color:var(--accentInk); }

/* Brand caret animations */
@keyframes ops-caret-blink { 0%,49% { opacity:1; } 50%,100% { opacity:0; } }
.ops-caret { animation: ops-caret-blink 1.1s steps(1) infinite; }
@keyframes ops-caret-pulse { 0%,49% { opacity:1; } 50%,100% { opacity:0.25; } }
.ops-caret-soft { animation: ops-caret-pulse 1.1s steps(1) infinite; }

@media (prefers-reduced-motion: reduce) {
  .ops-caret, .ops-caret-soft { animation:none; }
  html { scroll-behavior:auto; }
}

/* ── Layout primitives ───────────────────────────────────────── */
.container { width:100%; max-width:var(--maxw); margin:0 auto; padding:0 var(--pad); }

.section { border-top:1px solid var(--border); }
.section--flush { border-top:0; }
.section--panel { background:var(--bgPanel); }
.section__inner { padding:104px 0; }
.section__inner--tight { padding:72px 0; }

/* eyebrow + title block */
.eyebrow {
  font-family:'IBM Plex Mono', ui-monospace, monospace;
  font-size:11px; font-weight:500; letter-spacing:0.08em;
  text-transform:uppercase; color:var(--fgFaint);
}
.sec-head { display:flex; flex-direction:column; gap:14px; max-width:680px; }
.sec-title {
  margin:0; font-weight:600; letter-spacing:-0.025em; color:var(--fg);
  font-size:40px; line-height:1.08; text-wrap:balance;
}
.sec-sub { margin:0; color:var(--fgMuted); font-size:16px; line-height:1.6; max-width:560px; }

/* ── Top nav ─────────────────────────────────────────────────── */
.nav {
  position:sticky; top:0; z-index:50;
  background:color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter:saturate(140%) blur(12px);
  -webkit-backdrop-filter:saturate(140%) blur(12px);
  border-bottom:1px solid var(--border);
}
.nav__row {
  height:62px; display:flex; align-items:center; gap:28px;
}
.nav__links { display:flex; gap:4px; margin-left:14px; flex:1; }
.nav__link {
  position:relative; padding:6px 12px; border-radius:6px;
  font-size:13.5px; color:var(--fgDim); cursor:pointer;
  transition:color .14s ease, background .14s ease;
}
.nav__link:hover { color:var(--fg); background:var(--bgRaised); }
.nav__link--active { color:var(--fg); }
.nav__link--active::after {
  content:""; position:absolute; left:12px; right:12px; bottom:-1px; height:2px;
  background:var(--accent); border-radius:2px;
}
.nav__right { display:flex; align-items:center; gap:14px; }
.nav__signin { font-size:13.5px; color:var(--fgDim); cursor:pointer; white-space:nowrap; }
.nav__signin:hover { color:var(--fg); }

.theme-toggle {
  width:30px; height:30px; border-radius:999px;
  border:1px solid var(--border); background:var(--bgRaised);
  color:var(--fgMuted); cursor:pointer; display:inline-flex;
  align-items:center; justify-content:center; padding:0;
  transition:color .14s ease, border-color .14s ease;
}
.theme-toggle:hover { color:var(--fg); border-color:var(--borderStrong); }

/* button */
.btn {
  display:inline-flex; align-items:center; gap:8px;
  padding:9px 15px; border-radius:6px; cursor:pointer;
  font-family:'IBM Plex Sans', system-ui, sans-serif;
  font-size:13.5px; font-weight:500; white-space:nowrap;
  border:1px solid var(--border); background:transparent; color:var(--fgDim);
  transition:background .14s ease, border-color .14s ease, color .14s ease;
}
.btn:hover { border-color:var(--borderStrong); color:var(--fg); }
.btn--primary { background:var(--accent); border-color:var(--accent); color:var(--accentInk); box-shadow:inset 0 -1px 0 rgba(0,0,0,0.08); }
.btn--primary:hover { background:var(--accentDeep); border-color:var(--accentDeep); color:var(--accentInk); }
.btn--lg { padding:11px 18px; font-size:14px; }
.btn__kbd {
  font-family:'IBM Plex Mono', ui-monospace, monospace; font-size:10.5px;
  padding:1px 5px; border-radius:3px; letter-spacing:0.02em;
  border:1px solid color-mix(in srgb, currentColor 28%, transparent);
  opacity:0.7;
}

/* ── Footer ──────────────────────────────────────────────────── */
.footer { border-top:1px solid var(--border); background:var(--bgPanel); }
.footer__top {
  padding:56px 0 40px;
  display:grid; grid-template-columns:1.4fr 1fr 1fr 1fr; gap:40px;
}
.footer__tag { color:var(--fgMuted); font-size:13.5px; line-height:1.6; max-width:280px; margin:16px 0 0; }
.footer__col h4 {
  margin:0 0 14px; font-family:'IBM Plex Mono', ui-monospace, monospace;
  font-size:11px; font-weight:500; letter-spacing:0.08em; text-transform:uppercase;
  color:var(--fgFaint);
}
.footer__col a { display:block; color:var(--fgDim); font-size:13.5px; padding:5px 0; cursor:pointer; }
.footer__col a:hover { color:var(--fg); }
.footer__legal {
  border-top:1px solid var(--border); padding:18px 0;
  display:flex; align-items:center; justify-content:space-between; gap:20px;
  font-family:'IBM Plex Mono', ui-monospace, monospace;
  font-size:10.5px; letter-spacing:0.06em; color:var(--fgFaint); flex-wrap:wrap;
}
.footer__legal .compl { display:inline-flex; gap:18px; flex-wrap:wrap; text-transform:uppercase; }

/* ── Generic cards / grids ───────────────────────────────────── */
.card { background:var(--bgPanel); border:1px solid var(--border); border-radius:8px; }
.grid { display:grid; gap:20px; }
.grid--2 { grid-template-columns:1fr 1fr; }
.grid--3 { grid-template-columns:repeat(3,1fr); }
.grid--4 { grid-template-columns:repeat(4,1fr); }

/* ── Split layout -- shared by hero and feature sections ─────── */
/* Stack breakpoint: 980px (also used by footer). Do NOT add a   */
/* separate hero breakpoint -- hero-specific sizing is inline.   */
.split { display:grid; grid-template-columns:1.05fr 0.95fr; gap:56px; align-items:center; }
.split--rev .split__media { order:-1; }
/* Let grid tracks shrink below the mocks' intrinsic width (wide tables scroll
   inside their own wrapper instead of widening the page on mobile). */
.split > *, .hero-inner > *, .grid > * { min-width:0; }

/* ── Hero split layout ───────────────────────────────────────── */
/* Reduced padding so the above-fold thread mock fits at 1080p.  */
/* Reuses the existing 980px .split stack. No new breakpoint.    */
.hero-inner {
  padding: 40px 0 56px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

/* fade-up on load */
.rise { opacity:0; transform:translateY(14px); animation:rise .6s cubic-bezier(.2,.7,.2,1) forwards; }
@media (prefers-reduced-motion: reduce){ .rise{ opacity:1; transform:none; animation:none; } }
@keyframes rise { to { opacity:1; transform:none; } }

/* ── How-It-Works accordion ──────────────────────────────────── */
.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.32s ease;
}
.accordion-body--open {
  max-height: 560px; /* above the tallest detail block (step 03, ~330px at 980px viewport) */
}
@media (prefers-reduced-motion: reduce) {
  .accordion-body { transition: none; }
}

/* ── Tab bar (kept for any future use) ──────────────────────── */
.tab-bar {
  display:flex; border-bottom:1px solid var(--border);
  margin-bottom:0; gap:0;
}
.tab-btn {
  position:relative; padding:8px 18px; background:transparent; border:0;
  cursor:pointer; font-family:'IBM Plex Sans', system-ui, sans-serif;
  font-size:13.5px; font-weight:500; color:var(--fgMuted);
  transition:color .14s ease; letter-spacing:0; white-space:nowrap;
}
.tab-btn:hover { color:var(--fg); }
.tab-btn--active { color:var(--fg); }
.tab-btn--active::after {
  content:""; position:absolute; left:18px; right:18px; bottom:-1px; height:2px;
  background:var(--accent); border-radius:2px;
}

/* ── Modal overlay ───────────────────────────────────────────── */
.modal-overlay {
  position:fixed; inset:0; background:rgba(0,0,0,0.6);
  z-index:200; display:flex; align-items:center; justify-content:center;
  padding:20px;
}
.modal-panel {
  background:var(--bgPanel); border:1px solid var(--border);
  border-radius:10px; max-width:480px; width:100%; padding:32px;
  position:relative; max-height:90vh; overflow-y:auto;
}
.modal-close {
  position:absolute; top:14px; right:14px;
  background:var(--bgRaised); border:1px solid var(--border);
  color:var(--fgMuted); width:28px; height:28px; border-radius:6px;
  cursor:pointer; font-size:14px; display:flex;
  align-items:center; justify-content:center; padding:0;
  transition:color .14s ease, border-color .14s ease;
}
.modal-close:hover { color:var(--fg); border-color:var(--borderStrong); }

/* ── Contact form field labels ───────────────────────────────── */
.form-field { display:flex; flex-direction:column; gap:6px; }
.form-label {
  font-family:'IBM Plex Mono', ui-monospace, monospace;
  font-size:11px; font-weight:500; letter-spacing:0.06em;
  text-transform:uppercase; color:var(--fgFaint);
}

/* ── Release 1: hero "also covers" line ──────────────────────── */
.hero-also {
  margin:0; max-width:540px; font-size:13.5px; line-height:1.6; color:var(--fgFaint);
}

/* ── Release 1 mocks ─────────────────────────────────────────── */
/* KPI band: hairline-joined cells, wraps like the product KpiBar. */
.kpi-band {
  display:flex; flex-wrap:wrap; gap:1px;
  background:var(--border); border:1px solid var(--border);
  border-radius:8px; overflow:hidden;
}
.kpi-band > div { flex:1 1 120px; }

/* Dashboard KPI widgets */
.dash-kpis { display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:8px; }

/* Generic terminal (McpClientMock). Lines reserve their space before they
   are revealed so the section does not shift while the mock animates. */
.term {
  display:flex; flex-direction:column; min-height:200px; overflow-x:auto;
  padding:14px 16px;
  font-family:'IBM Plex Mono', ui-monospace, monospace;
  font-size:12px; line-height:1.7;
}
.term__line { white-space:pre-wrap; overflow-wrap:anywhere; }
.term__line--off { visibility:hidden; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 980px) {
  .split, .footer__top { grid-template-columns:1fr; gap:36px; }
  .split--rev .split__media { order:0; }
  .grid--4 { grid-template-columns:1fr 1fr; }
  .grid--3 { grid-template-columns:1fr; }
  .sec-title { font-size:34px; }
  /* hero inherits the 980px split stack */
  .hero-inner { grid-template-columns:1fr; gap:36px; padding:40px 0 48px; }
}
@media (max-width: 520px) {
  /* The nav CTA does not fit next to the logo and language toggle on phones
     (page scrolled horizontally at 375 px); the hero and contact section
     carry their own CTA. */
  .nav__right .btn--primary { display:none; }
}
@media (max-width: 720px) {
  :root { --pad:20px; }
  .nav__links { display:none; }
  .section__inner { padding:72px 0; }
  .grid--2, .grid--4 { grid-template-columns:1fr; }
  .sec-title { font-size:30px; }
  .dash-kpis { grid-template-columns:repeat(2, minmax(0, 1fr)); }
  .term { padding:12px; font-size:11.5px; }
  .footer__legal { flex-direction:column; align-items:flex-start; gap:10px; }
  .tab-bar { overflow-x:auto; -webkit-overflow-scrolling:touch; }
}
