/* Momentum Mascot landing page */

:root {
  --bg: #11111a;
  --panel: #191924;
  --panel-2: #232333;
  --text: #f4f4f8;
  --muted: #b0a8b8;
  --accent: #ff7eb3;
  --accent-2: #7af0d6;
  --awake: #7ab8ff;
  --dozing: #a8a0ff;
  --asleep: #8878c8;
  --comeback: #ffd700;
  --border: #3a3040;
  --radius: 8px;
  --font: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --font-pixel: "Press Start 2P", var(--font);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.008) 0px,
    rgba(255, 255, 255, 0.008) 1px,
    transparent 1px,
    transparent 4px
  );
  pointer-events: none;
  z-index: 9999;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1, h2 {
  font-family: var(--font-pixel);
  letter-spacing: 0.5px;
}

h1 {
  font-size: clamp(1.15rem, 2.8vw, 1.6rem);
  line-height: 1.5;
}

h2 {
  font-size: 1.1rem;
  line-height: 1.8;
}

.wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */

header.wrap {
  padding-top: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-links {
  display: flex;
  gap: 20px;
  align-items: center;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.85rem;
}

.nav-links a:hover {
  color: var(--text);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-pixel);
  color: var(--text);
  font-size: 0.95rem;
}

.logo img {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  image-rendering: pixelated;
}

/* Hero */

.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  padding: 48px 24px;
}

.hero-text h1 {
  margin: 0 0 14px;
  color: var(--text);
}

.lead {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0 0 14px;
}

.tagline {
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 700;
  margin: 0 0 22px;
}

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.btn {
  display: inline-block;
  padding: 12px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font-weight: 600;
  transition: transform 0.05s, background 0.15s;
}

.btn:hover {
  text-decoration: none;
  background: var(--panel-2);
}

.btn.primary {
  background: var(--accent);
  color: #111;
  border-color: var(--accent);
}

.btn.primary:hover {
  filter: brightness(1.1);
}

.meta {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0;
}

/* Visual placeholders */

.hero-visual,
.feature-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.hero-visual {
  position: relative;
}

.hero-room::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.06) 0px,
    rgba(0, 0, 0, 0.06) 1px,
    transparent 1px,
    transparent 3px
  );
  pointer-events: none;
  border-radius: var(--radius);
  z-index: 1;
}

.hero-room {
  position: relative;
  width: 420px;
  max-width: 100%;
  aspect-ratio: 480 / 336;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  image-rendering: pixelated;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  background-repeat: no-repeat;
  /* 12 frames of the 160x112 room, tripled: a 5760x336 strip stepped one room at a time. */
  --strip: 5760px;
  background-size: var(--strip) 336px;
  animation: room-strip 2s steps(12) infinite;
}

.hero-room[data-mood="awake"] {
  background-image: url("/assets/rooms/20/awake.png");
  animation-duration: 2s;
}
.hero-room[data-mood="dozing"] {
  background-image: url("/assets/rooms/20/dozing.png");
  animation-duration: 4s;
}
.hero-room[data-mood="asleep"] {
  background-image: url("/assets/rooms/20/asleep.png");
  animation-duration: 6s;
}
.hero-room[data-mood="comeback"] {
  background-image: url("/assets/rooms/20/comeback.png");
  animation-duration: 1.5s;
}

@keyframes room-strip {
  from {
    background-position: 0 0;
  }
  to {
    background-position: calc(var(--strip) * -1) 0;
  }
}

.hero-state {
  color: var(--muted);
  font-size: 0.75rem;
  margin: 0;
  min-height: 1.2em;
}

@keyframes flicker {
  0%, 90%, 100% { opacity: 1; }
  92% { opacity: 0.7; }
  94% { opacity: 0.3; }
  96% { opacity: 0.9; }
}

@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 12px var(--awake); }
  50% { box-shadow: 0 0 20px var(--awake), 0 0 4px var(--awake); }
}

.install.noise {
  position: relative;
}

.install.noise::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(180, 170, 150, 0.025);
  border-radius: var(--radius);
  pointer-events: none;
}

.feature-media {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  image-rendering: pixelated;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.pet-media {
  width: 128px;
  height: 128px;
  max-width: 128px;
}

.share-card {
  width: 360px;
  max-width: 100%;
  aspect-ratio: 600 / 315;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  image-rendering: pixelated;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}

.share-card[data-mood="awake"] {
  background-image: url("/assets/share/awake.png");
}
.share-card[data-mood="dozing"] {
  background-image: url("/assets/share/dozing.png");
}
.share-card[data-mood="asleep"] {
  background-image: url("/assets/share/asleep.png");
}
.share-card[data-mood="comeback"] {
  background-image: url("/assets/share/comeback.png");
}

.share-state {
  color: var(--muted);
  font-size: 0.75rem;
  margin: 0;
  min-height: 1.2em;
}

.built-room {
  width: 360px;
  max-width: 100%;
  aspect-ratio: 480 / 336;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  image-rendering: pixelated;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  background-repeat: no-repeat;
  /* Whole frames rather than the hero's crop: 12 of them at the rendered width. */
  --strip: 4320px;
  background-size: var(--strip) 252px;
  animation: room-strip 2s steps(12) infinite;
}

.built-room[data-who="01"] {
  background-image: url("/assets/built/01.png");
}
.built-room[data-who="02"] {
  background-image: url("/assets/built/02.png");
}
.built-room[data-who="03"] {
  background-image: url("/assets/built/03.png");
}
.built-room[data-who="04"] {
  background-image: url("/assets/built/04.png");
}

.op-badge {
  display: inline-block;
  padding: 8px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.caption {
  color: var(--muted);
  font-size: 0.75rem;
  margin: 0;
}

/* States */

.states,
.install,
.privacy,
.about {
  padding: 64px 24px;
  border-top: 1px solid var(--border);
}

.states h2,
.install h2,
.privacy h2,
.about h2,
.features h2 {
  margin: 0 0 12px;
}

.subhead {
  color: var(--muted);
  margin: 0 0 36px;
}

.grid {
  display: grid;
  gap: 20px;
}

.grid.four {
  grid-template-columns: repeat(4, 1fr);
}

article {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

article h3 {
  margin: 12px 0 8px;
  font-size: 1rem;
}

article p {
  color: var(--muted);
  margin: 0;
  font-size: 0.9rem;
}

.state-dot {
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
}

.state-dot.awake { background: var(--awake); box-shadow: 0 0 12px var(--awake); animation: glow-pulse 2.5s ease-in-out infinite; }
.state-dot.dozing { background: var(--dozing); }
.state-dot.asleep { background: var(--asleep); }
.state-dot.comeback { background: var(--comeback); }

/* Features */

.features {
  padding: 64px 24px;
  border-top: 1px solid var(--border);
}

.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  margin-bottom: 64px;
}

.feature:last-child {
  margin-bottom: 0;
}

.feature.reverse {
  direction: rtl;
}

.feature.reverse > * {
  direction: ltr;
}

.feature-text p {
  color: var(--muted);
}

/* Install */

.install ol {
  padding-left: 20px;
  color: var(--muted);
}

.install li {
  margin-bottom: 10px;
}

.install pre {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  overflow-x: auto;
  color: var(--text);
  margin: 12px 0 0;
}

.install code {
  font-family: var(--font);
  font-size: 0.9rem;
}

.note {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 20px;
}

/* Privacy */

.checks {
  list-style: none;
  padding: 0;
  margin: 0;
}

.checks li {
  padding: 10px 0 10px 28px;
  position: relative;
  color: var(--muted);
}

.checks li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent-2);
  font-weight: 700;
}

/* About */

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

/* Footer */

footer {
  padding: 40px 24px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

/* Responsive */

@media (max-width: 760px) {
  .hero,
  .feature,
  .feature.reverse {
    grid-template-columns: 1fr;
    direction: ltr;
  }

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

  .hero {
    padding: 48px 24px;
  }
}

@media (max-width: 480px) {
  .grid.four {
    grid-template-columns: 1fr;
  }
}

.hub-intro {
  padding: 4rem 0 1rem;
  max-width: 46rem;
}

.hub-cards {
  display: grid;
  gap: 2.5rem;
  padding-bottom: 4rem;
}

.hub-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: center;
}

.hub-media {
  display: block;
  line-height: 0;
}

.hub-media img {
  width: 100%;
  height: auto;
  image-rendering: pixelated;
}

.hub-body h2 {
  margin: 0 0 0.5rem;
}

.hub-body h2 a {
  text-decoration: none;
  color: inherit;
}

.hub-kicker {
  margin: 0 0 1rem;
  opacity: 0.7;
  font-size: 0.85rem;
}

.hub-body .actions {
  margin-top: 1.5rem;
}

@media (max-width: 48rem) {
  .hub-card {
    grid-template-columns: minmax(0, 1fr);
  }
}
