/* RecoReco showcase site. Tokens follow docs/design-tokens.md (dark mode). */

@font-face {
  font-family: "Bitter";
  src: url("assets/fonts/Bitter-Variable.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("assets/fonts/Manrope-Variable.ttf") format("truetype");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --bg-canvas: #121211;
  --bg-surface: #1b1b1a;
  --bg-raised: #242423;
  --bg-subtle: #2f2f2d;
  --text-primary: #f7f7f5;
  --text-secondary: #c3c3bd;
  --text-tertiary: #a1a19b;
  --border: #2f2f2d;
  --border-soft: #242423;
  --brand: #a5a8ff;
  --brand-ink: #100627;
  --action-bg: #ffffff;
  --action-fg: #1b1b1a;
  --secondary-bg: rgba(255, 255, 255, 0.1);
  --secondary-border: rgba(255, 255, 255, 0.2);

  --serif: "Bitter", Georgia, serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(20px, 8.34vw, 120px);
  --section-gap: clamp(88px, 11vw, 160px);
  --radius-card: 32px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--bg-canvas);
  color: var(--text-primary);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 8px; }

.skip {
  position: absolute; left: 16px; top: -64px; z-index: 100;
  background: var(--action-bg); color: var(--action-fg);
  padding: 12px 20px; border-radius: 999px; font-weight: 600;
}
.skip:focus { top: 16px; }

/* ---------- Shared pieces ---------- */

.wrap { padding-inline: var(--gutter); max-width: 1440px; margin-inline: auto; }
.eyebrow {
  font-size: 14px; font-weight: 600; letter-spacing: 0.08em; text-transform: none;
  color: var(--brand); line-height: 20px;
}
.display {
  font-family: var(--serif); font-weight: 400;
  letter-spacing: -0.015em; text-wrap: balance;
}
.h2 { font-size: clamp(36px, 4.4vw, 56px); line-height: 1.14; letter-spacing: -0.015em; }
.section-head { display: flex; flex-direction: column; gap: 16px; margin-bottom: clamp(40px, 5vw, 64px); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 16px 24px; border-radius: 999px; font-weight: 600; font-size: 16px; line-height: 20px;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: transform .2s ease, background-color .2s ease, opacity .2s ease;
}
.btn--primary { background: var(--action-bg); color: var(--action-fg); }
.btn--secondary { background: var(--secondary-bg); color: var(--text-primary); border-color: var(--secondary-border); }
.btn--secondary:hover { background: rgba(255, 255, 255, 0.16); }
.btn--soon { cursor: default; }
.btn--soon .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.btn:active { transform: scale(0.97); }

.avatar {
  --bg: #5b21b6; --fg: #ede9fe;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--bg); color: var(--fg); font-weight: 600;
  width: 56px; height: 56px; font-size: 18px; flex: none;
}
.c-lm { --bg: #5b21b6; --fg: #ede9fe; }
.c-tb { --bg: #8c2d12; --fg: #ffe8d5; }
.c-cp { --bg: #1e3a8a; --fg: #dbeafe; }
.c-kb { --bg: #14532d; --fg: #dcfce7; }
.c-hd { --bg: #854a0e; --fg: #fef7c3; }
.c-ir { --bg: #831843; --fg: #fce7f3; }
.c-ml { --bg: #0f766e; --fg: #ccfbf1; }
.c-sg { --bg: #3f3f46; --fg: #f4f4f5; }

/* ---------- Nav ---------- */

.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg-canvas) 82%, transparent);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; padding-block: 24px; }
.logo { display: inline-flex; align-items: center; gap: 12px; font-family: var(--serif); font-weight: 500; font-size: 22px; line-height: 24px; }
.logo img { width: 36px; height: 36px; border-radius: 8.25px; }
.nav__links { display: flex; gap: 40px; font-weight: 500; font-size: 15px; color: var(--text-secondary); }
.nav__links a { transition: color .2s ease; }
.nav__links a:hover { color: var(--text-primary); }
.nav .btn { padding: 14px 22px; }

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

.hero { padding-top: clamp(48px, 6.7vw, 96px); overflow: hidden; }
.hero__text { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 24px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px 9px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--border);
  font-size: 14px; font-weight: 500; line-height: 20px; color: var(--text-secondary);
}
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.hero h1 { font-size: clamp(44px, 5.56vw, 80px); line-height: 1.1; letter-spacing: -0.02em; max-width: 12.5em; }
.hero__lead { font-size: clamp(17px, 1.4vw, 20px); line-height: 1.6; color: var(--text-secondary); max-width: 640px; }
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.hero__note { font-size: 14px; color: var(--text-tertiary); line-height: 20px; }

.phones {
  position: relative; margin-top: clamp(40px, 5vw, 72px);
  height: clamp(420px, 44.5vw, 640px);
  display: flex; justify-content: center; align-items: flex-start;
}
.phones::before { /* glow */
  content: ""; position: absolute; left: 50%; top: 32%; width: min(820px, 90vw); height: 60%;
  transform: translateX(-50%); z-index: 0; pointer-events: none;
  background: radial-gradient(closest-side, rgba(165, 168, 255, 0.34), rgba(165, 168, 255, 0) 100%);
  filter: blur(20px);
}
.phones::after { /* fade out the bottom of the phones */
  content: ""; position: absolute; inset: auto 0 0 0; height: 31%; z-index: 3; pointer-events: none;
  background: linear-gradient(to bottom, rgba(18, 18, 17, 0), var(--bg-canvas) 92%);
}
.phone {
  --w: 298px;
  position: relative; z-index: 1; flex: none;
  width: var(--w); aspect-ratio: 1080 / 2340; padding: calc(var(--w) * 0.029);
  background: #050505; border-radius: calc(var(--w) * 0.155);
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.55);
}
.phone img {
  width: 100%; height: 100%; object-fit: cover; object-position: top;
  border-radius: calc(var(--w) * 0.126);
}
.phone--side { margin-top: clamp(48px, 6.7vw, 96px); }
.phone--left { margin-right: calc(var(--w) * -0.1); transform: rotate(-3deg); transform-origin: bottom right; }
.phone--right { margin-left: calc(var(--w) * -0.1); transform: rotate(3deg); transform-origin: bottom left; }
.phone--main { --w: 356px; z-index: 2; }

/* ---------- Statement ---------- */

.statement { padding-block: clamp(80px, 11vw, 160px); }
.statement p {
  font-family: var(--serif); font-size: clamp(28px, 3.3vw, 48px); line-height: 1.28; letter-spacing: -0.01em;
  color: var(--text-tertiary); text-align: center; max-width: 1000px; margin-inline: auto; text-wrap: balance;
}
.statement strong { color: var(--text-primary); font-weight: 400; }

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

.how { padding-bottom: var(--section-gap); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step {
  background: var(--bg-surface); border: 1px solid var(--border-soft); border-radius: var(--radius-card);
  overflow: hidden; display: flex; flex-direction: column;
}
.step__visual {
  height: 320px; position: relative; overflow: hidden;
  background: linear-gradient(180deg, #1f1f1e, var(--bg-surface));
  display: grid; place-items: center;
}
.step__copy { padding: 8px 32px 36px; }
.step__num { font-size: 14px; font-weight: 600; color: var(--brand); letter-spacing: 0.08em; line-height: 20px; margin-bottom: 12px; }
.step__title { font-family: var(--serif); font-weight: 500; font-size: 24px; line-height: 32px; margin-bottom: 12px; }
.step__body { font-size: 16px; line-height: 24px; color: var(--text-secondary); }

/* Step 1: share sheet */
.sheet { width: min(320px, 84%); background: #2a2a29; border-radius: 24px; padding: 21px; box-shadow: 0 20px 40px rgba(0,0,0,.4); }
.sheet__link { display: flex; align-items: center; gap: 12px; padding-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,.1); }
.sheet__thumb { width: 40px; height: 40px; border-radius: 8px; background: linear-gradient(135deg, #e5e1d3, #8a8576); flex: none; }
.sheet__title { font-weight: 600; font-size: 14px; line-height: 20px; }
.sheet__host { font-size: 12px; line-height: 16px; color: var(--text-tertiary); }
.sheet__apps { display: flex; justify-content: space-between; padding-top: 20px; }
.sheet__app { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 11px; line-height: 16px; color: var(--text-secondary); }
.sheet__tile { width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; }
.sheet__tile img { width: 100%; height: 100%; border-radius: 14px; }
.sheet__app--hl { color: var(--text-primary); }
.sheet__app--hl .sheet__tile { outline: 2px solid var(--brand); outline-offset: 3px; }
.t-msg { background: linear-gradient(#5df06a, #19b93a); }
.t-notes { background: linear-gradient(#ffe36b, #f6b800); }
.t-mail { background: linear-gradient(#5ab8ff, #1b6df0); }
.sheet__tile svg { width: 28px; height: 28px; fill: #fff; }
.t-notes svg { fill: #fff; }

/* Step 2: friends */
.friends { display: flex; flex-direction: column; gap: 20px; width: min(296px, 80%); }
.friends__title { font-family: var(--serif); font-weight: 500; font-size: 20px; line-height: 24px; }
.friends__grid { display: grid; grid-template-columns: repeat(4, 56px); justify-content: space-between; row-gap: 20px; }
.friend { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 12px; line-height: 16px; color: var(--text-secondary); }
.friend--on .avatar { box-shadow: 0 0 0 3px var(--bg-surface), 0 0 0 5px var(--brand); }
.friend--on { color: var(--text-primary); }

/* Step 3: reminder */
.clock { font-family: var(--serif); font-size: 64px; line-height: 64px; font-weight: 400; letter-spacing: -0.02em; position: absolute; top: 56px; left: 0; right: 0; text-align: center; }
.notif {
  display: flex; gap: 12px; padding: 17px; border-radius: 22px; width: min(320px, 84%);
  background: rgba(60, 60, 58, 0.85); border: 1px solid rgba(255,255,255,.08); text-align: left;
}
.notif img { width: 40px; height: 40px; border-radius: 9px; flex: none; }
.notif > div { flex: 1; min-width: 0; }
.notif__top { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; line-height: 20px; }
.notif__top b { font-weight: 600; }
.notif__top span { color: var(--text-tertiary); }
.notif__text { font-size: 13px; line-height: 20px; color: var(--text-secondary); margin-top: 2px; }
.step__visual--clock .notif { position: absolute; left: 50%; bottom: 64px; transform: translateX(-50%); }

/* ---------- Features (bento) ---------- */

.features { padding-bottom: var(--section-gap); }
.bento { display: grid; gap: 24px; }
.bento__row { display: grid; gap: 24px; }
.bento__row--1 { grid-template-columns: 700fr 476fr; }
.bento__row--3, .bento__row--2 { grid-template-columns: repeat(3, 1fr); }
.card {
  position: relative; overflow: hidden;
  background: var(--bg-surface); border: 1px solid var(--border-soft); border-radius: var(--radius-card);
  padding: 40px;
}
.card h3 { font-family: var(--serif); font-weight: 500; font-size: 24px; line-height: 32px; margin-bottom: 12px; }
.card p { font-size: 16px; line-height: 24px; color: var(--text-secondary); }
.card--deck { min-height: 440px; }
.card--deck .card__copy { max-width: 300px; position: relative; z-index: 2; }
.deck {
  position: absolute; right: 36px; top: 48px; width: 300px;
  transform: rotate(3deg); transform-origin: top center;
  filter: drop-shadow(0 24px 40px rgba(0,0,0,.5));
}
.deck__stack { position: absolute; inset: 0; }
.deck__stack i { position: absolute; left: 20px; right: 20px; top: -14px; height: 40px; border-radius: 22px 22px 0 0; }
.deck__stack i:nth-child(1) { background: #1e3a6b; }
.deck__stack i:nth-child(2) { background: #0f4a52; left: 34px; right: 34px; top: -26px; }
.deck .phone { --w: 300px; box-shadow: none; }
.card--sorted { display: flex; flex-direction: column; justify-content: space-between; min-height: 440px; }
.chips { display: flex; flex-wrap: wrap; gap: 12px; }
.chip {
  display: inline-flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 999px;
  background: var(--bg-raised); border: 1px solid var(--border); font-size: 15px; font-weight: 500; line-height: 20px;
}
.chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.card--small { min-height: 300px; display: flex; flex-direction: column; justify-content: flex-start; }
.figure { font-family: var(--serif); font-size: 48px; line-height: 56px; letter-spacing: -0.01em; }
.stack { display: flex; }
.stack .avatar + .avatar { margin-left: -12px; box-shadow: -3px 0 0 var(--bg-surface); }
.mini { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.mini span {
  padding: 8px 14px; border-radius: 999px; background: var(--bg-raised); border: 1px solid var(--border);
  font-size: 14px; font-weight: 500; color: var(--text-secondary);
}
.card--small .top { min-height: 120px; display: flex; align-items: flex-start; }

/* ---------- Evening ritual ---------- */

.ritual { padding-bottom: var(--section-gap); }
.panel {
  background: var(--brand); color: var(--brand-ink); border-radius: 40px;
  display: grid; grid-template-columns: 1fr 420px; gap: 64px; align-items: center;
  padding: 80px;
}
.panel .eyebrow { color: rgba(16, 6, 39, 0.72); }
.panel h2 { font-size: clamp(36px, 4.4vw, 56px); line-height: 1.14; margin: 16px 0 24px; }
.panel__body { font-size: 18px; line-height: 28px; max-width: 440px; color: rgba(16, 6, 39, 0.82); }
.panel__note { font-size: 14px; margin-top: 20px; color: rgba(16, 6, 39, 0.68); }
.notifs { display: flex; flex-direction: column; gap: 12px; }
.notifs .notif { width: 100%; background: #fff; color: var(--brand-ink); border: 0; box-shadow: 0 14px 30px rgba(16, 6, 39, .18); }
.notifs .notif__text { color: rgba(16, 6, 39, .78); }
.notifs .notif__top span { color: rgba(16, 6, 39, .55); }

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

.faq { padding-bottom: var(--section-gap); }
.faq__grid { display: grid; grid-template-columns: 384px 1fr; gap: 96px; align-items: start; }
.faq__list { border-top: 1px solid var(--border); }
.faq__item { padding: 28px 0; border-bottom: 1px solid var(--border); }
.faq__item:last-child { border-bottom: 0; }
.faq__item h3 { font-family: var(--serif); font-weight: 500; font-size: 22px; line-height: 32px; margin-bottom: 8px; }
.faq__item p { color: var(--text-secondary); line-height: 24px; }

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

.final { padding-block: 80px clamp(100px, 13vw, 200px); text-align: center; }
.final .wrap { display: flex; flex-direction: column; align-items: center; gap: 32px; }
.final__icon { width: 96px; height: 96px; border-radius: 22px; }
.final h2 { font-size: clamp(40px, 5vw, 72px); line-height: 1.11; letter-spacing: -0.02em; max-width: 12em; }
.final__note { font-size: 14px; color: var(--text-tertiary); margin-top: -8px; }

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

.footer { border-top: 1px solid var(--border-soft); }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 40px; flex-wrap: wrap; }
.footer .logo { font-size: 18px; gap: 10px; }
.footer .logo img { width: 28px; height: 28px; border-radius: 6.4px; }
.footer__links { display: flex; gap: 32px; font-size: 14px; font-weight: 500; color: var(--text-secondary); flex-wrap: wrap; }
.footer__links a:hover { color: var(--text-primary); }
.footer__copy { font-size: 14px; color: var(--text-tertiary); }

/* ---------- Legal pages ---------- */

.legal { padding-block: clamp(48px, 7vw, 96px) var(--section-gap); }
.legal__inner { max-width: 720px; margin-inline: auto; }
.legal h1 { font-size: clamp(36px, 4.4vw, 56px); line-height: 1.14; margin-bottom: 12px; }
.legal__meta { color: var(--text-tertiary); font-size: 14px; margin-bottom: 48px; }
.legal h2 { font-family: var(--serif); font-weight: 500; font-size: 24px; line-height: 32px; margin: 40px 0 12px; }
.legal p, .legal li { color: var(--text-secondary); line-height: 26px; }
.legal p + p { margin-top: 12px; }
.legal ul { padding-left: 20px; }
.legal a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Reveal ---------- */

@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
  .js .reveal.is-in { opacity: 1; transform: none; }
  .js .phone--left.reveal.is-in { transform: rotate(-3deg); }
  .js .phone--right.reveal.is-in { transform: rotate(3deg); }
}

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

@media (max-width: 1100px) {
  .nav__links { gap: 24px; }
  .steps, .bento__row--2, .bento__row--3 { grid-template-columns: 1fr; }
  .bento__row--1 { grid-template-columns: 1fr; }
  .card--small { min-height: 0; gap: 32px; }
  .card--small .top { min-height: 0; }
  .panel { grid-template-columns: 1fr; padding: 56px 40px; gap: 48px; }
  .faq__grid { grid-template-columns: 1fr; gap: 40px; }
  .phone { --w: 240px; }
  .phone--main { --w: 290px; }
}
@media (max-width: 720px) {
  .nav__links { display: none; }
  .nav__inner { padding-block: 16px; }
  .phone--side { display: none; }
  .phone--main { --w: 270px; }
  .phones { height: 440px; }
  .card { padding: 28px; }
  .card--deck { min-height: 0; padding-bottom: 0; }
  .card--deck .card__copy { max-width: none; }
  .deck { position: relative; right: auto; top: auto; margin: 56px auto 0; width: 240px; transform: none; }
  .deck .phone { --w: 240px; border-bottom-left-radius: 0; border-bottom-right-radius: 0; height: 300px; aspect-ratio: auto; }
  .panel { padding: 40px 24px; border-radius: 32px; }
  .figure { font-size: 40px; }
  .footer__inner { flex-direction: column; align-items: flex-start; }
}
