/* ============================================================
   Triantus LLC — design tokens
   Red identity on a near-black base. Green is reserved STRICTLY
   for live status (connected / healthy), per status-page semantics.
   ============================================================ */
:root {
  --bg:        #0b0c0f;  /* near-black */
  --surface:   #141519;  /* raised panel */
  --surface-2: #0f1014;  /* inset */
  --line:      #26272f;  /* hairline borders */
  --text:      #f3f4f7;  /* near-white body */
  --muted:     #a0a3ad;  /* secondary text (AA on --bg) */

  --red:        #e11d2a;  /* brand: buttons, marks */
  --red-bright: #ff5b62;  /* brand on dark: links, accent text (AA) */
  --ok:         #35d07f;  /* STATUS ONLY: connected / healthy */

  --maxw: 1100px;
  --radius: 14px;
  --radius-sm: 9px;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", ui-monospace, "Cascadia Code", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background-image:
    radial-gradient(1000px 460px at 80% -10%, rgba(225,29,42,0.10), transparent 60%),
    linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: auto, 46px 46px, 46px 46px;
}

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

/* ---- a11y ---- */
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--red); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0; font-weight: 600; }
.skip-link:focus { left: 0; }
:focus-visible { outline: 2px solid var(--red-bright); outline-offset: 3px; border-radius: 4px; }

a { color: var(--red-bright); text-underline-offset: 3px; }

/* ---- buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; line-height: 1; padding: 13px 20px; border-radius: var(--radius-sm);
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: transform .15s ease, background-color .15s ease, border-color .15s ease, color .15s ease; }
.btn--lg { padding: 16px 26px; font-size: 1.02rem; }
.btn--primary { background: var(--red); color: #fff; }
.btn--primary:hover { background: #f5333f; transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--red); color: var(--red-bright); }
@media (prefers-reduced-motion: reduce) { .btn:hover { transform: none; } }

.section-title { font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -0.02em; margin: 0 0 14px; }
.section-lede { color: var(--muted); max-width: 60ch; margin: 0 0 30px; }

/* ---- header ---- */
.site-header { position: sticky; top: 0; z-index: 30; backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--bg) 84%, transparent); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; color: var(--text);
  font-weight: 700; letter-spacing: -0.01em; text-decoration: none; font-size: 1.12rem; }
.wordmark__logo { display: block; height: 26px; width: auto; }
.nav__right { display: flex; align-items: center; gap: 16px; }
.status-pill { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono);
  font-size: 0.76rem; color: var(--muted); border: 1px solid var(--line); padding: 6px 11px;
  border-radius: 999px; background: var(--surface-2); }

/* ---- status dot (GREEN = healthy, used everywhere a live state is shown) ---- */
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: 0 0 auto; }
.dot--ok { background: var(--ok); box-shadow: 0 0 6px rgba(53,208,127,0.7); }
.status-pill .dot--ok { animation: pulse 2.6s infinite; }
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(53,208,127,0.55); }
  70%  { box-shadow: 0 0 0 7px rgba(53,208,127,0); }
  100% { box-shadow: 0 0 0 0 rgba(53,208,127,0); }
}
@media (prefers-reduced-motion: reduce) { .status-pill .dot--ok { animation: none; } }

/* ---- hero ---- */
.hero { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 54px; align-items: center;
  padding-block: clamp(48px, 8vw, 92px); }
.eyebrow { font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.04em; color: var(--red-bright);
  margin: 0 0 14px; }
.hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.3rem); line-height: 1.06; letter-spacing: -0.03em; margin: 0 0 20px; }
.accent { color: var(--red-bright); }
.lede { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--muted); max-width: 50ch; margin: 0 0 28px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.hero__note { font-size: 0.92rem; color: var(--muted); max-width: 46ch; margin: 0; }

/* ---- signature: integration map ---- */
.map { margin: 0; }
.map__panel { background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 18px;
  box-shadow: 0 30px 60px -30px rgba(0,0,0,0.7); }
.map__head { display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 14px; margin-bottom: 16px; border-bottom: 1px dashed var(--line); }
.map__title { font-family: var(--font-mono); font-size: 0.82rem; color: var(--muted); }
.map__meta { font-family: var(--font-mono); font-size: 0.74rem; color: var(--ok);
  display: inline-flex; align-items: center; gap: 7px; }
.map__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.node { position: relative; background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 13px 13px 11px; display: flex; flex-direction: column; gap: 3px; min-height: 70px; }
.node .dot { position: absolute; top: 12px; right: 12px; }
.node__name { font-weight: 600; font-size: 0.96rem; }
.node__state { font-family: var(--font-mono); font-size: 0.68rem; color: var(--muted); }
.node--core { grid-column: 1 / -1; min-height: 64px; align-items: flex-start; justify-content: center;
  background: linear-gradient(180deg, rgba(225,29,42,0.14), rgba(225,29,42,0.03)); border-color: rgba(225,29,42,0.4); }
.node__label { font-family: var(--font-mono); font-weight: 700; font-size: 1rem; color: var(--red-bright); letter-spacing: 0.02em; }
.node__sub { font-family: var(--font-mono); font-size: 0.68rem; color: var(--muted); }
.map__foot { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); }
.map__stat { font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); }
.map__stat-k { color: var(--red-bright); margin-right: 5px; }

/* ---- services (tight grid, low text) ---- */
.services { padding-block: clamp(40px, 6vw, 64px); border-top: 1px solid var(--line); }
.services__grid { list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.services__grid li { background: var(--surface); border: 1px solid var(--line); border-left: 2px solid var(--red);
  border-radius: var(--radius-sm); padding: 16px 18px; color: var(--muted); font-size: 0.9rem; }
.svc__k { display: block; color: var(--text); font-weight: 600; font-size: 1rem; margin-bottom: 3px; }

/* ---- packages ---- */
.packages { padding-block: clamp(40px, 6vw, 64px); border-top: 1px solid var(--line); }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: start; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px; display: flex; flex-direction: column; height: 100%; }
.card--feature { border-color: rgba(225,29,42,0.5); background: linear-gradient(180deg, rgba(225,29,42,0.07), var(--surface));
  box-shadow: 0 24px 50px -34px rgba(225,29,42,0.55); }
.card__tag { font-family: var(--font-mono); font-size: 0.7rem; color: var(--red-bright); margin-bottom: 12px; }
.card h3 { margin: 0 0 8px; font-size: 1.3rem; letter-spacing: -0.01em; }
.card__desc { color: var(--muted); margin: 0 0 16px; font-size: 0.94rem; }
.card__list { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 9px; }
.card__list li { position: relative; padding-left: 22px; font-size: 0.92rem; }
.card__list li::before { content: ""; position: absolute; left: 2px; top: 8px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--red); }
.card__bound { font-size: 0.82rem; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 14px; margin: auto 0 18px; }
.card__cta { width: 100%; }

/* ---- about ---- */
.about { padding-block: clamp(40px, 6vw, 64px); border-top: 1px solid var(--line);
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 44px; align-items: start; }
.about__intro p { color: var(--muted); }
.about__intro strong { color: var(--text); font-weight: 600; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 22px 0 0; }
.chips li { font-family: var(--font-mono); font-size: 0.76rem; color: var(--muted);
  border: 1px solid var(--line); background: var(--surface-2); border-radius: 7px; padding: 6px 10px; }
.proof { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.proof__item { background: var(--surface); border: 1px solid var(--line); border-left: 2px solid var(--red);
  border-radius: var(--radius-sm); padding: 16px 18px; font-size: 0.94rem; }

/* ---- application form ---- */
.apply { padding-block: clamp(48px, 7vw, 84px); border-top: 1px solid var(--line); }
.apply__inner { background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(26px, 5vw, 48px); }
.apply__head { max-width: 60ch; margin-bottom: 28px; }
.apply__head h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); letter-spacing: -0.02em; margin: 0 0 10px; }
.apply__head p { color: var(--muted); margin: 0; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form__group { border: 0; border-top: 1px solid var(--line); margin: 0; padding: 22px 0 4px; }
.form__group legend { font-family: var(--font-mono); font-size: 0.74rem; color: var(--red-bright);
  letter-spacing: 0.03em; padding: 0; margin-bottom: 4px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 0.9rem; color: var(--muted); }
.field > span, .field__label { color: var(--muted); }
.field i { color: var(--red-bright); font-style: normal; }
.field__label { display: block; font-size: 0.9rem; margin: 16px 0 8px; }

input, select, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--surface-2);
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 11px 13px; transition: border-color .15s ease;
}
input::placeholder, textarea::placeholder { color: #6b6f7a; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--red); }
select { appearance: none; background-image:
  linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
textarea { resize: vertical; }

.checks { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-bottom: 4px; }
.checks label { display: inline-flex; align-items: center; gap: 8px; font-size: 0.9rem; color: var(--text); }
.checks input { width: auto; accent-color: var(--red); }

.form__submit { margin-top: 24px; display: flex; flex-direction: column; gap: 12px; }
.form__alt { font-size: 0.86rem; color: var(--muted); margin: 0; }
.form__error { color: var(--red-bright); font-size: 0.88rem; margin: 12px 0 0; }

.apply__success { text-align: center; padding: clamp(30px, 6vw, 56px) 20px; }
.apply__success .dot { width: 12px; height: 12px; margin-bottom: 14px; }
.apply__success h3 { font-size: 1.4rem; margin: 0 0 8px; }
.apply__success p { color: var(--muted); max-width: 44ch; margin: 0 auto; }

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

/* ---- footer ---- */
.site-footer { padding-block: 32px; border-top: 1px solid var(--line); color: var(--muted);
  font-size: 0.84rem; display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--red-bright); }
.site-footer__links { display: flex; gap: 12px; margin: 0; }
.site-footer p { margin: 0; }

/* ---- responsive ---- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 38px; }
  .services__grid { grid-template-columns: repeat(2, 1fr); }
  .cards { grid-template-columns: 1fr; }
  .card--feature { order: -1; }
  .about { grid-template-columns: 1fr; gap: 30px; }
}
@media (max-width: 560px) {
  .nav__cta { display: none; }
  .services__grid { grid-template-columns: 1fr; }
  .map__grid { grid-template-columns: repeat(2, 1fr); }
  .hero__actions .btn { flex: 1 1 auto; }
}
