:root {
  --bg: #efe8dc;
  --text: #17130f;
  --text-secondary: rgba(23, 19, 15, 0.5);
  --border: rgba(23, 19, 15, 0.08);
  --border-strong: rgba(23, 19, 15, 0.14);
  --accent: #c4ddb9;
  --warm: #efddb0;
  --cream: #fffaf2;
  --deep: #17130f;
}

@font-face {
  font-family: "Instrument Sans";
  src: url("./fonts/instrument-sans-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: "Source Serif 4";
  src: url("./fonts/source-serif-4-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 500 600;
  font-display: swap;
}

@font-face {
  font-family: "Source Serif 4";
  src: url("./fonts/source-serif-4-700-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("./fonts/ibm-plex-mono-400-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("./fonts/ibm-plex-mono-500-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

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

::selection {
  background: rgba(196, 221, 185, 0.35);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: clip;
  font-family: "Instrument Sans", "Helvetica Neue", sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.topnav a,
.button,
.demo-terminal-bar p,
.demo-command-line,
.demo-log-line,
.pricing-label,
.example-column-label,
.example-ribbon-track span {
  font-family: "IBM Plex Mono", monospace;
}

/* ---- Shell ---- */

.site-shell {
  width: min(1120px, calc(100vw - 48px));
  margin: 0 auto;
  padding: 32px 0 96px;
}

/* ---- Topbar ---- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 0 48px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1;
  letter-spacing: -0.02em;
}

.brand-mark {
  flex: 0 0 12px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
}

.topnav {
  display: inline-flex;
  flex-wrap: wrap;
  margin-left: auto;
  justify-content: flex-end;
  gap: 24px;
}

.topnav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 200ms;
}

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

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

main {
  position: relative;
}

.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  padding: 64px 0 0;
}

.hero-copy {
  padding-bottom: 24px;
}

h1,
.pricing-line h2 {
  font-family: "Source Serif 4", serif;
  text-rendering: optimizeLegibility;
}

h1 {
  margin: 0 0 24px;
  font-size: clamp(4.2rem, 9.5vw, 7.5rem);
  font-weight: 700;
  line-height: 0.88;
  letter-spacing: -0.045em;
  white-space: nowrap;
}

.hero-sub {
  margin-bottom: 24px;
  color: var(--text-secondary);
  font-size: clamp(1.65rem, 3.2vw, 2.4rem);
  line-height: 0.94;
  letter-spacing: -0.035em;
  white-space: nowrap;
}

/* ---- Buttons ---- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border: none;
  border-radius: 999px;
  background: var(--deep);
  color: var(--cream);
  text-decoration: none;
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 200ms;
}

.button:hover {
  opacity: 0.82;
}

.hero-cta {
  min-height: 52px;
  padding: 0 28px;
  font-size: 0.75rem;
}

/* ---- Terminal demo ---- */

.hero-demo {
  position: relative;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
}

.demo-terminal {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 18px;
  background: #151210;
  box-shadow: 0 40px 80px -20px rgba(23, 19, 15, 0.14);
}

.demo-terminal::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 20%);
}

.demo-terminal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.demo-terminal-bar p {
  margin: 0;
  font-size: 0.625rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 250, 242, 0.44);
}

.demo-terminal-dots {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.demo-terminal-dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

.demo-terminal-dots span:first-child {
  background: rgba(212, 165, 116, 0.8);
}

.demo-terminal-dots span:nth-child(2) {
  background: rgba(223, 208, 160, 0.8);
}

.demo-terminal-dots span:nth-child(3) {
  background: rgba(180, 205, 169, 0.8);
}

.demo-terminal-screen {
  height: 220px;
  padding: 24px 22px 28px;
  overflow: hidden;
}

.demo-command-line {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 24px;
  color: rgba(247, 243, 235, 0.88);
  font-size: 0.875rem;
  letter-spacing: 0.005em;
}

.demo-prefix {
  color: var(--accent);
  opacity: 0.6;
}

.demo-caret {
  display: inline-block;
  width: 8px;
  height: 1.05em;
  background: var(--accent);
  opacity: 0.5;
  animation: blink 1s steps(2, start) infinite;
}

.demo-log {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.demo-log-line {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  color: rgba(243, 237, 228, 0.58);
  font-size: 0.8125rem;
  line-height: 1.4;
  opacity: 0;
  transform: translateY(4px);
  animation: demo-line-in 300ms ease forwards;
}

.demo-log-bullet {
  color: var(--accent);
  opacity: 0.5;
}

.demo-log-line.is-done .demo-log-bullet {
  color: var(--warm);
  opacity: 0.7;
}

/* ---- Examples ---- */

.examples-section {
  margin: 96px 0;
}

.example-ribbon {
  display: flex;
  gap: 18px;
  overflow: hidden;
  margin-bottom: 42px;
  padding: 10px 0 14px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.example-ribbon-track {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 18px;
  min-width: max-content;
  animation: ribbon-scroll 140s linear infinite;
}

.example-ribbon-track span {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: rgba(23, 19, 15, 0.54);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.example-ribbon-track span::after {
  content: "\b7";
  color: rgba(23, 19, 15, 0.2);
}

.example-atlas {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.example-column {
  padding-top: 16px;
  border-top: 1px solid var(--border-strong);
}

.example-column-label,
.pricing-label {
  margin-bottom: 16px;
  color: var(--text-secondary);
  font-size: 0.625rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.example-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.example-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: clamp(0.9375rem, 1.4vw, 1.125rem);
  line-height: 1.2;
  letter-spacing: -0.015em;
}

/* ---- Testimonials ---- */

.testimonials-section {
  margin: 0 0 96px;
  text-align: center;
}

.testimonial {
  max-width: 580px;
  margin: 0 auto;
  padding: 0;
  border: none;
  display: grid;
  gap: 12px;
  opacity: 0;
  transition: opacity 400ms ease;
}

.testimonial.is-visible {
  opacity: 1;
}

.testimonial-quote {
  font-family: "Source Serif 4", serif;
  font-size: clamp(1.25rem, 2.4vw, 1.75rem);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.025em;
  min-height: calc(1.35em * 3);
  margin: 0;
  text-wrap: balance;
}

.testimonial-cite {
  display: block;
  font-family: "IBM Plex Mono", monospace;
  font-style: normal;
  font-size: 0.625rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  min-height: 1.2em;
}

/* ---- Pricing ---- */

.pricing-section {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 0 32px;
  align-items: end;
  padding: 48px 0 0;
  border-top: 1px solid var(--border-strong);
}

.pricing-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.pricing-copy {
  display: grid;
  gap: 14px;
}

.pricing-line h2 {
  margin: 0;
  font-size: clamp(3rem, 5.5vw, 5rem);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -0.05em;
}

.pricing-prompt {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  white-space: nowrap;
}

/* ---- Keyframes ---- */

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

@keyframes ribbon-scroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(calc(-100% - 18px));
  }
}

@keyframes demo-line-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---- Tablet ---- */

@media (max-width: 1024px) {
  .site-shell {
    width: min(100vw - 40px, 1120px);
  }

  .example-atlas {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px 40px;
  }

  .pricing-section {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* ---- Mobile ---- */

@media (max-width: 640px) {
  .site-shell {
    width: calc(100vw - 32px);
    padding: 24px 0 64px;
  }

  .topbar {
    padding-bottom: 32px;
  }

  .hero {
    padding-top: 24px;
  }

  h1 {
    font-size: clamp(3rem, 14vw, 4.5rem);
    white-space: normal;
  }

  .hero-sub {
    max-width: 16ch;
    font-size: clamp(1.35rem, 6.4vw, 1.75rem);
    line-height: 0.98;
    text-wrap: balance;
    white-space: normal;
  }

  .hero-cta {
    min-height: 48px;
    padding: 0 24px;
  }

  .demo-terminal {
    border-radius: 14px;
  }

  .pricing-prompt {
    white-space: normal;
  }

  .demo-terminal-screen {
    height: 200px;
    padding: 18px 16px 22px;
  }

  .demo-command-line {
    font-size: 0.8125rem;
  }

  .demo-log-line {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 10px;
    font-size: 0.75rem;
  }

  .examples-section {
    margin: 64px 0;
  }

  .testimonials-section {
    margin: 0 0 64px;
  }

  .example-atlas {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .pricing-line {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }
}
