/* Funity landing — design system ported from apps/mobile/src/theme.ts.
   Warm cream page, chunky 3D surfaces (tonal 2px border + offset "base" + press-down),
   espresso text, teal as the one pop color, gold reserved for the Funz coin.
   Hebrew-first / RTL. */

:root {
  /* palette (theme.ts colors) */
  --cream: #FAF6ED;
  --surface: #FFFFFF;
  --surface-deep: #E7DCC4;
  --espresso: #3A2A1C;
  --brand: #13B0A5;
  --brand-deep: #0E8C84;
  --caramel: #C68A52;
  --caramel-deep: #9C6B3A;
  --gold: #F0B53C;
  --gold-deep: #C68A1E;
  --base-soft: rgba(58, 42, 28, 0.65);
  --base-muted: rgba(58, 42, 28, 0.40);

  /* radii (theme.ts radii) */
  --r-sm: 12px;
  --r-md: 22px;
  --r-lg: 32px;
  --r-xl: 40px;
  --r-pill: 999px;

  /* chunky offsets (theme.ts thickness) */
  --chunk-btn: 8px;
  --chunk-card: 12px;

  /* ambient ground shadow (theme.ts shadows.ambient) */
  --ambient: 0 6px 16px rgba(58, 42, 28, 0.15);

  --container: 1120px;
  --font: 'Rubik', 'Heebo', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--espresso);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

/* ---- layout ---- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: clamp(18px, 4vw, 32px); }
.section { padding-block: clamp(40px, 8vw, 88px); }
.section-head { text-align: center; max-width: 640px; margin-inline: auto; margin-bottom: clamp(28px, 5vw, 52px); }

/* ---- typography ---- */
h1, h2, h3 { margin: 0; line-height: 1.12; font-weight: 900; letter-spacing: -0.2px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); border: 2px solid var(--surface-deep);
  border-radius: var(--r-pill); padding: 7px 15px;
  font-size: 0.86rem; font-weight: 700; color: var(--base-soft);
  box-shadow: 0 3px 0 var(--surface-deep);
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
h1.hero-title { font-size: clamp(2.25rem, 6.2vw, 3.7rem); }
h2.section-title { font-size: clamp(1.7rem, 4.4vw, 2.5rem); }
.lead { font-size: clamp(1.06rem, 2.6vw, 1.3rem); color: var(--base-soft); font-weight: 500; }
.muted { color: var(--base-soft); }

/* ---- buttons (chunky 3D) ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: inherit; font-weight: 800; font-size: 1.04rem;
  padding: 14px 26px; border-radius: var(--r-md); border: 2px solid transparent;
  cursor: pointer; text-decoration: none; white-space: nowrap; user-select: none;
  transition: transform .09s ease, box-shadow .09s ease, filter .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn svg { width: 20px; height: 20px; }
.btn:active { transform: translateY(var(--chunk-btn)); }

.btn-primary { background: var(--brand); color: #fff; border-color: var(--brand-deep);
  box-shadow: 0 var(--chunk-btn) 0 var(--brand-deep), var(--ambient); }
.btn-primary:hover { filter: brightness(1.04); }
.btn-primary:active { box-shadow: 0 0 0 var(--brand-deep), var(--ambient); }

.btn-store { background: var(--brand); color: #fff; border-color: var(--brand-deep);
  box-shadow: 0 var(--chunk-btn) 0 var(--brand-deep), var(--ambient); }
.btn-store:hover { filter: brightness(1.04); }
.btn-store:active { box-shadow: 0 0 0 var(--brand-deep), var(--ambient); }
.btn-store small { display: block; font-size: 0.7rem; font-weight: 600; opacity: 0.8; line-height: 1; margin-bottom: 2px; }
.btn-store .store-text { text-align: start; line-height: 1.05; }
.btn-store .store-text b { font-size: 1.08rem; font-weight: 800; }

.btn-secondary { background: var(--surface); color: var(--espresso); border-color: var(--surface-deep);
  box-shadow: 0 var(--chunk-btn) 0 var(--surface-deep), var(--ambient); }
.btn-secondary:hover { filter: brightness(0.99); }
.btn-secondary:active { box-shadow: 0 0 0 var(--surface-deep), var(--ambient); }

.btn-ghost { background: transparent; color: var(--espresso); font-weight: 700; padding: 12px 18px; }
.btn-ghost:hover { background: rgba(58, 42, 28, 0.05); }
.btn-ghost:active { transform: none; opacity: 0.7; }

/* ---- coin chip ---- */
.coin-chip { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; color: var(--espresso); white-space: nowrap; }
.coin-chip img { width: 22px; height: 22px; }
.coin-chip.lg img { width: 30px; height: 30px; }

/* ---- top bar ---- */
.topbar { position: sticky; top: 0; z-index: 50;
  background: rgba(250, 246, 237, 0.82); backdrop-filter: saturate(1.2) blur(12px);
  border-bottom: 1px solid rgba(58, 42, 28, 0.06); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-block: 12px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 1.3rem; color: var(--espresso); text-decoration: none; }
.brand img { width: 34px; height: 34px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--base-soft); text-decoration: none; font-weight: 700; font-size: 0.96rem; padding: 8px 13px; border-radius: var(--r-pill); transition: background .15s, color .15s; }
.nav a:hover { color: var(--espresso); background: rgba(255, 255, 255, 0.7); }

/* ---- hero ---- */
.hero { display: grid; grid-template-columns: 1.08fr 0.92fr; gap: clamp(24px, 5vw, 56px); align-items: center; padding-block: clamp(28px, 6vw, 64px); }
.hero-copy > * + * { margin-top: clamp(16px, 2.6vw, 24px); }
.hero-title .pop { color: var(--brand); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.hero-note { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; color: var(--base-soft); font-weight: 600; }
.hero-note .sep { opacity: 0.4; }

.hero-art { position: relative; display: flex; justify-content: center; align-items: center; min-height: 320px; }
.hero-disc { position: absolute; width: min(400px, 88%); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 50% 42%, rgba(19, 176, 165, 0.12), rgba(19, 176, 165, 0.04) 55%, transparent 72%); }
.hero-mascot { position: relative; width: min(330px, 78%); filter: drop-shadow(0 26px 28px rgba(58, 42, 28, 0.20)); }

.float-chip { position: absolute; display: inline-flex; align-items: center; gap: 7px;
  background: var(--surface); border: 2px solid var(--surface-deep); border-radius: var(--r-pill);
  padding: 9px 15px; font-weight: 800; font-size: 0.98rem; box-shadow: 0 5px 0 var(--surface-deep), var(--ambient); }
.float-chip img { width: 24px; height: 24px; }
.float-chip.one { top: 12%; inset-inline-start: 2%; }
.float-chip.two { bottom: 14%; inset-inline-end: 0%; }
.float-chip .tick { width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: #fff; display: inline-flex; align-items: center; justify-content: center; }

/* ---- step cards ---- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2.5vw, 22px); }
.card { background: var(--surface); border: 2px solid var(--surface-deep); border-radius: var(--r-lg);
  box-shadow: 0 var(--chunk-card) 0 var(--surface-deep), var(--ambient); }
.step { padding: clamp(22px, 3vw, 30px); position: relative; }
.step-num { position: absolute; inset-block-start: 18px; inset-inline-end: 18px;
  width: 30px; height: 30px; border-radius: 50%; background: var(--cream); color: var(--caramel-deep);
  font-weight: 900; display: inline-flex; align-items: center; justify-content: center; font-size: 0.95rem; }
.step-icon { width: 76px; height: 76px; border-radius: 22px; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.step-icon img { width: 58px; height: 58px; }
.step-icon svg { width: 40px; height: 40px; }
.step-icon.block { background: #F3E7D5; color: var(--caramel-deep); }
.step-icon.earn { background: #FAEFD2; }
.step-icon.spend { background: #DCEFEA; color: var(--brand-deep); }
.step h3 { font-size: 1.28rem; margin-bottom: 8px; }
.step p { margin: 0; color: var(--base-soft); font-weight: 500; }
.step p b { color: var(--espresso); font-weight: 800; }

/* ---- funitiz grid ---- */
.funitiz { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(12px, 2vw, 18px); }
.tile { border-radius: var(--r-lg); border: 2px solid; padding: 18px 16px 16px; display: flex; flex-direction: column; align-items: center; text-align: center;
  box-shadow: 0 var(--chunk-card) 0 var(--tile-deep), var(--ambient); background: var(--tile-bg); border-color: var(--tile-deep); position: relative; }
.tile.movement { --tile-bg: #F3E7D5; --tile-deep: #9C6B3A; }
.tile.mind     { --tile-bg: #DCEFEA; --tile-deep: #0E8C84; }
.tile.health   { --tile-bg: #FAEFD2; --tile-deep: #C68A1E; }
.tile img.cut { width: clamp(96px, 14vw, 132px); height: clamp(96px, 14vw, 132px); object-fit: contain; filter: drop-shadow(0 10px 12px rgba(58, 42, 28, 0.16)); }
.tile .name { font-weight: 800; font-size: 1.08rem; margin-top: 6px; }
.tile .goal { font-size: 0.86rem; color: var(--base-soft); font-weight: 600; margin-top: 2px; }
.tile .reward { margin-top: 12px; display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface); border-radius: var(--r-pill); padding: 5px 12px; font-weight: 800; box-shadow: 0 3px 0 rgba(58,42,28,0.10); }
.tile .reward img { width: 19px; height: 19px; }

/* ---- features ---- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 34px); }
.feature { text-align: center; padding-inline: 8px; }
.feature .fi { width: 64px; height: 64px; border-radius: 20px; margin: 0 auto 14px; display: inline-flex; align-items: center; justify-content: center; background: rgba(19,176,165,0.12); color: var(--brand-deep); }
.feature .fi svg { width: 34px; height: 34px; }
.feature h3 { font-size: 1.18rem; margin-bottom: 7px; }
.feature p { margin: 0; color: var(--base-soft); font-weight: 500; font-size: 0.98rem; }

/* ---- CTA band ---- */
.cta-band { background: var(--surface); border: 2px solid var(--surface-deep); border-radius: var(--r-xl);
  box-shadow: 0 var(--chunk-card) 0 var(--surface-deep), var(--ambient);
  padding: clamp(30px, 5vw, 56px); text-align: center; position: relative; overflow: hidden; }
.cta-band::before { content: ""; position: absolute; inset: 0;
  background: radial-gradient(560px 320px at 0% 100%, rgba(19,176,165,0.10), transparent 60%); pointer-events: none; }
.cta-band > * { position: relative; }
.cta-band h2 { font-size: clamp(1.6rem, 4vw, 2.3rem); margin-bottom: 12px; }
.cta-band .lead { margin-bottom: 26px; }
.cta-band .hero-cta { justify-content: center; }
.legal-inline { margin-top: 22px; font-size: 0.92rem; color: var(--base-soft); }
.legal-inline a { color: var(--brand-deep); font-weight: 700; text-decoration: none; }
.legal-inline a:hover { text-decoration: underline; }

/* ---- footer ---- */
.footer { border-top: 1px solid rgba(58, 42, 28, 0.08); margin-top: 20px; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-block: 28px; }
.footer .brand { font-size: 1.1rem; }
.footer .brand img { width: 26px; height: 26px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 4px; }
.footer-links a { color: var(--base-soft); text-decoration: none; font-weight: 600; font-size: 0.92rem; padding: 6px 11px; border-radius: var(--r-pill); }
.footer-links a:hover { color: var(--espresso); background: rgba(255,255,255,0.7); }
.footer .copy { width: 100%; color: var(--base-muted); font-size: 0.85rem; font-weight: 500; }

/* ---- legal article ---- */
.legal-hero { text-align: center; padding-block: clamp(28px, 5vw, 52px) clamp(8px, 2vw, 18px); }
.legal-hero h1 { font-size: clamp(1.9rem, 5vw, 2.8rem); }
.legal-hero .updated { margin-top: 12px; display: inline-block; color: var(--base-soft); font-weight: 600; font-size: 0.92rem; }
.legal-card { max-width: 760px; margin-inline: auto; padding: clamp(24px, 4vw, 44px); margin-bottom: clamp(40px, 7vw, 80px); }
.legal-card .intro { font-size: 1.08rem; color: var(--espresso); font-weight: 600; margin-top: 0; }
.legal-card h2 { font-size: 1.18rem; font-weight: 800; margin: 28px 0 8px; display: flex; align-items: baseline; gap: 10px; }
.legal-card h2 .n { color: var(--brand); font-weight: 900; }
.legal-card p { margin: 0; color: var(--base-soft); font-weight: 500; line-height: 1.75; }
.legal-card p a { color: var(--brand-deep); font-weight: 700; }
.legal-card .sig { margin-top: 30px; padding-top: 18px; border-top: 1px solid rgba(58,42,28,0.08); color: var(--base-muted); font-weight: 600; font-size: 0.92rem; }

/* ---- reveal + float animation ---- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes floatChipA { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@keyframes floatChipB { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(8px); } }
.float { animation: float 5s ease-in-out infinite; }
.float-chip.one { animation: floatChipA 4.2s ease-in-out infinite; }
.float-chip.two { animation: floatChipB 4.8s ease-in-out infinite; }

/* ---- responsive ---- */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; text-align: center; gap: 8px; }
  .hero-copy { order: 2; }
  .hero-art { order: 1; min-height: 0; margin-bottom: 8px; }
  .hero-cta, .hero-note { justify-content: center; }
  .steps { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr; gap: 30px; }
  .nav.desktop { display: none; }
}
@media (max-width: 760px) {
  .funitiz { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .btn { width: 100%; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-note { flex-wrap: wrap; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .float, .float-chip.one, .float-chip.two { animation: none; }
}
