:root {
  --bg: #0c0c0b;
  --bg-raise: #141413;
  --ink: #f3efe6;
  --muted: #a39c90;
  --line: rgba(243, 239, 230, 0.14);
  --paper: #efeae0;
  --paper-ink: #161513;
  --paper-muted: #5e594f;
  --accent: #ff4d1c;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Schibsted Grotesk", "Avenir Next", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --pad: clamp(1.25rem, 4vw, 3.5rem);
  --max: 1180px;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

.grain {
  position: fixed;
  inset: -20%;
  z-index: 40;
  pointer-events: none;
  opacity: 0.18;
  mix-blend-mode: overlay;
  background: #fff;
  filter: url(#grain);
}

img {
  max-width: 100%;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

::selection {
  background: var(--accent);
  color: #1a0904;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 50;
  background: var(--ink);
  color: var(--bg);
  padding: 0.6rem 0.9rem;
}

.skip:focus {
  top: 1rem;
}

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem var(--pad);
  transition: background 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}

.nav.scrolled {
  background: rgba(12, 12, 11, 0.82);
  backdrop-filter: blur(16px);
  border-bottom-color: var(--line);
}

.wordmark,
.nav-toggle {
  position: relative;
  z-index: 2;
}

.wordmark {
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: -0.04em;
  font-size: 1.05rem;
}

.wordmark em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  margin-left: 0.2rem;
}

.menu {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  font-size: 0.95rem;
}

.menu a {
  color: var(--muted);
}

.menu a:hover,
.menu a:focus-visible {
  color: var(--ink);
}

.menu-cta {
  color: var(--bg) !important;
  background: var(--ink);
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
}

.menu-cta:hover,
.menu-cta:focus-visible {
  background: var(--accent);
  color: #1a0904 !important;
}

.nav-toggle {
  display: none;
  width: 2.6rem;
  height: 2.6rem;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 999px;
  position: relative;
}

.nav-toggle-lines,
.nav-toggle-lines::before,
.nav-toggle-lines::after {
  display: block;
  width: 14px;
  height: 1.5px;
  background: var(--ink);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.nav-toggle-lines {
  top: 50%;
}

.nav-toggle-lines::before,
.nav-toggle-lines::after {
  content: "";
}

.nav-toggle-lines::before {
  top: -5px;
}

.nav-toggle-lines::after {
  top: 5px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-lines {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-lines::before {
  top: 0;
  transform: translateX(-50%) rotate(40deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-lines::after {
  top: 0;
  transform: translateX(-50%) rotate(-40deg);
}

.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  padding: 7rem var(--pad) 3.5rem;
  max-width: 1440px;
  margin: 0 auto;
}

.eyebrow,
.kicker {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 1.25rem;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(255, 77, 28, 0.7);
  animation: pulse 2.2s ease-out infinite;
}

h1,
h2,
.quote-block blockquote p {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 0.94;
  margin: 0;
}

h1 {
  font-size: clamp(3.4rem, 7.4vw, 7.1rem);
}

h1 em,
.quote-block em {
  font-style: italic;
}

.lead {
  max-width: 38rem;
  color: var(--muted);
  font-size: 1.12rem;
  margin: 1.6rem 0 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font: inherit;
  font-size: 0.98rem;
  border: 1px solid var(--ink);
}

.btn:hover,
.btn:focus-visible {
  background: var(--accent);
  border-color: var(--accent);
  color: #1a0904;
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}

.console {
  background: var(--bg-raise);
  border: 1px solid var(--line);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

.console-bar {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.console-dots {
  display: flex;
  gap: 0.35rem;
}

.console-dots i {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #3a3834;
  display: block;
}

.console-dots i:first-child {
  background: #c9b8a2;
}

.console-title {
  letter-spacing: 0.04em;
}

.console-live {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.console-live .dot {
  width: 0.4rem;
  height: 0.4rem;
}

.console-log {
  list-style: none;
  margin: 0;
  padding: 1.15rem 1rem 0.2rem;
  min-height: 12.5rem;
  font-family: var(--mono);
  font-size: 0.86rem;
  line-height: 1.7;
}

.console-log li {
  display: grid;
  grid-template-columns: 7.2rem 1fr;
  gap: 0.75rem;
  opacity: 0;
  transform: translateY(6px);
  animation: line-in 0.45s ease forwards;
}

.console-log .role {
  color: #d9c7b0;
}

.console-log .role.review {
  color: var(--accent);
}

.console-log .msg {
  color: var(--ink);
}

.cursor {
  display: inline-block;
  width: 0.5ch;
  height: 0.95em;
  background: var(--ink);
  transform: translateY(2px);
  margin-left: 2px;
  animation: blink 1s steps(1) infinite;
}

.console-foot {
  margin: 0;
  padding: 0.85rem 1rem 1rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ticker {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 0.9rem 0;
}

.ticker-track {
  display: flex;
  gap: 2.4rem;
  width: max-content;
  animation: ticker 32s linear infinite;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.35rem;
  color: var(--muted);
}

.ticker-track span::before {
  content: "·";
  margin-right: 2.4rem;
  color: var(--accent);
  font-style: normal;
}

.section {
  padding: clamp(4.5rem, 10vw, 8rem) var(--pad);
  max-width: 1440px;
  margin: 0 auto;
}

.section-head {
  margin-bottom: 2.5rem;
}

.section-head h2,
.closer h2 {
  font-size: clamp(2.8rem, 6vw, 5.2rem);
  max-width: 12ch;
}

.work,
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
}

.work li {
  display: grid;
  grid-template-columns: 5rem 1fr;
  gap: 1rem;
  padding: 1.6rem 1rem;
  margin: 0 -1rem;
  border-top: 1px solid var(--line);
  transition: background 0.25s ease, color 0.25s ease, padding 0.25s ease;
}

.work li:last-child {
  border-bottom: 1px solid var(--line);
}

.work h3 {
  margin: 0 0 0.35rem;
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 500;
  letter-spacing: -0.04em;
}

.work p,
.steps p,
.facts span {
  margin: 0;
  color: var(--muted);
  max-width: 42rem;
}

.num {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent);
  padding-top: 0.7rem;
}

.work li:hover {
  background: var(--paper);
  color: var(--paper-ink);
}

.work li:hover p {
  color: var(--paper-muted);
}

.section-paper {
  max-width: none;
  background: var(--paper);
  color: var(--paper-ink);
}

.section-paper .kicker,
.section-paper .steps p {
  color: var(--paper-muted);
}

.section-paper .section-head,
.section-paper .steps {
  max-width: 1440px;
  margin-left: auto;
  margin-right: auto;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  padding-top: 0.5rem;
}

.steps li {
  border-top: 1px solid rgba(22, 21, 19, 0.18);
  padding-top: 1.1rem;
}

.steps h3 {
  margin: 0.8rem 0 0.55rem;
  font-size: 1.7rem;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.section-paper .num {
  padding-top: 0;
}

.quote-block blockquote {
  margin: 0;
}

.quote-block blockquote p {
  font-size: clamp(3rem, 7vw, 6.4rem);
  max-width: 14ch;
}

.facts {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin: 3.5rem 0 0;
  padding: 0;
}

.facts li {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}

.facts strong {
  display: block;
  font-weight: 500;
  margin-bottom: 0.35rem;
  letter-spacing: -0.03em;
  font-size: 1.15rem;
}

.closer h2 {
  max-width: 14ch;
}

.closer .lead {
  margin-bottom: 1.8rem;
}

.foot {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.4rem var(--pad) 2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 77, 28, 0.55);
  }
  100% {
    box-shadow: 0 0 0 10px rgba(255, 77, 28, 0);
  }
}

@keyframes ticker {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@keyframes line-in {
  to {
    opacity: 1;
    transform: none;
  }
}

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

@media (max-width: 900px) {
  .nav-toggle {
    display: grid;
    place-items: center;
  }

  .menu {
    position: fixed;
    inset: 0;
    background: rgba(12, 12, 11, 0.96);
    flex-direction: column;
    justify-content: center;
    gap: 1.4rem;
    align-items: center;
    text-align: center;
    font-size: 1.8rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }

  .menu.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .menu-cta {
    font-size: 1rem;
  }

  .hero,
  .steps,
  .facts,
  .work li {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 7rem;
    align-items: start;
  }

  .console {
    min-height: 300px;
  }

  .section-head {
    margin-bottom: 1.5rem;
  }

}

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

  .dot,
  .ticker-track,
  .cursor,
  .console-log li {
    animation: none;
  }

  .console-log li {
    opacity: 1;
    transform: none;
  }
}
