/* CosmoMatch — промо 16 «Мемфис-орбита» */

:root {
  --ground: #FFF3E2;
  --ink: #1F1B2E;
  --accent: #FF5C8A;
  --secondary: #22C7A8;
  --glow: #FFD166;
}

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

html { overflow-x: hidden; }

body {
  background: var(--ground);
  color: var(--ink);
  font-family: 'Montserrat', 'Trebuchet MS', sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.confetti {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
}

.confetti__drift {
  animation: memphis-drift 9s linear infinite;
}

@keyframes memphis-drift {
  from { transform: translate(0, 0); }
  to   { transform: translate(140px, 140px); }
}

.frame {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px 48px;
}

/* ---------- header ---------- */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 26px 0 10px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--ink);
}

.logo__mark {
  width: 84px;
  height: 40px;
  flex: none;
  overflow: visible;
}

.lm-orbit {
  stroke: var(--ink);
  stroke-width: 6;
  stroke-linecap: butt;
}

.lm-spring {
  stroke: var(--secondary);
  stroke-width: 6;
  stroke-linecap: butt;
  fill: none;
}

.lm-planet { fill: var(--accent); stroke: var(--ink); stroke-width: 3; }

.logo:hover .lm-planet { fill: var(--glow); }

.wordmark {
  font-family: 'Rubik', 'Verdana', sans-serif;
  font-weight: 700;
  font-size: 26px;
  letter-spacing: -0.02em;
  display: inline-flex;
  gap: 2px;
}

.wm-cosmo { display: inline-block; transform: translateY(-6px) rotate(-4deg); color: var(--ink); }
.wm-match { display: inline-block; transform: translateY(4px) rotate(3deg); color: var(--accent); }

.top__num {
  font-family: 'Rubik', sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.14em;
  background: var(--ink);
  color: var(--ground);
  padding: 8px 14px;
  transform: rotate(3deg);
  box-shadow: 5px 5px 0 var(--secondary);
}

/* ---------- hero ---------- */

.hero { position: relative; padding: 46px 0 70px; }

.hero__plate {
  background: var(--glow);
  border: 3px solid var(--ink);
  box-shadow: 12px 12px 0 var(--accent);
  padding: 44px 46px 40px;
  max-width: 760px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.hero__plate:hover {
  transform: rotate(2deg);
  box-shadow: 12px 12px 0 var(--secondary);
}

.tilt-l { transform: rotate(-1.4deg); }
.tilt-r { transform: rotate(1.2deg); }
.hero__plate.tilt-l:hover { transform: rotate(2deg); }

.kicker {
  font-family: 'Rubik', sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  display: inline-block;
  background: var(--ink);
  color: var(--ground);
  padding: 6px 12px;
  transform: rotate(-2deg);
  margin-bottom: 22px;
}

.headline {
  font-family: 'Rubik', sans-serif;
  font-weight: 700;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin-bottom: 22px;
  text-wrap: balance;
}

.sub {
  font-size: clamp(16px, 1.6vw, 19px);
  max-width: 52ch;
  margin-bottom: 30px;
}

.cta {
  display: inline-block;
  font-family: 'Rubik', sans-serif;
  font-weight: 700;
  font-size: 19px;
  text-decoration: none;
  color: var(--ink);
  background: var(--secondary);
  border: 3px solid var(--ink);
  padding: 15px 34px;
  box-shadow: 7px 7px 0 var(--ink);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.cta:hover, .cta:focus-visible {
  transform: translate(4px, 4px) rotate(-1deg);
  box-shadow: 2px 2px 0 var(--ink);
  background: var(--accent);
  color: var(--ground);
}

.hero__squiggle {
  position: absolute;
  right: 8px;
  bottom: 6px;
  width: min(240px, 42vw);
  height: auto;
}

.hero__squiggle path {
  stroke: var(--accent);
  stroke-width: 7;
}

/* ---------- cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  padding-bottom: 76px;
}

.card {
  border: 3px solid var(--ink);
  padding: 30px 26px 34px;
  min-height: 190px;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.card--a {
  background: var(--accent);
  color: var(--ground);
  box-shadow: 10px 10px 0 var(--secondary);
}

.card--b {
  background: var(--secondary);
  color: var(--ink);
  box-shadow: 10px 10px 0 var(--accent);
}

.card--c {
  background: var(--glow);
  color: var(--ink);
  box-shadow: 10px 10px 0 var(--ink);
}

.card:hover { transform: rotate(2deg) translateY(-4px); }
.card--a:hover { box-shadow: 10px 10px 0 var(--glow); }
.card--b:hover { box-shadow: 10px 10px 0 var(--ink); }
.card--c:hover { box-shadow: 10px 10px 0 var(--accent); }
.card.tilt-l:hover { transform: rotate(-3deg) translateY(-4px); }
.card.tilt-r:hover { transform: rotate(2deg) translateY(-4px); }

.card__t {
  font-family: 'Rubik', sans-serif;
  font-weight: 700;
  font-size: 30px;
  margin-bottom: 12px;
}

.card__d { font-size: 17px; font-weight: 500; }
.card--b .card__d, .card--c .card__d { font-family: 'Montserrat', sans-serif; }

/* ---------- quote ---------- */

.quote-block {
  position: relative;
  background: var(--ink);
  color: var(--ground);
  border: 3px solid var(--ink);
  box-shadow: 12px 12px 0 var(--glow);
  padding: 52px 44px 60px;
  margin: 0 auto 84px;
  max-width: 900px;
  transform: rotate(-0.8deg);
}

.quote p {
  font-family: 'Rubik', sans-serif;
  font-weight: 700;
  font-size: clamp(24px, 3.4vw, 38px);
  line-height: 1.22;
  max-width: 24ch;
}

.quote__zig {
  position: absolute;
  left: 30px;
  bottom: 14px;
  width: 220px;
  height: auto;
}

.quote__zig path { stroke: var(--accent); stroke-width: 4; fill: none; }

/* ---------- note ---------- */

.note {
  display: flex;
  justify-content: center;
  padding-bottom: 30px;
}

.note__sticker {
  background: var(--ground);
  border: 3px dashed var(--ink);
  padding: 26px 38px;
  box-shadow: 8px 8px 0 var(--accent);
  transition: transform 0.2s ease;
}

.note__sticker:hover { transform: rotate(2deg) scale(1.02); }

.note__line {
  font-family: 'Rubik', sans-serif;
  font-weight: 700;
  font-size: 20px;
  text-align: center;
}

/* ---------- footer ---------- */

.foot {
  border-top: 3px solid var(--ink);
  padding-top: 26px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.foot__brand {
  font-family: 'Rubik', sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.08em;
}

.promo-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.promo-nav a {
  font-family: 'Rubik', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
  text-decoration: none;
  border: 2px solid var(--ink);
  background: var(--ground);
  padding: 9px 16px;
  box-shadow: 4px 4px 0 var(--secondary);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.promo-nav a:hover, .promo-nav a:focus-visible {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--accent);
  background: var(--glow);
}

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

html.js [data-reveal] { opacity: 0; }

html.js [data-reveal].in {
  opacity: 1;
  animation: memphis-pop 0.55s cubic-bezier(0.2, 1.4, 0.4, 1);
}

@keyframes memphis-pop {
  0%   { opacity: 0; transform: translateY(64px) scale(0.94); }
  60%  { opacity: 1; transform: translateY(-10px) scale(1.02); }
  80%  { opacity: 1; transform: translateY(4px); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------- adaptive ---------- */

@media (max-width: 900px) {
  .cards { grid-template-columns: 1fr; gap: 22px; }
  .hero__plate { padding: 32px 26px; box-shadow: 8px 8px 0 var(--accent); }
  .hero__squiggle { right: 0; bottom: -30px; }
}

@media (max-width: 480px) {
  .frame { padding: 0 16px 36px; }
  .top { flex-wrap: wrap; }
  .wordmark { font-size: 22px; }
  .logo__mark { width: 68px; }
  .quote-block { padding: 34px 24px 52px; }
  .note__sticker { padding: 20px 22px; }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .confetti__drift { animation: none; }
  html.js [data-reveal] { opacity: 1; }
  html.js [data-reveal].in { animation: none; }
  .hero__plate, .card, .cta, .note__sticker, .promo-nav a {
    transition: none;
  }
}
