/* Vicimus marketing site
   Tokens and rules live in AGENTS.md — keep this file aligned. */

@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/inter-400.woff2") format("woff2");
}

@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../assets/fonts/inter-500.woff2") format("woff2");
}

@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../assets/fonts/inter-600.woff2") format("woff2");
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/jetbrains-mono-400.woff2") format("woff2");
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../assets/fonts/jetbrains-mono-500.woff2") format("woff2");
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../assets/fonts/jetbrains-mono-700.woff2") format("woff2");
}

:root {
  --bg: #0a0a0a;
  --bg-raised: #101018;
  --slate: #1a1a2e;
  --phosphor: #00ff9c;
  --phosphor-dim: rgba(0, 255, 156, 0.12);
  --phosphor-border: rgba(0, 255, 156, 0.38);
  --phosphor-strong: rgba(0, 255, 156, 0.7);
  --amber: #ffb000;
  --amber-dim: rgba(255, 176, 0, 0.16);
  --amber-border: rgba(255, 176, 0, 0.45);
  --text: #cfe0d6;
  --text-strong: #eef8f1;
  --muted: #9bb0a5;
  --error: #ff8a7a;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --font-sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --max: 72rem;
  --gutter: clamp(1.15rem, 4vw, 2.25rem);
  --header-h: 4.15rem;
  --radius: 4px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --focus: 0 0 0 2px var(--bg), 0 0 0 4px var(--phosphor);
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
  scroll-padding-top: calc(var(--header-h) + 0.6rem);
}

html:focus-within {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(0, 255, 156, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 156, 0.03) 1px, transparent 1px);
  background-size: 52px 52px;
  background-attachment: fixed;
}

body.nav-open {
  overflow: hidden;
}

body::after {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 80;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0 2px,
    rgba(0, 0, 0, 0.18) 3px
  );
  opacity: 0.22;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--phosphor);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--text-strong);
}

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

::selection {
  background: var(--phosphor);
  color: var(--bg);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--text-strong);
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2rem, 6vw, 3.35rem);
  margin: 0 0 1rem;
}

h2 {
  font-size: clamp(1.45rem, 3.2vw, 2rem);
  margin: 0 0 0.75rem;
}

h3 {
  font-size: 1.125rem;
  margin: 0 0 0.5rem;
}

p {
  margin: 0 0 1rem;
}

p:last-child {
  margin-bottom: 0;
}

pre,
code,
kbd {
  font-family: var(--font-mono);
}

.wrap {
  width: min(100% - 2 * var(--gutter), var(--max));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: 0.75rem;
  z-index: 100;
  padding: 0.55rem 0.8rem;
  background: var(--phosphor);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-decoration: none;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: none;
  color: var(--bg);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.85rem;
  margin: 0 0 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
}

.kicker code {
  color: var(--phosphor);
  background: var(--phosphor-dim);
  border: 1px solid var(--phosphor-border);
  padding: 0.15rem 0.45rem;
}

.lede {
  font-size: 1.125rem;
  max-width: 40rem;
}

.muted {
  color: var(--muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  color: var(--amber);
  background: var(--amber-dim);
  border: 1px solid var(--amber-border);
  padding: 0.18rem 0.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.85rem;
  padding: 0.55rem 1.05rem;
  border: 1px solid var(--phosphor);
  background: var(--phosphor);
  color: #032216;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover,
.btn:focus-visible {
  color: #032216;
  background: #6affc4;
  border-color: #6affc4;
}

.btn--ghost {
  background: transparent;
  color: var(--phosphor);
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  background: var(--phosphor-dim);
  color: var(--text-strong);
  border-color: var(--phosphor);
}

.btn:disabled {
  opacity: 0.55;
  cursor: wait;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  background: rgba(10, 10, 10, 0.92);
  border-bottom: 1px solid var(--phosphor-border);
}

.site-header.is-scrolled {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: var(--header-h);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--phosphor);
  text-decoration: none;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.08em;
}

.logo img {
  width: 1.7rem;
  height: 1.7rem;
}

.logo:hover {
  color: var(--text-strong);
}

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid var(--phosphor-border);
  background: var(--slate);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 1.05rem;
  height: 2px;
  margin-inline: auto;
  background: var(--phosphor);
  transition: transform 0.16s ease, opacity 0.16s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.site-nav {
  display: none;
}

.site-nav.is-open {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: absolute;
  left: 0;
  right: 0;
  top: var(--header-h);
  padding: 1.25rem var(--gutter) 1.5rem;
  background: #0c0c14;
  border-bottom: 1px solid var(--phosphor-border);
  box-shadow: var(--shadow);
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.nav-list a {
  display: block;
  padding: 0.55rem 0;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--text);
  text-decoration: none;
}

.nav-list a::before {
  content: "~/";
  color: var(--muted);
  margin-right: 0.15rem;
}

.nav-list a:hover,
.nav-list a[aria-current="true"] {
  color: var(--phosphor);
}

.site-nav .btn {
  width: 100%;
}

.hero {
  padding: 2.5rem 0 3.5rem;
}

.hero-grid {
  display: grid;
  gap: 1.75rem;
}

.prompt-line {
  font-family: var(--font-mono);
  font-size: 0.92rem;
  color: var(--muted);
  margin-bottom: 0.85rem;
}

.prompt-line .ok {
  color: var(--phosphor);
}

.cursor {
  display: inline-block;
  width: 0.55ch;
  height: 0.95em;
  margin-left: 0.12ch;
  background: var(--phosphor);
  vertical-align: -0.08em;
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.console {
  background: var(--slate);
  border: 1px solid var(--phosphor-border);
  box-shadow: var(--shadow);
}

.console-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.8rem;
  border-bottom: 1px solid var(--phosphor-border);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.console-pre {
  margin: 0;
  padding: 1rem 1rem 1.15rem;
  overflow-x: auto;
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--phosphor);
}

.console-pre .comment {
  color: var(--muted);
}

.console-pre .amber {
  color: var(--amber);
}

.console figure {
  margin: 0;
  border-top: 1px solid var(--phosphor-border);
}

.console figcaption {
  padding: 0.55rem 0.8rem 0.8rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.console img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.section {
  padding: 3.25rem 0;
  border-top: 1px solid var(--phosphor-dim);
}

.section-head {
  margin-bottom: 1.75rem;
  max-width: 40rem;
}

.service-grid {
  display: grid;
  gap: 1rem;
}

.card {
  background: var(--slate);
  border: 1px solid var(--phosphor-border);
  padding: 1.2rem 1.2rem 1.3rem;
}

.card .cmd {
  margin: 0 0 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--amber);
}

.service--lead {
  background:
    linear-gradient(180deg, rgba(0, 255, 156, 0.06), transparent 42%),
    var(--slate);
}

.plain-list {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--phosphor);
}

.plain-list li + li {
  margin-top: 0.35rem;
}

.plain-list li::before {
  content: "> ";
  color: var(--amber);
}

.process-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  counter-reset: step;
}

.process-list li {
  position: relative;
  background: var(--slate);
  border: 1px solid var(--phosphor-border);
  padding: 1.2rem 1.2rem 1.3rem 1.2rem;
  counter-increment: step;
}

.process-list h3::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.78rem;
  color: var(--amber);
  font-weight: 400;
}

.work-grid {
  display: grid;
  gap: 1rem;
}

.work-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-bottom: 1px solid var(--phosphor-border);
}

.work-card {
  padding: 0;
  overflow: hidden;
}

.work-card .card-body {
  padding: 1.05rem 1.15rem 1.2rem;
}

.work-card h3 {
  margin-top: 0.45rem;
}

.faq-list {
  display: grid;
  gap: 0.7rem;
}

.faq-item {
  background: var(--slate);
  border: 1px solid var(--phosphor-border);
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 1rem 2.6rem 1rem 1.15rem;
  font-family: var(--font-mono);
  font-size: 0.98rem;
  color: var(--text-strong);
  position: relative;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--phosphor);
  font-family: var(--font-mono);
}

.faq-item[open] summary::after {
  content: "–";
}

.faq-item .faq-body {
  padding: 0 1.15rem 1.15rem;
  color: var(--text);
  max-width: 42rem;
}

.contact-grid {
  display: grid;
  gap: 1.5rem;
}

.contact-mail {
  font-family: var(--font-mono);
  font-size: 0.95rem;
}

.contact-mail a {
  text-underline-offset: 0.22em;
}

.form {
  background: var(--slate);
  border: 1px solid var(--phosphor-border);
  padding: 1.2rem;
}

.form-to {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0 0 1rem;
}

.form-to a {
  color: var(--phosphor);
  text-underline-offset: 0.22em;
}

.field {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.95rem;
}

.field label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-strong);
}

.req {
  color: var(--amber);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 2.85rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--phosphor-border);
  background: var(--bg);
  color: var(--text-strong);
  font: 400 1rem/1.4 var(--font-sans);
}

.field textarea {
  min-height: 8.5rem;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--muted);
  opacity: 1;
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-color: var(--phosphor);
}

.form-note {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 1rem;
}

.form-success {
  background: var(--slate);
  border: 1px solid var(--phosphor-border);
  padding: 1.3rem;
}

.form-success h3 {
  color: var(--phosphor);
}

.form-error {
  color: var(--error);
  font-size: 0.88rem;
  margin: 0 0 0.8rem;
}

.form-error[hidden],
.form-success[hidden],
[hidden] {
  display: none !important;
}

/* --- Ask panel (Phase 2) --- */

.ask-panel {
  margin-top: 1.5rem;
}

.ask-panel .ask-form {
  margin: 0;
}

.ask-response {
  margin: 1rem 0 0;
  padding: 0.9rem 1rem;
  border: 1px solid var(--phosphor-border);
  border-left-width: 3px;
  background: var(--bg);
  color: var(--text);
  font-size: 1.0625rem;
  line-height: 1.65;
}

.ask-response--answer {
  border-left-color: var(--phosphor);
}

.ask-response--refusal {
  border-left-color: var(--amber-border);
}

.ask-response--session-exhausted {
  border-left-color: var(--amber-border);
}

.ask-response--error {
  border-left-color: var(--error);
  color: var(--error);
  font-size: 0.88rem;
}

.ask-response-label {
  display: block;
  margin-bottom: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}

.ask-response--answer .ask-response-label {
  color: var(--phosphor);
}

.ask-response--refusal .ask-response-label {
  color: var(--amber);
}

.ask-response--session-exhausted .ask-response-label {
  color: var(--amber);
}

.ask-response-text {
  white-space: pre-line; /* preserve Syrenka's \n/\n\n structure; still wraps normally at spaces */
  overflow-wrap: break-word; /* guard against a single unbreakable long token (e.g. a URL) */
}

.ask-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1rem;
}

.chip {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.35;
  text-align: left;
  color: var(--phosphor);
  background: var(--phosphor-dim);
  border: 1px solid var(--phosphor-border);
  padding: 0.35rem 0.6rem;
  cursor: pointer;
}

.chip:hover {
  background: var(--phosphor);
  color: var(--bg);
}

.chip[disabled] {
  opacity: 0.5;
  cursor: default;
}

.chip[disabled]:hover {
  background: var(--phosphor-dim);
  color: var(--phosphor);
}

.ask-escalate {
  margin-top: 1rem;
}

.ask-escalate-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--phosphor);
  display: block;
  margin-bottom: 0.35rem;
}

.ask-escalate-form {
  margin: 0;
}

.ask-escalate-error {
  color: var(--error);
  font-size: 0.88rem;
  margin: 0 0 0.8rem;
}

.ask-escalate-unreachable {
  margin: 1rem 0 0;
  padding: 0.9rem 1rem;
  border: 1px solid var(--phosphor-border);
  border-left-width: 3px;
  border-left-color: var(--error);
  background: var(--bg);
  color: var(--error);
  font-size: 0.88rem;
}

.ask-escalate-unreachable .ask-escalate-label {
  color: var(--error);
}

.ask-escalate-success {
  background: var(--slate);
  border: 1px solid var(--phosphor-border);
  padding: 1.3rem;
}

/* --- end Ask panel --- */

.site-footer {
  padding: 2rem 0 2.6rem;
  border-top: 1px solid var(--phosphor-border);
  font-size: 0.92rem;
  color: var(--muted);
}

.footer-grid {
  display: grid;
  gap: 1.25rem;
}

.footer-brand {
  font-family: var(--font-mono);
  color: var(--phosphor);
  letter-spacing: 0.08em;
}

.footer-meta {
  display: grid;
  gap: 0.25rem;
}

@media (min-width: 720px) {
  .service-grid,
  .work-grid,
  .process-list {
    grid-template-columns: 1fr 1fr;
  }

  .service--lead {
    grid-column: 1 / -1;
  }

  .hero {
    padding-top: 3.25rem;
    padding-bottom: 4.25rem;
  }

  .section {
    padding: 4.25rem 0;
  }
}

@media (min-width: 960px) {
  .nav-toggle {
    display: none;
  }

  .site-nav,
  .site-nav.is-open {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1.5rem;
    position: static;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .nav-list {
    flex-direction: row;
    gap: 0.15rem 1.15rem;
  }

  .nav-list a {
    padding: 0.2rem 0;
  }

  .site-nav .btn {
    width: auto;
  }

  .hero-grid,
  .contact-grid,
  .footer-grid {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: start;
    gap: 2rem;
  }

  .hero {
    min-height: calc(100dvh - var(--header-h));
    display: flex;
    align-items: center;
  }

  .service-grid {
    grid-template-columns: 1.25fr 1fr 1fr;
    grid-template-areas:
      "lead custom migrate"
      "lead integrate maintain";
  }

  .service--lead {
    grid-area: lead;
    grid-column: auto;
  }

  .service--custom { grid-area: custom; }
  .service--migrate { grid-area: migrate; }
  .service--integrate { grid-area: integrate; }
  .service--maintain { grid-area: maintain; }

  .process-list {
    grid-template-columns: repeat(4, 1fr);
  }

  .work-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 960px) and (min-height: 1100px) {
  .hero {
    min-height: 0;
    display: block;
    padding-top: 4.5rem;
    padding-bottom: 5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .cursor {
    animation: none;
  }

  .nav-toggle span {
    transition: none;
  }
}
