:root {
  --red: #c81016;
  --paper: #f3f0e9;
  --paper-2: #ebe6dc;
  --ink: #171717;
  --muted: #696762;
  --line: #d8d3cb;
  --white: #fffaf1;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 28px;
  align-items: center;
  padding: 18px clamp(20px, 4vw, 56px);
  background: rgba(243, 240, 233, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand {
  display: block;
  width: 170px;
  height: 56px;
  overflow: hidden;
}

.brand img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scale(1.35);
}

.nav {
  display: flex;
  justify-content: flex-end;
  gap: clamp(14px, 2vw, 28px);
  color: var(--muted);
  font-size: 14px;
}

.nav a,
.talk-link,
.button,
.text-cta {
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.nav a:hover,
.talk-link:hover,
.text-cta:hover {
  color: var(--red);
}

.talk-link {
  color: var(--red);
  font-weight: 700;
  white-space: nowrap;
}

.hero,
.section,
.footer {
  padding: clamp(72px, 10vw, 148px) clamp(20px, 5vw, 80px);
}

.hero {
  min-height: calc(100vh - 93px);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  position: relative;
  overflow: hidden;
  padding-top: clamp(48px, 6vw, 88px);
  border-bottom: 1px solid var(--line);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 96px 4vw auto auto;
  width: min(42vw, 720px);
  height: min(42vw, 720px);
  border: 1px solid rgba(200, 16, 22, 0.12);
  background:
    linear-gradient(90deg, rgba(200, 16, 22, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(200, 16, 22, 0.08) 1px, transparent 1px);
  background-size: 44px 44px;
  transform: rotate(-8deg);
  animation: drift-grid 14s ease-in-out infinite alternate;
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  left: clamp(20px, 5vw, 80px);
  right: clamp(20px, 5vw, 80px);
  bottom: 34px;
  height: 1px;
  background: linear-gradient(90deg, var(--red), transparent 42%, var(--line));
  transform-origin: left;
  animation: hero-rule 4.8s ease-in-out infinite;
  pointer-events: none;
}

.eyebrow,
.section-index,
.hero-panel p,
.footer p,
.product-copy small {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0;
  color: var(--red);
  font-size: 13px;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: clamp(36px, 8vw, 120px);
  align-items: end;
}

.hero-main {
  transform: translateY(clamp(-56px, -4vh, -24px));
}

.hero-kicker {
  position: relative;
  z-index: 1;
  width: fit-content;
  padding: 8px 0;
}

.hero-kicker::after {
  content: "";
  display: block;
  width: 54%;
  height: 2px;
  margin-top: 9px;
  background: var(--red);
  animation: ticker-mark 3.2s ease-in-out infinite;
}

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

h1 {
  margin-bottom: 28px;
  color: var(--red);
  font-size: clamp(44px, 7.35vw, 116px);
  line-height: 0.9;
  letter-spacing: 0;
}

.kinetic-title {
  display: grid;
  gap: clamp(4px, 0.9vw, 14px);
}

.hero-word {
  position: relative;
  display: block;
  width: fit-content;
  padding-right: clamp(28px, 4vw, 62px);
  transform-origin: left center;
  animation: word-rise 780ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.hero-word:nth-child(2) {
  animation-delay: 120ms;
}

.hero-word:nth-child(3) {
  animation-delay: 240ms;
}

.hero-word::before {
  content: attr(data-index);
  position: absolute;
  top: clamp(9px, 1.1vw, 18px);
  right: 0;
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(12px, 0.9vw, 16px);
  font-weight: 500;
}

.hero-word::after {
  content: "";
  position: absolute;
  right: clamp(8px, 1.4vw, 22px);
  bottom: clamp(7px, 1vw, 18px);
  width: clamp(38px, 5vw, 86px);
  height: clamp(8px, 0.9vw, 15px);
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  animation: word-accent 3.8s ease-in-out infinite;
}

.hero-word:nth-child(2)::after {
  animation-delay: 420ms;
}

.hero-word:nth-child(3)::after {
  animation-delay: 840ms;
}

.hero-word-offset {
  margin-left: clamp(0px, 2.8vw, 48px);
}

h2 {
  margin-bottom: 28px;
  font-size: clamp(44px, 7vw, 104px);
  line-height: 0.94;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: clamp(19px, 1.8vw, 26px);
}

p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.hero-copy,
.lead {
  max-width: 760px;
  color: var(--ink);
  font-size: clamp(20px, 2.1vw, 30px);
  line-height: 1.22;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 13px 18px;
  border: 1px solid var(--red);
  font-weight: 800;
}

.button.primary {
  background: var(--red);
  color: var(--white);
}

.button.secondary {
  color: var(--red);
}

.button:hover {
  transform: translateY(-2px);
}

.hero-panel {
  position: relative;
  border-top: 1px solid var(--red);
  padding-top: 24px;
}

.stack-map {
  display: grid;
  gap: 8px;
  margin-top: 34px;
  font-size: clamp(22px, 3vw, 46px);
  font-weight: 850;
  line-height: 1;
}

.stack-map span,
.stack-map strong {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 0 12px;
  border-bottom: 1px solid var(--line);
  transition: color 180ms ease, transform 180ms ease, border-color 180ms ease;
}

.stack-map span::after,
.stack-map strong::after {
  content: "↗";
  color: var(--red);
  font-size: 0.55em;
  transform: translateY(0.1em);
}

.stack-map span:hover,
.stack-map strong:hover {
  color: var(--red);
  border-color: var(--red);
  transform: translateX(8px);
}

.stack-map strong {
  color: var(--red);
}

.signal-board {
  position: relative;
  min-height: 230px;
  margin-top: 34px;
  padding: 22px;
  border: 1px solid var(--ink);
  background: var(--white);
  box-shadow: 14px 14px 0 var(--red);
  overflow: hidden;
}

.signal-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  width: min(260px, 72%);
}

.signal-grid span {
  aspect-ratio: 1;
  border: 2px solid var(--red);
  animation: signal-pulse 2.8s ease-in-out infinite;
}

.signal-grid span:nth-child(3n) {
  animation-delay: 220ms;
}

.signal-grid span:nth-child(4n) {
  animation-delay: 460ms;
}

.signal-line {
  position: absolute;
  right: -8%;
  top: 44%;
  width: 70%;
  height: 2px;
  background: var(--red);
  transform: rotate(-18deg);
}

.signal-line::before,
.signal-line::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  border: 2px solid var(--red);
  background: var(--white);
  transform: translateY(-50%) rotate(45deg);
  animation: node-travel 3.6s ease-in-out infinite;
}

.signal-line::after {
  animation-delay: 1.8s;
}

.signal-readout {
  position: absolute;
  right: 20px;
  bottom: 18px;
  display: grid;
  gap: 2px;
  text-align: right;
}

.signal-readout strong {
  color: var(--red);
  font-size: clamp(34px, 4vw, 58px);
  line-height: 0.95;
}

.signal-readout span,
.hero-marquee span {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}

.hero-marquee {
  display: flex;
  gap: 22px;
  width: 100%;
  margin-top: 32px;
  padding: 12px 0;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.hero-marquee span {
  flex: 0 0 auto;
  color: var(--red);
  animation: marquee-shift 6s linear infinite;
}

.split {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px);
  border-bottom: 1px solid var(--line);
}

.section:not(.product-band):not(.dark)::before {
  content: "";
  position: absolute;
  inset: auto clamp(20px, 5vw, 80px) 26px auto;
  width: min(360px, 34vw);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--red));
  opacity: 0.7;
  transform-origin: right;
  animation: section-scan 5.4s ease-in-out infinite;
}

.split > .section-index,
.approach .section-index {
  align-self: start;
  width: fit-content;
  padding: 10px 12px;
  border: 1px solid var(--red);
  background: var(--paper);
  box-shadow: 6px 6px 0 rgba(200, 16, 22, 0.12);
}

.editorial-list article,
.feature-lines article {
  position: relative;
  display: grid;
  grid-template-columns: minmax(190px, 0.42fr) minmax(0, 1fr);
  gap: 24px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  transition: border-color 180ms ease, transform 180ms ease;
}

.editorial-list article::before,
.feature-lines article::before {
  content: "";
  position: absolute;
  left: 0;
  top: -1px;
  width: 0;
  height: 2px;
  background: var(--red);
  transition: width 220ms ease;
}

.editorial-list article:hover,
.feature-lines article:hover {
  border-color: var(--red);
  transform: translateX(10px);
}

.editorial-list article:hover::before,
.feature-lines article:hover::before {
  width: 100%;
}

.editorial-list p,
.feature-lines p {
  margin-bottom: 0;
}

.capability-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.capability-grid article {
  position: relative;
  overflow: hidden;
  min-height: 180px;
  padding: 28px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.capability-grid article::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 34px;
  height: 34px;
  border-right: 2px solid var(--red);
  border-bottom: 2px solid var(--red);
  opacity: 0;
  transform: translate(-8px, -8px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.capability-grid article:hover {
  background: var(--white);
  transform: translateY(-4px);
}

.capability-grid article:hover::after {
  opacity: 1;
  transform: translate(0, 0);
}

.capability-grid article:nth-child(2n) {
  border-right: 0;
}

.dark {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: var(--white);
}

.dark::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 250, 241, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 250, 241, 0.08) 1px, transparent 1px);
  background-size: 58px 58px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 35%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 35%, transparent);
  opacity: 0.5;
  animation: dark-grid 10s ease-in-out infinite alternate;
  pointer-events: none;
}

.dark > * {
  position: relative;
  z-index: 1;
}

.dark p,
.dark .section-index {
  color: var(--paper-2);
}

.dark h2 {
  color: var(--white);
}

.ai-rows {
  display: grid;
  margin-top: 48px;
  border-top: 1px solid rgba(255, 250, 241, 0.25);
}

.ai-rows span {
  padding: 22px 0;
  border-bottom: 1px solid rgba(255, 250, 241, 0.25);
  color: var(--paper);
  font-size: clamp(24px, 3vw, 44px);
  font-weight: 800;
  transition: color 180ms ease, transform 180ms ease;
}

.ai-rows span:hover {
  color: var(--red);
  transform: translateX(12px);
}

.product-band {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
}

.product-band::before {
  content: "";
  position: absolute;
  top: 42px;
  right: -120px;
  width: 440px;
  height: 440px;
  border: 1px solid rgba(200, 16, 22, 0.18);
  transform: rotate(14deg);
  animation: product-frame 9s ease-in-out infinite alternate;
}

.product-band > * {
  position: relative;
  z-index: 1;
}

.product-copy h2 {
  color: var(--red);
  font-size: clamp(72px, 11vw, 156px);
}

.product-logo {
  display: block;
  width: min(420px, 100%);
  height: auto;
  margin-bottom: 24px;
}

.product-copy small {
  display: block;
  margin-top: 22px;
}

.device-composition {
  position: relative;
  min-height: 520px;
}

.desktop-ui,
.phone-ui,
.screen,
.mobile-screen {
  border: 1px solid var(--ink);
  background: var(--white);
  box-shadow: 18px 18px 0 var(--red);
}

.desktop-ui {
  position: absolute;
  right: 0;
  top: 34px;
  width: min(720px, 100%);
  min-height: 420px;
  padding: 24px;
}

.ui-top,
.screen-header {
  display: flex;
  justify-content: space-between;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.ui-top span,
.screen-header strong {
  color: var(--red);
  font-weight: 900;
}

.metric-row,
.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 22px 0;
}

.metric-row div,
.summary-grid div {
  padding: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
}

.metric-row span,
.summary-grid span,
.phone-ui span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.metric-row strong,
.summary-grid strong,
.phone-ui strong {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 26px;
}

.chart-lines {
  display: flex;
  align-items: end;
  gap: 12px;
  height: 145px;
  padding: 18px;
  border: 1px solid var(--line);
}

.chart-lines i {
  flex: 1;
  background: var(--red);
}

.chart-lines i:nth-child(1) { height: 42%; }
.chart-lines i:nth-child(2) { height: 74%; }
.chart-lines i:nth-child(3) { height: 58%; }
.chart-lines i:nth-child(4) { height: 88%; }

.table-lines {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.table-lines span {
  height: 16px;
  background: linear-gradient(90deg, var(--line) 0 72%, transparent 72%);
}

.phone-ui {
  position: absolute;
  left: 0;
  bottom: 18px;
  width: 190px;
  min-height: 300px;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.phone-ui strong {
  color: var(--red);
  font-size: 34px;
  line-height: 1;
}

.phone-ui em {
  margin-top: 18px;
  color: var(--muted);
  font-style: normal;
}

.problem-lines {
  display: grid;
  margin: 42px 0;
  border-top: 1px solid var(--line);
}

.problem-lines strong {
  position: relative;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
  color: var(--red);
  font-size: clamp(25px, 3.4vw, 56px);
  line-height: 1.05;
  transition: color 180ms ease, transform 180ms ease;
}

.problem-lines strong::after {
  content: "→";
  position: absolute;
  right: 0;
  color: var(--ink);
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.problem-lines strong:hover {
  color: var(--ink);
  transform: translateX(10px);
}

.problem-lines strong:hover::after {
  opacity: 1;
  transform: translateX(0);
}

.text-cta {
  color: var(--red);
  font-size: 26px;
  font-weight: 850;
}

.approach {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(32px, 6vw, 80px);
  border-bottom: 1px solid var(--line);
}

.steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.steps article {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  padding: 28px;
  background: var(--paper);
  transition: background 180ms ease, transform 180ms ease;
}

.steps article::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--red);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 220ms ease;
}

.steps article:hover {
  background: var(--white);
  transform: translateY(-4px);
}

.steps article:hover::before {
  transform: scaleY(1);
}

.steps span {
  color: var(--red);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.about {
  border-bottom: 1px solid var(--line);
}

.footer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 44px;
  background: var(--ink);
  color: var(--paper);
}

.footer h2 {
  color: var(--paper);
}

.footer-contact {
  display: grid;
  gap: 10px;
  width: fit-content;
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 250, 241, 0.18);
}

.footer-contact a {
  color: var(--paper);
  font-size: clamp(20px, 2vw, 30px);
  font-weight: 800;
  line-height: 1.1;
  transition: color 180ms ease, transform 180ms ease;
}

.footer-contact a:hover {
  color: var(--red);
  transform: translateX(8px);
}

.footer nav {
  display: grid;
  gap: 14px;
  align-content: start;
  color: var(--paper-2);
}

.footer-bottom {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 250, 241, 0.18);
  color: var(--paper-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}

@keyframes word-rise {
  from {
    opacity: 0;
    transform: translateY(38px) skewY(2deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) skewY(0deg);
  }
}

@keyframes word-accent {
  0%,
  34%,
  100% {
    transform: scaleX(0);
  }
  48%,
  72% {
    transform: scaleX(1);
  }
}

@keyframes signal-pulse {
  0%,
  100% {
    background: transparent;
    transform: translateY(0);
  }
  45% {
    background: rgba(200, 16, 22, 0.13);
    transform: translateY(-4px);
  }
}

@keyframes node-travel {
  0% {
    left: 0;
    opacity: 0;
  }
  18%,
  72% {
    opacity: 1;
  }
  100% {
    left: calc(100% - 14px);
    opacity: 0;
  }
}

@keyframes marquee-shift {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-104px);
  }
}

@keyframes drift-grid {
  from {
    transform: translate3d(0, 0, 0) rotate(-8deg);
  }
  to {
    transform: translate3d(-26px, 18px, 0) rotate(-5deg);
  }
}

@keyframes hero-rule {
  0%,
  100% {
    transform: scaleX(0.42);
  }
  50% {
    transform: scaleX(1);
  }
}

@keyframes ticker-mark {
  0%,
  100% {
    transform: scaleX(0.38);
    transform-origin: left;
  }
  50% {
    transform: scaleX(1);
    transform-origin: left;
  }
}

@keyframes section-scan {
  0%,
  100% {
    transform: scaleX(0.2);
    opacity: 0.25;
  }
  50% {
    transform: scaleX(1);
    opacity: 0.75;
  }
}

@keyframes dark-grid {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-34px, 22px, 0);
  }
}

@keyframes product-frame {
  from {
    transform: translate3d(0, 0, 0) rotate(14deg);
  }
  to {
    transform: translate3d(-28px, 18px, 0) rotate(9deg);
  }
}

@media (max-width: 1200px) {
  .site-header {
    grid-template-columns: auto 1fr;
  }

  .talk-link {
    display: none;
  }

  .device-composition {
    min-height: 480px;
  }

  .signal-board {
    min-height: 210px;
  }
}

@media (max-width: 900px) {
  .site-header {
    position: static;
    grid-template-columns: 1fr;
  }

  .nav {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .hero-grid,
  .split,
  .product-band,
  .approach,
  .footer {
    grid-template-columns: 1fr;
  }

  .hero::before {
    inset: 130px -18vw auto auto;
    width: 78vw;
    height: 78vw;
  }

  .section:not(.product-band):not(.dark)::before {
    width: 48vw;
  }

  .hero-signal {
    max-width: 680px;
  }

  .hero-word-offset {
    margin-left: 0;
  }

  .hero-main {
    transform: translateY(-18px);
  }

  .section-index {
    margin-bottom: 12px;
  }

  .capability-grid,
  .steps {
    grid-template-columns: 1fr;
  }

  .capability-grid article {
    border-right: 0;
  }

  .editorial-list article,
  .feature-lines article {
    grid-template-columns: 1fr;
  }

  .desktop-ui {
    position: relative;
  }

  .phone-ui {
    left: auto;
    right: 12px;
    bottom: -26px;
  }
}

@media (max-width: 640px) {
  .hero,
  .section,
  .footer {
    padding: 54px 18px;
  }

  h1 {
    font-size: 38px;
  }

  .kinetic-title {
    gap: 8px;
  }

  .hero-word {
    padding-right: 30px;
  }

  .hero-main {
    transform: translateY(-10px);
  }

  .hero-word::before {
    top: 4px;
    font-size: 11px;
  }

  .hero-word::after {
    width: 30px;
    height: 7px;
    bottom: 8px;
  }

  h2 {
    font-size: 42px;
  }

  .hero-copy,
  .lead {
    font-size: 20px;
  }

  .metric-row {
    grid-template-columns: 1fr;
  }

  .device-composition {
    min-height: 620px;
  }

  .phone-ui {
    position: relative;
    width: 100%;
    right: auto;
    bottom: auto;
    margin-top: 24px;
  }

  .footer-bottom {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
