/* Görev: rebusmaster.com landing — brand tokens + responsive + juice */
/* Token kaynak: src/shared/tokens/ColorTokens.js (CSS custom properties mirror) */

:root {
  --brand-primary: #7B6DB5;
  --brand-primary-dark: #5A4D8D;
  --brand-primary-light: #A99BD4;
  --brand-gradient: linear-gradient(180deg, #A99BD4 0%, #7B6DB5 100%);
  --accent-gold: #F2C94C;
  --accent-gold-dark: #D9A93A;
  --cta-primary: #8BBF4A;
  --cta-primary-dark: #6FA033;
  --surface-cream: #F0E4D8;
  --surface-card: #FFF5EC;
  --text-primary: #4A3426;
  --text-secondary: #7A6452;
  --shadow-3d-purple: 0 4px 0 #5A4D8D, 0 8px 16px rgba(74, 52, 38, 0.18);
  --shadow-3d-green: 0 4px 0 #6FA033, 0 8px 16px rgba(74, 52, 38, 0.18);
  --shadow-soft: 0 6px 18px rgba(74, 52, 38, 0.10);
  --radius-card: 20px;
  --radius-btn: 999px;
  --font-display: 'Baloo 2', system-ui, -apple-system, sans-serif;
  --font-body: 'Nunito', system-ui, -apple-system, sans-serif;
  --maxw: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--surface-cream);
  background-image:
    radial-gradient(circle at 15% 0%, rgba(123, 109, 181, 0.10) 0%, transparent 55%),
    radial-gradient(circle at 90% 100%, rgba(242, 201, 76, 0.12) 0%, transparent 60%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-primary-dark); text-decoration: none; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 800; color: var(--text-primary); margin: 0 0 .5em; line-height: 1.15; }
h1 { font-size: clamp(2rem, 5vw + 1rem, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw + .8rem, 2.4rem); text-align: center; margin-bottom: 2rem; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; color: var(--text-secondary); }

/* ── NAV ───────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 22px;
  background: linear-gradient(180deg, rgba(255,252,247,0.96) 0%, rgba(240,228,216,0.92) 100%);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid rgba(123, 109, 181, 0.14);
  box-shadow: 0 1px 0 rgba(123, 109, 181, 0.06), 0 6px 18px rgba(74, 52, 38, 0.04);
}
.nav__brand {
  display: inline-flex; align-items: center;
  padding: 4px 6px; border-radius: 12px;
  transition: transform .25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.nav__brand:hover { transform: translateY(-1px) rotate(-1.5deg); }
.nav__brand:active { transform: translateY(1px) rotate(0deg); }
.nav__logo {
  height: 44px; width: auto;
  filter: drop-shadow(0 2px 4px rgba(123, 109, 181, 0.20));
  transition: filter .25s ease;
}
.nav__brand:hover .nav__logo { filter: drop-shadow(0 4px 10px rgba(123, 109, 181, 0.40)); }
@media (min-width: 720px) { .nav__logo { height: 52px; } }

.nav__links { display: flex; gap: 6px; align-items: center; font-weight: 700; font-size: .95rem; }
.nav__links a {
  position: relative; color: var(--text-secondary); padding: 8px 12px;
  border-radius: 8px;
  transition: color .2s ease, background .2s ease;
}
.nav__links a:not(.nav__cta)::after {
  content: ''; position: absolute; left: 12px; right: 12px; bottom: 4px;
  height: 2px; border-radius: 1px;
  background: var(--brand-primary);
  transform: scaleX(0); transform-origin: center;
  transition: transform .25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.nav__links a:not(.nav__cta):hover { color: var(--brand-primary); }
.nav__links a:not(.nav__cta):hover::after { transform: scaleX(1); }
.nav__cta {
  background: var(--cta-primary); color: #fff !important;
  padding: 9px 16px !important;
  box-shadow: 0 3px 0 var(--cta-primary-dark), 0 4px 10px rgba(111, 160, 51, 0.25);
  font-family: var(--font-display);
}
.nav__cta:hover { transform: translateY(-1px); box-shadow: 0 4px 0 var(--cta-primary-dark), 0 6px 14px rgba(111, 160, 51, 0.35); }
.nav__cta:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--cta-primary-dark); }

@media (max-width: 640px) {
  .nav__links a:nth-child(1), .nav__links a:nth-child(2) { display: none; }
  .nav__links a[href="/privacy"] { padding: 8px 10px; font-size: .88rem; }
}
@media (max-width: 420px) { .nav__links a[href="/privacy"] { display: none; } }

/* ── HERO ──────────────────────────────── */
.hero {
  display: grid; grid-template-columns: 1fr; gap: 32px;
  max-width: var(--maxw); margin: 0 auto;
  padding: 48px 24px 64px;
  align-items: center;
}
@media (min-width: 960px) {
  .hero { grid-template-columns: 1.1fr 1fr; gap: 48px; padding: 80px 24px 96px; }
  .hero__visual { order: 2; }
  .hero__copy { order: 1; }
}
.hero__visual { position: relative; display: flex; justify-content: center; align-items: center; min-height: 320px; }
.hero__visual img { width: min(72vw, 420px); height: auto; position: relative; z-index: 2; filter: drop-shadow(0 18px 28px rgba(74, 52, 38, 0.20)); }
.hero__halo {
  position: absolute; inset: 0; margin: auto; width: 90%; aspect-ratio: 1;
  background: radial-gradient(circle, rgba(242, 201, 76, 0.55) 0%, transparent 60%);
  z-index: 1; animation: pulse 5s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: .7; } 50% { transform: scale(1.08); opacity: 1; } }

.float { animation: float 5s ease-in-out infinite; }
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-1.5deg); }
  50%      { transform: translateY(-14px) rotate(1.5deg); }
}

.hero__pill {
  display: inline-block; padding: 6px 14px;
  background: var(--accent-gold); color: var(--text-primary);
  font-weight: 700; font-size: .85rem; border-radius: var(--radius-btn);
  box-shadow: 0 2px 0 var(--accent-gold-dark);
  margin-bottom: 16px; letter-spacing: .02em;
  animation: pillPop 1.4s cubic-bezier(0.34, 1.56, 0.64, 1) .15s both;
}
@keyframes pillPop {
  0%   { opacity: 0; transform: translateY(-12px) scale(0.6) rotate(-8deg); }
  60%  { transform: translateY(0) scale(1.08) rotate(2deg); }
  100% { opacity: 1; transform: translateY(0) scale(1) rotate(0deg); }
}
.hero h1 {
  animation: heroLift 1s cubic-bezier(0.34, 1.56, 0.64, 1) .25s both;
}
.hero .lead {
  animation: heroFade .9s ease-out .55s both;
}
.hero .cta-row {
  animation: heroFade .9s ease-out .75s both;
}
@keyframes heroLift {
  0%   { opacity: 0; transform: translateY(28px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes heroFade {
  0%   { opacity: 0; transform: translateY(14px); }
  100% { opacity: 1; transform: translateY(0); }
}
.grad {
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-dark) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { font-size: 1.13rem; max-width: 540px; margin-bottom: 24px; }

.hero__rating { display: flex; align-items: center; gap: 10px; margin-top: 18px; color: var(--text-secondary); font-size: .95rem; }
.stars { color: var(--accent-gold); font-size: 1.1rem; letter-spacing: 2px; }

/* ── CTA BUTTONS ───────────────────────── */
.cta-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 22px;
  border-radius: 14px;
  font-family: var(--font-display); font-weight: 700;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease;
  user-select: none; -webkit-tap-highlight-color: transparent;
}
.btn__col { display: flex; flex-direction: column; line-height: 1.05; text-align: left; }
.btn__col small { font-size: .68rem; font-weight: 600; opacity: .85; letter-spacing: .04em; }
.btn__col strong { font-size: 1.05rem; font-weight: 800; }
.btn--play {
  background: var(--brand-primary); color: #fff;
  box-shadow: var(--shadow-3d-purple);
}
.btn--app {
  background: var(--text-primary); color: #fff;
  box-shadow: 0 4px 0 #2D1F15, 0 8px 16px rgba(74, 52, 38, 0.18);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(2px); }
.btn--play:active { box-shadow: 0 2px 0 var(--brand-primary-dark); }
.btn--app:active { box-shadow: 0 2px 0 #2D1F15; }
.btn--lg { padding: 16px 28px; }
.btn--lg .btn__col strong { font-size: 1.18rem; }

body.platform--ios .btn--app, body.platform--android .btn--play {
  outline: 3px solid var(--accent-gold);
  outline-offset: 3px;
  animation: highlight 2.4s ease-in-out infinite;
}
@keyframes highlight { 0%, 100% { outline-color: var(--accent-gold); } 50% { outline-color: rgba(242, 201, 76, 0.4); } }

/* ── SECTION SHARED ────────────────────── */
section {
  max-width: var(--maxw); margin: 0 auto;
  padding: 64px 24px;
}
@media (min-width: 960px) { section { padding: 96px 32px; } }

/* ── HOW IT WORKS ──────────────────────── */
.how { padding-top: 32px; }
.steps {
  display: grid; gap: 24px; padding: 0; margin: 0; list-style: none;
  grid-template-columns: 1fr;
  counter-reset: step;
}
@media (min-width: 720px)  { .steps { grid-template-columns: repeat(3, 1fr); } }
.step {
  background: var(--surface-card);
  border-radius: var(--radius-card);
  padding: 32px 24px 28px;
  text-align: center;
  position: relative;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(123, 109, 181, 0.08);
}
.step__num {
  position: absolute; top: -18px; left: 50%; transform: translateX(-50%);
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--brand-gradient); color: #fff;
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 800; font-size: 1.3rem;
  box-shadow: var(--shadow-3d-purple);
}
.step img { width: 120px; height: 120px; margin: 14px auto 18px; }
.step h3 { margin-top: 6px; }
.step p { color: var(--text-secondary); margin: 0; font-size: .98rem; }

.cryptogram {
  display: flex; justify-content: center; gap: 4px; flex-wrap: wrap;
  margin: 14px auto 18px; height: 120px; align-items: center;
}
.cryptogram span {
  width: 28px; height: 36px; display: grid; place-items: center;
  background: var(--brand-primary); color: #fff;
  border-radius: 6px; font-family: var(--font-display); font-weight: 800;
  box-shadow: 0 2px 0 var(--brand-primary-dark);
  opacity: 0;
  animation: cryptoPop .5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.step.in-view .cryptogram span:nth-child(1) { animation-delay: .10s; }
.step.in-view .cryptogram span:nth-child(2) { animation-delay: .18s; background: transparent; box-shadow: none; color: var(--brand-primary-dark); }
.step.in-view .cryptogram span:nth-child(3) { animation-delay: .26s; }
.step.in-view .cryptogram span:nth-child(4) { animation-delay: .34s; }
.step.in-view .cryptogram span:nth-child(5) { animation-delay: .42s; background: transparent; box-shadow: none; color: var(--brand-primary-dark); }
.step.in-view .cryptogram span:nth-child(6) { animation-delay: .50s; }
.step.in-view .cryptogram span:nth-child(7) { animation-delay: .58s; background: transparent; box-shadow: none; color: var(--brand-primary-dark); }
.step.in-view .cryptogram span:nth-child(8) { animation-delay: .66s; }
.step.in-view .cryptogram span:nth-child(9) { animation-delay: .74s; }
@keyframes cryptoPop {
  0%   { opacity: 0; transform: translateY(-14px) scale(0.6); }
  60%  { transform: translateY(2px) scale(1.1); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── FEATURES ──────────────────────────── */
.feature-grid {
  display: grid; gap: 18px;
  grid-template-columns: 1fr;
}
@media (min-width: 720px)  { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .feature-grid { grid-template-columns: repeat(4, 1fr); } }
.feature-card {
  background: var(--surface-card);
  border-radius: var(--radius-card);
  padding: 28px 22px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(123, 109, 181, 0.08);
  transition: transform .25s ease, box-shadow .25s ease;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: 0 10px 24px rgba(74, 52, 38, 0.14); }
.feature-card__icon {
  width: 56px; height: 56px; border-radius: 16px;
  background: var(--brand-gradient);
  display: grid; place-items: center; font-size: 1.7rem;
  margin-bottom: 14px;
  box-shadow: var(--shadow-3d-purple);
  transition: transform .35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.feature-card:hover .feature-card__icon { transform: scale(1.12) rotate(-6deg); }
.feature-card h3 { margin-bottom: 6px; }
.feature-card p { font-size: .95rem; margin: 0; }

/* ── SCREENSHOTS ───────────────────────── */
.shots {
  display: grid; gap: 18px;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) { .shots { grid-template-columns: repeat(3, 1fr); } }
.shot {
  margin: 0;
  background: var(--brand-gradient);
  border-radius: var(--radius-card);
  padding: 12px;
  box-shadow: var(--shadow-3d-purple);
  transition: transform .3s ease;
}
@media (hover: hover) {
  .shot:hover { transform: translateY(-6px) rotate(-1deg); }
  .shot:nth-child(2):hover { transform: translateY(-6px) rotate(1deg); }
}
.shot img { border-radius: 12px; aspect-ratio: 9/16; object-fit: cover; }

/* ── BOTTOM CTA ────────────────────────── */
.cta-bottom {
  text-align: center;
  background: var(--brand-gradient);
  color: #fff;
  border-radius: 32px;
  padding: 64px 24px !important;
  box-shadow: 0 12px 32px rgba(74, 52, 38, 0.20);
  position: relative; overflow: hidden;
}
.cta-bottom::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(242, 201, 76, 0.2) 0%, transparent 60%);
  pointer-events: none;
}
.cta-bottom h2 { color: #fff; }
.cta-bottom p { color: rgba(255, 255, 255, 0.92); font-size: 1.1rem; margin-bottom: 28px; }
.cta-bottom .cta-row { justify-content: center; position: relative; z-index: 2; }

/* ── FOOTER ────────────────────────────── */
.footer { padding: 36px 24px 48px; text-align: center; color: var(--text-secondary); font-size: .92rem; }
.footer__inner { display: flex; flex-wrap: wrap; gap: 14px 22px; justify-content: center; align-items: center; max-width: var(--maxw); margin: 0 auto; }
.footer__links { display: flex; gap: 18px; }
.footer__links a { color: var(--text-secondary); }
.footer__links a:hover { color: var(--brand-primary); }
.footer__platforms { margin-top: 12px; opacity: .8; }

/* ── REVEAL (IntersectionObserver) ─────── */
.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity .7s ease, transform .7s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* ── REDUCED MOTION ────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .float, .hero__halo, .btn { animation: none !important; transition: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
