:root {
  color-scheme: dark;
  --bg: #0b0d10;
  --bg-2: #111314;
  --surface: rgba(247, 242, 231, 0.06);
  --surface-strong: rgba(247, 242, 231, 0.11);
  --line: rgba(247, 242, 231, 0.16);
  --text: #f7f2e7;
  --muted: rgba(247, 242, 231, 0.68);
  --faint: rgba(247, 242, 231, 0.45);
  --ink: #111314;
  --coral: #ff6b57;
  --cyan: #56d9ff;
  --green: #79d89b;
  --amber: #f4bd61;
  --violet: #b59cff;
  --max: 1180px;
  --radius: 8px;
  --font-sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-serif: Newsreader, Georgia, serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(180deg, rgba(255, 107, 87, 0.06), transparent 420px),
    linear-gradient(125deg, rgba(86, 217, 255, 0.08), transparent 560px),
    var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.5;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  background-image:
    linear-gradient(rgba(247, 242, 231, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(247, 242, 231, 0.03) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

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

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 4px;
}

#systemCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.72;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 999;
  transform: translateY(-140%);
  background: var(--text);
  color: var(--ink);
  padding: 10px 14px;
  border-radius: var(--radius);
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 14px clamp(18px, 5vw, 48px);
  background: rgba(11, 13, 16, 0.72);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(18px) saturate(160%);
  transition: border-color 180ms ease, background 180ms ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(11, 13, 16, 0.9);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--text);
  font-family: var(--font-serif);
  font-weight: 650;
}

.brand-text {
  font-weight: 800;
}

.site-nav {
  display: flex;
  justify-content: center;
  gap: 22px;
}

.site-nav a,
.nav-action {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  transition: color 160ms ease;
}

.site-nav a:hover,
.nav-action:hover {
  color: var(--text);
}

.nav-action {
  justify-self: end;
  color: var(--ink);
  background: var(--green);
  padding: 10px 14px;
  border-radius: var(--radius);
}

.hero-section {
  width: min(var(--max), calc(100% - 36px));
  min-height: 88svh;
  margin: 0 auto;
  padding: 118px 0 42px;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.05fr);
  align-items: center;
  gap: 42px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
}

.hero-copy h1 {
  margin: 0;
  max-width: 720px;
  font-family: var(--font-serif);
  font-size: 4.85rem;
  line-height: 0.94;
  font-weight: 650;
  letter-spacing: 0;
}

.hero-deck {
  max-width: 620px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: 1.18rem;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-weight: 800;
  text-decoration: none;
  transition: transform 180ms var(--ease), border-color 180ms ease, background 180ms ease;
}

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

.button-primary {
  color: var(--ink);
  background: var(--text);
  border-color: var(--text);
}

.button-secondary {
  color: var(--text);
  background: rgba(247, 242, 231, 0.05);
}

.system-console {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(247, 242, 231, 0.11), rgba(247, 242, 231, 0.045)),
    rgba(11, 13, 16, 0.72);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.34);
  overflow: hidden;
}

.console-row,
.console-metrics {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--faint);
}

.console-row strong {
  color: var(--text);
  font-weight: 600;
}

.console-stage {
  position: relative;
  min-height: 520px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(rgba(247, 242, 231, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(247, 242, 231, 0.04) 1px, transparent 1px),
    rgba(0, 0, 0, 0.18);
  background-size: 34px 34px;
  overflow: hidden;
}

.console-stage::before {
  content: "";
  position: absolute;
  inset: 12%;
  border: 1px solid rgba(86, 217, 255, 0.18);
  border-radius: 50%;
  transform: rotate(-12deg);
}

.signal-tile {
  position: absolute;
  display: grid;
  gap: 8px;
  width: 248px;
  min-height: 168px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(11, 13, 16, 0.86);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32);
}

.signal-tile span {
  font-family: var(--font-mono);
  color: var(--green);
  font-size: 0.76rem;
}

.signal-tile b {
  font-size: 0.95rem;
}

.signal-tile img {
  width: 100%;
  height: 88px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid rgba(247, 242, 231, 0.12);
}

.tile-decaf {
  left: 28px;
  top: 72px;
}

.tile-core {
  right: 32px;
  top: 138px;
}

.tile-clouseau {
  left: 112px;
  bottom: 50px;
}

.console-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  color: var(--muted);
}

.console-metrics span {
  display: grid;
  gap: 2px;
}

.console-metrics b {
  color: var(--amber);
  font-size: 1.05rem;
}

.proof-strip {
  width: min(var(--max), calc(100% - 36px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--line);
}

.proof-strip a {
  padding: 18px;
  min-height: 66px;
  background: rgba(247, 242, 231, 0.065);
  color: var(--muted);
  font-weight: 700;
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease;
}

.proof-strip a:hover {
  background: rgba(247, 242, 231, 0.11);
  color: var(--text);
}

.section-block {
  width: min(var(--max), calc(100% - 36px));
  margin: 0 auto;
  padding: 108px 0 0;
}

.section-heading {
  max-width: 760px;
}

.section-heading h2,
.contact-copy h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 3.45rem;
  line-height: 1;
  font-weight: 650;
  letter-spacing: 0;
}

.section-heading p:not(.eyebrow),
.contact-copy p:not(.eyebrow) {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.06rem;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 34px;
}

.service-card {
  padding: 22px;
  min-height: 338px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(247, 242, 231, 0.06);
}

.service-index,
.case-kicker {
  font-family: var(--font-mono);
  color: var(--amber);
  font-size: 0.78rem;
  font-weight: 600;
}

.service-card h3 {
  margin: 42px 0 12px;
  font-size: 1.32rem;
}

.service-card p,
.service-card li {
  color: var(--muted);
}

.service-card ul {
  margin: 22px 0 0;
  padding-left: 18px;
}

.work-section {
  padding-top: 120px;
}

.case-study {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(360px, 1.2fr);
  gap: 34px;
  align-items: stretch;
  margin-top: 34px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(247, 242, 231, 0.055);
}

.case-study + .case-study {
  margin-top: 24px;
}

.case-copy {
  align-self: center;
}

.case-copy h3 {
  margin: 14px 0 16px;
  font-family: var(--font-serif);
  font-size: 2.35rem;
  line-height: 1.04;
  font-weight: 650;
}

.case-copy p {
  color: var(--muted);
}

.case-facts {
  display: grid;
  gap: 14px;
  margin: 24px 0;
}

.case-facts div {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.case-facts dt {
  font-family: var(--font-mono);
  color: var(--faint);
  font-size: 0.78rem;
}

.case-facts dd {
  margin: 5px 0 0;
  color: var(--text);
}

.case-link {
  display: inline-flex;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
  transition: transform 180ms var(--ease), border-color 180ms ease;
}

.case-link:hover {
  transform: translateY(-2px);
  border-color: rgba(247, 242, 231, 0.44);
}

.case-media {
  min-height: 430px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-2);
}

.decaf-media {
  position: relative;
  display: grid;
  place-items: center;
  background:
    linear-gradient(rgba(86, 217, 255, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(86, 217, 255, 0.09) 1px, transparent 1px),
    #030609;
  background-size: 42px 42px;
}

.cycle-body {
  position: relative;
  z-index: 3;
  width: min(70%, 520px);
  filter: drop-shadow(0 0 22px rgba(86, 217, 255, 0.34));
}

.cycle-wheel {
  position: absolute;
  z-index: 4;
  width: 16%;
  max-width: 110px;
  min-width: 62px;
}

.wheel-one {
  left: 25%;
  top: 55%;
}

.wheel-two {
  right: 26%;
  top: 55%;
}

.trail {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: 0.62;
}

.trail-a {
  top: 42%;
}

.trail-b {
  top: 63%;
  background: linear-gradient(90deg, transparent, var(--coral), transparent);
}

.screenshot-media {
  position: relative;
  display: grid;
  place-items: center;
  padding: 26px;
  background: linear-gradient(145deg, #d8ded6, #0e1212);
}

.screenshot-media > img:first-child {
  width: 88%;
  height: 360px;
  object-fit: cover;
  object-position: top left;
  border-radius: var(--radius);
  border: 1px solid rgba(0, 0, 0, 0.16);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.38);
}

.phone-shot {
  position: absolute;
  right: 24px;
  bottom: 20px;
  width: 24%;
  border-radius: var(--radius);
  border: 1px solid rgba(247, 242, 231, 0.22);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.44);
}

.clouseau-media {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 18px;
  background: #020711;
}

.clouseau-media img {
  width: 100%;
  height: 390px;
  object-fit: cover;
  object-position: top center;
  border-radius: var(--radius);
  border: 1px solid rgba(86, 217, 255, 0.18);
}

.method-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 34px 0 0;
  padding: 0;
  list-style: none;
}

.method-list li {
  min-height: 260px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(247, 242, 231, 0.055);
}

.method-list span {
  display: block;
  color: var(--coral);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  margin-bottom: 44px;
}

.method-list b {
  display: block;
  font-size: 1.08rem;
}

.method-list p {
  color: var(--muted);
}

.capability-wall {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 34px;
}

.capability-wall span {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(247, 242, 231, 0.06);
  color: var(--muted);
  font-weight: 700;
}

.contact-section {
  width: min(var(--max), calc(100% - 36px));
  margin: 116px auto 0;
  padding: 52px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 107, 87, 0.18), transparent 48%),
    linear-gradient(315deg, rgba(121, 216, 155, 0.16), transparent 52%),
    rgba(247, 242, 231, 0.075);
}

.contact-actions {
  justify-content: flex-end;
}

.site-footer {
  width: min(var(--max), calc(100% - 36px));
  margin: 0 auto;
  padding: 34px 0 44px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  color: var(--faint);
  font-size: 0.9rem;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1080px) {
  .hero-section,
  .case-study,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .hero-copy h1 {
    font-size: 4rem;
  }

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

  .contact-actions {
    justify-content: flex-start;
  }
}

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

  .site-nav {
    display: none;
  }

  .nav-action {
    padding: 9px 10px;
    font-size: 0.82rem;
  }

  .hero-section {
    width: min(100% - 28px, var(--max));
    min-height: auto;
    padding-top: 104px;
  }

  .hero-copy h1 {
    font-size: 3.05rem;
    line-height: 0.98;
  }

  .hero-deck,
  .section-heading p:not(.eyebrow),
  .contact-copy p:not(.eyebrow) {
    font-size: 1rem;
  }

  .system-console {
    margin-top: 12px;
  }

  .console-stage {
    min-height: 560px;
  }

  .signal-tile {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    width: calc(100% - 28px);
    margin: 14px;
  }

  .console-stage::before {
    inset: 24%;
  }

  .console-metrics,
  .proof-strip,
  .service-grid,
  .method-list,
  .clouseau-media {
    grid-template-columns: 1fr;
  }

  .section-heading h2,
  .contact-copy h2 {
    font-size: 2.55rem;
  }

  .section-block {
    width: min(100% - 28px, var(--max));
    padding-top: 84px;
  }

  .case-study {
    padding: 16px;
    gap: 18px;
  }

  .case-copy h3 {
    font-size: 2rem;
  }

  .case-media {
    min-height: 330px;
  }

  .phone-shot {
    width: 34%;
    right: 12px;
    bottom: 12px;
  }

  .screenshot-media > img:first-child {
    width: 100%;
    height: 260px;
  }

  .clouseau-media img {
    height: 240px;
  }

  .contact-section {
    width: min(100% - 28px, var(--max));
    margin-top: 84px;
    padding: 28px;
  }

  .site-footer {
    width: min(100% - 28px, var(--max));
    flex-direction: column;
  }
}

@media (max-width: 440px) {
  .brand-text {
    display: none;
  }

  .hero-copy h1 {
    font-size: 2.5rem;
  }

  .hero-actions,
  .contact-actions {
    display: grid;
  }

  .button {
    width: 100%;
  }
}

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

  #systemCanvas {
    display: none;
  }

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