:root {
  --paper: #f4ecdd;
  --paper-2: #fff9ee;
  --ink: #121212;
  --muted: #4b3d35;
  --mars: #b3221b;
  --mars-dark: #7f1711;
  --line: #1c1b18;
  --sand: #e5d4bd;
  --card: rgba(255, 249, 238, 0.9);
  --shadow: 0 18px 42px rgba(52, 28, 16, 0.14);
  --radius: 12px;
  --max-content: 1280px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #fff9ec 0%, var(--paper) 18%, var(--paper) 100%);
  font-family: "Courier New", Courier, monospace;
  overflow-x: hidden;
  line-height: 1.4;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; image-rendering: auto; }
main { overflow: hidden; }

.topbar {
  position: fixed;
  z-index: 50;
  inset: 0 0 auto 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 34px;
  padding: 22px clamp(18px, 4vw, 52px) 14px;
  background: linear-gradient(180deg, rgba(255, 248, 234, 0.96) 0%, rgba(255, 248, 234, 0.85) 72%, rgba(255, 248, 234, 0) 100%);
  backdrop-filter: blur(6px);
}

.brand {
  display: grid;
  gap: 4px;
  text-transform: uppercase;
  flex: 0 0 auto;
}
.brand-name {
  font-family: Impact, Haettenschweiler, "Arial Black", sans-serif;
  font-size: clamp(34px, 3.6vw, 56px);
  line-height: .8;
  letter-spacing: .07em;
}
.brand-subtitle {
  color: var(--mars);
  font-weight: 900;
  font-size: clamp(12px, 1.15vw, 18px);
  letter-spacing: .08em;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(10px, 2vw, 26px);
  flex-wrap: wrap;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: clamp(12px, 1vw, 18px);
}
.nav-links a:not(.nav-icon) {
  padding-top: 6px;
  transition: color .16s ease;
}
.nav-links a:not(.nav-icon):hover { color: var(--mars); }
.nav-icon {
  display: grid;
  place-items: center;
  width: clamp(30px, 2.8vw, 42px);
  height: clamp(30px, 2.8vw, 42px);
  transition: transform .16s ease;
}
.nav-icon:hover { transform: translateY(-2px); }
.nav-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.hero {
  position: relative;
  min-height: 760px;
  padding: 132px clamp(20px, 4vw, 56px) 90px;
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 76% 22%, rgba(255,255,255,.68) 0 18%, transparent 42%), linear-gradient(180deg, #fff8ea 0%, #f1e1ca 100%);
  z-index: -4;
}
.hero-copy {
  position: relative;
  z-index: 5;
  width: min(520px, 44vw);
}
.eyebrow {
  margin: 0 0 18px;
  color: var(--mars);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}
h1 {
  margin: 0;
  font-family: Impact, Haettenschweiler, "Arial Black", sans-serif;
  font-size: clamp(64px, 10vw, 148px);
  line-height: .86;
  letter-spacing: .045em;
  text-transform: uppercase;
}
h1 span { color: var(--mars); }
.lead {
  max-width: 430px;
  margin: 28px 0 28px;
  font-size: clamp(16px, 1.35vw, 22px);
  line-height: 1.45;
  font-weight: 700;
}
.cta {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  border: 2px solid var(--mars-dark);
  border-radius: 8px;
  background: var(--mars);
  color: #fff6eb;
  padding: 18px 28px;
  font-size: clamp(17px, 1.45vw, 22px);
  font-weight: 900;
  text-transform: uppercase;
  box-shadow: 8px 8px 0 var(--line);
  transition: transform .18s ease, box-shadow .18s ease;
}
.cta:hover { transform: translate(4px, 4px); box-shadow: 4px 4px 0 var(--line); }

.hero-mountains {
  position: absolute;
  z-index: -2;
  right: -2vw;
  bottom: 180px;
  width: min(56vw, 780px);
  opacity: .94;
}
.hero-ground {
  position: absolute;
  z-index: -1;
  left: -4vw;
  right: -4vw;
  bottom: -18px;
  width: 108vw;
  max-width: none;
}
.hero-rover {
  position: absolute;
  z-index: 2;
  right: 21vw;
  bottom: 112px;
  width: min(49vw, 690px);
  filter: drop-shadow(0 18px 12px rgba(38, 22, 15, .18));
}
.hero-stars {
  position: absolute;
  z-index: -1;
  right: 5vw;
  top: 300px;
  width: 120px;
  opacity: .65;
}
.hero-sheep { position: absolute; z-index: 4; }
.hero-sheep.jet { right: 45vw; top: 150px; width: clamp(112px, 9vw, 150px); transform: rotate(-4deg); }
.hero-sheep.laptop { right: 13vw; bottom: 108px; width: clamp(120px, 10vw, 160px); }
.hero-sheep.box { right: 2.6vw; bottom: 138px; width: clamp(132px, 11vw, 172px); }
.speech { position: absolute; z-index: 5; right: 14vw; top: 120px; width: clamp(220px, 18vw, 300px); }

.pipeline, .open, .cards {
  padding-inline: clamp(20px, 4vw, 56px);
}
.pipeline {
  position: relative;
  padding-top: 28px;
  padding-bottom: 18px;
  background: var(--paper);
}
.section-rule {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 28px;
  max-width: var(--max-content);
  margin: 0 auto 8px;
}
.section-rule span { height: 2px; background: var(--line); opacity: .75; }
.section-rule h2 {
  margin: 0;
  font-family: Impact, Haettenschweiler, "Arial Black", sans-serif;
  font-size: clamp(26px, 3.2vw, 44px);
  letter-spacing: .16em;
  text-transform: uppercase;
  white-space: nowrap;
  text-align: center;
}
.steps {
  max-width: var(--max-content);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1.15fr;
  align-items: center;
  gap: clamp(10px, 2vw, 30px);
}
.step { text-align: center; }
.step img { height: 168px; width: 100%; object-fit: contain; object-position: center center; margin: 0 auto 10px; }
.step:last-child img { height: 172px; }
.step h3 {
  margin: 0 0 6px;
  color: var(--mars);
  font-family: Impact, Haettenschweiler, "Arial Black", sans-serif;
  font-size: 28px;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.step p { margin: 0 auto; max-width: 185px; line-height: 1.32; font-weight: 700; }
.arrow { font-size: 42px; line-height: 1; transform: translateY(-28px); }

.open { padding-top: 12px; padding-bottom: 14px; }
.open-card {
  max-width: var(--max-content);
  margin: 0 auto;
  min-height: 236px;
  display: grid;
  grid-template-columns: minmax(500px, 620px) 1fr auto;
  align-items: center;
  gap: 34px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  padding: 20px 32px 20px 24px;
}
.open-art { height: 206px; width: 100%; object-fit: contain; object-position: center center; overflow: visible; }
.open h2 {
  margin: 0 0 10px;
  font-family: Impact, Haettenschweiler, "Arial Black", sans-serif;
  font-size: clamp(30px, 3vw, 46px);
  letter-spacing: .13em;
  text-transform: uppercase;
}
.open p { margin: 0; font-size: 18px; font-weight: 800; line-height: 1.45; }
.github-badge {
  display: grid;
  place-items: center;
  gap: 10px;
  min-width: 156px;
  font-weight: 900;
  text-transform: uppercase;
}
.github-badge img { width: 108px; height: 108px; object-fit: contain; object-position: center; }

.cards {
  padding-top: 10px;
  padding-bottom: 54px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  max-width: calc(var(--max-content) + 80px);
  margin: 0 auto;
}
.resource-card {
  min-height: 128px;
  display: grid;
  grid-template-columns: 88px 1fr;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  box-shadow: 0 8px 18px rgba(0,0,0,.05);
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}
.resource-card:hover {
  transform: translateY(-4px);
  background: #fff6e8;
  box-shadow: 0 12px 24px rgba(0,0,0,.09);
}
.resource-card img {
  width: 92px;
  height: 78px;
  object-fit: contain;
  justify-self: center;
}
.resource-card h3 {
  margin: 0 0 5px;
  font-family: Impact, Haettenschweiler, "Arial Black", sans-serif;
  font-size: 22px;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.resource-card p { margin: 0 0 8px; font-size: 13px; line-height: 1.3; font-weight: 800; }
.resource-card span { color: var(--mars); font-size: 24px; font-weight: 900; }

.footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 2px solid var(--line);
  padding: 18px clamp(20px, 4vw, 56px);
  background: var(--ink);
  color: var(--paper);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}

@media (max-width: 1200px) {
  .hero-copy { width: min(520px, 52vw); }
  .hero-rover { right: 12vw; width: min(58vw, 620px); }
  .hero-mountains { width: 64vw; right: -4vw; }
  .hero-sheep.jet { right: 52vw; }
  .speech { right: 5vw; }
  .open-card { grid-template-columns: 420px 1fr auto; }
}

@media (max-width: 1024px) {
  .hero {
    min-height: 880px;
    padding-top: 148px;
    padding-bottom: 80px;
  }
  .hero-copy { width: min(590px, 72vw); }
  .hero-rover { right: 6vw; bottom: 132px; width: min(76vw, 640px); }
  .hero-mountains { width: 78vw; bottom: 225px; }
  .hero-sheep.jet { right: 54vw; top: 320px; }
  .speech { top: 228px; right: 5vw; }
  .hero-sheep.laptop, .hero-sheep.box { display: none; }
  .steps { grid-template-columns: repeat(4, 1fr); gap: 20px; }
  .arrow { display: none; }
  .open-card { grid-template-columns: 360px 1fr; }
  .github-badge { grid-column: 1 / -1; display: flex; justify-content: center; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .topbar {
    position: sticky;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 14px;
    padding: 16px 18px 12px;
  }
  .brand-name { font-size: 34px; }
  .brand-subtitle { font-size: 12px; }
  .nav-links {
    width: 100%;
    justify-content: flex-start;
    gap: 10px 16px;
  }
  .nav-links a:not(.nav-icon) { font-size: 12px; padding-top: 0; }
  .nav-icon { width: 28px; height: 28px; }

  .hero {
    min-height: 840px;
    padding: 28px 18px 64px;
  }
  .hero-copy { width: 100%; max-width: 390px; }
  h1 { font-size: clamp(54px, 18vw, 82px); }
  .lead { font-size: 15px; max-width: 320px; margin-top: 22px; }
  .cta { padding: 16px 20px; font-size: 17px; box-shadow: 5px 5px 0 var(--line); }

  .hero-rover { width: 96vw; right: -7vw; bottom: 116px; }
  .hero-mountains { width: 112vw; right: -34vw; bottom: 230px; }
  .hero-ground { width: 180vw; left: -40vw; }
  .hero-sheep.jet, .speech, .hero-stars { display: none; }

  .section-rule { grid-template-columns: 1fr; gap: 10px; }
  .section-rule span { display: none; }
  .section-rule h2 {
    white-space: normal;
    font-size: 30px;
    line-height: 1.05;
  }
  .steps { grid-template-columns: 1fr 1fr; gap: 20px 14px; }
  .step img { height: 132px; }
  .step:last-child img { height: 138px; }
  .step h3 { font-size: 23px; }
  .step p { font-size: 13px; }

  .open-card {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 18px;
  }
  .open-art { height: 168px; }
  .open h2 { font-size: 28px; }
  .open p { font-size: 15px; }

  .cards {
    grid-template-columns: 1fr;
    padding-inline: 18px;
  }
  .footer {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero {
    min-height: 760px;
    padding-bottom: 56px;
  }
  .hero-rover { bottom: 96px; }
  .hero-mountains { bottom: 190px; }
  .resource-card {
    grid-template-columns: 72px 1fr;
    gap: 14px;
    min-height: 104px;
    padding: 14px;
  }
  .resource-card img { width: 72px; height: 66px; }
  .resource-card h3 { font-size: 20px; }
}
