/*
 * True Match / DateMe landing v2
 * Colours mirror the mobile app's palette (truematch/lib/theme/app_theme.dart, class TmColors).
 */

:root {
  --tm-background: #f5f8fc;
  --tm-surface: #ffffff;
  --tm-foreground: #172033;
  --tm-primary: #4a90e2;
  --tm-primary-soft: #a8d0ff;
  --tm-primary-tint: #eaf3fd;
  --tm-secondary-foreground: #2b6cb5;
  --tm-muted: #f0f4f9;
  --tm-muted-foreground: #687386;
  --tm-warm: #f4c078;
  --tm-violet: #b78ad5;
  --tm-success: #23865b;
  --tm-destructive: #d64545;
  --tm-border: #e5eaf2;
  --tm-input: #dce3ed;

  --tm-radius-card: 28px;
  --tm-radius-field: 12px;
  --tm-radius-pill: 999px;

  --tm-shadow-card: 0 18px 40px -18px rgba(74, 144, 226, 0.45);
  --tm-shadow-soft: 0 4px 16px -6px rgba(74, 144, 226, 0.18);
  --tm-shadow-float: 0 10px 24px -8px rgba(74, 144, 226, 0.55);

  --tm-font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --tm-font-display: "Outfit", "DM Sans", system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--tm-background);
  color: var(--tm-foreground);
  font-family: var(--tm-font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

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

h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  font-weight: 700;
}

h3 {
  font-size: 1.2rem;
  font-weight: 600;
}

p {
  margin: 0 0 1em;
}

.container {
  width: min(1120px, 92%);
  margin: 0 auto;
}

.section {
  padding: 88px 0;
}

.section--tint {
  background: var(--tm-primary-tint);
}

.section__eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tm-secondary-foreground);
  margin-bottom: 12px;
}

.section__lead {
  color: var(--tm-muted-foreground);
  max-width: 620px;
  font-size: 1.05rem;
}

.section__header {
  text-align: center;
  margin-bottom: 48px;
}

.section__header .section__lead {
  margin: 0 auto;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 26px;
  border-radius: var(--tm-radius-pill);
  font: 600 1rem var(--tm-font-body);
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

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

.btn--primary {
  background: var(--tm-primary);
  color: #ffffff;
  box-shadow: var(--tm-shadow-float);
}

.btn--primary:hover {
  background: #3d82d1;
}

.btn--ghost {
  background: var(--tm-surface);
  color: var(--tm-secondary-foreground);
  border-color: var(--tm-primary-soft);
}

.btn--ghost:hover {
  background: var(--tm-primary-tint);
}

.btn--block {
  width: 100%;
}

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

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245, 248, 252, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--tm-border);
}

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

.nav__links {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__links a {
  text-decoration: none;
  font-weight: 500;
  color: var(--tm-muted-foreground);
}

.nav__links a:hover {
  color: var(--tm-foreground);
}

.nav__toggle {
  display: none;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
}

.nav__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--tm-foreground);
  margin: 5px 0;
  border-radius: 2px;
}

/* ---------- Logo (matches the app's TmLogo) ---------- */

.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--tm-font-display);
  font-size: 1.5rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--tm-foreground);
}

.logo__mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--tm-primary);
  display: grid;
  place-items: center;
  color: #ffffff;
}

.logo__mark svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.logo__accent {
  color: var(--tm-primary);
}

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

.hero {
  padding: 72px 0 96px;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--tm-radius-pill);
  background: var(--tm-primary-tint);
  color: var(--tm-secondary-foreground);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero__title span {
  color: var(--tm-primary);
}

.hero__lead {
  font-size: 1.12rem;
  color: var(--tm-muted-foreground);
  max-width: 520px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 28px 0 22px;
}

.hero__trust {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 0.9rem;
  color: var(--tm-muted-foreground);
}

.hero__trust strong {
  color: var(--tm-foreground);
}

.hero__visual {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.hero__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: var(--tm-shadow-card);
}

.hero__photo--tall {
  grid-row: span 2;
  height: 100%;
  min-height: 420px;
}

.hero__photo--short {
  height: 200px;
}

.match-pill {
  position: absolute;
  left: -18px;
  bottom: 28px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: var(--tm-surface);
  border-radius: var(--tm-radius-card);
  box-shadow: var(--tm-shadow-card);
  font-weight: 600;
}

.match-pill__heart {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--tm-primary);
  color: #ffffff;
  display: grid;
  place-items: center;
}

.match-pill small {
  display: block;
  font-weight: 400;
  color: var(--tm-muted-foreground);
}

/* ---------- Cards and grids ---------- */

.grid {
  display: grid;
  gap: 24px;
}

.grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid--2 {
  grid-template-columns: repeat(2, 1fr);
}

.card {
  background: var(--tm-surface);
  border-radius: var(--tm-radius-card);
  padding: 28px;
  box-shadow: var(--tm-shadow-soft);
}

.card__icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--tm-primary-tint);
  color: var(--tm-primary);
  margin-bottom: 18px;
}

.card__icon svg {
  width: 26px;
  height: 26px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card p {
  color: var(--tm-muted-foreground);
  margin: 0;
}

.card--accent-warm .card__icon {
  background: rgba(244, 192, 120, 0.25);
  color: #b9782a;
}

.card--accent-violet .card__icon {
  background: rgba(183, 138, 213, 0.2);
  color: #8b5cb5;
}

.card--accent-success .card__icon {
  background: rgba(35, 134, 91, 0.12);
  color: var(--tm-success);
}

/* ---------- How it works ---------- */

.steps {
  counter-reset: step;
}

.step {
  position: relative;
  padding-left: 0;
}

.step__num {
  font-family: var(--tm-font-display);
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--tm-primary-soft);
  line-height: 1;
  margin-bottom: 12px;
}

/* ---------- Phone preview ---------- */

.phone-strip {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding: 8px 4px 24px;
  scroll-snap-type: x mandatory;
}

.phone-strip::-webkit-scrollbar {
  display: none;
}

.phone {
  flex: 0 0 auto;
  width: 260px;
  scroll-snap-align: center;
  background: var(--tm-surface);
  border-radius: 36px;
  padding: 14px;
  box-shadow: var(--tm-shadow-card);
  border: 6px solid var(--tm-foreground);
}

.phone img {
  width: 100%;
  height: 340px;
  object-fit: cover;
  border-radius: 24px;
}

.phone__meta {
  padding: 14px 6px 6px;
}

.phone__meta strong {
  font-family: var(--tm-font-display);
  font-size: 1.2rem;
}

.phone__meta p {
  margin: 4px 0 0;
  font-size: 0.9rem;
  color: var(--tm-muted-foreground);
}

.chip {
  display: inline-block;
  margin: 10px 6px 0 0;
  padding: 4px 12px;
  border-radius: var(--tm-radius-pill);
  background: var(--tm-primary-tint);
  color: var(--tm-secondary-foreground);
  font-size: 0.8rem;
  font-weight: 600;
}

/* ---------- Safety band ---------- */

.safety {
  background: var(--tm-foreground);
  color: #ffffff;
  border-radius: 36px;
  padding: 64px 48px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.safety h2 {
  color: #ffffff;
}

.safety p {
  color: rgba(255, 255, 255, 0.78);
}

.safety__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 16px;
}

.safety__list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--tm-radius-field);
}

.safety__list svg {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  stroke: var(--tm-primary-soft);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  margin-top: 2px;
}

.safety__list strong {
  display: block;
  color: #ffffff;
}

.safety__list span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.95rem;
}

/* ---------- FAQ ---------- */

.faq {
  max-width: 760px;
  margin: 0 auto;
  display: grid;
  gap: 14px;
}

.faq details {
  background: var(--tm-surface);
  border-radius: var(--tm-radius-field);
  box-shadow: var(--tm-shadow-soft);
  padding: 0;
  overflow: hidden;
}

.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 24px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

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

.faq summary::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--tm-primary);
  line-height: 1;
  transition: transform 0.2s ease;
}

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

.faq__body {
  padding: 0 24px 22px;
  color: var(--tm-muted-foreground);
}

/* ---------- Final CTA ---------- */

.cta {
  text-align: center;
  background: linear-gradient(160deg, #4a90e2, #3a7bc8);
  color: #ffffff;
  border-radius: 36px;
  padding: 72px 32px;
  box-shadow: var(--tm-shadow-card);
}

.cta h2 {
  color: #ffffff;
}

.cta p {
  color: rgba(255, 255, 255, 0.88);
  max-width: 560px;
  margin: 0 auto 28px;
}

.cta .btn--primary {
  background: #ffffff;
  color: var(--tm-secondary-foreground);
  box-shadow: none;
}

.cta .btn--primary:hover {
  background: var(--tm-primary-tint);
}

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

.footer {
  padding: 48px 0 32px;
  border-top: 1px solid var(--tm-border);
  background: var(--tm-surface);
}

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

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer__links a {
  color: var(--tm-muted-foreground);
  text-decoration: none;
  font-size: 0.95rem;
}

.footer__links a:hover {
  color: var(--tm-foreground);
}

.footer__copy {
  width: 100%;
  margin: 8px 0 0;
  font-size: 0.85rem;
  color: var(--tm-muted-foreground);
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .hero__grid,
  .safety {
    grid-template-columns: 1fr;
  }

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

  .safety {
    padding: 48px 28px;
  }

  .hero__visual {
    max-width: 520px;
    margin: 0 auto;
  }
}

@media (max-width: 720px) {
  .section {
    padding: 64px 0;
  }

  .grid--3,
  .grid--2 {
    grid-template-columns: 1fr;
  }

  .nav__links {
    display: none;
  }

  .nav__links.is-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--tm-surface);
    padding: 20px 6%;
    border-bottom: 1px solid var(--tm-border);
  }

  .nav__toggle {
    display: block;
  }

  .match-pill {
    left: 8px;
  }
}

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