/* Origami landing page — cream paper, navy ink, folded geometry.
 * Type: Bricolage Grotesque (display), Hanken Grotesk (body), JetBrains Mono.
 */

:root {
  --paper: #faf6ec;
  --paper-deep: #f1e9d5;
  --card: #fffdf6;
  --ink: #1b2a4a;
  --ink-soft: #46557a;
  --muted: #6b7896;
  --line: #e4dcc8;
  --line-strong: #d3c8ac;
  --accent: #0c79d8;
  --accent-deep: #0a62b2;
  --sky: #68c4ff;
  --code-ink: #2b3440;
  --shadow-warm: 0 18px 40px rgba(27, 42, 74, 0.12);
  --font-display: "Figtree", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Hanken Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* Paper grain + faint diagonal creases. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    repeating-linear-gradient(
      115deg,
      transparent 0 140px,
      rgba(27, 42, 74, 0.022) 140px 141px
    ),
    radial-gradient(circle at 82% -10%, rgba(104, 196, 255, 0.14), transparent 42rem),
    radial-gradient(circle at -8% 108%, rgba(12, 121, 216, 0.07), transparent 38rem);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection {
  background: rgba(12, 121, 216, 0.2);
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  letter-spacing: -0.015em;
  line-height: 1.06;
}

h2 {
  font-size: clamp(34px, 4.6vw, 52px);
  font-weight: 750;
  margin: 0 0 18px;
}

h3 {
  font-size: 19px;
  font-weight: 700;
  margin: 0 0 8px;
}

p {
  margin: 0 0 14px;
}

a {
  color: var(--accent-deep);
}

code {
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(27, 42, 74, 0.05);
  color: #274b66;
  font-family: var(--font-mono);
  font-size: 0.86em;
  padding: 0.08em 0.35em;
}

/* --------------------------------------------------------------------------
 * Site navigation
 * ------------------------------------------------------------------------ */

.site-nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 60px;
  border-bottom: 1px solid var(--line);
  background: rgba(250, 246, 236, 0.92);
  backdrop-filter: blur(8px);
  padding: 0 28px;
  transition: box-shadow 200ms ease;
}

.site-nav.is-scrolled {
  box-shadow: 0 10px 30px rgba(27, 42, 74, 0.08);
}

.site-nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17px;
  text-decoration: none;
}

.site-nav-brand img {
  width: 26px;
  height: 26px;
}

.site-nav-links {
  display: flex;
  gap: 6px;
}

.site-nav-links a {
  border-radius: 7px;
  color: var(--ink-soft);
  font-size: 14.5px;
  font-weight: 600;
  padding: 7px 13px;
  text-decoration: none;
  transition: background 140ms ease, color 140ms ease;
}

.site-nav-links a:hover {
  background: var(--paper-deep);
  color: var(--ink);
}

.site-nav-links a[aria-current="page"] {
  background: var(--ink);
  color: var(--paper);
}

/* --------------------------------------------------------------------------
 * Hero
 * ------------------------------------------------------------------------ */

.hero {
  padding: 150px 0 90px;
}

.hero-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 56px;
  align-items: center;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  color: var(--accent-deep);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 10px;
  height: 10px;
  background: linear-gradient(135deg, var(--sky) 50%, var(--accent) 50%);
  transform: rotate(45deg);
}

.hero h1 {
  margin: 0 0 22px;
  font-size: clamp(42px, 5.6vw, 78px);
  font-weight: 850;
}

.hero h1 .accent {
  color: var(--accent);
  position: relative;
  white-space: nowrap;
}

.hero-lead {
  max-width: 34rem;
  margin: 0 0 28px;
  color: var(--ink-soft);
  font-size: clamp(17px, 1.6vw, 19.5px);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 0 0 34px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 15.5px;
  padding: 13px 24px;
  text-decoration: none;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.btn-primary {
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 12px 26px rgba(27, 42, 74, 0.22);
}

.btn-primary:hover {
  background: var(--accent-deep);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(12, 121, 216, 0.28);
}

.btn-ghost {
  border: 1.5px solid var(--line-strong);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--ink);
  background: var(--card);
  transform: translateY(-2px);
}

.semantic-strip {
  max-width: 32rem;
  border-left: 3px solid var(--accent);
  padding-left: 14px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.9;
}

/* Hero side: logo swatch over the pipeline card, with a fold overlap. */

.hero-side {
  display: grid;
  justify-items: center;
}

.logo-card {
  position: relative;
  z-index: 2;
  margin: 0 0 -34px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  padding: 18px 22px 30px 18px;
  box-shadow: var(--shadow-warm);
  transform: rotate(-1.6deg);
}

.logo-card::after {
  content: "";
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 34px;
  height: 34px;
  border-radius: 0 0 13px 0;
  background: var(--paper-deep);
  clip-path: polygon(0 100%, 100% 0, 100% 100%);
  box-shadow: -3px -3px 6px rgba(27, 42, 74, 0.08);
}

.logo-card img {
  display: block;
  width: min(300px, 60vw);
  height: auto;
}

/* --------------------------------------------------------------------------
 * Code cards (share the docs look: light block, fold gradient, ice label)
 * ------------------------------------------------------------------------ */

.code-card {
  position: relative;
  z-index: 1;
  border: 1px solid #e7e9eb;
  border-radius: 12px;
  background: linear-gradient(135deg, #f6f7f8 0%, #e3e5e7 100%);
  box-shadow: var(--shadow-warm);
  padding: 8px;
  width: 100%;
}

.code-card pre {
  overflow-x: auto;
  margin: 0;
  position: relative;
}

.code-card code {
  border: 0;
  background: transparent;
  color: var(--code-ink);
  display: block;
  font-size: 14.5px;
  line-height: 1.75;
  padding: 16px 18px;
}

.code-card code[data-lang]::after {
  content: attr(data-lang);
  position: absolute;
  top: 9px;
  right: 14px;
  color: #97a1af;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  pointer-events: none;
  user-select: none;
}

.code-card-lg {
  padding: 10px;
}

.code-card-lg code {
  font-size: 14px;
}

/* --------------------------------------------------------------------------
 * Sections
 * ------------------------------------------------------------------------ */

.section {
  border-top: 1px dashed var(--line-strong);
  padding: 84px 0;
}

.anatomy {
  background:
    linear-gradient(180deg, rgba(241, 233, 213, 0.55), rgba(241, 233, 213, 0));
}

.section-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
}

.section-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  color: var(--accent-deep);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-kicker::before {
  content: "";
  width: 10px;
  height: 10px;
  background: linear-gradient(135deg, var(--sky) 50%, var(--accent) 50%);
  transform: rotate(45deg);
}

.section-kicker:has(.kicker-icon)::before {
  display: none;
}

.kicker-icon {
  width: 20px;
  height: 20px;
}

.section-lead {
  max-width: 40rem;
  color: var(--ink-soft);
  font-size: 18px;
}

/* Feature cards */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.feature-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  padding: 26px 24px 24px;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.feature-card::after {
  content: "";
  position: absolute;
  top: -1px;
  right: -1px;
  width: 22px;
  height: 22px;
  background: var(--paper-deep);
  border-radius: 0 12px 0 0;
  clip-path: polygon(0 0, 100% 100%, 100% 0);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-warm);
}

.feature-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15.5px;
}

.card-icon {
  display: block;
  width: 34px;
  height: 34px;
  margin-bottom: 16px;
}

/* Anatomy */

.anatomy-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 56px;
  align-items: center;
}

.anatomy-steps {
  list-style: none;
  margin: 34px 0 0;
  padding: 0;
  display: grid;
  gap: 26px;
}

.anatomy-steps li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.step-number {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--paper);
  background: var(--ink);
  border-radius: 8px;
  padding: 6px 9px;
}

.anatomy-steps p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15.5px;
}

/* CLI */

.cli-card {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  margin-top: 36px;
}

.cli-notes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.cli-notes li {
  border-left: 3px solid var(--sky);
  padding-left: 14px;
  color: var(--ink-soft);
  font-size: 15.5px;
}

/* --------------------------------------------------------------------------
 * Artifacts placeholder
 * ------------------------------------------------------------------------ */

.placeholder-main {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 60px);
  padding: 120px 24px 80px;
}

.placeholder-card {
  position: relative;
  max-width: 460px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow-warm);
  padding: 40px 40px 44px;
  text-align: center;
  animation: rise 600ms cubic-bezier(0.2, 0.7, 0.2, 1) 80ms both;
}

.placeholder-card::after {
  content: "";
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 38px;
  height: 38px;
  border-radius: 0 0 15px 0;
  background: var(--paper-deep);
  clip-path: polygon(0 100%, 100% 0, 100% 100%);
  box-shadow: -3px -3px 6px rgba(27, 42, 74, 0.08);
}

.placeholder-card img {
  width: 180px;
  height: auto;
  margin-bottom: 6px;
}

.placeholder-card h1 {
  font-size: 44px;
  font-weight: 850;
  margin: 0 0 10px;
}

.placeholder-card p {
  color: var(--ink-soft);
}

.placeholder-card .btn {
  margin-top: 10px;
}

.placeholder-card .section-kicker {
  justify-content: center;
}

/* --------------------------------------------------------------------------
 * Footer
 * ------------------------------------------------------------------------ */

.site-footer {
  background: var(--ink);
  color: var(--paper);
  padding: 64px 0;
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
  display: grid;
  gap: 18px;
  justify-items: center;
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--paper);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  text-decoration: none;
}

.footer-brand img {
  width: 30px;
  height: 30px;
}

.footer-line {
  margin: 0;
  color: rgba(250, 246, 236, 0.66);
  font-size: 15px;
}

.footer-links {
  display: flex;
  gap: 22px;
}

.footer-links a {
  color: var(--sky);
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* --------------------------------------------------------------------------
 * Highlight.js palette (matches the docs theme)
 * ------------------------------------------------------------------------ */

.hljs-comment { color: #6e7781; font-style: italic; }
.hljs-keyword { color: #cf222e; }
.hljs-literal { color: #0550ae; }
.hljs-section { color: #8250df; font-weight: 600; }
.hljs-string { color: #0a3069; }
.hljs-number { color: #0550ae; }
.hljs-attr { color: #116329; }
.hljs-title { color: #8250df; }
.hljs-variable { color: #953800; font-weight: 600; }
.hljs-meta { color: #953800; }
.hljs-built_in { color: #116329; }
.hljs-escape { color: #0550ae; }

/* --------------------------------------------------------------------------
 * Entrance choreography
 * ------------------------------------------------------------------------ */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-copy > * {
  animation: rise 600ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hero-copy > *:nth-child(1) { animation-delay: 60ms; }
.hero-copy > *:nth-child(2) { animation-delay: 140ms; }
.hero-copy > *:nth-child(3) { animation-delay: 220ms; }
.hero-copy > *:nth-child(4) { animation-delay: 300ms; }
.hero-copy > *:nth-child(5) { animation-delay: 380ms; }

.hero-side {
  animation: rise 700ms cubic-bezier(0.2, 0.7, 0.2, 1) 260ms both;
}

.logo-card {
  animation: rise 700ms cubic-bezier(0.2, 0.7, 0.2, 1) 380ms both;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* --------------------------------------------------------------------------
 * Responsive
 * ------------------------------------------------------------------------ */

@media (max-width: 980px) {
  .hero {
    padding-top: 120px;
  }

  .hero-inner,
  .anatomy-grid {
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .hero-side {
    justify-items: stretch;
  }

  .logo-card {
    justify-self: center;
  }

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

  .cli-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .site-nav {
    padding: 0 16px;
  }

  .site-nav-links a {
    padding: 7px 9px;
    font-size: 13.5px;
  }

  .hero-inner,
  .section-inner {
    padding: 0 20px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 60px 0;
  }
}
