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

:root {
  --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --agency-primary: #10b981;
  --agency-secondary: #047857;
  --page-bg: #0a0c10;
  --text: #e8e8ec;
  --text-muted: #8b92a0;
  --surface: #12151c;
  --surface-border: #252a36;
  --surface-divider: #1e232d;

  --vk-color-primary: #10b981;
  --vk-color-primary-hover: #047857;
  --vk-color-primary-light: color-mix(in srgb, #10b981 35%, transparent);
  --vk-color-on-primary: #042f22;
  --vk-font-display: var(--font-display);
  --vk-navbar-max-width: 72rem;
}

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--vk-font-family, ui-sans-serif, system-ui, sans-serif);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--vk-color-text, var(--text));
  background:
    radial-gradient(ellipse 80% 45% at 50% -8%, color-mix(in srgb, var(--agency-primary) 20%, transparent), transparent 60%),
    var(--page-bg);
}

a {
  color: inherit;
}

code, .mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88em;
}

.page {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.5rem 3.5rem;
}

.brand-slot {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.brand-slot svg {
  width: 2.1rem;
  height: 2.1rem;
  display: block;
  filter: drop-shadow(0 8px 18px color-mix(in srgb, var(--agency-primary) 35%, transparent));
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.35rem 0.55rem;
}

.nav-link:hover,
.nav-link[aria-current="page"] {
  color: var(--text);
}

.nav-link[aria-current="page"] {
  color: var(--agency-primary);
}

.hero {
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 2rem;
}

.eyebrow {
  margin: 0 0 0.85rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--agency-primary);
}

.hero h1,
.section h2,
.close h2,
.docs-body h1,
.docs-body h2,
.start-body h1,
.start-body h2 {
  font-family: var(--font-display);
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.hero h1 {
  margin: 0 0 1.1rem;
  font-size: clamp(2.2rem, 5vw + 0.5rem, 4.1rem);
  font-weight: 800;
  max-width: 16ch;
}

.lede {
  margin: 0 0 1.75rem;
  max-width: 40rem;
  font-size: 1.15rem;
  color: var(--text-muted);
}

.lede strong {
  color: var(--text);
  font-weight: 650;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-bottom: 2rem;
}

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.fact {
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--surface-border);
  border-radius: 1rem;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
}

.fact p {
  margin: 0.35rem 0 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.fact .kicker {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--agency-primary);
}

.section {
  padding: 2.5rem 0 0.5rem;
}

.section h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.5rem, 2vw + 0.8rem, 2.1rem);
  font-weight: 750;
}

.section-lede {
  margin: 0 0 1.5rem;
  max-width: 40rem;
  color: var(--text-muted);
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.panel {
  padding: 1.35rem 1.4rem;
  border: 1px solid var(--surface-border);
  border-radius: 1rem;
  background: var(--surface);
}

.panel h3 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.panel p {
  margin: 0;
  color: var(--text-muted);
}

/* Meet the team — studio call sheet (one board, six seats) */
.team {
  position: relative;
  margin-top: 1.25rem;
  padding: 2.5rem 0 0.5rem;
}

.team-kicker {
  margin: 0 0 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--agency-primary);
}

.team .section-lede {
  margin-bottom: 1.75rem;
  max-width: 36rem;
}

.cast {
  list-style: none;
  counter-reset: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: auto auto auto;
  border: 1px solid color-mix(in srgb, var(--agency-primary) 22%, var(--surface-border));
  border-radius: 1.5rem;
  overflow: hidden;
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--agency-primary) 6%, var(--surface)),
      var(--surface) 28%
    );
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--agency-primary) 8%, transparent) inset,
    0 28px 60px rgb(0 0 0 / 28%);
}

.cast-seat {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 1rem;
  row-gap: 0.85rem;
  align-items: start;
  padding: 1.35rem 1.25rem 1.45rem;
  border-right: 1px solid var(--surface-divider);
  border-bottom: 1px solid var(--surface-divider);
  min-height: 100%;
  transition: background 0.2s ease;
  animation: cast-in 0.5s ease both;
  animation-delay: calc(var(--i, 0) * 60ms);
}

.cast-seat:nth-child(3n) {
  border-right: none;
}

.cast-seat:nth-child(n + 7) {
  border-bottom: none;
}

.cast-seat:hover {
  background: color-mix(in srgb, var(--agency-primary) 7%, transparent);
}

.cast-seat:hover .cast-face {
  transform: translateY(-3px) rotate(-1.5deg);
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--agency-primary) 55%, transparent),
    0 16px 32px color-mix(in srgb, var(--agency-primary) 28%, transparent);
}

@keyframes cast-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cast-slot {
  position: absolute;
  top: 0.85rem;
  right: 1rem;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: color-mix(in srgb, var(--agency-primary) 55%, var(--text-muted));
}

.cast-face {
  grid-row: 1;
  grid-column: 1;
  width: 4.75rem;
  height: 4.75rem;
  display: block;
  border-radius: 0.85rem;
  object-fit: cover;
  background: #e8eef2;
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--agency-primary) 28%, transparent),
    0 10px 22px rgb(0 0 0 / 35%);
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease;
}

.cast-face-open {
  display: grid;
  place-items: center;
  border: 1.5px dashed color-mix(in srgb, var(--agency-primary) 50%, var(--surface-border));
  background:
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 5px,
      color-mix(in srgb, var(--agency-primary) 9%, transparent) 5px,
      color-mix(in srgb, var(--agency-primary) 9%, transparent) 10px
    );
  box-shadow: none;
}

.cast-q {
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1;
  color: var(--agency-primary);
}

.cast-copy {
  grid-row: 1;
  grid-column: 2;
  min-width: 0;
  padding-top: 0.1rem;
}

.cast-role {
  margin: 0 0 0.15rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--agency-primary);
}

.cast-seat h3 {
  margin: 0 0 0.15rem;
  font-family: var(--font-display);
  font-size: 1.28rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.cast-handle {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.76rem;
  color: color-mix(in srgb, var(--agency-primary) 75%, var(--text));
}

.cast-blurb {
  grid-row: 2;
  grid-column: 1 / -1;
  margin: 0;
  padding-top: 0.15rem;
  border-top: 1px dashed color-mix(in srgb, var(--agency-primary) 18%, var(--surface-divider));
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.cast-open {
  background:
    linear-gradient(
      160deg,
      color-mix(in srgb, var(--agency-primary) 8%, transparent),
      transparent 55%
    );
}

.cast-open .cast-face-open {
  transition:
    transform 0.22s ease,
    border-color 0.22s ease;
}

.cast-open:hover .cast-face-open {
  transform: translateY(-3px) rotate(1.5deg);
  border-color: var(--agency-primary);
}

.loop {
  display: grid;
  gap: 0.65rem;
}

.loop-row {
  display: grid;
  grid-template-columns: 2.4rem 1fr;
  gap: 0.85rem;
  align-items: start;
  padding: 0.85rem 1rem;
  border: 1px solid var(--surface-border);
  border-radius: 0.85rem;
  background: var(--surface);
}

.loop-n {
  width: 2.4rem;
  height: 2.4rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: color-mix(in srgb, var(--agency-primary) 18%, transparent);
  color: var(--agency-primary);
  font-family: var(--font-display);
  font-weight: 800;
}

.loop-row h3 {
  margin: 0 0 0.2rem;
  font-size: 1rem;
}

.loop-row p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.limits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.close {
  margin-top: 3rem;
  padding: 2rem 1.6rem;
  border-radius: 1.25rem;
  border: 1px solid color-mix(in srgb, var(--agency-primary) 35%, var(--surface-border));
  background:
    radial-gradient(ellipse 80% 80% at 0% 0%, color-mix(in srgb, var(--agency-primary) 18%, transparent), transparent 55%),
    var(--surface);
}

.close h2 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.close p {
  margin: 0 0 1.2rem;
  max-width: 36rem;
  color: var(--text-muted);
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 3rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--surface-divider);
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-links a {
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--agency-primary);
}

.gitlab-icon {
  display: inline-block;
  vertical-align: -2px;
  margin-right: 0.25rem;
}

.docs-layout,
.start-layout {
  display: grid;
  grid-template-columns: 14rem minmax(0, 1fr);
  gap: 2rem;
  padding-top: 2rem;
}

.side-nav {
  position: sticky;
  top: 4.5rem;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.side-nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.92rem;
  padding: 0.25rem 0;
}

.side-nav a:hover {
  color: var(--text);
}

.docs-body h1,
.start-body h1 {
  margin: 0 0 0.85rem;
  font-size: clamp(1.9rem, 3vw, 2.6rem);
  font-weight: 800;
}

.docs-body h2,
.start-body h2 {
  margin: 2rem 0 0.65rem;
  font-size: 1.35rem;
  font-weight: 750;
}

.docs-body p,
.start-body p,
.docs-body li,
.start-body li {
  color: var(--text-muted);
}

.docs-body p,
.start-body p {
  margin: 0 0 0.9rem;
  max-width: 42rem;
}

.docs-body ul,
.start-body ul,
.docs-body ol,
.start-body ol {
  margin: 0 0 1.1rem;
  padding-left: 1.2rem;
  max-width: 42rem;
}

.prose-wide {
  max-width: 46rem;
}

pre, .code-block {
  margin: 0 0 1.25rem;
  padding: 1rem 1.15rem;
  border-radius: 0.85rem;
  border: 1px solid var(--surface-border);
  background: color-mix(in srgb, var(--page-bg) 70%, var(--surface));
  overflow-x: auto;
}

pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82rem;
  line-height: 1.55;
  color: #c7d2e0;
}

.callout {
  margin: 0 0 1.25rem;
  padding: 1rem 1.15rem;
  border-radius: 0.85rem;
  border: 1px solid color-mix(in srgb, var(--agency-primary) 30%, var(--surface-border));
  background: color-mix(in srgb, var(--agency-primary) 8%, var(--surface));
  max-width: 42rem;
}

.callout p {
  margin: 0;
}

@media (max-width: 900px) {
  .facts,
  .limits,
  .split {
    grid-template-columns: 1fr;
  }

  .cast {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cast-seat:nth-child(3n) {
    border-right: 1px solid var(--surface-divider);
  }

  .cast-seat:nth-child(2n) {
    border-right: none;
  }

  .cast-seat:nth-child(n + 4) {
    border-bottom: 1px solid var(--surface-divider);
  }

  .cast-seat:nth-child(n + 7) {
    border-bottom: none;
  }

  .docs-layout,
  .start-layout {
    grid-template-columns: 1fr;
  }

  .side-nav {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--surface-divider);
  }
}

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

  .cast-seat,
  .cast-seat:nth-child(3n),
  .cast-seat:nth-child(2n),
  .cast-seat:nth-child(n + 4),
  .cast-seat:nth-child(n + 5) {
    border-right: none;
    border-bottom: 1px solid var(--surface-divider);
  }

  .cast-seat:last-child {
    border-bottom: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cast-seat {
    animation: none;
  }

  .cast-seat:hover .cast-face,
  .cast-open:hover .cast-face-open {
    transform: none;
  }
}
