@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/dm-sans-400.woff2") format("woff2");
}

@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/dm-sans-500.woff2") format("woff2");
}

@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/dm-sans-600.woff2") format("woff2");
}

@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/dm-sans-700.woff2") format("woff2");
}

:root {
  --ink: #1c1c1a;
  --secondary: #5c5c57;
  --canvas: #ffffff;
  --surface: #f4f4f2;
  --selection: #ededea;
  --divider: #e9e9e6;
  --border: #d8d8d3;
  --green: #2e6b4f;
  --green-soft: #e4efe8;
  --green-dot: #2e6b4f;
  --amber: #8a5a00;
  --amber-soft: #f7ecd2;
  --bar: 56px;
  --ease: cubic-bezier(0.33, 1, 0.68, 1);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--canvas);
  color: var(--ink);
  font-family: "DM Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

body {
  margin: 0;
  overflow-x: clip;
}

::selection {
  background: var(--selection);
}

p {
  margin: 0;
}

.wrap {
  width: 100%;
  max-width: 1080px;
  margin-inline: auto;
  padding-inline: 24px;
  min-width: 0;
}

/* Header */

.bar {
  position: sticky;
  top: 0;
  z-index: 10;
  height: var(--bar);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color 220ms var(--ease);
}

.bar.scrolled {
  border-bottom-color: var(--divider);
}

.bar-inner {
  height: 100%;
  max-width: 1080px;
  margin-inline: auto;
  padding-inline: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  flex: none;
  width: 56px;
}

.brand-mark svg {
  display: block;
  width: 100%;
  height: auto;
}

.word {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.1px;
}

.bar-note {
  font-size: 13px;
  font-weight: 500;
  color: var(--secondary);
}

/* Reveal */

.reveal {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 450ms var(--ease), transform 450ms var(--ease);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

/* Hero */

.hero {
  padding: 88px 24px 120px;
  text-align: center;
}

h1 {
  margin: 0 auto;
  max-width: 11em;
  font-size: clamp(46px, 7vw, 88px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.99;
  text-wrap: balance;
}

.sub {
  margin: 26px auto 0;
  max-width: 32em;
  font-size: clamp(18px, 2vw, 21px);
  line-height: 1.45;
  color: var(--secondary);
}

.micro {
  margin-top: 40px;
  font-size: 13px;
  font-weight: 500;
  color: var(--secondary);
}

/* Shared mock pieces */

.avatar {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 600;
  color: rgba(28, 28, 26, 0.78);
}

.tint-sand { background: #f1e4d3; }
.tint-rose { background: #f0e0e1; }
.tint-sage { background: #e3ece4; }
.tint-sky { background: #e1e8ec; }
.tint-butter { background: #f3eacb; }

.meta {
  margin-top: 2px;
  font-size: 13px;
  line-height: 18px;
  color: var(--secondary);
}

.tag {
  flex: none;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--surface);
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  color: var(--secondary);
  white-space: nowrap;
}

.tag-green {
  background: var(--green-soft);
  color: var(--green);
  font-weight: 600;
}

.tag-action {
  background: var(--canvas);
  border: 1px solid var(--border);
  color: var(--ink);
  font-weight: 500;
}

.tag-amber {
  background: var(--amber-soft);
  color: var(--amber);
  font-weight: 600;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.pill {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.pill-going {
  background: var(--green-soft);
  border-color: var(--green-soft);
  color: var(--green);
  font-weight: 600;
}

.date-tile {
  flex: none;
  width: 52px;
  height: 56px;
  border-radius: 12px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.date-tile strong {
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
}

.date-tile span {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.6px;
  line-height: 1;
  color: var(--secondary);
}

.date-tile-lg {
  width: 60px;
  height: 64px;
  border-radius: 14px;
}

.date-tile-lg strong {
  font-size: 21px;
}

/* Hero card — Who's free, alive */

.hero-card {
  width: min(440px, 100%);
  margin: 56px auto 0;
  padding: 22px 20px 18px;
  text-align: left;
  background: var(--canvas);
  border: 1px solid var(--divider);
  border-radius: 24px;
  box-shadow: 0 24px 48px rgba(28, 28, 26, 0.09);
}

.hc-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.hc-title {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.1px;
}

.hc-when {
  font-size: 13px;
  font-weight: 600;
  color: var(--green);
  background: var(--green-soft);
  padding: 5px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.hc-count {
  display: flex;
  align-items: center;
  margin-top: 14px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.1px;
}

.live-dot {
  flex: none;
  width: 9px;
  height: 9px;
  margin-right: 9px;
  border-radius: 50%;
  background: var(--green-dot);
  animation: breathe 2.8s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.hc-row {
  display: flex;
  gap: 12px;
  align-items: center;
  padding-top: 16px;
}

.hc-copy {
  flex: 1;
  min-width: 0;
}

.hc-name {
  font-size: 15px;
  font-weight: 600;
  line-height: 20px;
}

.hc-new {
  transition: opacity 600ms var(--ease), transform 600ms var(--ease);
}

.hc-new.is-off {
  opacity: 0.25;
}

.hc-foot {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--divider);
  font-size: 13px;
  color: var(--secondary);
}

/* Cases */

.case {
  padding-top: 80px;
  padding-bottom: 80px;
  border-top: 1px solid var(--divider);
}

.case-wide {
  border-top: 0;
  padding-top: 24px;
}

.case h2,
.elsewhere h2,
.closing h2 {
  margin: 0;
  font-size: clamp(34px, 4.6vw, 56px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.04;
  text-wrap: balance;
}

.intro {
  margin-top: 14px;
  max-width: 30em;
  font-size: 18px;
  line-height: 1.5;
  color: var(--secondary);
}

.case:not(.case-wide) {
  display: grid;
  gap: 36px;
  align-items: start;
}

/* Playdate match — the flagship, given room */

.match {
  display: grid;
  gap: 20px;
  margin-top: 48px;
  align-items: stretch;
}

.match-sub {
  margin: 72px 0 0;
  font-size: clamp(26px, 3.4vw, 38px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
}

.match-card {
  padding: 24px;
  background: var(--surface);
  border-radius: 24px;
}

.mc-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--secondary);
}

.mc-big {
  margin-top: 8px;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.match-link {
  display: grid;
  place-items: center;
  min-height: 28px;
}

.match-link span {
  display: block;
  width: 2px;
  height: 36px;
  background: var(--border);
  border-radius: 2px;
  animation: linkpulse 7s var(--ease) infinite;
}

@keyframes linkpulse {
  0%, 18% { background: var(--border); transform: scaleY(0.6); }
  30%, 78% { background: var(--green); transform: scaleY(1); }
  92%, 100% { background: var(--border); transform: scaleY(0.6); }
}

.confirmed {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 20px 24px;
  background: var(--green-soft);
  border-radius: 24px;
  animation: confirmcycle 7s var(--ease) infinite;
}

@keyframes confirmcycle {
  0%, 22% { opacity: 0.55; transform: translateY(4px); }
  36%, 82% { opacity: 1; transform: none; }
  96%, 100% { opacity: 0.55; transform: translateY(4px); }
}

.confirm-dot {
  flex: none;
  width: 10px;
  height: 10px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--green);
}

.confirmed p {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.confirmed strong {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.1px;
}

.confirmed span {
  font-size: 14px;
  color: var(--green);
  font-weight: 500;
}

/* Mocks */

.mock {
  padding: 10px 20px 16px;
  background: var(--canvas);
  border: 1px solid var(--divider);
  border-radius: 24px;
  box-shadow: 0 16px 32px rgba(28, 28, 26, 0.06);
}

.mock-label {
  padding: 14px 0 6px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.1px;
}

.mock-row {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
}

.mock-copy {
  flex: 1;
  min-width: 0;
}

.mock-name {
  font-size: 15px;
  font-weight: 600;
  line-height: 20px;
}

.mock-name-lg {
  font-size: 17px;
  line-height: 22px;
}

.mock-event {
  padding-top: 20px;
}

.mock-event-head {
  align-items: flex-start;
  padding-top: 0;
}

.mock-going {
  margin-top: 12px;
  font-size: 15px;
  color: var(--secondary);
}

.mock-going strong {
  color: var(--ink);
}

/* Everything else */

.elsewhere {
  padding-top: 80px;
  padding-bottom: 80px;
  border-top: 1px solid var(--divider);
  text-align: center;
}

.elsewhere h2 {
  margin-inline: auto;
}

.elsewhere p {
  margin: 16px auto 0;
  max-width: 30em;
  font-size: 18px;
  line-height: 1.5;
  color: var(--secondary);
}

/* How it works — three beats, nothing more */

.how {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  justify-content: center;
  padding-top: 8px;
  padding-bottom: 96px;
  text-align: center;
}

.how p {
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.how span {
  color: var(--secondary);
  font-weight: 400;
}

/* Manifesto — relief, placed late */

.manifesto {
  background: var(--surface);
}

.manifesto .wrap {
  padding-top: 104px;
  padding-bottom: 104px;
}

.manifesto p {
  font-size: clamp(34px, 5vw, 60px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.manifesto p + p {
  margin-top: 22px;
}

/* Close */

.closing {
  padding-top: 120px;
  padding-bottom: 140px;
  text-align: center;
}

.ovals {
  width: min(220px, 52%);
  margin: 0 auto 36px;
}

.ovals svg {
  display: block;
  width: 100%;
  height: auto;
}

.closing h2 {
  margin-inline: auto;
}

.closing .last {
  margin-top: 20px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.1px;
}

/* Footer */

footer {
  border-top: 1px solid var(--divider);
}

.foot {
  padding-top: 24px;
  padding-bottom: 40px;
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--secondary);
}

.foot-word {
  font-weight: 600;
  color: var(--ink);
}

/* Layout rhythm — no two cases sit the same way */

@media (min-width: 840px) {
  .case:not(.case-wide) {
    grid-template-columns: 1fr 1fr;
    gap: 72px;
  }

  .case.flip .case-copy {
    order: 2;
  }

  .match {
    grid-template-columns: 1fr 56px 1fr;
  }

  .confirmed {
    grid-column: 1 / -1;
  }

  .match-link span {
    width: 100%;
    height: 2px;
  }

  @keyframes linkpulse {
    0%, 18% { background: var(--border); transform: scaleX(0.6); }
    30%, 78% { background: var(--green); transform: scaleX(1); }
    92%, 100% { background: var(--border); transform: scaleX(0.6); }
  }
}

@media (max-width: 599px) {
  .hero {
    padding-top: 56px;
    padding-bottom: 88px;
  }

  .case {
    padding-top: 72px;
    padding-bottom: 72px;
  }

  .how p {
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .live-dot,
  .match-link span,
  .confirmed {
    animation: none;
  }

  .confirmed {
    opacity: 1;
  }

  .hc-new {
    transition: none;
  }

  .bar {
    transition: none;
  }
}
