/* yaawn — plan skills. Design system inspired by mistral.ai,
   with a bright blue (#0096FF) signature ramp instead of orange. */

:root {
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-display: "Space Grotesk", "Inter", ui-sans-serif, sans-serif;
  --font-mono:
    "Space Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* neutrals */
  --steel-950: #101013;
  --steel-900: #1a1a1e;
  --steel-800: #27272b;
  --steel-600: #55555e;
  --steel-500: #83838e;
  --steel-400: #a1a1aa;
  --steel-100: #f1f1f3;
  --cream-50: #fafaf4;
  --border-primary: #2a2a31;
  --border-secondary: #3d3d46;
  --navy-950: #151524;

  /* signature bright blue ramp */
  --blue-300: #8fd6ff;
  --blue-400: #4fb8ff;
  --blue-500: #0096ff;
  --blue-700: #0052a8;
  --blue-800: #003e8f;

  --ink: var(--steel-100);
  --muted: var(--steel-400);
  --faint: var(--steel-500);
  --surface: var(--steel-900);
  --surface-brand: var(--steel-950);
  --surface-brand-secondary: var(--navy-950);

  --radius: 0.75rem;
  --container: 72rem;

  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
  overflow-x: hidden;
}

body {
  margin: 0;
  overflow-x: hidden;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  background: var(--surface-brand);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--blue-500);
  color: #fff;
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--blue-500);
  outline-offset: 3px;
  border-radius: 2px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

@media (min-width: 768px) {
  .container {
    padding-inline: 2rem;
  }
}

/* ---------- buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.125rem;
  border: 1px solid transparent;
  border-radius: 0.5rem;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.25rem;
  text-decoration: none;
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.button svg {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
}

.button-primary {
  background: var(--steel-100);
  color: var(--steel-950);
}

.button-primary:hover {
  background: var(--blue-500);
  color: #fff;
}

.button-ghost {
  background: var(--surface);
  border-color: var(--border-secondary);
  color: var(--ink);
}

.button-ghost:hover {
  border-color: var(--steel-600);
}

.button-blue {
  background: var(--blue-500);
  color: #fff;
}

.button-blue:hover {
  background: var(--blue-400);
}

/* ---------- header ---------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(16, 16, 19, 0.85);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-primary);
}

.site-header .container {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 1rem;
  height: 3.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.brand-name,
.site-header h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.site-nav {
  display: flex;
  align-items: stretch;
}

.site-nav a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-inline: 1rem;
  border-left: 1px solid var(--border-primary);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--muted);
  transition:
    color 0.15s ease,
    background 0.15s ease;
}

.site-nav a:last-child {
  border-right: 1px solid var(--border-primary);
}

.site-nav a:hover {
  color: var(--ink);
  background: var(--steel-900);
}

.site-nav a svg {
  width: 0.9375rem;
  height: 0.9375rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-actions .button {
  padding-block: 0.4375rem;
  font-size: 0.875rem;
}

.header-actions .command {
  align-self: auto;
  margin: 0;
  padding: 0.4375rem 0.875rem;
  font-size: 0.8125rem;
}

.header-actions .command.copied::after {
  bottom: auto;
  top: calc(100% + 0.375rem);
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  padding: 9.5rem 0 0;
  text-align: center;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    44rem 22rem at 50% -8rem,
    rgba(0, 150, 255, 0.16),
    transparent 70%
  );
  pointer-events: none;
}

.hero .container {
  position: relative;
}

.eyebrow {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue-400);
}

.hero .subtitle {
  max-width: 34rem;
  margin: 0 auto;
  font-size: 1.25rem;
  line-height: 1.75rem;
  color: var(--muted);
}

.gradient-rule {
  width: 4.5rem;
  height: 3px;
  margin: 2.75rem auto 0;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    var(--blue-300),
    var(--blue-500),
    var(--blue-800)
  );
}

/* ---------- hero sprites ---------- */

.hero-art {
  --sprite-scale: 1;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 1.5rem;
  margin: 0;
  user-select: none;
}

.sprite {
  --sprite-width: calc(192px * var(--sprite-scale));
  display: block;
  flex: none;
  width: var(--sprite-width);
  height: calc(160px * var(--sprite-scale));
  background-repeat: no-repeat;
  background-size: calc(var(--sprite-width) * 10) 100%;
  background-position: calc(var(--frame) * var(--sprite-width) * -1) 0;
  image-rendering: pixelated;
}

.sprite-dog {
  --frame: 5;
  background-image: url("assets/dog/dog-sprite-sheet.png");
}

.sprite-terminal {
  --frame: 0;
  background-image: url("assets/terminal/terminal-sprite-sheet.png");
}

/* ---------- sections ---------- */

.section {
  padding: 4.5rem 0;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2.75rem;
  padding-top: 1.375rem;
  border-top: 1px solid var(--border-primary);
}

.section-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.section-head p {
  max-width: 19rem;
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.6;
  text-align: right;
  color: var(--faint);
}

/* ---------- workflow stages ---------- */

.stages {
  --gap: 3.25rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gap);
  align-items: stretch;
  list-style: none;
  margin: 0;
  padding: 0;
}

.stage {
  position: relative;
  min-width: 0;
}

.stage:not(:last-child)::after {
  content: "\2192";
  position: absolute;
  top: 1.9rem;
  right: calc(var(--gap) / -2 - 0.6em);
  color: var(--blue-500);
  font-size: 1.375rem;
  line-height: 1;
}

.stage-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius);
  transition: border-color 0.2s ease;
}

.stage-card:hover {
  border-color: var(--border-secondary);
}

.stage-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.stage-number {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: var(--blue-500);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
}

.stage-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.stage-eyebrow {
  margin: -0.375rem 0 0.875rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue-400);
}

.command {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  align-self: flex-start;
  margin: 0 0 1.125rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid rgba(0, 150, 255, 0.35);
  border-radius: 0.5rem;
  background: rgba(0, 150, 255, 0.1);
  color: var(--blue-300);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.25rem;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background 0.15s ease;
}

.command:hover {
  border-color: var(--blue-400);
  background: rgba(0, 150, 255, 0.18);
}

.command .copy-icon {
  width: 0.8125rem;
  height: 0.8125rem;
  opacity: 0.65;
}

.command.copied::after {
  content: "Copied";
  position: absolute;
  bottom: calc(100% + 0.375rem);
  left: 50%;
  transform: translateX(-50%);
  padding: 0.125rem 0.5rem;
  border-radius: 0.25rem;
  background: var(--blue-700);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.stage-list {
  display: grid;
  gap: 0.5rem;
  margin: 0 0 1.25rem;
  padding: 0;
  list-style: none;
}

.stage-list li {
  position: relative;
  padding-left: 1.125rem;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--muted);
}

.stage-list li::before {
  content: "";
  position: absolute;
  top: 0.6em;
  left: 0;
  width: 0.5rem;
  height: 2px;
  background: var(--blue-400);
}

.stage-skills {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border-primary);
}

.skills-label {
  display: block;
  margin-bottom: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
}

.skill-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.skill-chip {
  padding: 0.1875rem 0.625rem;
  border: 1px solid var(--border-primary);
  border-radius: 999px;
  background: var(--surface);
  color: var(--blue-300);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
}

.skill-none {
  margin: 0;
  font-size: 0.8125rem;
  font-style: italic;
  color: var(--faint);
}

/* ---------- prerequisites ---------- */

.prereq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  align-items: stretch;
}

.prereq-card {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius);
  transition: border-color 0.2s ease;
}

.prereq-card:hover {
  border-color: var(--border-secondary);
}

.prereq-icon {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 1rem;
  border-radius: 0.625rem;
  background: rgba(0, 150, 255, 0.1);
  color: var(--blue-400);
}

.prereq-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.prereq-title {
  margin: 0 0 0.625rem;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.prereq-desc {
  margin: 0 0 0.75rem;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--muted);
}

.prereq-desc strong {
  display: block;
  margin-top: 0.5rem;
  margin-bottom: 0.375rem;
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.prereq-desc:last-of-type {
  margin-bottom: 0;
}

.prereq-card .stage-list {
  margin-bottom: 0;
}

.prereq-desc code {
  padding: 0.0625rem 0.375rem;
  border-radius: 0.25rem;
  background: var(--steel-800);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--blue-300);
}

.prereq-desc a {
  color: var(--blue-300);
  text-decoration: none;
  border-bottom: 1px solid rgba(143, 214, 255, 0.3);
}

.prereq-desc a:hover {
  border-bottom-color: var(--blue-300);
}

.prereq-or {
  align-self: center;
  margin: 0.375rem 0;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}

.prereq-note {
  margin: 0.875rem 0 0;
  padding-top: 0.875rem;
  border-top: 1px solid var(--border-primary);
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--faint);
}

.prereq-note code {
  padding: 0.0625rem 0.375rem;
  border-radius: 0.25rem;
  background: var(--steel-800);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--steel-400);
}

.agent-tree {
  margin: 0.25rem 0 0;
  padding: 0.875rem 1rem;
  overflow-x: auto;
  border: 1px solid var(--border-primary);
  border-radius: 0.5rem;
  background: var(--steel-950);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.6;
  white-space: pre;
  color: var(--muted);
}

.agent-tree .t-root,
.agent-tree .t-link {
  color: var(--blue-300);
}

.agent-tree .t-cmt {
  color: var(--faint);
}

.label-list {
  display: grid;
  gap: 0.625rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.label-list li {
  display: flex;
  align-items: baseline;
  gap: 0.625rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--muted);
}

.label-list li span {
  color: var(--faint);
}

.label-list li code {
  flex: 0 0 auto;
  min-width: 5.5rem;
  text-align: center;
}

.label-chip {
  display: inline-block;
  padding: 0.1875rem 0.625rem;
  border: 1px solid rgba(0, 150, 255, 0.35);
  border-radius: 999px;
  background: rgba(0, 150, 255, 0.1);
  color: var(--blue-300);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
}

.label-chip code {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
}

/* ---------- completion band ---------- */

.completion {
  padding: 4.5rem 0;
  border-top: 1px solid var(--border-primary);
  border-bottom: 1px solid var(--border-primary);
  background: var(--surface-brand-secondary);
  text-align: center;
}

.completion-icon {
  width: 2.25rem;
  height: 2.25rem;
  margin-bottom: 0.5rem;
  color: var(--blue-500);
}

.completion h2 {
  margin: 0 0 0.875rem;
  font-family: var(--font-display);
  font-size: clamp(1.875rem, 4.5vw, 3rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.completion h2 .accent {
  color: var(--blue-500);
}

.completion p {
  margin: 0;
  font-size: 1rem;
  color: var(--muted);
}

/* ---------- skill grid ---------- */

.skill-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  border: 1px solid var(--border-primary);
  border-radius: var(--radius);
  background: var(--border-primary);
  overflow: hidden;
}

.skill-cell {
  padding: 1.375rem 1.25rem;
  background: var(--surface);
  transition: background 0.15s ease;
}

.skill-cell:hover {
  background: rgba(0, 150, 255, 0.06);
}

.skill-cell .name {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--blue-300);
  overflow-wrap: anywhere;
}

.skill-cell .where {
  display: block;
  margin-top: 0.625rem;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

/* ---------- CTA + footer (dark) ---------- */

.cta {
  padding: 5.5rem 0;
  background: var(--navy-950);
  color: var(--cream-50);
  text-align: center;
}

.cta h2 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(1.875rem, 4vw, 2.75rem);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.cta h2 .accent {
  color: var(--blue-400);
}

.cta p {
  max-width: 32rem;
  margin: 0 auto 2rem;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: rgba(250, 250, 244, 0.62);
}

.site-footer {
  background: var(--steel-950);
  color: var(--ink);
  border-top: 1px solid var(--border-primary);
}

.site-footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-dog {
  --sprite-scale: 0.5;
  --frame: 0;
  margin: 2.5rem 0 1.5rem;
  animation: standing-dog 4s steps(1, end) infinite;
  user-select: none;
}

@keyframes standing-dog {
  0%,
  70%,
  100% {
    --frame: 0;
  }
  20%,
  50% {
    --frame: 1;
  }
  30% {
    --frame: 2;
  }
  85%,
  95% {
    --frame: 3;
  }
  90% {
    --frame: 4;
  }
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
}

.footer-col {
  padding: 2.75rem 2rem;
  border-left: 1px solid rgba(250, 250, 244, 0.12);
}

.footer-col:first-child {
  border-left: 0;
  padding-left: 0;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 0.875rem;
}

.footer-brand span {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.footer-tagline {
  margin: 0;
  max-width: 22rem;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: rgba(250, 250, 244, 0.62);
}

.footer-col h3 {
  margin: 0 0 0.875rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(250, 250, 244, 0.45);
}

.footer-col ul {
  display: grid;
  gap: 0.625rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col a {
  font-size: 0.9375rem;
  color: var(--cream-50);
  opacity: 0.85;
  text-decoration: none;
}

.footer-col a:hover {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding: 1.375rem 0;
  border-top: 1px solid var(--border-primary);
  font-size: 0.8125rem;
  color: var(--faint);
}

.footer-bottom p {
  margin: 0;
}

/* ---------- reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ---------- responsive ---------- */

@media (max-width: 1100px) {
  .stages {
    --gap: 2.5rem;
    grid-template-columns: minmax(0, 1fr);
  }

  .stage:not(:last-child)::after {
    content: "\2193";
    top: auto;
    right: auto;
    bottom: calc(var(--gap) / -2 - 0.75em);
    left: 1.4rem;
  }

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

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

  .footer-col {
    padding: 2rem 0;
    border-left: 0;
    border-top: 1px solid rgba(250, 250, 244, 0.12);
  }

  .footer-col:first-child {
    border-top: 0;
    padding-top: 2.75rem;
  }
}

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

  .site-header .container {
    flex-wrap: wrap;
    height: auto;
    min-height: 3.5rem;
    padding-block: 0.5rem;
  }

  .header-actions {
    margin-left: auto;
  }

  .hero {
    padding: 7.5rem 0 4rem;
  }

  .section {
    padding: 3.5rem 0;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.625rem;
  }

  .section-head p {
    text-align: left;
  }

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

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

  .hero .subtitle {
    font-size: 1.0625rem;
  }

  .header-actions .button-ghost {
    display: none;
  }
}

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

  .footer-dog {
    animation: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
