@font-face {
  font-family: 'Playfair Display';
  src: url('fonts/PlayfairDisplay-Medium.ttf') format('truetype');
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: 'Finlandica Text';
  src: url('fonts/FinlandicaText-Variable.ttf') format('truetype');
  font-weight: 100 900;
  font-display: swap;
}

/* The app's palette: cream, lavender, plum and apricot for matches. */
:root {
  color-scheme: light;
  --bg: #FAF7F2;
  --surface: #F3EDF5;
  --text: #49345E;
  --muted: #706478;
  --line: #E2D9E4;
  --card: #E7DDF5;
  --card-text: #49345E;
  --frame: #1C1424;
  --match: linear-gradient(135deg, #F6D8C3, #F3BE9D);
  --button: #49345E;
  --on-button: #FAF7F2;
  --shadow: 0 18px 40px rgba(73, 52, 94, 0.16);
  --heading: 'Playfair Display', Georgia, serif;
  --body: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

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

html { scroll-behavior: smooth; }

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

/* A hero card flying off the side would otherwise widen the page, and
   phones zoom out or jump to show it. */
main { overflow-x: hidden; overflow-x: clip; }

h1, h2, h3 {
  font-family: var(--heading);
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.4rem, 6vw, 3.8rem); }
h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
h3 { font-size: 1.35rem; }

p { margin: 0 0 1em; }

a { color: inherit; }

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

@media (max-width: 480px) {
  .wrap { padding: 0 16px; }
}

/* Header and footer */

.site-header { padding-top: 20px; padding-bottom: 20px; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--heading);
  font-size: 1.3rem;
  text-decoration: none;
}

.brand img { border-radius: 10px; }

.brand .soon {
  color: var(--muted);
  opacity: 0.7;
  font-size: 0.75em;
  white-space: nowrap;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 32px;
  padding-bottom: 40px;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Hero */

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 48px;
  padding-top: 40px;
  padding-bottom: 96px;
}

.lead {
  font-size: 1.2rem;
  font-weight: 600;
  max-width: 30em;
}

.intro { color: var(--muted); max-width: 34em; }

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 0;
  /* The closing button jumps here; keep the hero text above in view. */
  scroll-margin-top: 30vh;
}

.store {
  display: inline-flex;
  flex-direction: column;
  min-width: 170px;
  padding: 10px 26px 12px;
  border-radius: 999px;
  background: var(--button);
  color: var(--on-button);
  text-decoration: none;
  line-height: 1.25;
  transition: transform 0.15s ease;
}

.store small { font-size: 0.8rem; opacity: 0.85; }
.store strong { font-size: 1.15rem; font-weight: 600; }

.store:hover { transform: translateY(-2px); }

/* The pile of name cards, as in the app's deck */

.pile {
  position: relative;
  width: min(100%, 340px);
  aspect-ratio: 3 / 4;
  justify-self: center;
  /* The fan leans left, so this centres it by eye. */
  translate: 8% 0;
}

.card {
  position: absolute;
  inset: 0;
  border-radius: 32px;
  box-shadow: var(--shadow);
}

.card-back {
  background: var(--match);
  transform: translate(-22%, 5%) rotate(-12deg);
}

/* Three name cards fanned over the apricot one. Slot 0 is the top card;
   script.js moves each card up a slot as the top one swipes off. */
.name-card {
  background: var(--card);
  padding: 22px;
  transition: transform 0.45s ease, opacity 0.45s ease-in;
}

.name-card[data-slot="0"] { transform: rotate(5deg); z-index: 3; }
.name-card[data-slot="1"] { transform: translate(-5%, 2%) rotate(-2deg); z-index: 2; }
.name-card[data-slot="2"] { transform: translate(-12%, 3%) rotate(-7deg); z-index: 1; }

.name-card.out {
  transform: translate(90%, -6%) rotate(22deg);
  opacity: 0;
  z-index: 4;
}

.name-card.enter {
  transition: none;
  opacity: 0;
}

.frame {
  display: grid;
  place-items: center;
  height: 100%;
  border: 2px solid var(--frame);
  border-radius: 22px;
}

.name {
  font-family: 'Finlandica Text', var(--body);
  font-weight: 500;
  font-size: clamp(2.6rem, 8vw, 3.6rem);
  color: var(--card-text);
}

/* script.js shrinks a long name to fit instead. */
.name-card .name { white-space: nowrap; }

/* Value proposition */

.value {
  max-width: 680px;
  padding-bottom: 96px;
  text-align: center;
}

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

.value .punchline { color: var(--text); font-weight: 600; margin: 0; }

/* The dialogue as a chat: the first parent on the left, the other on the
   right. */
.chat {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 420px;
  margin: 32px auto 40px;
  text-align: left;
}

.chat .bubble {
  align-self: flex-start;
  max-width: 80%;
  margin: 0;
  padding: 10px 18px;
  border-radius: 22px 22px 22px 6px;
  background: var(--card);
  color: var(--card-text);
}

.chat .reply {
  align-self: flex-end;
  border-radius: 22px 22px 6px 22px;
  background: #FFFFFF;
  box-shadow: inset 0 0 0 1px var(--line);
}

/* How it works */

.how {
  background: var(--surface);
  border-radius: 40px;
  padding: 72px 0;
  margin: 0 12px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 0;
  margin: 32px 0 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  background: var(--bg);
  border-radius: 28px;
  padding: 28px;
  counter-increment: step;
}

.steps p { color: var(--muted); margin: 0; }

.steps p + p { margin-top: 0.8em; }

/* The step's number, from the list rather than the text. */
.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: var(--card);
  color: var(--card-text);
  font-family: var(--heading);
  font-size: 1.3rem;
}

/* Screenshots */

.shots { padding-top: 96px; padding-bottom: 96px; }

.phones {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 40px;
}

.phones figure {
  margin: 0;
  flex: 0 1 250px;
  text-align: center;
}

.phone {
  padding: 8px;
  border-radius: 40px;
  background: #1C1424;
  box-shadow: var(--shadow);
}

.phone img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 32px;
}

.phones figcaption {
  margin-top: 18px;
  font-family: var(--heading);
  font-size: 1.2rem;
}

/* Closing call to action */

.cta {
  max-width: 680px;
  padding-bottom: 96px;
  text-align: center;
}

.cta p { color: var(--muted); font-size: 1.2rem; }

/* Contact */

.contact { padding-bottom: 72px; }

.contact-inner {
  text-align: center;
  max-width: 640px;
}

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

.button {
  display: inline-block;
  margin-top: 8px;
  padding: 14px 28px;
  border: 1.5px solid var(--text);
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.button:hover { background: var(--surface); }

.button-filled {
  border-color: var(--button);
  background: var(--button);
  color: var(--on-button);
  transition: transform 0.15s ease;
}

.button-filled:hover { background: var(--button); transform: translateY(-2px); }

/* Privacy policy */

.prose {
  max-width: 720px;
  padding-top: 32px;
  padding-bottom: 48px;
}

.prose h2 { font-size: 1.5rem; margin-top: 1.6em; }

.prose p,
.prose li { color: var(--muted); }

.prose li + li { margin-top: 0.4em; }

.note {
  padding: 18px 22px;
  border-radius: 20px;
  background: var(--surface);
}

/* 404 page */

.not-found {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: 40px;
  padding-bottom: 72px;
}

.not-found-card {
  position: relative;
  width: 180px;
  aspect-ratio: 3 / 4;
  margin-bottom: 48px;
  padding: 14px;
  background: var(--card);
  transform: rotate(-6deg);
}

.not-found-card .frame { border-radius: 16px; }

.not-found-card .name { font-size: 2.6rem; line-height: 1.1; }

/* Narrow screens */

@media (max-width: 800px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 56px;
    padding-top: 16px;
    padding-bottom: 72px;
  }

  .pile { width: min(70%, 280px); }

  .value, .cta { padding-bottom: 72px; }

  .how { padding: 56px 0; margin: 0; border-radius: 32px; }

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

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

  /* Swipe through the phones sideways instead of stacking three tall images. */
  .phones {
    justify-content: flex-start;
    gap: 20px;
    margin: 32px -24px 0;
    padding: 0 24px 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .phones figure {
    flex: 0 0 68%;
    max-width: 250px;
    scroll-snap-align: center;
  }
}

@media (max-width: 480px) {
  .phones { margin: 32px -16px 0; padding: 0 16px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .store, .name-card, .button-filled { transition: none; }
}
