:root {
  --paper: #e0e0e0;
  --ink: #1f56d6;
  --display: "Pixelify Sans", monospace;
  --body: "IBM Plex Mono", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
img { image-rendering: pixelated; }
svg { shape-rendering: crispEdges; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }

/* ---------- nav ---------- */
.nav {
  position: fixed;
  top: 16px;
  left: 50%;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 8px 8px 14px;
  background: var(--paper);
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  transform: translate(-50%, -24px);
  opacity: 0;
  animation: nav-in .6s steps(4) .25s forwards;
}
@keyframes nav-in { to { opacity: 1; transform: translate(-50%, 0); } }

.brand {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  margin-right: 10px;
}
.brand svg { width: 16px; height: 16px; fill: currentColor; }

.links { display: flex; gap: 2px; }
.links a {
  white-space: nowrap;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 8px 12px;
  color: var(--ink);
  transition: background .15s steps(2), color .15s steps(2);
}
.links a:hover { background: var(--ink); color: var(--paper); }

.menu {
  display: none;
  width: 36px;
  height: 36px;
  position: relative;
}
.menu span {
  position: absolute;
  left: 10px;
  right: 10px;
  height: 2px;
  background: var(--ink);
  transition: transform .15s steps(2);
}
.menu span:first-child { top: 14px; }
.menu span:last-child { top: 21px; }
/* top stays fixed; the X shape comes from transform only, so this never triggers layout */
.nav.open .menu span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav.open .menu span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  font-family: var(--body);
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
  border: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform .1s steps(2), box-shadow .1s steps(2);
}
.btn:hover { transform: translate(1px, 1px); box-shadow: 2px 2px 0 var(--ink); }
.btn svg { width: 14px; height: 14px; }
.btn-dark, .btn-light { background: var(--ink); color: var(--paper); }
.btn-ghost { border: none; box-shadow: none; padding: 12px 4px; }
.btn-ghost:hover { transform: none; box-shadow: none; text-decoration: underline; }
.btn-outline { background: var(--paper); color: var(--ink); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  height: 100svh;
  min-height: 640px;
  overflow: hidden;
  display: grid;
  place-items: center;
  isolation: isolate;
  background: var(--paper);
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: -1;
  will-change: transform;
}
.hero-media .room {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 60%;
  image-rendering: pixelated;
}

.butterfly {
  position: absolute;
  left: 8vw;
  top: max(14vh, 120px);
  z-index: 1;
  width: 160px;
  height: 160px;
  perspective: 400px;
  animation: drift 14s steps(24) infinite alternate;
}
.butterfly i {
  position: absolute;
  top: 0;
  width: 50%;
  height: 100%;
  background-image: url(assets/butterfly.png);
  background-size: 200% 100%;
  image-rendering: pixelated;
  animation-duration: .9s;
  animation-timing-function: steps(3, jump-none);
  animation-iteration-count: infinite;
  animation-direction: alternate;
}
.butterfly .l { left: 0; background-position: 0 0; transform-origin: right center; animation-name: flap-l; }
.butterfly .r { right: 0; background-position: 100% 0; transform-origin: left center; animation-name: flap-r; }
@keyframes flap-l { from { transform: rotateY(0); } to { transform: rotateY(62deg); } }
@keyframes flap-r { from { transform: rotateY(0); } to { transform: rotateY(-62deg); } }
@keyframes drift { from { transform: translate(0, 0); } to { transform: translate(28px, -20px); } }

.hero-copy {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 40px 44px 44px;
  max-width: 720px;
  margin-top: -5vh;
  background: var(--paper);
  border: 2px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
  will-change: transform, opacity;
}

.titlebar {
  height: 22px;
  border-bottom: 2px solid var(--ink);
  background: repeating-linear-gradient(var(--ink) 0 2px, var(--paper) 2px 4px);
  display: flex;
  align-items: center;
  position: relative;
}
.titlebar span:first-child {
  width: 12px;
  height: 12px;
  margin-left: 8px;
  border: 2px solid var(--ink);
  background: var(--paper);
}
.titlebar span:last-child {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: var(--paper);
  padding: 0 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.hero-copy .titlebar { margin: -40px -44px 24px; }

.rv {
  opacity: 0;
  transform: translateY(14px);
  animation: rv .4s steps(4) var(--d, 0s) forwards;
}
@keyframes rv { to { opacity: 1; transform: translateY(0); } }

.badge {
  display: inline-block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink);
  margin-bottom: 22px;
}

h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.6rem, 7vw, 5.4rem);
  line-height: 1;
  letter-spacing: 0;
  text-wrap: balance;
}
h1 .w {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding: .08em .05em 0;
  margin: -.08em -.05em 0;
}
h1 .w span {
  display: inline-block;
  transform: translateY(115%);
  animation: rise .5s steps(5) var(--d, 0s) forwards;
}
@keyframes rise { to { transform: translateY(0); } }

.lede {
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  font-weight: 500;
  color: var(--ink);
  max-width: 36ch;
  margin: 22px auto 30px;
}
.cta {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.scroll-cue {
  position: absolute;
  bottom: 28px;
  left: 50%;
  z-index: 1;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--ink);
  padding: 8px 14px;
  transform: translateX(-50%) translateY(14px);
  animation-name: rv-cue;
  /* this transition drives the scroll-linked show/hide, not the entrance;
     kept smooth so it doesn't strobe as the user scrolls past it */
  transition: opacity .3s ease;
}
@keyframes rv-cue { to { opacity: 1; transform: translateX(-50%) translateY(0); } }
.scroll-cue span { display: inline-block; animation: bob 1.2s steps(2) infinite; }
@keyframes bob { 50% { transform: translateY(3px); } }
.scroll-cue.gone { opacity: 0; pointer-events: none; }

/* ---------- sections ---------- */
.section { padding: 128px 24px; }
.section-alt { background: var(--paper); position: relative; }
.section-alt::before, .section-alt::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 12px;
  background: repeating-conic-gradient(var(--ink) 0 25%, var(--paper) 0 50%) 0 0 / 4px 4px;
}
.section-alt::before { top: 0; }
.section-alt::after { bottom: 0; }
.wrap { max-width: 1120px; margin: 0 auto; }

.eyebrow {
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink);
  font-weight: 500;
  margin-bottom: 18px;
}
h2 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2rem, 4vw, 3.1rem);
  letter-spacing: 0;
  line-height: 1.04;
}
.sub { color: var(--ink); margin-top: 20px; max-width: 40ch; font-size: 1.05rem; }

.split {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 64px;
  align-items: start;
}
.split-head { position: sticky; top: 120px; }

.feature-list { border-top: 2px solid var(--ink); }
.feature {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 20px;
  padding: 30px 0;
  border-bottom: 2px solid var(--ink);
}
.feature svg {
  width: 28px;
  height: 28px;
  stroke: var(--ink);
  fill: none;
  stroke-width: 2;
  margin-top: 2px;
}
.feature h3 { font-size: 18px; font-weight: 600; margin-bottom: 6px; }
.feature p { color: var(--ink); max-width: 50ch; }

.center-head { text-align: center; max-width: 620px; margin: 0 auto 56px; }

.cases { border-top: 2px solid var(--ink); }
.cases li {
  display: grid;
  grid-template-columns: 56px 1.1fr 2fr 32px;
  align-items: baseline;
  gap: 24px;
  padding: 26px 8px;
  border-bottom: 2px solid var(--ink);
  transition: background .15s steps(3), color .15s steps(3);
  cursor: default;
}
.cases li:hover { background: var(--ink); color: var(--paper); }
/* nudge the text right on hover instead of the row itself, so the row's own
   border-bottom stays put and doesn't shift out of line with its neighbors */
.cases .n, .cases .t, .cases .d { transition: transform .15s steps(3); }
.cases li:hover .n, .cases li:hover .t, .cases li:hover .d { transform: translateX(8px); }
.cases .n { font-size: 12px; color: inherit; letter-spacing: .08em; }
.cases .t { font-family: var(--display); font-size: 1.5rem; font-weight: 500; letter-spacing: 0; }
.cases .d { color: inherit; }
.cases .a { color: inherit; opacity: 0; transform: translateX(-6px); transition: opacity .15s steps(3), transform .15s steps(3); }
.cases li:hover .a { opacity: 1; transform: none; }

.tiers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 820px;
  margin: 0 auto;
}
.tier {
  border: 2px solid var(--ink);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--paper);
  box-shadow: 4px 4px 0 var(--ink);
}
.tier { position: relative; padding-top: 54px; }
.tier .titlebar { position: absolute; top: 0; left: 0; right: 0; }
.tier h3 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.price { font-family: var(--display); font-size: 2.6rem; font-weight: 500; letter-spacing: 0; line-height: 1; margin-top: 4px; }
.price span { font-family: var(--body); font-size: 14px; letter-spacing: 0; color: var(--ink); font-weight: 400; }
.tier-sub { color: var(--ink); margin-bottom: 12px; }
.tier ul { border-top: 2px solid var(--ink); padding-top: 16px; margin-bottom: 24px; display: grid; gap: 8px; font-size: 15px; }
.tier ul li { padding-left: 18px; position: relative; }
.tier ul li::before { content: ""; position: absolute; left: 0; top: 6px; width: 6px; height: 6px; background: var(--ink); }
.tier .btn { margin-top: auto; justify-content: center; }

.footer { border-top: 2px solid var(--ink); padding: 40px 24px; }
.footer-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 20px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink); }
.footer-links a:hover { text-decoration: underline; }
.copy { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink); }

/* ---------- scroll reveal ---------- */
/* opacity fades smoothly so the reveal reads as an appearance, not a strobe;
   the transform keeps a slight stepped snap for the pixel-aesthetic feel */
[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .5s ease-out var(--d, 0s), transform .3s steps(3) var(--d, 0s);
}
[data-reveal].in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; gap: 40px; }
  .split-head { position: static; }
  .cases li { grid-template-columns: 40px 1fr 24px; }
  .cases .d { grid-column: 2; }
  .cases .a { grid-column: 3; grid-row: 1; }
  .tiers { grid-template-columns: 1fr; }
  .section { padding: 96px 20px; }
}
@media (max-width: 680px) {
  .nav { left: 16px; right: 16px; transform: translate(0, -24px); padding-left: 12px; }
  @keyframes nav-in { to { opacity: 1; transform: translate(0, 0); } }
  .brand { margin-right: auto; }
  .links {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--paper);
    border: 2px solid var(--ink);
    box-shadow: 4px 4px 0 var(--ink);
    padding: 8px;
  }
  .links a { font-size: 13px; padding: 12px 14px; }
  .nav.open .links { display: flex; }
  .menu { display: block; }
  .hero-media .room { object-position: 50% 65%; }
  .butterfly { width: 96px; height: 96px; left: 5vw; top: 104px; z-index: 0; }
  .hero-copy { margin-top: -8vh; max-width: 90vw; }
  .butterfly { left: 4vw; top: 10vh; width: 120px; height: 120px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .nav, .rv, h1 .w span, .scroll-cue { animation: none; opacity: 1; transform: none; }
  .nav { transform: translateX(-50%); }
  .scroll-cue { transform: translateX(-50%); }
  .butterfly, .butterfly i, .scroll-cue span { animation: none; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .hero-media, .hero-copy { will-change: auto; }
}
