/* Blobbi Roadmap. Colours follow Blobbi Home's day and night palettes. */

@font-face {
  font-family: 'Comfortaa';
  src: url('/fonts/comfortaa-latin-wght-normal.woff2') format('woff2');
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --bg: #fbf8ef;
  --paper: #f4eedf;
  --card: #fffdf7;
  --ink: #33281a;
  --ink-soft: #6b5b4a;
  --line: #e6dccb;
  --primary: #5a1ae6;
  --primary-ink: #4a14c2;
  --pink: #c8338f;
  --sky-top: #8cc8f0;
  --sky-bottom: #dff1fb;
  --grass: #74c254;
  --grass-edge: #5aa63d;
  --live: #1f7a43;
  --live-bg: #e3f4e6;
  --soon: #5f5873;
  --soon-bg: #ece9f2;

  /* Card stages: one sky per world. */
  --stage-home: #ffe2c4;
  --stage-pixel: #fff1b8;
  --stage-island: #c9f0ea;
  --stage-farm: #d6f2c9;
  --stage-rumble: #e6dbff;

  --radius: 22px;
  --shadow: 0 1px 0 rgba(51, 40, 26, 0.04), 0 14px 32px -20px rgba(51, 40, 26, 0.4);
  --display: 'Comfortaa', ui-rounded, 'SF Pro Rounded', system-ui, sans-serif;
  --body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16132b;
    --paper: #1d1937;
    --card: #221d40;
    --ink: #f1ecff;
    --ink-soft: #b8afd6;
    --line: #362f5e;
    --primary: #b49bff;
    --primary-ink: #c9b8ff;
    --pink: #ff8fd0;
    --sky-top: #0e0b24;
    --sky-bottom: #2a2058;
    --grass: #2f5a3c;
    --grass-edge: #244a30;
    --live: #7fdc9c;
    --live-bg: #18392a;
    --soon: #d4cdea;
    --soon-bg: #2d2850;

    --stage-home: #3a2a35;
    --stage-pixel: #393420;
    --stage-island: #1c3a3c;
    --stage-farm: #213826;
    --stage-rumble: #2e2552;

    --shadow: 0 14px 32px -20px rgba(0, 0, 0, 0.75);
  }
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 1.0625rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 0.9em;
}

a {
  color: var(--primary-ink);
  text-underline-offset: 0.18em;
}

:focus-visible {
  outline: 3px solid var(--pink);
  outline-offset: 3px;
  border-radius: 8px;
}

img {
  max-width: 100%;
  height: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 10;
  background: var(--card);
  padding: 0.5rem 0.9rem;
  border-radius: 10px;
}

.skip:focus {
  top: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: 700 0.92rem/1 var(--display);
  padding: 0.7rem 1.15rem;
  min-height: 2.75rem;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  color: var(--ink);
  background: var(--card);
  text-decoration: none;
}

.btn:hover {
  border-color: var(--primary);
  color: var(--primary-ink);
}

.btn--play {
  background: linear-gradient(135deg, var(--primary) 0%, var(--pink) 140%);
  border-color: transparent;
  color: #fff;
}

.btn--play:hover {
  color: #fff;
  filter: brightness(1.08);
}

@media (prefers-color-scheme: dark) {
  .btn--play,
  .btn--play:hover {
    color: #16132b;
  }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-bottom) 72%, var(--bg) 100%);
  padding: 2.75rem 1rem 0;
  overflow: hidden;
}

.hero__inner {
  max-width: 64rem;
  margin: 0 auto;
  display: grid;
  gap: 1.5rem;
  position: relative;
  z-index: 1;
}

.brand {
  font: 700 0.9rem/1 var(--display);
  color: var(--primary-ink);
  letter-spacing: 0.04em;
  margin-bottom: 1.1rem;
}

.hero h1 {
  font-size: clamp(2.4rem, 10vw, 4.4rem);
  margin-bottom: 0.45em;
}

.hero__kicker {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.12rem;
  margin-bottom: 0.5em;
}

.hero__lead {
  font-size: 1.1rem;
  max-width: 32rem;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.5rem;
}

.hero__art {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0.25rem;
  padding-bottom: 1.75rem;
}

.hero__blobbi {
  width: 9.5rem;
  animation: bob 3.2s ease-in-out infinite;
  filter: drop-shadow(0 14px 10px rgba(40, 20, 80, 0.18));
}

.hero__friend {
  width: 4.25rem;
  margin-bottom: 0.2rem;
  animation: bob 3.8s ease-in-out infinite;
}

.hero__friend--r {
  animation-delay: -1.4s;
}

.hero__egg {
  position: absolute;
  right: 12%;
  bottom: 1.6rem;
  width: 2.4rem;
  animation: wobble 4.5s ease-in-out infinite;
}

.hero__ground {
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: -3.2rem;
  height: 6rem;
  background: var(--grass);
  border-top: 6px solid var(--grass-edge);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}

@keyframes bob {
  50% {
    transform: translateY(-8px);
  }
}

@keyframes wobble {
  0%,
  80%,
  100% {
    transform: rotate(0);
  }
  85% {
    transform: rotate(-7deg);
  }
  90% {
    transform: rotate(6deg);
  }
  95% {
    transform: rotate(-3deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__blobbi,
  .hero__friend,
  .hero__egg {
    animation: none;
  }
}

@media (min-width: 48rem) {
  .hero {
    padding-top: 4.5rem;
  }

  .hero__inner {
    grid-template-columns: 1.2fr 1fr;
    align-items: end;
  }

  .hero__text {
    padding-bottom: 4rem;
  }

  .hero__blobbi {
    width: 13.75rem;
  }

  .hero__friend {
    width: 5.5rem;
  }

  .hero__egg {
    width: 3.2rem;
    right: 2%;
  }
}

/* ---------- Sections ---------- */

main {
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.section {
  padding: 4.5rem 0 1rem;
}

.section h2 {
  font-size: clamp(1.8rem, 6vw, 2.6rem);
  text-align: center;
  margin-bottom: 0.35em;
}

.section__intro {
  text-align: center;
  color: var(--ink-soft);
  max-width: 34rem;
  margin: 0 auto 2.5rem;
}

/* ---------- Worlds ---------- */

.worlds {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
}

.world {
  flex: 1 1 100%;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

@media (min-width: 40rem) {
  .world {
    flex-basis: calc(50% - 0.625rem);
    max-width: calc(50% - 0.625rem);
  }
}

@media (min-width: 60rem) {
  .world {
    flex-basis: calc((100% - 2.5rem) / 3);
    max-width: calc((100% - 2.5rem) / 3);
  }
}

.world__stage {
  --stage: var(--paper);
  position: relative;
  display: grid;
  place-items: end center;
  height: 10.5rem;
  padding-bottom: 0.4rem;
  background:
    radial-gradient(120% 60% at 50% 115%, color-mix(in srgb, var(--grass) 55%, var(--stage)) 0 45%, transparent 46%),
    var(--stage);
}

.world--home .world__stage {
  --stage: var(--stage-home);
}

.world--pixel .world__stage {
  --stage: var(--stage-pixel);
}

.world--island .world__stage {
  --stage: var(--stage-island);
}

.world--farm .world__stage {
  --stage: var(--stage-farm);
}

.world--rumble .world__stage {
  --stage: var(--stage-rumble);
}

.world__stage .art {
  width: 7rem;
  filter: drop-shadow(0 8px 6px rgba(40, 20, 80, 0.15));
}

.world--rumble .world__stage .art {
  opacity: 0.85;
}

.badge {
  position: absolute;
  top: 0.8rem;
  left: 0.8rem;
  display: inline-flex;
  gap: 0.35em;
  align-items: center;
  font: 700 0.78rem/1 var(--display);
  padding: 0.45em 0.75em;
  border-radius: 999px;
}

.badge--live {
  color: var(--live);
  background: var(--live-bg);
}

.badge--soon {
  color: var(--soon);
  background: var(--soon-bg);
}

.world__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.15rem 1.25rem 1.25rem;
}

.world__body h3 {
  font-size: 1.35rem;
  margin-bottom: 0.2em;
}

.world__tagline {
  font: 700 0.95rem/1.4 var(--display);
  color: var(--primary-ink);
  margin-bottom: 0.6em;
}

.world__body p:not(.world__tagline) {
  color: var(--ink-soft);
}

.world__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.4rem;
}

/* ---------- Timeline ---------- */

.timeline {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  max-width: 52rem;
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 1rem;
  bottom: 1rem;
  left: 1.1rem;
  border-left: 3px dotted var(--primary);
  opacity: 0.5;
}

.step {
  position: relative;
  padding-left: 3.25rem;
  margin-bottom: 1.25rem;
}

.step__node {
  position: absolute;
  left: 0;
  top: 1rem;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 700 1rem/1 var(--display);
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--pink));
  box-shadow: 0 0 0 5px var(--bg);
}

@media (prefers-color-scheme: dark) {
  .step__node {
    color: #16132b;
  }
}

.step__card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem 0.4rem;
  box-shadow: var(--shadow);
}

.step__art {
  float: right;
  width: 3.5rem;
  margin: -0.2rem -0.2rem 0.3rem 0.75rem;
}

.step__month {
  font: 700 0.78rem/1 var(--display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pink);
  margin-bottom: 0.5rem;
}

.step h3 {
  font-size: 1.2rem;
}

.step p:not(.step__month) {
  color: var(--ink-soft);
}

.step__progress {
  font-size: 0.92rem;
}

@media (min-width: 48rem) {
  .timeline::before {
    left: 50%;
    margin-left: -1.5px;
  }

  .step {
    width: 50%;
    padding: 0 2.5rem 0 0;
    margin-bottom: -1.5rem;
  }

  .step:nth-child(even) {
    margin-left: 50%;
    padding: 0 0 0 2.5rem;
  }

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

  .step__node {
    left: auto;
    right: -1.125rem;
  }

  .step:nth-child(even) .step__node {
    right: auto;
    left: -1.125rem;
  }
}

/* ---------- Built on Nostr ---------- */

.pillars {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
  display: grid;
  gap: 1rem;
}

@media (min-width: 44rem) {
  .pillars {
    grid-template-columns: repeat(2, 1fr);
  }
}

.pillar {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.3rem 0.5rem;
  border-top: 5px solid var(--accent);
}

.pillar--1 {
  --accent: #f0a04b;
}

.pillar--2 {
  --accent: #5ac8b8;
}

.pillar--3 {
  --accent: #74c254;
}

.pillar--4 {
  --accent: #a77bf3;
}

.pillar h3 {
  font-size: 1.15rem;
}

.pillar p {
  color: var(--ink-soft);
}

.repos {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 44rem) {
  .repos {
    grid-template-columns: repeat(3, 1fr);
  }
}

.repos a {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.9rem 1.1rem;
  border-radius: 16px;
  border: 1.5px solid var(--line);
  background: var(--paper);
  text-decoration: none;
  color: var(--ink);
}

.repos a:hover {
  border-color: var(--primary);
}

.repos strong {
  font-family: var(--display);
  color: var(--primary-ink);
}

.repos span {
  font-size: 0.9rem;
  color: var(--ink-soft);
}

/* ---------- Footer, 404 ---------- */

.footer {
  max-width: 64rem;
  margin: 4rem auto 0;
  padding: 2rem 1rem 3rem;
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
  color: var(--ink-soft);
  text-align: center;
}

.notfound {
  min-height: 80vh;
  display: grid;
  place-content: center;
  text-align: center;
  padding: 1rem;
}

.notfound img {
  margin: 0 auto 1rem;
}
