/* Candid marketing site — brand tokens extracted from the iOS app
   (Question.swift gradients, GradientBackground.swift, CategoryTile.swift) */

@font-face {
  font-family: "Crimson Text";
  src: url("../fonts/CrimsonText-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Crimson Text";
  src: url("../fonts/CrimsonText-Italic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/JetBrainsMono-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #131313;
  --bg-raised: #191919;
  --text: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.62);
  --text-faint: rgba(255, 255, 255, 0.4);
  --ink: #311507;
  --card: #d9d9d9;
  --serif: "Crimson Text", "Times New Roman", serif;
  --mono: "JetBrains Mono", "SF Mono", Menlo, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-strong: cubic-bezier(0.23, 1, 0.32, 1);
  /* iOS spring(response: 0.6, dampingFraction: 0.8) sampled into a
     CSS linear() easing, so the spring runs off the main thread */
  --spring: linear(0.0, 0.0298, 0.1034, 0.2017, 0.3109, 0.421, 0.5257, 0.621, 0.7048, 0.7763, 0.8358, 0.8841, 0.9223, 0.9518, 0.9738, 0.9898, 1.0009, 1.0081, 1.0124, 1.0146, 1.0152, 1.0147, 1.0136, 1.0121, 1.0105, 1.0088, 1.0072, 1.0057, 1.0045, 1.0034, 1.0025, 1.0018, 1.0012, 1.0007, 1.0004, 1.0002, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: radial-gradient(120rem 60rem at 30% -10%, var(--bg-raised), var(--bg) 60%) var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: #c9956a;
  color: var(--ink);
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

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

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.01em;
}

/* ---------- Navigation ---------- */

.nav {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-family: var(--serif);
  font-size: 26px;
}

.nav-brand img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.25s var(--ease);
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--text);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  color: #131313;
  font-family: var(--mono);
  font-size: 15px;
  text-decoration: none;
  padding: 15px 28px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.btn img {
  width: 17px;
  height: 17px;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 32px rgba(201, 149, 106, 0.18);
}

.btn:active {
  transform: scale(0.98);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow: none;
}

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

.hero {
  text-align: center;
  padding-block: 48px 96px;
}

.hero h1 {
  font-size: clamp(40px, 5.6vw, 72px);
  max-width: 22ch;
  margin: 0 auto;
}

.hero h1 em {
  font-style: italic;
  line-height: 1.1;
}

/* Rotating headline word: all variants share one grid cell; JS sets
   the slot width to the active word (in em) so "getting <word>"
   re-centers elastically. Words roll up in with the brand spring +
   a blur ramp; exits are softer and shorter. */
.word-roll {
  display: inline-grid;
  /* One track that follows the JS-set width, not the widest word,
     so the active word truly centers in the slot */
  grid-template-columns: 100%;
  justify-items: center;
}

.word-roll .word {
  grid-area: 1 / 1;
  white-space: nowrap;
}

/* The brand name lands in the app's peach */
.word-roll .word:last-child {
  color: #f9cbb8;
}

/* No JS or reduced motion: show the final word, hide the rest */
.word-roll:not(.on) .word:not(:last-child) {
  visibility: hidden;
}

.word-roll.on {
  transition: width 0.7s var(--spring);
}

.word-roll.on .word {
  opacity: 0;
  transform: translateY(0.55em);
  filter: blur(6px);
  transition: opacity 0.4s var(--ease), filter 0.4s var(--ease), transform 0.7s var(--spring);
}

.word-roll.on .word.is-active {
  opacity: 1;
  transform: none;
  filter: none;
}

.word-roll.on .word.is-leaving {
  opacity: 0;
  transform: translateY(-0.3em);
  filter: blur(4px);
  transition: opacity 0.3s var(--ease), filter 0.3s var(--ease), transform 0.4s var(--ease);
}

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

.hero p {
  margin: 24px auto 0;
  max-width: 46ch;
  color: var(--text-muted);
  font-size: 16px;
}

.hero-cta {
  margin-top: 44px;
}

.badge {
  display: inline-block;
  transition: transform 0.25s var(--ease);
}

.badge img {
  height: 54px;
  width: auto;
}

.badge:hover {
  transform: translateY(-1px);
}

.badge:active {
  transform: scale(0.98);
}

/* Question-card carousel: a real preview of the app's QuestionCard,
   built from actual questions in the app bundle. Decorative and
   non-interactive: a seamless CSS marquee (constant motion, linear,
   off the main thread), with a one-time staggered entrance. */

.carousel {
  --card-w: 230px;
  --card-h: calc(var(--card-w) * 4.1 / 3);
  --gap: 24px;
  --loop-time: 110s;
  position: relative;
  margin-top: 56px;
  padding-block: 10px 46px;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

.track {
  display: flex;
  width: max-content;
  animation: carousel-loop var(--loop-time) linear infinite;
  will-change: transform;
}

.set {
  display: flex;
  gap: var(--gap);
  padding-right: var(--gap);
}

@keyframes carousel-loop {
  to { transform: translate3d(-50%, 0, 0); }
}

.qcard {
  position: relative;
  flex: none;
  width: var(--card-w);
  height: var(--card-h);
  /* One-time entrance: rise and fade on a spring, card by card */
  animation: card-in 900ms var(--spring) backwards;
  animation-delay: calc(var(--d, 0) * 55ms);
  border-radius: 30px;
  background: var(--card);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 24px 22px;
  text-align: center;
  /* Diagonal inner bevel, like the app's gradient inner border */
  box-shadow:
    inset 1.5px 1.5px 0 rgba(255, 255, 255, 0.55),
    inset -1.5px -1.5px 0 rgba(0, 0, 0, 0.18),
    0 24px 60px rgba(0, 0, 0, 0.45);
}

.qcard::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: url("../img/paper-texture.jpg") repeat;
  background-size: 400px;
  mix-blend-mode: multiply;
  opacity: 0.45;
  pointer-events: none;
}

/* Question centered in the space above the pill, like the app */
.qcard .q {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1.16;
}

.qcard .tag {
  display: inline-flex;
  align-items: center;
  flex: none;
  margin-top: 14px;
  gap: 7px;
  font-size: 11px;
  line-height: 1;
  padding: 7px 14px;
  border-radius: 999px;
  white-space: nowrap;
}

.qcard .tag img {
  width: 16px;
  height: 16px;
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

/* Stagger the cards visible at load; later ones enter off-screen */
.set .qcard:nth-child(1) { --d: 0; }
.set .qcard:nth-child(2) { --d: 1; }
.set .qcard:nth-child(3) { --d: 2; }
.set .qcard:nth-child(4) { --d: 3; }
.set .qcard:nth-child(5) { --d: 4; }
.set .qcard:nth-child(6) { --d: 5; }
.set .qcard:nth-child(7) { --d: 6; }
.set .qcard:nth-child(8) { --d: 7; }

/* Hand-dealt tilt, like the cards in the app */
.set .qcard:nth-child(3n + 1) { rotate: -0.9deg; }
.set .qcard:nth-child(3n + 2) { rotate: 0.7deg; }
.set .qcard:nth-child(3n) { rotate: -0.3deg; }

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

.section {
  padding-block: 96px;
}

/* ---------- Full-bleed image band ---------- */
.full-bleed-img {
  margin-block: 24px;
}

.full-bleed-img img {
  width: 100%;
  height: clamp(320px, 52vh, 620px);
  object-fit: cover;
}

.section-head {
  max-width: 60ch;
  margin-bottom: 56px;
}

.section-head h2 {
  font-size: clamp(34px, 4vw, 52px);
}

.section-head p {
  margin-top: 18px;
  color: var(--text-muted);
  max-width: 52ch;
}

/* Category pill colors (Category.color = first gradient stop) */
.tag-icebreakers { background: #b28a80; }
.tag-most-likely-to { background: #a2808c; }
.tag-deep { background: #c9956a; }
.tag-spicy { background: #b34a50; }
.tag-nostalgia { background: #7ba3a0; }
.tag-would-you-rather { background: #e8c4a8; }
.tag-romantic { background: #c98e96; }
.tag-dreams { background: #6c9d88; }
.tag-never-have-i-ever { background: #8c9aa6; }

/* ---------- How it plays ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
}

.step .num {
  font-family: var(--serif);
  font-size: 56px;
  line-height: 1;
  color: var(--text-faint);
  display: block;
  margin-bottom: 18px;
}

.step h3 {
  font-size: 26px;
  margin-bottom: 12px;
}

.step p {
  color: var(--text-muted);
  font-size: 15px;
}

/* ---------- Closing CTA ---------- */

.closing {
  text-align: center;
  padding-block: 40px 140px;
}

.closing h2 {
  font-size: clamp(36px, 4.6vw, 58px);
}

.closing .badge {
  margin-top: 36px;
}

/* ---------- Footer ---------- */

footer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 36px 0 48px;
  font-size: 13px;
  color: var(--text-faint);
}

footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

footer nav {
  display: flex;
  gap: 24px;
}

footer a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.25s var(--ease);
}

footer a:hover {
  color: var(--text);
}

/* ---------- Inner pages (support, privacy) ---------- */

.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 64px 24px 120px;
}

.page h1 {
  font-size: clamp(40px, 5vw, 60px);
  margin-bottom: 20px;
}

.page .lede {
  color: var(--text-muted);
  margin-bottom: 48px;
}

.page h2 {
  font-size: 30px;
  margin: 56px 0 16px;
}

.page h3 {
  font-size: 19px;
  margin: 32px 0 12px;
}

.page p,
.page li {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 14px;
}

.page ul {
  padding-left: 22px;
  margin-bottom: 14px;
}

.page strong {
  color: var(--text);
  font-weight: 400;
}

.page a {
  color: var(--text);
}

.page .btn {
  color: #131313;
  text-decoration: none;
}

.contact-card {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  padding: 32px;
  margin: 40px 0 16px;
}

.contact-card h2 {
  margin: 0 0 10px;
}

.contact-card .btn {
  margin-top: 18px;
}

.faq details {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 22px 0;
}

.faq details:first-of-type {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.faq summary {
  font-family: var(--serif);
  font-size: 23px;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  font-family: var(--mono);
  font-size: 18px;
  color: var(--text-faint);
  transition: transform 0.3s var(--ease);
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq details p {
  margin-top: 14px;
  margin-bottom: 0;
}

.meta-line {
  font-size: 13px;
  color: var(--text-faint);
  margin-bottom: 48px;
}

/* ---------- Scroll reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .btn,
  .badge {
    transition: none;
  }
  /* Remove movement; keep the static row readable */
  .track {
    animation: none;
  }
  .qcard {
    animation: none;
    rotate: none;
  }
}

/* ---------- Mobile ---------- */

@media (max-width: 900px) {
  .hero {
    padding-block: 40px 72px;
  }

  /* Keep "getting nostalgic." (the longest line) on one line:
     it runs about 7.1em of this serif, so 12vw clears the gutters */
  .hero h1 {
    font-size: min(40px, 12vw);
  }

  .carousel {
    --card-w: 175px;
    --gap: 16px;
    --loop-time: 85s;
    margin-top: 40px;
  }

  .qcard {
    padding: 18px 18px 16px;
    border-radius: 23px;
  }

  .qcard .q {
    font-size: 17px;
  }

  .qcard .tag {
    font-size: 10px;
    padding: 6px 10px;
    gap: 5px;
  }

  .qcard .tag img {
    width: 14px;
    height: 14px;
  }

  .badge img {
    height: 48px;
  }

  .section {
    padding-block: 64px;
  }

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

  .closing {
    padding-block: 24px 96px;
  }
}

@media (max-width: 480px) {
  .nav-links {
    gap: 18px;
  }
}
