/*
 * LoLove landing page.
 *
 * Dark only, on purpose: the app is dark-only, and a light landing page would
 * introduce a product that does not exist.
 *
 * One accent (coral), one font family (Plus Jakarta Sans, the app's own
 * display face), one shape rule: interactive things are pills, surfaces are
 * 28px, phones are 44px because that is what a phone is.
 */

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("fonts/plus-jakarta-sans-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("fonts/plus-jakarta-sans-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("fonts/plus-jakarta-sans-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("fonts/plus-jakarta-sans-latin-800-normal.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}

:root {
  /* From lib/core/theme/app_colors.dart, so the site and the app are one brand. */
  --ink: #12121c;
  --ink-raised: #1a1a26;
  --ink-high: #232331;
  --paper: #f5f1f0;
  --muted: #b7afb9;
  --line: rgb(245 241 240 / 0.09);
  --coral: #ff4d6d;
  --coral-ink: #2a0610;
  --shared: #d01e4b;

  --radius-surface: 28px;
  --radius-phone: 44px;

  --gutter: clamp(16px, 4vw, 40px);
  --max: 1200px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* Layers. Nothing else on the page sets a z-index. */
  --z-nav: 20;
  --z-skip: 30;

  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  /* The tilted phone and the hero's light run past the right edge on purpose.
     Clipped on the root, because hidden on body alone still scrolls sideways
     in iOS Safari; and clip rather than hidden, because hidden would turn the
     root into a scroll container and break the sticky nav and story phone. */
  overflow-x: hidden;
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: var(--z-skip);
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}
.skip:focus {
  top: 12px;
}

.icon {
  width: 18px;
  height: 18px;
  flex: none;
}
.icon--lg {
  width: 26px;
  height: 26px;
}

.h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.1rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

/* ------------------------------------------------------------------ Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  white-space: nowrap;
  transition:
    transform 0.25s var(--ease-out),
    background-color 0.25s var(--ease-out),
    box-shadow 0.25s var(--ease-out);
}
.btn:active {
  transform: scale(0.98) translateY(1px);
}
.btn--primary {
  background: var(--coral);
  /* Near-black on coral is 5.9:1. White on coral would be 3.3:1. */
  color: var(--coral-ink);
  box-shadow: 0 10px 30px -12px rgb(255 77 109 / 0.7);
}
.btn--primary:hover {
  background: #ff6680;
  box-shadow: 0 14px 34px -12px rgb(255 77 109 / 0.85);
}
.btn--primary .icon {
  transition: transform 0.25s var(--ease-out);
}
.btn--primary:hover .icon {
  transform: translateX(3px);
}
.btn--ghost {
  border: 1px solid rgb(245 241 240 / 0.22);
  color: var(--paper);
}
.btn--ghost:hover {
  background: rgb(245 241 240 / 0.06);
}
.btn--sm {
  min-height: 42px;
  padding: 0 18px;
  font-size: 15px;
}

/* ---------------------------------------------------------------------- Nav */

.nav {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  transition:
    background-color 0.3s var(--ease-out),
    border-color 0.3s var(--ease-out);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgb(18 18 28 / 0.78);
  border-bottom-color: var(--line);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}
@media (prefers-reduced-transparency: reduce) {
  .nav.is-scrolled {
    background: var(--ink);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}
.nav__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: 68px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.nav__links {
  display: flex;
  gap: 28px;
  margin-left: auto;
}
.nav__links a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  transition: color 0.2s;
}
.nav__links a:hover {
  color: var(--paper);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand__mark {
  width: 34px;
  height: 31px;
}
.brand__word {
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.035em;
}

@media (max-width: 767px) {
  .nav__links {
    display: none;
  }
  .nav .btn {
    margin-left: auto;
  }
}

/* --------------------------------------------------------------------- Hero */

.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(24px, 5vw, 64px) var(--gutter) clamp(48px, 7vw, 96px);
  min-height: calc(100dvh - 68px);
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
  position: relative;
}
/* A warm light behind the phones, like a lamp in a dark bar. Painted once,
   never animated. */
.hero::before {
  content: "";
  position: absolute;
  right: -10%;
  top: 8%;
  width: 70%;
  aspect-ratio: 1;
  background: radial-gradient(closest-side, rgb(255 77 109 / 0.2), rgb(105 26 159 / 0.08) 55%, transparent 72%);
  pointer-events: none;
}

.hero__copy {
  position: relative;
}
.hero__title {
  margin: 0;
  font-size: clamp(2.7rem, 5.2vw, 4.25rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.04em;
  text-wrap: balance;
  /* Two lines on desktop: "Meet someone who / feels like you." */
  max-width: 16ch;
}
.hero__sub {
  margin: 24px 0 0;
  max-width: 36ch;
  color: var(--muted);
  font-size: clamp(17px, 1.5vw, 19px);
}
.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.hero__visual {
  position: relative;
  height: min(78dvh, 720px);
  min-height: 460px;
}

/* ------------------------------------------------------------------- Phones */

.phone {
  margin: 0;
  aspect-ratio: 720 / 1493;
  border-radius: var(--radius-phone);
  padding: 9px;
  background: #0a0a11;
  box-shadow:
    inset 0 0 0 1px rgb(255 255 255 / 0.08),
    0 40px 80px -30px rgb(0 0 0 / 0.8),
    0 20px 50px -30px rgb(255 77 109 / 0.35);
}
.phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: calc(var(--radius-phone) - 9px);
}

.hero .phone {
  position: absolute;
  height: 100%;
}
.phone--front {
  right: 26%;
  top: 0;
}
.phone--back {
  right: -6%;
  top: 8%;
  height: 88% !important;
  transform: rotate(7deg);
  opacity: 0.55;
  filter: saturate(0.85);
}

@media (prefers-reduced-motion: no-preference) {
  .phone--front {
    animation: rise 1s var(--ease-out) both;
  }
  .phone--back {
    animation: rise-tilt 1.2s 0.12s var(--ease-out) both;
  }
  .hero__copy > * {
    animation: fade-up 0.8s var(--ease-out) both;
  }
  .hero__copy > :nth-child(2) {
    animation-delay: 0.08s;
  }
  .hero__copy > :nth-child(3) {
    animation-delay: 0.16s;
  }
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
}
@keyframes rise-tilt {
  from {
    opacity: 0;
    transform: translateY(60px) rotate(12deg);
  }
}
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}

@media (max-width: 899px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .hero__title {
    max-width: 13ch;
  }
  .hero__visual {
    height: 560px;
    min-height: 0;
  }
  .phone--front {
    right: auto;
    left: 50%;
    translate: -62% 0;
  }
  .phone--back {
    right: auto;
    left: 50%;
    translate: -8% 0;
  }
}
@media (max-width: 479px) {
  .hero__visual {
    height: 470px;
  }
  .hero__ctas .btn {
    flex: 1 1 auto;
  }
}

/* -------------------------------------------------------------------- Story */

.story {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(64px, 9vw, 128px) var(--gutter);
}
.story__head .h2 {
  max-width: 18ch;
}
.story__grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(32px, 6vw, 96px);
  margin-top: clamp(40px, 6vw, 72px);
}
.story__stage {
  position: sticky;
  top: 96px;
  align-self: start;
  height: calc(100dvh - 140px);
  max-height: 700px;
  display: grid;
  place-items: center;
}
.phone--stage {
  position: relative;
  height: 100%;
}
.phone--stage img {
  position: absolute;
  inset: 9px;
  width: calc(100% - 18px);
  height: calc(100% - 18px);
  opacity: 0;
  transform: scale(0.985);
  transition:
    opacity 0.6s var(--ease-out),
    transform 0.6s var(--ease-out);
}
.phone--stage img.is-shown {
  opacity: 1;
  transform: none;
}

.story__steps {
  list-style: none;
  margin: 0;
  padding: 0;
}
.step {
  min-height: 72dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px 0;
  opacity: 0.35;
  transition: opacity 0.5s var(--ease-out);
}
.step.is-active {
  opacity: 1;
}
.step__title {
  margin: 0;
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
  max-width: 16ch;
}
.step__body {
  margin: 14px 0 0;
  color: var(--muted);
  max-width: 40ch;
}
.phone--inline {
  display: none;
}

@media (max-width: 899px) {
  .story__grid {
    grid-template-columns: 1fr;
  }
  .story__stage {
    display: none;
  }
  .step {
    min-height: 0;
    opacity: 1;
    padding: 0 0 56px;
  }
  .phone--inline {
    display: block;
    width: min(300px, 78%);
    margin-top: 28px;
  }
}

/* -------------------------------------------------------------------- Bento */

.bento-wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(32px, 6vw, 80px) var(--gutter) clamp(64px, 9vw, 128px);
}
.bento-wrap__title {
  max-width: 16ch;
}
.bento {
  margin-top: clamp(32px, 5vw, 56px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
  gap: 16px;
}
.cell {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-surface);
  background: var(--ink-raised);
  border: 1px solid var(--line);
  padding: 28px;
  min-height: 250px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.cell h3 {
  margin: 14px 0 0;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.cell p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 16px;
  max-width: 34ch;
}
.cell .icon--lg {
  color: var(--coral);
}

/* The large one: a real card from the app, cropped to the name and badge. */
.cell--verify {
  grid-row: span 2;
  padding: 0;
  justify-content: stretch;
}
.cell--verify .cell__media {
  position: relative;
  /* The crop's own proportions: face at the top, name and badge at the
     bottom. Letting the cell stretch it would cut one or the other. */
  aspect-ratio: 672 / 752;
  overflow: hidden;
}
.cell--verify .cell__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}
.cell--verify .cell__text {
  padding: 24px 28px 28px;
}

.cell--status {
  background:
    radial-gradient(120% 90% at 100% 0%, rgb(255 77 109 / 0.26), transparent 60%),
    var(--ink-raised);
}
.cell--report {
  background:
    radial-gradient(120% 90% at 0% 100%, rgb(105 26 159 / 0.35), transparent 62%),
    var(--ink-raised);
}

.cell--city {
  padding: 0;
}
.cell--city .cell__photo {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, var(--ink-raised) 30%, rgb(26 26 38 / 0.55) 62%, rgb(26 26 38 / 0.15)),
    url("img/evening.webp") 50% 30% / cover no-repeat;
}
.cell--city .cell__text {
  position: relative;
  padding: 28px;
  margin-top: auto;
}

@media (max-width: 899px) {
  .bento {
    grid-template-columns: 1fr 1fr;
  }
  .cell--verify {
    grid-column: span 2;
    grid-row: auto;
  }
  .cell--verify .cell__media {
    aspect-ratio: 1;
  }
  .cell--verify .cell__media img {
    object-position: 50% 100%;
  }
}
@media (max-width: 599px) {
  .bento {
    grid-template-columns: 1fr;
  }
  .cell--verify,
  .cell--city {
    grid-column: auto;
  }
  .cell {
    min-height: 0;
  }
  .cell--status,
  .cell--private,
  .cell--report {
    padding-top: 36px;
  }
}

/* ------------------------------------------------------------------ Evening */

.evening {
  position: relative;
  min-height: min(88dvh, 760px);
  display: grid;
  align-items: end;
  background:
    linear-gradient(to top, var(--ink) 4%, rgb(18 18 28 / 0.55) 42%, rgb(18 18 28 / 0.25) 70%, var(--ink) 100%),
    url("img/evening.webp") 50% 40% / cover no-repeat;
}
.evening__inner {
  max-width: var(--max);
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--gutter) clamp(56px, 8vw, 112px);
}
.evening__title {
  margin: 0;
  font-size: clamp(2.3rem, 5.4vw, 4.4rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.035em;
  max-width: 14ch;
  text-wrap: balance;
}
.evening__body {
  margin: 18px 0 0;
  color: rgb(245 241 240 / 0.8);
  max-width: 38ch;
}

/* ---------------------------------------------------------------------- FAQ */

.faq {
  max-width: 860px;
  margin: 0 auto;
  padding: clamp(72px, 10vw, 140px) var(--gutter) clamp(48px, 7vw, 96px);
}
.faq__list {
  margin-top: clamp(28px, 4vw, 44px);
  border-top: 1px solid var(--line);
}
.faq details {
  border-bottom: 1px solid var(--line);
}
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 0;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "";
  flex: none;
  width: 14px;
  height: 14px;
  background:
    linear-gradient(var(--coral), var(--coral)) center / 14px 2px no-repeat,
    linear-gradient(var(--coral), var(--coral)) center / 2px 14px no-repeat;
  transition: transform 0.3s var(--ease-out);
}
.faq details[open] summary::after {
  transform: rotate(45deg);
}
.faq details p {
  margin: -6px 0 24px;
  color: var(--muted);
  max-width: 62ch;
}

/* ----------------------------------------------------------------- Download */

.download {
  padding: clamp(48px, 7vw, 96px) var(--gutter) clamp(72px, 10vw, 140px);
}
.download__inner {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.download__mark {
  width: 76px;
  height: 70px;
  margin-bottom: 28px;
}
.download .h2 {
  max-width: 16ch;
}
.download__body {
  margin: 16px 0 0;
  color: var(--muted);
}
.stores {
  list-style: none;
  padding: 0;
  margin: 36px 0 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.store {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 0 24px 0 20px;
  border-radius: 999px;
  border: 1px solid rgb(245 241 240 / 0.16);
  background: var(--ink-raised);
  text-align: left;
  line-height: 1.15;
  font-weight: 700;
}
.store small {
  display: block;
  font-weight: 500;
  font-size: 12px;
  color: var(--muted);
}

/* ------------------------------------------------------------------- Footer */

.footer {
  border-top: 1px solid var(--line);
}
.footer__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 32px var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand--footer .brand__word {
  font-size: 19px;
}
.footer__note {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

/* ---------------------------------------------------------------- Reveals */

@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition:
      opacity 0.8s var(--ease-out),
      transform 0.8s var(--ease-out);
  }
  .js .reveal.is-in {
    opacity: 1;
    transform: none;
  }
  .bento .reveal:nth-child(2) {
    transition-delay: 0.06s;
  }
  .bento .reveal:nth-child(3) {
    transition-delay: 0.12s;
  }
  .bento .reveal:nth-child(4) {
    transition-delay: 0.18s;
  }
  .bento .reveal:nth-child(5) {
    transition-delay: 0.24s;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .phone--stage img,
  .step {
    transition: none;
  }
}

@media (min-width: 900px) {
  .br-wide {
    display: inline;
  }
}
@media (max-width: 899px) {
  .br-wide {
    display: none;
  }
}
