/* Shuffler — landing page. Dark only, «Закат» (sunset) palette from the app.
   Fonts: Nunito + Playfair Display (SIL OFL), self-hosted in fonts/. Icons: Lucide (ISC). */

:root {
  color-scheme: dark;
  --bg: #1a0d1c;
  --ink: #fff4ec;
  --ink-2: rgb(255 244 236 / .72);
  --ink-3: rgb(255 244 236 / .58);
  --line: rgb(255 225 205 / .11);
  --surface: rgb(255 225 205 / .045);
  --surface-2: rgb(255 225 205 / .08);
  --accent: #ffb08a;
  --grad-text: linear-gradient(95deg, #ff8a6b, #ffb35c 60%, #ffd27a);
  --cta-bg: linear-gradient(100deg, #ff6f61 0%, #ff9a4d 55%, #ffc15e 100%);
  --cta-ink: #2a0f22;
  --cta-shadow: 0 18px 40px -18px rgb(255 120 80 / .65);
  --font: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-serif: "Playfair Display", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-emoji: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  --heart: #ff5470;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --gutter: 16px;
  --wrap: 1120px;
}
@media (min-width: 600px) { :root { --gutter: 24px; } }
@media (min-width: 1000px) { :root { --gutter: 40px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font: 500 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
main { overflow-x: clip; }   /* the sun and its glow may bleed past the gutters; never the page */
svg { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0; }
h1, h2 { margin: 0; text-wrap: balance; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: rgb(255 138 92 / .4); color: #fff; }
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  padding: 10px 16px; border-radius: 12px;
  background: var(--ink); color: var(--cta-ink); font-weight: 800; text-decoration: none;
}
.skip:focus { top: 12px; }

.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.grad { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- ambient sunset glow behind everything ---------- */
.ambient { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: var(--bg); }
.ambient i { position: absolute; width: 90vmax; aspect-ratio: 1; border-radius: 50%; opacity: .5; }
.ambient i:nth-child(1) { left: -40vmax; top: -45vmax; background: radial-gradient(closest-side, rgb(255 122 89 / .55), transparent); }
.ambient i:nth-child(2) { right: -45vmax; top: 10vh; background: radial-gradient(closest-side, rgb(122 42 107 / .75), transparent); }
.ambient i:nth-child(3) { left: -20vmax; bottom: -60vmax; background: radial-gradient(closest-side, rgb(255 181 71 / .32), transparent); }
@media (prefers-reduced-motion: no-preference) {
  .ambient i { animation: drift 34s ease-in-out infinite alternate; }
  .ambient i:nth-child(2) { animation-duration: 41s; animation-direction: alternate-reverse; }
  .ambient i:nth-child(3) { animation-duration: 47s; }
}
@keyframes drift { to { translate: 6vmax 4vmax; scale: 1.08; } }

/* ---------- top bar: name + language ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; font-weight: 850; font-size: 22px; letter-spacing: -.015em; }
.brand .logo { width: 36px; height: 36px; flex: none; }
.lang {
  display: inline-grid; place-items: center;
  min-width: 48px; height: 44px; padding: 0 14px;
  border-radius: 99px;
  text-decoration: none; font-weight: 800; font-size: 14px; letter-spacing: .04em;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: background-color .2s;
}
.lang:hover { background: rgb(255 225 205 / .14); }

/* ---------- button ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 58px; padding: 0 30px;
  border-radius: 99px;
  font: 800 18px/1 var(--font); letter-spacing: -.005em;
  text-decoration: none; white-space: nowrap;
  transition: scale .35s cubic-bezier(.25, 1.3, .4, 1), filter .2s;
}
.btn:active { scale: .97; }
.btn-primary { background: var(--cta-bg); color: var(--cta-ink); box-shadow: var(--cta-shadow); }
.btn-primary:hover { filter: brightness(1.05); }

/* ---------- hero: one line, one button, the live phone ---------- */
.hero {
  display: grid;
  justify-items: center;
  gap: 48px;
  padding-top: clamp(20px, 5vw, 40px);
}
.hero-copy { display: grid; justify-items: center; text-align: center; }
.hero h1 {
  font-weight: 850;
  font-size: clamp(42px, 11.4vw, 88px);
  line-height: 1;
  letter-spacing: -.035em;
  max-width: 11ch;
}
.hero h1 .grad { display: inline-block; padding-bottom: .08em; }
.hero .btn { margin-top: 34px; min-width: 230px; }
.platforms { margin-top: 18px; color: var(--ink-3); font-weight: 700; font-size: 15.5px; letter-spacing: .02em; word-spacing: .12em; }

/* the phone: the demo renders at 375×812 and is scaled to --w */
.phone-stage {
  --w: 262px;
  --s: .6987;   /* = --w / 375 */
  position: relative;
  margin: 0;
  display: grid;
  justify-items: center;
}
.sun-glow {
  position: absolute; z-index: -1;
  left: 50%; top: calc(var(--w) * -.1);
  width: calc(var(--w) * 2.6); aspect-ratio: 1;
  translate: -50% 0;
  background: radial-gradient(closest-side, rgb(255 122 89 / .32), transparent 72%);
  pointer-events: none;
}
.sun {
  position: absolute; z-index: -1;
  left: 50%; top: calc(var(--w) * .2);
  width: calc(var(--w) * 1.62); aspect-ratio: 1;
  translate: -50% 0;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffd27a 0%, #ff8a5c 55%, #ff5e7a 100%);
  -webkit-mask: linear-gradient(#000 0 56%, transparent 56% 60%, #000 60% 68%, transparent 68% 73%, #000 73% 80%, transparent 80% 86%, #000 86% 91%, transparent 91%);
  mask: linear-gradient(#000 0 56%, transparent 56% 60%, #000 60% 68%, transparent 68% 73%, #000 73% 80%, transparent 80% 86%, #000 86% 91%, transparent 91%);
  opacity: .78;
  pointer-events: none;
}
.phone {
  --bz: 10px;
  position: relative;
  padding: var(--bz);
  border-radius: calc(var(--w) * .13 + var(--bz));
  background: linear-gradient(160deg, #3a1d36, #120812 60%);
  box-shadow:
    0 60px 100px -40px rgb(10 0 8 / .95),
    0 0 0 1px rgb(255 225 205 / .14),
    inset 0 0 0 1px rgb(255 225 205 / .08);
}
.phone-screen {
  position: relative;
  width: var(--w);
  height: calc(var(--w) * 812 / 375);
  border-radius: calc(var(--w) * .13);
  overflow: hidden;
  clip-path: inset(0 round calc(var(--w) * .13));   /* also clips composited layers inside the demo */
  background: var(--bg) radial-gradient(120% 70% at 50% 30%, rgb(255 122 89 / .35), transparent 70%);
  isolation: isolate;
}
.phone-screen iframe {
  display: block;
  width: 375px; height: 812px;
  border: 0;
  transform: scale(var(--s));
  transform-origin: 0 0;
  background: transparent;
  color-scheme: dark;
}
.phone-caption {
  margin-top: 18px;
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 14.5px; font-weight: 700; color: var(--ink-3);
}
.phone-caption::before {
  content: "";
  width: 8px; height: 8px; border-radius: 50%;
  background: #6ee7a8;
  box-shadow: 0 0 0 4px rgb(110 231 168 / .16);
}
@media (max-width: 599px) { .sun { display: none; } }   /* too wide for the screen: it would only peek out as slabs */
@media (min-width: 360px) { .phone-stage { --w: 300px; --s: .8; } }
@media (min-width: 380px) { .phone-stage { --w: 320px; --s: .8533; } }

@media (min-width: 960px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: clamp(48px, 8vw, 128px);
    padding-top: 8px;
  }
  .hero-copy { justify-items: start; text-align: left; }
  .phone-stage { --w: 345px; --s: .92; }
}
@media (min-width: 960px) and (max-height: 860px) { .phone-stage { --w: 315px; --s: .84; } }
@media (min-width: 960px) and (max-height: 760px) { .phone-stage { --w: 285px; --s: .76; } }

/* ---------- three steps + one privacy line ---------- */
.how {
  display: grid;
  justify-items: center;
  padding-block: clamp(64px, 9vw, 112px) clamp(56px, 8vw, 96px);
}
.steps {
  list-style: none;
  margin: 0; padding: 0;
  width: min(100%, 680px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.steps li {
  position: relative;
  display: grid; justify-items: center; align-content: start; gap: 14px;
  padding-inline: 6px;
  text-align: center;
  font-weight: 800; font-size: clamp(15.5px, 2vw, 19px); line-height: 1.3;
  text-wrap: balance;
}
.step-ic {
  width: 60px; height: 60px;
  display: grid; place-items: center;
  border-radius: 20px;
  color: var(--cta-ink);
  background: var(--cta-bg);
  box-shadow: 0 14px 30px -16px rgb(255 120 80 / .8);
}
.step-ic .ic { width: 26px; height: 26px; stroke-width: 2.1; }
.steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 29px; left: calc(50% + 40px); right: calc(-50% + 40px);
  height: 2px;
  background: repeating-linear-gradient(90deg, rgb(255 176 138 / .5) 0 6px, transparent 6px 12px);
}
.privacy {
  margin-top: clamp(56px, 8vw, 80px);
  display: inline-flex; align-items: center; gap: 12px;
  max-width: 100%;
  padding: 14px 22px;
  border-radius: 22px;
  color: var(--ink-2);
  font-weight: 700; font-size: clamp(15.5px, 1.8vw, 17px); line-height: 1.4;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}
.privacy .ic { color: var(--accent); }

/* ---------- years strip: liked reels from different years, mixed ----------
   Default (and reduced motion): a still fan (3 cards on phones, 5 wider). With motion: the full row flows by.
   Both layouts have the same height, and only `translate` is animated. */
.years { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; padding-top: clamp(64px, 9vw, 120px); }
.strip {
  --cw: 128px; --ch: 214px; --gap: 14px; --pad: 40px;
  width: 100%;
  height: calc(var(--ch) + 2 * var(--pad));
  overflow: clip;
  -webkit-mask: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
  mask: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
}
@media (min-width: 700px) { .strip { --cw: 168px; --ch: 280px; --gap: 22px; --pad: 44px; } }
.strip-track { display: flex; justify-content: center; align-items: center; height: 100%; }
.strip-set { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; }
.strip-set + .strip-set, .rc:nth-child(n+4) { display: none; }
.rc {
  position: relative;
  flex: none;
  width: var(--cw); height: var(--ch);
  margin-inline: calc(var(--cw) * -.1);
  display: grid; place-items: center;
  border-radius: calc(var(--cw) * .15);
  background: linear-gradient(160deg, var(--c1), var(--c2));
  box-shadow: 0 22px 40px -20px rgb(10 0 8 / .85), inset 0 0 0 1px rgb(255 255 255 / .22);
}
.rc:nth-child(1) { rotate: -9deg; translate: 0 12px; }
.rc:nth-child(2) { z-index: 1; }
.rc:nth-child(3) { rotate: 9deg; translate: 0 12px; }
@media (min-width: 700px) {
  .rc:nth-child(4), .rc:nth-child(5) { display: grid; }
  .rc:nth-child(1) { rotate: -14deg; translate: 0 26px; }
  .rc:nth-child(2) { rotate: -7deg; translate: 0 6px; z-index: 1; }
  .rc:nth-child(3) { rotate: 0deg; translate: 0 0; z-index: 2; }
  .rc:nth-child(4) { rotate: 7deg; translate: 0 6px; z-index: 1; }
  .rc:nth-child(5) { rotate: 14deg; translate: 0 26px; }
}
.rc-e { font: calc(var(--cw) * .36)/1 var(--font-emoji); }
.rc-h { position: absolute; top: 8%; right: 10%; width: calc(var(--cw) * .12); height: auto; fill: #fff; }
.rc-y {
  position: absolute; left: 50%; bottom: 7%;
  translate: -50% 0;
  padding: .3em .62em .36em;
  border-radius: 99px;
  font: italic 600 calc(var(--cw) * .13)/1 var(--font-serif);
  color: #fff;
  background: rgb(0 0 0 / .26);
}
.years-cap {
  margin-top: 26px;
  text-align: center;
  font-weight: 800; font-size: clamp(22px, 3.4vw, 32px); line-height: 1.25; letter-spacing: -.015em;
}
.years-cap .yrs {
  font: italic 600 1.08em/1 var(--font-serif);
  background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent;
}
@media (prefers-reduced-motion: no-preference) {
  .strip-track { justify-content: flex-start; width: max-content; animation: flow 48s linear infinite; }
  .strip-set + .strip-set, .rc:nth-child(n) { display: flex; }
  .rc:nth-child(n) { display: grid; margin: 0 var(--gap) 0 0; rotate: var(--r); translate: 0 var(--y); z-index: auto; }
}
@media (prefers-reduced-motion: no-preference) and (max-width: 699px) { .strip-track { animation-duration: 38s; } }
@keyframes flow { to { translate: -50% 0; } }

/* ---------- FAQ: four short answers ---------- */
.faq { display: grid; justify-items: center; padding-bottom: clamp(24px, 4vw, 48px); }
.faq-title { font-weight: 850; font-size: clamp(28px, 4.4vw, 40px); line-height: 1.1; letter-spacing: -.025em; margin-bottom: 26px; }
.faq-list { width: min(100%, 680px); display: grid; gap: 10px; }
.faq-list details {
  border-radius: 22px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: background-color .25s;
}
.faq-list details[open] { background: var(--surface-2); }
.faq-list summary {
  list-style: none;
  display: flex; align-items: center; gap: 16px;
  min-height: 62px; padding: 14px 18px 14px 22px;
  cursor: pointer;
  font-weight: 800; font-size: 17.5px; line-height: 1.3;
  border-radius: 22px;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary .ic {
  margin-left: auto;
  width: 32px; height: 32px; padding: 6px;
  border-radius: 50%;
  color: var(--accent);
  background: rgb(255 160 120 / .1);
}
.faq-list details[open] summary .ic { rotate: 180deg; }
.faq-list details p { padding: 0 22px 20px; color: var(--ink-2); font-size: 16.5px; }
.faq-list details a { color: var(--accent); font-weight: 700; text-underline-offset: 3px; }
@media (prefers-reduced-motion: no-preference) {
  .faq-list summary .ic { transition: rotate .3s var(--ease-out); }
  @supports (interpolate-size: allow-keywords) {
    .faq-list { interpolate-size: allow-keywords; }
    .faq-list details::details-content {
      block-size: 0;
      overflow: hidden;
      transition: block-size .35s var(--ease-out), content-visibility .35s allow-discrete;
    }
    .faq-list details[open]::details-content { block-size: auto; }
  }
}

/* ---------- outro: the double-tap moment ---------- */
.outro { display: grid; justify-items: center; text-align: center; padding-block: clamp(56px, 8vw, 104px) clamp(72px, 10vw, 128px); }
.like { position: relative; width: clamp(200px, 21vw, 244px); aspect-ratio: 9 / 15; }
.like::before {
  content: ""; position: absolute; inset: -30% -60%; z-index: -1;
  background: radial-gradient(closest-side, rgb(255 84 112 / .28), transparent 72%);
}
.like-card {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  border-radius: 15% / 9%;
  rotate: -4deg;
  background: linear-gradient(160deg, #f093fb, #f5576c 62%, #ffb199);
  box-shadow: 0 40px 70px -30px rgb(10 0 8 / .9), inset 0 0 0 1px rgb(255 255 255 / .22);
  overflow: hidden;
}
.like-e { position: absolute; left: 0; right: 0; top: 17%; text-align: center; font: 76px/1 var(--font-emoji); }
.like-big {
  position: absolute; left: 27%; top: 45%;
  width: 46%; height: auto;
  fill: var(--heart);
  filter: drop-shadow(0 10px 20px rgb(120 0 30 / .45));
}
.like-burst { position: absolute; inset: 0; }
.like-burst i {
  position: absolute; left: 50%; top: 58%;
  width: 18px; height: 18px; margin: -9px 0 0 -9px;
  opacity: 0;
}
.like-burst svg { width: 100%; height: 100%; fill: #fff; }
.like-chip {
  position: absolute; left: 8%; bottom: 7%;
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px 0 10px;
  border-radius: 99px;
  font: 700 13px/1 var(--font);
  white-space: nowrap;
  color: #fff;
  background: rgb(44 14 32 / .5);
  box-shadow: inset 0 0 0 1px rgb(255 228 210 / .2);
}
.like-chip svg { width: 13px; height: 13px; fill: var(--accent); }
.like-chip i { font: italic 600 17px/1 var(--font-serif); }
.outro-q {
  margin-top: clamp(44px, 6vw, 64px);
  font: italic 600 clamp(46px, 10vw, 92px)/1 var(--font-serif);
  letter-spacing: -.02em;
  padding-bottom: .1em;
}
.outro .btn { margin-top: 30px; min-width: 230px; }
@media (prefers-reduced-motion: no-preference) {
  .like-big { animation: tap 5s ease-out infinite; }
  .like-burst i { animation: burst 5s ease-out infinite; }
}
@keyframes tap {
  0%, 26% { opacity: 0; scale: .2; }
  33% { opacity: 1; scale: 1.2; }
  38% { scale: .94; }
  43%, 70% { opacity: 1; scale: 1; translate: 0 0; }
  84%, 100% { opacity: 0; scale: 1.08; translate: 0 -18%; }
}
@keyframes burst {
  0%, 29% { opacity: 0; transform: rotate(var(--a)) translateY(0) scale(.4); }
  35% { opacity: 1; }
  56%, 100% { opacity: 0; transform: rotate(var(--a)) translateY(-108px) scale(1); }
}

/* ---------- footer ---------- */
.foot {
  position: relative;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 18px 28px;
  padding-block: 28px 36px;
}
.foot::before { content: ""; position: absolute; top: 0; left: var(--gutter); right: var(--gutter); height: 1px; background: var(--line); }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.foot-links a { color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 15px; line-height: 2; }
.foot-links a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.langs {
  display: inline-flex; gap: 2px; padding: 3px;
  border-radius: 99px;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line);
}
.langs > * {
  display: grid; place-items: center;
  min-width: 48px; height: 38px; padding: 0 12px;
  border-radius: 99px;
  font-weight: 800; font-size: 14px; letter-spacing: .04em;
  text-decoration: none; color: var(--ink-2);
}
.langs a:hover { color: var(--ink); }
.langs [aria-current] { background: var(--ink); color: var(--cta-ink); }
@media (max-width: 599px) {
  .foot { flex-direction: column; text-align: center; }
  .foot-links { justify-content: center; }
}

/* ---------- entrance motion (off when reduced motion is requested) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero h1, .hero .btn, .platforms { animation: rise .8s var(--ease-out) both; }
  .hero .btn { animation-delay: .1s; }
  .platforms { animation-delay: .18s; }
  .phone { animation: rise 1s var(--ease-out) .12s both; }
  .sun { animation: sunrise 1.6s var(--ease-out) .1s both; }
  .phone-caption::before { animation: pulse 2.4s ease-in-out infinite; }
}
@keyframes rise { from { opacity: 0; translate: 0 22px; } }
@keyframes sunrise { from { opacity: 0; translate: -50% 16%; } }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgb(110 231 168 / 0); } }

@media (forced-colors: active) {
  .btn, .lang, .langs, .privacy, .phone, .rc, .faq-list details, .like-card { border: 1px solid CanvasText; }
  .grad { color: CanvasText; background: none; }
}
