:root {
  color-scheme: dark;

  /* Surfaces */
  --c-bg-base: #060606;
  --c-surface-container: #121212;
  --c-surface-active: #1d1d1d;
  --c-surface-muted: #0d0d0d;
  --c-surface-toolbar: #0b0b0b;
  --c-surface-sidebar: #0b0b0b;
  --c-surface-card: #0a0a0a;

  /* Borders */
  --c-border-subtle: #303030;

  /* Text */
  --c-text: #eeeeee;
  --c-text-muted: #8a8a8a;
  --c-text-highlighted: #ffffff;
  --c-teal-accent: #f4f4f4;

  /* Grayscale scale */
  --c-zinc-300: #d4d4d4;
  --c-zinc-400: #a3a3a3;
  --c-zinc-500: #737373;
  --c-zinc-600: #525252;
  --c-zinc-700: #404040;
  --c-zinc-800: #262626;
  --c-zinc-900: #171717;

  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-inter: "Inter", sans-serif;
  --font-sans: "Inter", sans-serif;

  /* Inline noise texture, mirrored from the app's noise.webp */
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.35'/%3E%3C/svg%3E");
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  letter-spacing: 0;
}

html {
  background: var(--c-bg-base);
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-mono);
  color: var(--c-text);
  background:
    linear-gradient(rgb(6 6 6 / 0.85), rgb(6 6 6 / 0.85)), var(--noise),
    var(--c-bg-base);
  background-repeat: no-repeat, repeat, no-repeat;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  line-height: 1.6;
}

::selection {
  background: var(--c-teal-accent);
  color: var(--c-bg-base);
}

.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding-inline: clamp(24px, 5vw, 48px);
}

a {
  color: inherit;
  text-decoration: none;
}

/* ---- Brand mark (matches BrandLogo.vue) ---- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-family: var(--font-mono);
  color: var(--c-text-highlighted);

  .gt {
    font-size: 1.1em;
  }

  .name {
    position: relative;
    display: inline-block;
    height: 1.15em;
    width: 3.2em;

    span {
      position: absolute;
      left: 50%;
      top: -0.06em;
      transform: translateX(-50%);
      font-size: 0.92em;
      line-height: 1;
      letter-spacing: 0.02em;
    }

    &::after {
      content: "";
      position: absolute;
      bottom: 0;
      left: 50%;
      height: 0.12em;
      width: 2.95em;
      transform: translateX(-50%);
      border-radius: 999px;
      background: currentColor;
      opacity: 0.6;
    }
  }
}

/* ---- Panels (matches .castor-panel / .castor-window) ---- */
.panel {
  border: 1px solid var(--c-border-subtle);
  background: color-mix(in srgb, var(--c-surface-container) 88%, transparent);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.04);
}

.kicker {
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--c-zinc-500);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  padding: 0.6em 1.1em;
  border-radius: 5px;
  border: 1px solid var(--c-border-subtle);
  background: color-mix(in srgb, var(--c-surface-card) 86%, transparent);
  color: var(--c-zinc-300);
  cursor: pointer;
  transition:
    background-color 0.15s,
    color 0.15s,
    border-color 0.15s;

  &:hover {
    background: color-mix(in srgb, var(--c-surface-active) 90%, transparent);
    color: var(--c-text-highlighted);
  }

  &-primary {
    background: var(--c-text-highlighted);
    color: var(--c-bg-base);
    border-color: var(--c-text-highlighted);

    &:hover {
      background: var(--c-zinc-300);
      color: var(--c-bg-base);
    }
  }
}

/* ---- Header ---- */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--c-border-subtle);
  background: color-mix(in srgb, var(--c-surface-toolbar) 88%, transparent);
  backdrop-filter: blur(8px);

  .nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 58px;
  }

  .nav-links {
    display: flex;
    align-items: center;
    gap: 22px;
    font-size: 13px;
    color: var(--c-text-muted);

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

/* ---- Hero ---- */
.hero {
  padding-block: 96px 72px;
  text-align: center;

  h1 {
    font-family: var(--font-inter);
    font-weight: 700;
    font-size: clamp(2.6rem, 7vw, 4.4rem);
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: var(--c-text-highlighted);
    margin: 22px 0 18px;

    .accent {
      color: var(--c-zinc-500);
    }
  }

  p {
    max-width: 560px;
    margin: 0 auto 30px;
    font-size: 15px;
    color: var(--c-text-muted);
  }

  &-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
  }
}

/* ---- Sections ---- */
section.block {
  padding-block: 56px;

  .section-head {
    margin-bottom: 28px;

    h2 {
      font-family: var(--font-inter);
      font-weight: 600;
      font-size: 1.6rem;
      letter-spacing: -0.01em;
      color: var(--c-text-highlighted);
      margin-top: 8px;
    }
  }
}

.grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card {
  padding: 22px;

  .ico {
    font-size: 18px;
    color: var(--c-zinc-400);
    margin-bottom: 14px;
  }

  h3 {
    font-family: var(--font-inter);
    font-weight: 600;
    font-size: 1rem;
    color: var(--c-text);
    margin-bottom: 6px;
  }

  p {
    font-size: 13px;
    color: var(--c-text-muted);
  }
}

/* ---- Stack / split ---- */
.split {
  display: grid;
  gap: 24px;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;

  .panel {
    padding: 26px;
  }
}

.feature-list {
  list-style: none;
  display: grid;
  gap: 12px;

  li {
    display: flex;
    gap: 10px;
    font-size: 14px;
    color: var(--c-zinc-300);
  }

  .tick {
    color: var(--c-zinc-500);
    flex: none;
  }
}

.mock {
  font-size: 12.5px;
  color: var(--c-text-muted);
  line-height: 1.9;

  .row {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid var(--c-zinc-900);
    padding: 4px 0;

    &:last-child {
      border-bottom: none;
    }

    .dot {
      display: inline-block;
      width: 7px;
      height: 7px;
      border-radius: 999px;
      background: var(--c-zinc-500);
      margin-right: 8px;
      vertical-align: middle;

      &.live {
        background: var(--c-text-highlighted);
        animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
      }
    }
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

/* ---- CTA ---- */
.cta {
  text-align: center;
  padding-block: 64px;

  h2 {
    font-family: var(--font-inter);
    font-weight: 700;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    letter-spacing: -0.02em;
    color: var(--c-text-highlighted);
    margin-bottom: 14px;
  }

  p {
    color: var(--c-text-muted);
    font-size: 14px;
    margin-bottom: 26px;
  }
}

/* ---- Footer ---- */
footer {
  border-top: 1px solid var(--c-border-subtle);
  padding: 28px 0;
  color: var(--c-zinc-600);
  font-size: 12px;
}

.foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px 24px;

  > span:last-child {
    color: var(--c-zinc-600);
    font-size: 12px;
    line-height: 1.7;
  }

  &-links {
    display: flex;
    gap: 18px;

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

/* ---- Run / code ---- */
.steps {
  display: grid;
  gap: 14px;
  counter-reset: step;
}

.step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: start;
  padding: 18px 20px;

  .num {
    counter-increment: step;
    flex: none;
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border: 1px solid var(--c-border-subtle);
    border-radius: 999px;
    font-size: 12px;
    color: var(--c-zinc-400);
    background: color-mix(in srgb, var(--c-surface-muted) 80%, transparent);

    &::before {
      content: counter(step);
    }
  }

  .body {
    min-width: 0;

    h3 {
      font-family: var(--font-inter);
      font-weight: 600;
      font-size: 0.95rem;
      color: var(--c-text);
      margin-bottom: 4px;
    }

    p {
      font-size: 13px;
      color: var(--c-text-muted);
      margin-bottom: 10px;
    }
  }
}

.code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  background: var(--c-bg-base);
  border: 1px solid var(--c-border-subtle);
  border-radius: 5px;
  padding: 10px 12px;
  color: var(--c-zinc-300);
  max-width: 100%;
  overflow-x: auto;
  position: relative;
  /*white-space: pre;*/

  .prompt {
    color: var(--c-zinc-600);
    user-select: none;
  }

  .cmd {
    color: var(--c-text-highlighted);
  }

  .copy-btn {
    position: absolute;
    top: 50%;
    translate: 0 -50%;
    right: 12px;
    font-family: var(--font-sans);
    font-size: 11px;
    line-height: 1;
    color: var(--c-zinc-500);
    background: var(--c-bg-base);
    border: 1px solid var(--c-border-subtle);
    border-radius: 4px;
    padding: 4px 7px;
    cursor: pointer;
    opacity: 0;
    transition:
      opacity 0.15s ease,
      color 0.15s ease,
      border-color 0.15s ease;

    &:hover {
      color: var(--c-text-highlighted);
      border-color: var(--c-border);
    }

    &.copied {
      color: #4ade80;
      border-color: #4ade80;
      opacity: 1;
    }
  }

  &:hover .copy-btn {
    opacity: 1;
  }
}

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

  .nav-links {
    gap: 14px;

    .hide-sm {
      display: none;
    }
  }

  .foot {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;

    > span:last-child {
      max-width: 42ch;
    }
  }

  .step {
    grid-template-columns: 1fr;
    gap: 12px;
    align-items: start;
  }
}
