/* ADF — adf.rs product site
 * Built on PowerSecurity tokens. Sub-brand layer adds:
 *  - .hdr / .nav with ADF wordmark
 *  - .hero with bigger atmospherics
 *  - .stat-row, .cap-grid, .arch-grid, .dash-frame
 *  - .pill, .kbd, .copy-row (mono utilities)
 */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
img { display: block; max-width: 100%; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: var(--container-pad);
  position: relative;
}

/* ============= HEADER ============= */
.hdr {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  display: flex; align-items: center;
  background: color-mix(in oklch, var(--bg) 78%, transparent);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--line-soft);
}
.hdr-inner {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: var(--container-pad);
  display: flex; align-items: center; gap: 20px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}
.brand .mark {
  width: 30px; height: 28px;
  display: block;
  flex-shrink: 0;
  /* Solid-purple variant — purple pentagon, white cells (light theme) */
  --mark-shape: #534080;
  --mark-cells: #ffffff;
}
:root[data-theme="dark"] .brand .mark {
  /* Inverted variant — white pentagon, purple cells (dark theme) */
  --mark-shape: #ffffff;
  --mark-cells: #534080;
}
.brand .word {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.01em;
  line-height: 1;
}
.brand .tld {
  color: var(--accent-hi);
  font-weight: 500;
}
:root[data-theme="light"] .brand .tld { color: var(--accent); }

.nav {
  display: flex; gap: 2px;
  flex: 1; min-width: 0;
  margin-left: 8px;
  overflow: hidden;
}
.nav a {
  padding: 8px 12px;
  font-size: 14px;
  color: var(--text-2);
  text-decoration: none;
  border-radius: 6px;
  white-space: nowrap;
  transition: background var(--t-base) var(--ease), color var(--t-base) var(--ease);
}
.nav a:hover { background: var(--surface); color: var(--text); }
.nav a.on    { background: var(--surface); color: var(--text); }

.hdr .r { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }

.lang-wrap { position: relative; }
.lang {
  height: 36px;
  padding: 0 10px 0 12px;
  display: inline-flex; align-items: center; gap: 6px;
  border: none; background: transparent;
  border-radius: 6px;
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase;
  cursor: pointer;
  transition: background var(--t-base) var(--ease), color var(--t-base) var(--ease);
}
.lang:hover { background: var(--surface); color: var(--text); }
.lang .caret { color: var(--text-3); font-size: 10px; }
.lang-menu {
  position: absolute; top: calc(100% + 6px); right: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 4px;
  display: none;
  flex-direction: column;
  min-width: 160px;
  box-shadow: var(--shadow-3);
  z-index: 60;
}
.lang-menu.open { display: flex; }
.lang-menu button,
.lang-menu a {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  background: transparent;
  border: 0;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  text-align: left;
  transition: background var(--t-base) var(--ease);
}
.lang-menu button .code,
.lang-menu a .code {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-3);
}
.lang-menu button:hover,
.lang-menu a:hover { background: var(--surface-2); }
.lang-menu button.on,
.lang-menu a.on { background: color-mix(in oklch, var(--accent) 12%, transparent); }
.lang-menu button.on .code,
.lang-menu a.on .code { color: var(--accent-hi); }
:root[data-theme="light"] .lang-menu button.on .code,
:root[data-theme="light"] .lang-menu a.on .code { color: var(--accent); }

/* Single theme button — cycles dark → light → auto → dark */
.theme-btn {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--text-2);
  cursor: pointer;
  transition: background var(--t-base) var(--ease), color var(--t-base) var(--ease);
  position: relative;
}
.theme-btn:hover { background: var(--surface); color: var(--text); }
.theme-btn svg { width: 16px; height: 16px; display: none; }
:root[data-theme-mode="light"] .theme-btn .icon-light { display: block; }
:root[data-theme-mode="dark"]  .theme-btn .icon-dark  { display: block; }
:root[data-theme-mode="auto"]  .theme-btn .icon-auto  { display: block; }

.cta {
  display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 14px;
  margin-left: 8px;
  background: var(--accent);
  color: var(--accent-fg);
  border-radius: 6px;
  font-family: var(--font-body); font-weight: 500; font-size: 14px;
  text-decoration: none;
  white-space: nowrap; line-height: 1;
  box-shadow: 0 1px 0 0 oklch(1 0 0 / 0.18) inset,
              0 6px 18px color-mix(in oklch, var(--accent) 30%, transparent);
  transition: transform var(--t-base) var(--ease), background var(--t-base) var(--ease);
}
.cta:hover { background: var(--accent-hi); transform: translateY(-1px); }
.cta:active { transform: translateY(0); }
.cta .ar { transition: transform var(--t-base) var(--ease); display: inline-block; }
.cta:hover .ar { transform: translateX(3px); }

@media (max-width: 860px) {
  .nav { display: none; }
}

/* ============= BUTTON ============= */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 20px;
  border-radius: var(--r-md);
  font-family: var(--font-body); font-weight: 500; font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer; border: 0;
  transition: transform var(--t-base) var(--ease),
              background var(--t-base) var(--ease),
              color var(--t-base) var(--ease),
              border-color var(--t-base) var(--ease);
}
.btn .ar { transition: transform var(--t-base) var(--ease); display: inline-block; }
.btn:hover { transform: translateY(-1px); }
.btn:hover .ar { transform: translateX(3px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: var(--accent); color: var(--accent-fg);
  box-shadow: 0 1px 0 0 oklch(1 0 0 / 0.18) inset,
              0 6px 18px color-mix(in oklch, var(--accent) 30%, transparent);
}
.btn-primary:hover { background: var(--accent-hi); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}
.btn-ghost:hover { background: var(--surface); border-color: var(--text-3); }

/* ============= HERO ============= */
.hero {
  position: relative;
  padding: 120px 0 88px;
  overflow: hidden;
  isolation: isolate;
}
/* Soften atmospherics at the bottom of the hero so they don't get sharply
 * chopped off where the section ends — they fade into the body bg instead. */
.hero .atmos-grid,
.hero .atmos-glow {
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 60%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 0%, #000 60%, transparent 100%);
}
.hero .container { z-index: 2; }
.hero h1 {
  font-size: clamp(40px, 5.6vw, 76px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.04;
  text-wrap: balance;
  margin: 16px 0 18px;
  max-width: 20ch;
}
.hero h1 .accent { color: var(--accent-hi); }
:root[data-theme="light"] .hero h1 .accent { color: var(--accent); }
.hero .sub {
  font-size: 18px;
  line-height: 1.55;
  color: var(--text-2);
  max-width: 60ch;
  text-wrap: pretty;
  margin: 0 0 28px;
}
.hero .ctas { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-after {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 56px;
  align-items: stretch;
}
@media (max-width: 820px) {
  .hero-after { grid-template-columns: 1fr; }
}

/* Terminal */
.term {
  background: oklch(0.10 0.012 270);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  font-family: var(--font-mono); font-size: 13px;
  color: oklch(0.86 0.02 270);
  box-shadow: var(--shadow-3),
              0 0 0 1px color-mix(in oklch, var(--accent) 15%, transparent),
              0 0 80px color-mix(in oklch, var(--accent) 10%, transparent);
}
:root[data-theme="light"] .term {
  background: oklch(0.16 0.025 270);
  color: oklch(0.92 0.02 270);
}
.term .chrome {
  display: flex; align-items: stretch;
  height: 36px;
  background: oklch(0.13 0.02 270);
  border-bottom: 1px solid oklch(0.22 0.012 270);
  padding-left: 12px;
}
.term .tab {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 0 14px;
  align-self: end;
  height: 30px;
  background: oklch(0.10 0.012 270);
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;
  border: 1px solid oklch(0.22 0.012 270);
  border-bottom: none;
  color: oklch(0.86 0.01 270);
  font-size: 12px;
}
.term .tab::before {
  content: ""; width: 10px; height: 10px;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}
.term .btns { margin-left: auto; display: flex; }
.term .btns span {
  width: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  color: oklch(0.72 0.01 270);
  font-size: 14px;
  border-left: 1px solid oklch(0.22 0.012 270);
}
.term .body {
  padding: 18px 22px;
  line-height: 1.75;
  white-space: pre;
  overflow-x: auto;
}
.term .p   { color: var(--accent-hi); }
.term .i   { color: var(--text-3); }
.term .o   { color: oklch(0.78 0.16 152); }
.term .w   { color: oklch(0.82 0.15 80); }
.term .s   { color: oklch(0.78 0.16 200); }
.term .a   { color: oklch(0.84 0.10 100); }
.term .err { color: oklch(0.70 0.20 20); }
.term .k   { color: oklch(0.86 0.02 270); font-weight: 700; }
.term .dim { color: var(--text-dim); }
.term .cursor {
  display: inline-block; width: 8px; height: 14px;
  background: var(--accent-hi); vertical-align: -2px;
  animation: blink 1.6s steps(2, end) infinite;
  margin-left: 2px;
}
@keyframes blink { 50% { opacity: 0; } }

/* hero-side stats panel */
.hero-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px 18px;
  display: flex; flex-direction: column; gap: 4px;
}
.stat .lbl {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}
.stat .v {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 28px;
  letter-spacing: -0.018em;
  color: var(--text);
  line-height: 1.1;
}
.stat .v .u {
  font-size: 14px;
  color: var(--text-3);
  font-weight: 400;
  letter-spacing: 0;
  margin-left: 2px;
}
.stat .d {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.4;
  margin-top: 4px;
}

/* ============= SECTIONS ============= */
section.x { padding: 96px 0; position: relative; }
section.x + section.x { border-top: 1px solid var(--line-soft); }
@media (max-width: 720px) { section.x { padding: 64px 0; } }
.s-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 48px; max-width: 64ch; }
.s-head h2 {
  font-size: clamp(30px, 3.5vw, 48px);
  font-weight: 500;
  letter-spacing: -0.028em;
  line-height: 1.08;
  margin: 0;
}
.s-head .sub {
  font-size: 17px;
  color: var(--text-2);
  line-height: 1.55;
  margin: 0;
}

/* ============= CAPABILITIES ============= */
.cap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 980px) { .cap-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .cap-grid { grid-template-columns: 1fr; } }

.cap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 26px 24px;
  display: flex; flex-direction: column; gap: 12px;
  transition: border-color var(--t-base) var(--ease);
}
.cap:hover { border-color: color-mix(in oklch, var(--accent) 50%, var(--line)); }
.cap .ico {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: var(--r-sm);
  background: color-mix(in oklch, var(--accent) 12%, transparent);
  color: var(--accent-hi);
  border: 1px solid color-mix(in oklch, var(--accent) 25%, transparent);
}
:root[data-theme="light"] .cap .ico { color: var(--accent); }
.cap .ico svg { width: 22px; height: 22px; }
.cap h3 {
  font-size: 18px; font-weight: 500;
  letter-spacing: -0.018em;
  margin: 0;
  color: var(--text);
}
.cap p {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.55;
  margin: 0;
}
.cap-list {
  list-style: none; padding: 0;
  margin: 4px 0 0;
  display: flex; flex-direction: column;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.02em;
}
.cap-list li::before { content: "› "; color: var(--accent-hi); font-weight: 700; }
:root[data-theme="light"] .cap-list li::before { color: var(--accent); }

.cap.feat {
  background:
    radial-gradient(ellipse 100% 100% at 100% 0%, color-mix(in oklch, var(--accent) 18%, transparent), transparent 60%),
    var(--surface);
  border-color: color-mix(in oklch, var(--accent) 40%, transparent);
}

/* ============= DASHBOARD PREVIEW ============= */
.dash-section { padding-top: 96px; padding-bottom: 96px; }
.dash-frame {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  box-shadow: var(--shadow-3);
  isolation: isolate;
}
.dash-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 50% 60% at 50% -20%, color-mix(in oklch, var(--accent) 30%, transparent), transparent 70%);
  z-index: 2;
}
.dash-frame .winbar {
  height: 32px;
  display: flex; align-items: center;
  gap: 8px;
  padding: 0 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: relative; z-index: 3;
}
.dash-frame .winbar .dots {
  display: flex; gap: 6px;
}
.dash-frame .winbar .dots span {
  width: 10px; height: 10px; border-radius: 50%;
  background: color-mix(in oklch, var(--text-3) 50%, transparent);
}
.dash-frame .winbar .url {
  margin: 0 auto;
  padding: 4px 14px;
  border-radius: var(--r-pill);
  background: var(--bg);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.04em;
  display: inline-flex; align-items: center; gap: 6px;
}
.dash-frame .winbar .url::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 8px var(--good);
}
.dash-frame img {
  width: 100%;
  display: block;
}
.dash-frame img.light { display: none; }
:root[data-theme="light"] .dash-frame img.dark { display: none; }
:root[data-theme="light"] .dash-frame img.light { display: block; }

.dash-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
.dash-callouts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 20px;
}
@media (max-width: 720px) { .dash-callouts { grid-template-columns: 1fr; } }
.callout {
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.callout .lbl {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-hi);
  margin-bottom: 6px;
}
:root[data-theme="light"] .callout .lbl { color: var(--accent); }
.callout .t {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.5;
}

/* ============= ARCHITECTURE ============= */
.arch {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 24px;
  align-items: stretch;
}
@media (max-width: 980px) { .arch { grid-template-columns: 1fr; } }
.arch-diagram {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px;
  display: flex; flex-direction: column; gap: 18px;
  position: relative;
  overflow: hidden;
}
.arch-row {
  display: flex; align-items: center; gap: 12px;
  flex-wrap: wrap;
}
.arch-row .label {
  width: 92px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  flex-shrink: 0;
}
.node {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-2);
  letter-spacing: 0.02em;
}
.node.core {
  background: color-mix(in oklch, var(--accent) 14%, var(--surface));
  border-color: color-mix(in oklch, var(--accent) 40%, transparent);
  color: var(--text);
}
.node .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}
.node.live .dot { background: var(--good); box-shadow: 0 0 8px var(--good); }
.divider {
  height: 1px;
  background: var(--line-soft);
  margin: 0 -28px;
}

.arch-side {
  display: flex; flex-direction: column;
  gap: 14px;
}
.arch-fact {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 18px 20px;
  display: flex; flex-direction: column; gap: 6px;
}
.arch-fact .k {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}
.arch-fact .v {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.018em;
  color: var(--text);
}
.arch-fact .v .u {
  font-size: 13px;
  color: var(--text-3);
  font-weight: 400;
  margin-left: 4px;
}
.arch-fact .d {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.5;
}

/* ============= CONTACT ============= */
.contact-band {
  margin-top: 24px;
  background: var(--surface);
  border: 1px solid color-mix(in oklch, var(--accent) 30%, var(--line));
  border-radius: var(--r-2xl);
  padding: 48px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px; align-items: center;
  box-shadow: var(--shadow-2);
  position: relative; overflow: hidden;
}
.contact-band::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 60% 90% at 90% 0%, color-mix(in oklch, var(--accent) 22%, transparent), transparent 65%);
}
.contact-band > * { position: relative; z-index: 1; }
.contact-band h2 { font-size: clamp(28px, 3vw, 40px); font-weight: 500; letter-spacing: -0.028em; margin: 0; }
.contact-band p {
  font-size: 15px;
  color: var(--text-2);
  margin: 12px 0 0;
  line-height: 1.5;
}
.contact-band .actions {
  display: flex; flex-direction: column; gap: 14px;
}
.contact-band .micro {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--text-3); letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 4px 0 0;
}
@media (max-width: 720px) {
  .contact-band {
    grid-template-columns: 1fr;
    padding: 32px;
  }
  /* Let the single column collapse to the band's content box so a long,
     no-wrap button label (e.g. the contact email) can't push the actions
     past the right padding. */
  .contact-band > * { min-width: 0; }
  .contact-band .actions .btn {
    white-space: normal;
    justify-content: center;
    text-align: center;
    /* Fixed 44px height has no vertical padding; once the label wraps to two
       lines it fills edge-to-edge. Switch to min-height + vertical padding. */
    height: auto;
    min-height: 44px;
    padding: 11px 20px;
  }
}

/* ============= FOOTER ============= */
.foot {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-top: 1px solid var(--line-soft);
  padding: 64px 0 32px;
  margin-top: 80px;
}
.foot .container { position: relative; z-index: 2; }
.foot .cols {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 36px;
}
@media (max-width: 900px) {
  .foot .cols { grid-template-columns: repeat(2, 1fr); }
}
.foot .col h4 {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  font-weight: 400;
  margin: 0 0 14px;
}
.foot .col a {
  display: block;
  font-size: 14px;
  color: var(--text-2);
  text-decoration: none;
  padding: 4px 0;
  transition: color var(--t-base) var(--ease);
}
.foot .col a:hover { color: var(--text); }
.foot .brand-block {
  display: flex; flex-direction: column; gap: 14px;
}
.foot .brand-block .pitch {
  font-size: 13px;
  color: var(--text-3);
  max-width: 36ch;
  line-height: 1.55;
}
.foot .ps-line {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}
.foot .ps-line img { height: 18px; opacity: 0.7; }
.foot .base {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
  display: flex; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.04em;
}

/* ============= Eyebrow override (smaller version exists in colors_and_type.css) ============= */
.eyebrow.lg { font-size: 13px; }

/* ============= Reveal staggered ============= */
@media (prefers-reduced-motion: no-preference) {
  .rise   { animation: ps-rise 600ms var(--ease) both; }
  .rise-1 { animation-delay:  60ms; }
  .rise-2 { animation-delay: 120ms; }
  .rise-3 { animation-delay: 180ms; }
  .rise-4 { animation-delay: 240ms; }
  .rise-5 { animation-delay: 300ms; }
  .rise-6 { animation-delay: 360ms; }
}
@keyframes ps-rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============= Utility ============= */
.kbd {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text-2);
}
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-2);
}
.pill.accent {
  background: color-mix(in oklch, var(--accent) 10%, transparent);
  border-color: color-mix(in oklch, var(--accent) 40%, transparent);
  color: var(--accent-hi);
}
:root[data-theme="light"] .pill.accent { color: var(--accent); }

/* RU/SR adjustments — Cyrillic + Serbian Latin often need slightly looser tracking */
:root[lang="ru"] h1, :root[lang="ru"] h2,
:root[lang="sr"] h1, :root[lang="sr"] h2 {
  letter-spacing: -0.025em;
}

/* ============= HERO SPLIT (dark + light dashboard, angled seam) ============= */
.hero-split {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  box-shadow: var(--shadow-3),
              0 0 0 1px color-mix(in oklch, var(--accent) 15%, transparent),
              0 0 100px color-mix(in oklch, var(--accent) 12%, transparent);
  isolation: isolate;
  display: flex; flex-direction: column;
  height: 100%;
  min-height: 320px;
}
.hero-split .winbar {
  height: 32px;
  display: flex; align-items: center; gap: 8px;
  padding: 0 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: relative; z-index: 3;
}
.hero-split .winbar .dots { display: flex; gap: 6px; }
.hero-split .winbar .dots span {
  width: 10px; height: 10px; border-radius: 50%;
  background: color-mix(in oklch, var(--text-3) 50%, transparent);
}
.hero-split .winbar .url {
  margin: 0 auto;
  padding: 4px 14px;
  border-radius: var(--r-pill);
  background: var(--bg);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.04em;
  display: inline-flex; align-items: center; gap: 6px;
}
.hero-split .winbar .url::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 8px var(--good);
}
.hero-split .frames {
  position: relative;
  overflow: hidden;
  flex: 1;
  min-height: 280px;
  background: oklch(0.13 0.02 270);
}
.hero-split img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
  object-fit: cover;
  object-position: top left;
}
.hero-split img.layer-light {
  /* Right portion, angled seam: 58% at top → 42% at bottom */
  clip-path: polygon(58% 0, 100% 0, 100% 100%, 42% 100%);
}
/* Accent line along the seam — same angle as the polygon edge */
.hero-split .seam {
  position: absolute; inset: 0;
  pointer-events: none;
  background: color-mix(in oklch, var(--accent) 70%, transparent);
  clip-path: polygon(
    calc(58% - 1px) 0,  calc(58% + 1px) 0,
    calc(42% + 1px) 100%, calc(42% - 1px) 100%
  );
  filter: drop-shadow(0 0 12px color-mix(in oklch, var(--accent) 60%, transparent));
  z-index: 2;
}

/* Stats row — unused (legacy of full-width layout). The 2x2 hero-stats grid in the hero-after row is what's used now. */

/* ============= ADMIN CONSOLE FEATURE BLOCKS ============= */
.admin-blocks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 900px) { .admin-blocks { grid-template-columns: 1fr; } }
.admin-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px 26px;
  display: flex; flex-direction: column; gap: 14px;
  transition: border-color var(--t-base) var(--ease);
}
.admin-block:hover { border-color: color-mix(in oklch, var(--accent) 50%, var(--line)); }
.admin-block .ico {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: var(--r-sm);
  background: color-mix(in oklch, var(--accent) 12%, transparent);
  color: var(--accent-hi);
  border: 1px solid color-mix(in oklch, var(--accent) 25%, transparent);
}
:root[data-theme="light"] .admin-block .ico { color: var(--accent); }
.admin-block .ico svg { width: 24px; height: 24px; }
.admin-block h3 {
  font-size: 20px; font-weight: 500;
  letter-spacing: -0.018em;
  margin: 0;
  color: var(--text);
}
.admin-block p {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.55;
  margin: 0;
}
.admin-block .tags {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 4px;
}

/* ============= ARCHITECTURE — new grouped rows ============= */
.arch-diagram .arch-row .group {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  border-radius: var(--r-sm);
  background: color-mix(in oklch, var(--accent) 14%, var(--surface));
  border: 1px solid color-mix(in oklch, var(--accent) 40%, transparent);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 14px;
  color: var(--text);
  letter-spacing: -0.01em;
}
.arch-diagram .arch-row .group .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}
.arch-diagram .arch-row .plus {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-3);
  padding: 0 2px;
}
.arch-diagram .arch-row .sub-node {
  display: inline-flex; align-items: center;
  padding: 6px 10px;
  border-radius: var(--r-sm);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-2);
  letter-spacing: 0.02em;
}
/* New arch row layout */
.arch-diagram .row-new {
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap;
}
.arch-diagram .row-new .label-num {
  width: 24px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  flex-shrink: 0;
}
