/* ============================================================
   KSATALSIN SL. — Systems Engineering
   Committed dark technical identity. One accent, hairline rules.
   ============================================================ */

/* ---- Tokens ------------------------------------------------ */
:root {
  --bg:            #0B0F17;   /* deep slate ground            */
  --bg-alt:        #090D14;   /* alternating section ground   */
  --surface:       #0E1522;   /* lifted card surface          */
  --surface-2:     #111A28;   /* deeper inset (canvas, code)  */

  --border:        rgba(148, 163, 184, 0.12);
  --border-strong: rgba(148, 163, 184, 0.22);

  --text:          #94A3B8;   /* cool-gray body               */
  --text-strong:   #E6EDF5;   /* heading white                */
  --text-muted:    #64748B;   /* captions, meta               */

  --accent:        #38BDF8;   /* ice blue                     */
  --accent-strong: #7DD3FC;
  --accent-dim:    rgba(56, 189, 248, 0.10);
  --accent-line:   rgba(56, 189, 248, 0.35);

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

  --maxw: 1200px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-y: clamp(4.5rem, 9vw, 8rem);
  --radius: 10px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---- Reset ------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: hidden; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  font-feature-settings: "cv02", "cv03", "cv04", "ss01";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
ul, ol { list-style: none; padding: 0; }

::selection { background: rgba(56, 189, 248, 0.25); color: #fff; }

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

.skip-link {
  position: absolute; left: 50%; top: -100px; transform: translateX(-50%);
  background: var(--surface); color: var(--text-strong);
  padding: 0.6rem 1rem; border: 1px solid var(--border-strong); border-radius: 8px;
  z-index: 200; transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 0.75rem; }

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

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.section { padding-block: var(--section-y); border-top: 1px solid var(--border); }
.section--alt { background: var(--bg-alt); }

.section__head { max-width: 60ch; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section__title {
  font-size: clamp(1.7rem, 3.6vw, 2.6rem);
  line-height: 1.12;
  letter-spacing: -0.022em;
  font-weight: 600;
  color: var(--text-strong);
  text-wrap: balance;
}
.section__sub {
  margin-top: 1.1rem;
  font-size: 1.05rem;
  max-width: 58ch;
}

/* ---- Buttons ---------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.72rem 1.25rem;
  border-radius: 8px;
  font-size: 0.94rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease), color 0.18s var(--ease), transform 0.18s var(--ease);
  white-space: nowrap;
}
.btn--primary {
  background: var(--accent);
  color: #04121c;
  font-weight: 600;
}
.btn--primary:hover { background: var(--accent-strong); transform: translateY(-1px); }
.btn--ghost {
  background: transparent;
  color: var(--text-strong);
  border-color: var(--border-strong);
}
.btn--ghost:hover { border-color: var(--accent-line); color: #fff; background: var(--accent-dim); }
.btn svg { flex: none; }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.nav.is-scrolled { border-bottom-color: var(--border); background: color-mix(in srgb, var(--bg) 88%, transparent); }
.nav__inner { display: flex; align-items: center; gap: 2rem; height: 64px; }

.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--text-strong); }
.brand__logo { display: block; height: 21px; width: auto; fill: currentColor; }
.brand:hover .brand__logo { color: #fff; }
.brand__mark { color: var(--accent); }
.brand__name { font-weight: 600; letter-spacing: 0.02em; font-size: 0.98rem; }
.brand__suffix {
  font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.1em;
  color: var(--text-muted); border: 1px solid var(--border); border-radius: 4px;
  padding: 0.1rem 0.32rem; align-self: center;
}

.nav__links { display: flex; gap: 1.75rem; margin-left: auto; }
.nav__links a {
  font-size: 0.9rem; color: var(--text);
  transition: color 0.16s var(--ease);
  position: relative;
}
.nav__links a:hover { color: var(--text-strong); }
.nav__cta { margin-left: 0; }

@media (max-width: 860px) {
  .nav__links { display: none; }
  .nav__inner { justify-content: space-between; }
  .nav__cta { margin-left: auto; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  padding-block: clamp(3.5rem, 8vw, 7rem) var(--section-y);
  overflow: hidden;
}
/* subtle technical grid backdrop */
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 70% 0%, #000 0%, transparent 72%);
          mask-image: radial-gradient(ellipse 90% 70% at 70% 0%, #000 0%, transparent 72%);
  opacity: 0.5;
  pointer-events: none;
}
.hero > * { position: relative; }

.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.hero__title {
  font-size: clamp(2.1rem, 5.2vw, 3.75rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  font-weight: 700;
  color: var(--text-strong);
  text-wrap: balance;
}
.hero__title,
.section__title { text-wrap: balance; }
.hero__sub {
  margin-top: 1.5rem;
  font-size: clamp(1.02rem, 1.6vw, 1.18rem);
  max-width: 46ch;
}
.hero__actions { margin-top: 2.25rem; display: flex; flex-wrap: wrap; gap: 0.85rem; }

/* Live buffer panel */
.panel {
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.8);
}
.panel__head, .panel__foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.7rem 1rem;
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.03em;
  color: var(--text-muted);
}
.panel__head { border-bottom: 1px solid var(--border); }
.panel__label { color: var(--text); }
.panel__status { display: inline-flex; align-items: center; gap: 0.45rem; }
.dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent-line);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(56,189,248,0.5); }
  50%      { box-shadow: 0 0 0 5px rgba(56,189,248,0); }
}
.panel__canvas { width: 100%; height: auto; background: var(--surface-2); display: block; }
.panel__foot { border-top: 1px solid var(--border); gap: 0.5rem; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; gap: 0.15rem; }
.stat__k { color: var(--text-muted); }
.stat__v { color: var(--accent-strong); }

/* Metrics rail */
.metrics {
  display: grid; grid-template-columns: repeat(3, 1fr);
  margin-top: clamp(2.5rem, 5vw, 4rem);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.metric { padding: 1.5rem clamp(1.25rem, 2.5vw, 2rem); border-left: 1px solid var(--border); }
.metric:first-child { border-left: none; }
.metric__val {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 500;
  color: var(--text-strong);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.metric__unit { color: var(--accent); font-size: 0.6em; margin-left: 0.1em; }
.metric__label { display: block; margin-top: 0.4rem; font-size: 0.9rem; }
@media (max-width: 720px) {
  .metrics { grid-template-columns: 1fr; }
  .metric { border-left: none; border-top: 1px solid var(--border); }
  .metric:first-child { border-top: none; }
}

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__panel { order: 2; }
}

/* ============================================================
   SPECIALIZATION
   ============================================================ */
.spec__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.spec__lede { font-size: 1.08rem; }
.feature-list { display: grid; gap: 1.75rem; }
.feature { padding-left: 1.15rem; border-left: 2px solid var(--border-strong); transition: border-color 0.2s var(--ease); }
.feature:hover { border-left-color: var(--accent); }
.feature__title { font-size: 1.02rem; font-weight: 600; color: var(--text-strong); margin-bottom: 0.35rem; letter-spacing: -0.01em; }
.feature__body { font-size: 0.95rem; }
@media (max-width: 820px) { .spec__grid { grid-template-columns: 1fr; } }

/* ============================================================
   CARDS
   ============================================================ */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  display: flex; flex-direction: column;
  transition: border-color 0.22s var(--ease), transform 0.22s var(--ease), background 0.22s var(--ease);
}
.card:hover { border-color: var(--border-strong); transform: translateY(-3px); background: var(--surface-2); }
.card__icon {
  width: 46px; height: 46px; border-radius: 9px;
  display: grid; place-items: center;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid var(--accent-line);
  margin-bottom: 1.4rem;
}
.card__kicker {
  font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: 0.5rem;
}
.card__title { font-size: 1.14rem; font-weight: 600; color: var(--text-strong); line-height: 1.25; letter-spacing: -0.015em; margin-bottom: 0.7rem; }
.card__body { font-size: 0.93rem; flex: 1; }
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1.4rem; }
.chips li {
  font-family: var(--font-mono); font-size: 0.72rem;
  color: var(--text); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 6px;
  padding: 0.28rem 0.55rem;
}
.card:hover .chips li { border-color: var(--border-strong); }
@media (max-width: 900px) { .cards { grid-template-columns: 1fr; } }

/* ============================================================
   PIPELINE
   ============================================================ */
.pipeline {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, var(--surface) 0%, var(--bg-alt) 100%);
  padding: clamp(1.5rem, 4vw, 3rem) clamp(1rem, 3vw, 2rem);
  overflow-x: auto;
}
.pipeline__row {
  display: flex; align-items: stretch; justify-content: center;
  gap: 0; min-width: max-content; margin-inline: auto;
}
.node {
  position: relative;
  flex: none;
  min-width: 150px; max-width: 180px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 0.9rem 1rem;
  display: flex; flex-direction: column; gap: 0.3rem;
}
.node__idx { font-family: var(--font-mono); font-size: 0.66rem; color: var(--accent); letter-spacing: 0.1em; }
.node__name { font-size: 0.92rem; font-weight: 500; color: var(--text-strong); line-height: 1.25; }
.node__meta { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-muted); }
.node--engine { border-color: var(--accent-line); box-shadow: 0 0 0 1px var(--accent-dim) inset; }
.node--client { border-style: dashed; }
.node__branch {
  margin-top: 0.55rem; padding-top: 0.55rem;
  border-top: 1px dashed var(--border-strong);
  display: grid; gap: 0.3rem;
}
.node__branch li {
  font-family: var(--font-mono); font-size: 0.68rem; color: var(--text);
  padding-left: 0.85rem; position: relative;
}
.node__branch li::before {
  content: "└"; position: absolute; left: 0; color: var(--accent); font-size: 0.7rem;
}
.conn {
  flex: none; align-self: center; width: clamp(20px, 4vw, 44px); height: 1px;
  background: linear-gradient(90deg, var(--border-strong), var(--accent-line));
  position: relative;
}
.conn::after {
  content: ""; position: absolute; right: -1px; top: 50%; transform: translateY(-50%);
  border: 4px solid transparent; border-left-color: var(--accent-line);
}

.guarantees { margin-top: 2rem; display: grid; gap: 0.75rem; }
.guarantees li { display: flex; align-items: flex-start; gap: 0.65rem; font-size: 0.96rem; }
.guarantees svg { color: var(--accent); flex: none; margin-top: 0.28rem; }

/* ============================================================
   STACK & METHOD
   ============================================================ */
.stack__grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.stack__col { display: grid; gap: 2rem; }
.stack__catname {
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-strong); margin-bottom: 0.9rem;
}
.chips--mono li { background: transparent; }

.method {
  border-left: 1px solid var(--border);
  padding-left: clamp(1.5rem, 3vw, 2.5rem);
  display: grid; gap: 1.75rem;
}
.method__item { position: relative; }
.method__item::before {
  content: ""; position: absolute; left: calc(-1 * clamp(1.5rem, 3vw, 2.5rem) - 1px);
  top: 0.55rem; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); transform: translateX(-3px);
}
.method__name { font-size: 1.02rem; font-weight: 600; color: var(--text-strong); margin-bottom: 0.3rem; letter-spacing: -0.01em; }
.method__body { font-size: 0.94rem; }
@media (max-width: 820px) {
  .stack__grid { grid-template-columns: 1fr; }
  .method { border-left: none; padding-left: 1.15rem; }
  .method__item::before { left: -1.15rem; }
}

/* ============================================================
   CONTACT FORM
   ============================================================ */
.contact__grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(2.5rem, 6vw, 5rem); align-items: start; }
.book { margin-top: 2rem; display: flex; align-items: center; gap: 0.9rem 1.1rem; flex-wrap: wrap; }
.book__hint { font-size: 0.85rem; color: var(--text-muted); }
.corp { margin-top: 2.5rem; display: grid; gap: 1.25rem; }
.corp dt { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 0.25rem; }
.corp dd { color: var(--text-strong); font-size: 0.96rem; }

.form { display: grid; gap: 1.25rem; }
/* Honeypot: kept in the layout for bots, removed from view + a11y tree for people. */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.field { display: grid; gap: 0.45rem; }
.field label { font-size: 0.85rem; font-weight: 500; color: var(--text-strong); letter-spacing: -0.005em; }
.field input, .field textarea, .field select {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 0.72rem 0.85rem;
  font-size: 0.95rem;
  color: var(--text-strong);
  transition: border-color 0.16s var(--ease), background 0.16s var(--ease), box-shadow 0.16s var(--ease);
}
.field textarea { resize: vertical; min-height: 120px; line-height: 1.55; }
.field input::placeholder, .field textarea::placeholder { color: var(--text-muted); }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
  background: var(--surface-2);
}
.field.is-invalid input, .field.is-invalid textarea, .field.is-invalid select { border-color: #f87171; }
.field__err { font-size: 0.78rem; color: #f87171; min-height: 0; }
.field.is-invalid .field__err { min-height: 1rem; }

.select-wrap { position: relative; }
.select-wrap select { appearance: none; -webkit-appearance: none; padding-right: 2.25rem; cursor: pointer; }
.select-wrap select:invalid { color: var(--text-muted); }
.select-wrap__chevron { position: absolute; right: 0.85rem; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; }
.select-wrap select option { background: var(--surface); color: var(--text-strong); }

.form__submit { margin-top: 0.5rem; justify-self: start; }
.form__note { font-size: 0.88rem; min-height: 1.2rem; }
.form__note.is-ok { color: var(--accent-strong); }
.form__note.is-err { color: #f87171; }

@media (max-width: 860px) { .contact__grid { grid-template-columns: 1fr; } }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { border-top: 1px solid var(--border); padding-block: 2.5rem; background: var(--bg-alt); }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.footer__brand { display: inline-flex; align-items: center; gap: 0.7rem; font-size: 0.85rem; color: var(--text-muted); }
.footer__logo { height: 15px; width: auto; fill: currentColor; flex: none; }
.footer__legal { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer__legal a { font-size: 0.85rem; color: var(--text-muted); transition: color 0.16s var(--ease); }
.footer__legal a:hover { color: var(--text-strong); }

/* ============================================================
   TWO-MODEL COMPARISON
   ============================================================ */
.subhead {
  font-family: var(--font-mono);
  font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent);
  margin: clamp(2.75rem, 5vw, 4rem) 0 1.25rem;
}
.models { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.model {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.model--alt {
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.06), var(--surface) 60%);
  border-color: var(--accent-line);
}
.model__head { padding: 1.4rem 1.5rem; border-bottom: 1px solid var(--border); }
.model__tag { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.model__name { margin-top: 0.4rem; font-size: 1.1rem; font-weight: 600; color: var(--text-strong); letter-spacing: -0.015em; }
.model__specs { padding: 0.5rem 1.5rem 1.35rem; }
.model__specs > div {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  padding: 0.72rem 0; border-bottom: 1px solid var(--border);
}
.model__specs > div:last-child { border-bottom: none; }
.model__specs dt { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.02em; color: var(--text-muted); flex: none; }
.model__specs dd { font-size: 0.86rem; color: var(--text-strong); text-align: right; flex: 1; }
@media (max-width: 720px) { .models { grid-template-columns: 1fr; } }

/* ---- Roadmap / coming-soon callout ---------------------- */
.soon {
  display: flex; align-items: center; gap: 0.85rem 1.25rem; flex-wrap: wrap;
  margin-top: clamp(1.75rem, 3vw, 2.5rem);
  padding: 1.05rem 1.35rem;
  border: 1px dashed var(--accent-line);
  border-radius: var(--radius);
  background: var(--accent-dim);
}
.soon__tag {
  font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); border: 1px solid var(--accent-line); border-radius: 999px;
  padding: 0.32rem 0.72rem; white-space: nowrap; flex: none;
}
.soon__text { font-size: 0.94rem; flex: 1; min-width: 240px; }
.soon__text strong { color: var(--text-strong); font-weight: 600; }

/* ============================================================
   ADDITIONAL DOMAINS
   ============================================================ */
.domains { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.domain {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1.5rem;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), transform 0.2s var(--ease);
}
.domain:hover { border-color: var(--border-strong); background: var(--surface-2); transform: translateY(-2px); }
.domain__name {
  font-size: 1rem; font-weight: 600; color: var(--text-strong); letter-spacing: -0.01em;
  margin-bottom: 0.4rem; padding-left: 0.95rem; position: relative;
}
.domain__name::before {
  content: ""; position: absolute; left: 0; top: 0.5em;
  width: 6px; height: 6px; background: var(--accent); border-radius: 1px;
}
.domain__desc { font-size: 0.9rem; padding-left: 0.95rem; }
@media (max-width: 900px) { .domains { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .domains { grid-template-columns: 1fr; } }

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .dot { animation: none; }
}
