:root {
  --bg: #f6f3ec;
  --fg: #1b1a17;
  --muted: #6b675e;
  --rule: #e2ddd1;
  --link: #1b1a17;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121210;
    --fg: #eeebe4;
    --muted: #a09c93;
    --rule: #2a2925;
    --link: #eeebe4;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

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

.wrap {
  max-width: 68rem;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 40rem) {
  .wrap { padding: 0 2rem; }
}

/* Hero */

.hero {
  position: relative;
  overflow: hidden;
  padding: 3.5rem 0 2.5rem;
}

/* Soft colour wash borrowed from the four app palettes */
.glow {
  position: absolute;
  inset: -30% -10% 0;
  background:
    radial-gradient(32rem 22rem at 85% 30%, rgba(255, 140, 60, 0.22), transparent 70%),
    radial-gradient(30rem 20rem at 70% 75%, rgba(45, 212, 191, 0.18), transparent 70%),
    radial-gradient(26rem 18rem at 98% 85%, rgba(70, 90, 220, 0.16), transparent 70%);
  filter: blur(10px);
  -webkit-mask-image: linear-gradient(to bottom, #000 50%, transparent);
  mask-image: linear-gradient(to bottom, #000 50%, transparent);
  pointer-events: none;
}

.hero .wrap { position: relative; }

.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-bottom: 1rem;
}

.icons {
  display: flex;
}

.icons img {
  width: 48px;
  height: 48px;
  border-radius: 11px;
  box-shadow: 0 0 0 3px var(--bg), 0 8px 20px rgba(20, 15, 5, 0.18);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.icons img + img { margin-left: -10px; }
.icons img:nth-child(1) { transform: rotate(-6deg); }
.icons img:nth-child(2) { transform: rotate(3deg) translateY(-3px); }
.icons img:nth-child(3) { transform: rotate(-2deg); }
.icons img:nth-child(4) { transform: rotate(5deg) translateY(-2px); }
.icons img:nth-child(5) { transform: rotate(-4deg) translateY(1px); }
.icons img:nth-child(6) { transform: rotate(3deg) translateY(-1px); }
.icons img:nth-child(7) { transform: rotate(-3deg) translateY(2px); }
.icons:hover img { transform: none; }
.icons:hover img + img { margin-left: 6px; }
.icons img { transition-property: transform, margin-left; }

h1 {
  font: 600 clamp(2.25rem, 6vw, 3.75rem)/1.05 var(--display);
  font-variation-settings: "opsz" 144;
  letter-spacing: -0.03em;
  margin: 0;
}

.lede {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--muted);
  margin: 0;
  max-width: 52rem;
}

/* Apps */

.eyebrow {
  font: 600 0.8rem/1 var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 0 0 1.25rem;
}

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

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

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

.app {
  /* Per-app palette; set below */
  --card: #222;
  --card-2: #333;
  --ink: #fff;
  --ink-soft: rgba(255, 255, 255, 0.78);
  --accent: #fff;

  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 24px;
  color: var(--ink);
  background: linear-gradient(160deg, var(--card), var(--card-2));
  isolation: isolate;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.35s;
}

.app::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--wash, none);
}

.app:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 50px -20px rgba(10, 10, 20, 0.45);
}

.copy {
  padding: 1.5rem 1.5rem 1rem;
}

.icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  margin-bottom: 1rem;
}

.app h3 {
  font: 600 1.6rem/1.1 var(--display);
  font-variation-settings: "opsz" 96;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
}

.app h3 a {
  color: inherit;
  text-decoration: none;
}

/* Make the whole card a link to the app's site */
.app h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.app h3 a:focus-visible { outline: none; }
.app:has(h3 a:focus-visible) { outline: 3px solid var(--accent); outline-offset: 3px; }

.tagline {
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.4;
  color: var(--accent);
  margin: 0 0 1rem;
}

.app p { margin-top: 0; }

/* Status button, then platforms on their own line */
.meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin: 0;
}

.pill {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.14);
  color: var(--ink);
}

.pill--link {
  position: relative;
  z-index: 2;
  background: var(--accent);
  color: var(--card);
  text-decoration: none;
  transition: filter 0.2s;
}

.pill--link:hover { filter: brightness(1.08); }

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Phone peeking up from the bottom of the card */
.phone {
  margin-top: auto;
  height: 210px;
  display: flex;
  justify-content: center;
  padding-top: 0.5rem;
}

.phone img {
  width: 200px;
  height: auto;
  align-self: flex-start;
  border-radius: 28px 28px 0 0;
  border: 6px solid #0c0c0e;
  border-bottom: 0;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.3);
  transform: translateY(18px);
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.app:hover .phone img { transform: translateY(0); }

.app--amphora {
  --card: #0f2a3a;
  --card-2: #0d3b3a;
  --accent: #5eead4;
  --wash: radial-gradient(22rem 16rem at 90% 100%, rgba(45, 212, 191, 0.28), transparent 70%);
}

.app--ubifui {
  --card: #0e183a;
  --card-2: #223478;
  --accent: #ffb27a;
  --wash: radial-gradient(22rem 16rem at 80% 100%, rgba(255, 120, 40, 0.38), transparent 70%),
          radial-gradient(14rem 10rem at 5% 10%, rgba(120, 140, 255, 0.2), transparent 70%);
}

.app--terranota {
  --card: #f1e4c6;
  --card-2: #dcc69a;
  --ink: #2d2112;
  --ink-soft: rgba(45, 33, 18, 0.78);
  --accent: #a3271f;
  --wash: radial-gradient(22rem 16rem at 85% 100%, rgba(163, 39, 31, 0.14), transparent 70%);
}

.app--terranota .pill { background: rgba(45, 33, 18, 0.1); }
.app--terranota .pill--link { background: var(--accent); color: #fff7ea; }

.app--detent {
  --card: #141b2e;
  --card-2: #2c3a58;
  --accent: #ffb340;
  --wash: radial-gradient(22rem 16rem at 85% 100%, rgba(255, 179, 64, 0.22), transparent 70%),
          radial-gradient(14rem 10rem at 5% 10%, rgba(180, 195, 225, 0.12), transparent 70%);
}

.app--voterempathy {
  --card: #0a3d2c;
  --card-2: #0f5f43;
  --accent: #9ff0c8;
  --wash: radial-gradient(22rem 16rem at 85% 100%, rgba(159, 240, 200, 0.18), transparent 70%);
}

.flags {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.flags a {
  display: block;
  border-radius: 3px;
}

.flags img {
  display: block;
  height: 18px;
  width: auto;
  border-radius: 2px;
}

.app--bacon {
  --card: #4b2c2c;
  --card-2: #7a3a46;
  --accent: #ffc7b3;
  --wash: radial-gradient(22rem 16rem at 85% 100%, rgba(255, 138, 149, 0.3), transparent 70%);
}

.app--bowlful {
  --card: #6b2e0e;
  --card-2: #b8531d;
  --accent: #ffd29a;
  --wash: radial-gradient(22rem 16rem at 85% 100%, rgba(255, 180, 92, 0.35), transparent 70%);
}

/* Footer */

footer .foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-top: 4rem;
  padding-top: 1.5rem;
  padding-bottom: 2.5rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.9rem;
}

footer p { margin: 0; }
footer a { color: var(--muted); }

@media (max-width: 30rem) {
  .hero { padding: 2.5rem 0 2rem; }
  .app { border-radius: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
