:root {
  --paper: #f8f3e7;
  --ink: #18221a;
  --acid: #d8ff3e;
  --rose: #ff8e9e;
  --sun: #ffd65a;
  --sky: #85c7ff;
  --mint: #9ce6b2;
  --purple: #7357ff;
  --mono: "DM Mono", monospace;
  --sans: "Manrope", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
}

button,
a {
  font: inherit;
}

.noise {
  position: fixed;
  inset: 0;
  z-index: 20;
  opacity: 0.035;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

.site-header,
.hero,
.recipe,
.terminal-section,
.closing,
footer {
  width: min(1240px, calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(24, 34, 26, 0.24);
}

.brand {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  color: inherit;
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.13em;
}

.brand-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--acid);
  font-size: 1.35rem;
}

.live-pill {
  display: flex;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--ink);
  border-radius: 999px;
  padding: 8px 13px;
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
}

.live-pill i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2db74d;
  box-shadow: 0 0 0 0 rgba(45, 183, 77, 0.45);
  animation: ping 2s infinite;
}

.hero {
  min-height: 740px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(380px, 0.92fr);
  align-items: center;
  gap: clamp(50px, 7vw, 110px);
  padding-block: 66px 80px;
}

.eyebrow {
  margin: 0 0 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.eyebrow span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  letter-spacing: 0;
}

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

h1 {
  margin-bottom: 30px;
  font-size: clamp(3.7rem, 7.4vw, 7.2rem);
  line-height: 0.93;
  letter-spacing: -0.075em;
  font-weight: 800;
}

h1 em,
.closing h2 em {
  position: relative;
  z-index: 0;
  font-weight: 400;
  font-style: italic;
  font-family: Georgia, serif;
  letter-spacing: -0.06em;
}

h1 em::after,
.closing h2 em::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: -3%;
  right: -4%;
  bottom: 6%;
  height: 21%;
  background: var(--acid);
  transform: rotate(-1.5deg);
}

.lede {
  max-width: 630px;
  margin-bottom: 36px;
  color: #3f493f;
  font-size: clamp(1.05rem, 1.45vw, 1.28rem);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 22px;
}

.magic-button {
  min-width: 205px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 17px 20px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: var(--ink);
  box-shadow: 5px 5px 0 var(--purple);
  color: #fff;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.magic-button:hover {
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 var(--purple);
}

.magic-button:active {
  transform: translate(3px, 3px);
  box-shadow: 2px 2px 0 var(--purple);
}

.tiny-note {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: #626b63;
}

.portrait-stage {
  position: relative;
  min-height: 585px;
  display: grid;
  place-items: center;
  perspective: 1000px;
}

.portrait-stage::before {
  content: "";
  position: absolute;
  width: 82%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--sun);
  box-shadow: inset 0 0 0 1px var(--ink);
}

.orbit {
  position: absolute;
  border: 1px solid rgba(24, 34, 26, 0.42);
  border-radius: 50%;
  pointer-events: none;
}

.orbit::before {
  content: "";
  position: absolute;
  top: 48%;
  left: -5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--purple);
}

.orbit-one {
  width: 103%;
  aspect-ratio: 1;
  animation: orbit-spin 12s linear infinite;
}

.orbit-two {
  width: 92%;
  aspect-ratio: 1;
  transform: rotate(65deg);
  animation: orbit-spin-reverse 16s linear infinite;
}

.polaroid {
  position: relative;
  z-index: 3;
  width: min(370px, 73%);
  margin: 0;
  padding: 14px 14px 20px;
  background: #fffdf7;
  border: 1px solid var(--ink);
  box-shadow: 13px 16px 0 rgba(24, 34, 26, 0.14);
  transform: rotate(3deg);
  transition: transform 120ms ease-out;
  will-change: transform;
}

.photo-wrap {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #ddd;
}

.photo-wrap img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.status-tag {
  position: absolute;
  right: 9px;
  bottom: 10px;
  padding: 7px 9px;
  border: 1px solid var(--ink);
  border-radius: 99px;
  background: var(--acid);
  font-family: var(--mono);
  font-size: 0.56rem;
  text-transform: uppercase;
}

.polaroid figcaption {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 17px 5px 0;
  font-family: var(--mono);
  font-size: 0.62rem;
}

.polaroid figcaption strong {
  text-align: right;
  font-weight: 500;
}

.sticker {
  position: absolute;
  z-index: 5;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  font-family: var(--mono);
  font-weight: 500;
}

.sticker-code {
  top: 10%;
  left: 1%;
  width: 75px;
  height: 75px;
  border-radius: 50%;
  background: var(--sky);
  font-size: 1.3rem;
  animation: bob 4.5s ease-in-out infinite;
}

.sticker-ssh {
  right: -1%;
  top: 21%;
  padding: 12px 15px;
  background: var(--mint);
  transform: rotate(8deg);
  animation: bob 5.5s ease-in-out -1s infinite;
}

.sticker-ship {
  right: 0;
  bottom: 9%;
  width: 94px;
  height: 54px;
  background: var(--rose);
  transform: rotate(-8deg);
  animation: bob 5s ease-in-out -2.5s infinite;
}

.ticker {
  overflow: hidden;
  border-block: 1px solid var(--ink);
  background: var(--acid);
}

.ticker-track {
  width: max-content;
  display: flex;
  align-items: center;
  gap: 42px;
  padding: 18px 0;
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.17em;
  animation: ticker 25s linear infinite;
}

.ticker-track b {
  font-size: 1.2rem;
}

.recipe {
  padding-block: 120px 135px;
}

.section-intro {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  align-items: start;
  margin-bottom: 62px;
}

.section-intro h2,
.terminal-copy h2,
.closing h2 {
  margin: 0;
  font-size: clamp(2.8rem, 5vw, 5.2rem);
  line-height: 0.98;
  letter-spacing: -0.065em;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.step-card {
  position: relative;
  min-height: 350px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--ink);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.step-card:hover {
  z-index: 2;
  transform: translateY(-10px) rotate(-1deg);
  box-shadow: 8px 10px 0 var(--ink);
}

.step-card.rose { background: var(--rose); }
.step-card.yellow { background: var(--sun); }
.step-card.blue { background: var(--sky); }
.step-card.green { background: var(--mint); }

.step-number {
  align-self: flex-end;
  font-family: var(--mono);
  font-size: 0.65rem;
}

.step-icon {
  margin: auto 0 24px;
  font-size: 2.35rem;
}

.step-card h3 {
  margin-bottom: 12px;
  font-size: 1.25rem;
  letter-spacing: -0.035em;
}

.step-card p {
  margin-bottom: 0;
  font-size: 0.88rem;
  line-height: 1.6;
}

.terminal-section {
  position: relative;
  width: 100%;
  max-width: none;
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(540px, 1.2fr);
  gap: clamp(50px, 8vw, 130px);
  align-items: center;
  padding: 120px max(24px, calc((100vw - 1240px) / 2));
  overflow: hidden;
  background: var(--ink);
  color: #f9f5e9;
}

.terminal-section::before {
  content: "01001011 100101";
  position: absolute;
  left: -20px;
  bottom: -28px;
  color: rgba(255, 255, 255, 0.035);
  font-family: var(--mono);
  font-size: 7rem;
  white-space: nowrap;
}

.eyebrow.light {
  color: var(--acid);
}

.terminal-copy p:last-child {
  max-width: 560px;
  margin: 28px 0 0;
  color: #b8c1b9;
  line-height: 1.75;
}

.terminal {
  position: relative;
  z-index: 1;
  min-height: 365px;
  border: 1px solid #738077;
  border-radius: 10px;
  background: #101711;
  box-shadow: 22px 25px 0 var(--purple);
  overflow: hidden;
}

.terminal-bar {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid #4d5950;
  background: #243027;
  color: #aab2ab;
  font-family: var(--mono);
  font-size: 0.65rem;
}

.terminal-dots {
  position: absolute;
  left: 16px;
  display: flex;
  gap: 7px;
}

.terminal-dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--rose);
}

.terminal-dots i:nth-child(2) { background: var(--sun); }
.terminal-dots i:nth-child(3) { background: var(--mint); }

.terminal-body {
  padding: 32px;
  font-family: var(--mono);
  font-size: clamp(0.72rem, 1.1vw, 0.9rem);
  line-height: 1.8;
}

.prompt { color: var(--acid); }
.cursor {
  display: inline-block;
  width: 8px;
  height: 1.05em;
  margin-left: 4px;
  vertical-align: -0.16em;
  background: var(--acid);
  animation: blink 0.9s steps(1) infinite;
}

.terminal-output {
  opacity: 0;
  transform: translateY(8px);
  transition: 400ms ease;
}

.terminal-output.visible {
  opacity: 1;
  transform: none;
}

.terminal-output p { margin-bottom: 4px; color: #bec7bf; }
.terminal-output .ok { color: var(--mint); }
.terminal-output .final-line { margin-top: 20px; color: #fff; }
.terminal-output strong { color: var(--sun); }

.closing {
  padding-block: 140px;
  text-align: center;
}

.closing .eyebrow {
  justify-content: center;
}

.closing h2 {
  margin-bottom: 28px;
}

.closing > p:not(.eyebrow) {
  color: #586258;
  font-size: 1.1rem;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 28px;
  margin-top: 20px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--ink);
  color: var(--ink);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.82rem;
}

.text-link span {
  transition: transform 180ms ease;
}

.text-link:hover span {
  transform: translateY(-4px);
}

footer {
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(24, 34, 26, 0.25);
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.1em;
}

.toast {
  position: fixed;
  z-index: 50;
  left: 50%;
  bottom: 26px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 18px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: var(--acid);
  box-shadow: 5px 5px 0 var(--ink);
  font-family: var(--mono);
  font-size: 0.72rem;
  transform: translate(-50%, 120px);
  transition: transform 350ms cubic-bezier(0.2, 0.9, 0.2, 1.2);
}

.toast.show {
  transform: translate(-50%, 0);
}

.confetti {
  position: fixed;
  z-index: 40;
  width: 10px;
  height: 16px;
  top: -30px;
  pointer-events: none;
  animation: confetti-fall var(--duration) cubic-bezier(0.2, 0.7, 0.35, 1) forwards;
}

@keyframes ping {
  70% { box-shadow: 0 0 0 7px rgba(45, 183, 77, 0); }
  100% { box-shadow: 0 0 0 0 rgba(45, 183, 77, 0); }
}

@keyframes bob {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -12px; }
}

@keyframes orbit-spin {
  to { transform: rotate(360deg); }
}

@keyframes orbit-spin-reverse {
  from { transform: rotate(65deg); }
  to { transform: rotate(-295deg); }
}

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

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

@keyframes confetti-fall {
  to {
    transform: translate3d(var(--drift), 110vh, 0) rotate(var(--spin));
  }
}

@media (max-width: 1000px) {
  .hero {
    grid-template-columns: 1fr 0.8fr;
    gap: 28px;
  }

  .portrait-stage {
    min-height: 520px;
  }

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

  .step-card {
    min-height: 310px;
  }

  .terminal-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .site-header,
  .hero,
  .recipe,
  .closing,
  footer {
    width: min(100% - 30px, 620px);
  }

  .site-header {
    min-height: 74px;
  }

  .live-pill {
    padding: 7px 10px;
    font-size: 0;
  }

  .live-pill::after {
    content: "LIVE";
    font-size: 0.64rem;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding-block: 54px 70px;
  }

  h1 {
    font-size: clamp(3.25rem, 16.5vw, 5.1rem);
  }

  .lede {
    line-height: 1.55;
  }

  .portrait-stage {
    min-height: 530px;
    margin-top: 26px;
  }

  .portrait-stage::before { width: 76%; }
  .orbit-one { width: 94%; }
  .orbit-two { width: 84%; }
  .polaroid { width: min(340px, 72%); }

  .section-intro {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .recipe {
    padding-block: 90px;
  }

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

  .step-card {
    min-height: 260px;
  }

  .terminal-section {
    padding-block: 90px;
    padding-inline: 15px;
  }

  .terminal-copy,
  .terminal {
    width: min(100%, 620px);
    margin-inline: auto;
  }

  .terminal {
    min-height: 330px;
    box-shadow: 9px 11px 0 var(--purple);
  }

  .terminal-body {
    padding: 24px 18px;
  }

  .closing {
    padding-block: 100px;
  }

  footer {
    min-height: 110px;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    text-align: center;
  }
}

@media (max-width: 430px) {
  .hero-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .magic-button {
    width: 100%;
  }

  .portrait-stage {
    min-height: 450px;
  }

  .sticker-code {
    width: 58px;
    height: 58px;
  }

  .sticker-ssh { right: 0; }
  .sticker-ship { width: 78px; }
}

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