/* RAIMFUN: marketing site
   Brand: the exact palette and type the app itself uses (src/screens/theme.ts),
   so the site feels like a continuation of the app, not a generic template.

   Asset base path: every image in every HTML file is referenced with the literal,
   consistent prefix "assets/" (see assets/ in this folder; no other prefix is used
   anywhere, and no image is referenced from CSS via url()). To move images to
   Cloudinary, replace that one prefix across *.html with the Cloudinary delivery
   base, e.g. https://res.cloudinary.com/<cloud_name>/image/upload/<version>/raimfun/
   That is the single, one-place change this file's own comment is pointing at. */

:root {
  --cream: #FFF7DF;
  --paper: #FFFCF2;
  --white: #FFFFFF;
  --ink: #43265F;
  --ink-soft: #76566F;
  --coral: #FF5B4D;
  --coral-dark: #C93631;
  --teal: #2DBDB5;
  --yellow: #FFBF24;
  --yellow-dark: #D58C00;
  --purple: #8753C7;
  --purple-dark: #603797;
  --mint: #CBEFD9;
  --blue: #C8E9FB;
  --pink: #FFD6D8;
  --lilac: #E0D1F3;
  --pale-yellow: #FFE49A;
  --line: #E7D7B7;
  --muted: #987C66;
  --success: #32AD78;

  --display: "Baloo 2", sans-serif;
  --body: "Nunito", sans-serif;

  --radius: 20px;
  --radius-sm: 12px;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--body);
  font-weight: 600;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ---- Motion system: bright, bouncy, arcade-joyful ------------------- */
@keyframes rf-pop-in { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes rf-bob { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-10px) rotate(-1deg); } }
@keyframes rf-pulse {
  0%, 100% { box-shadow: 0 6px 0 var(--yellow-dark), 0 10px 22px -8px rgba(255,91,77,.35); }
  50% { box-shadow: 0 6px 0 var(--yellow-dark), 0 15px 30px -6px rgba(255,91,77,.55); }
}
@keyframes rf-confetti-drift {
  0% { background-position: 0 0, 60px 90px, 120px 30px; }
  100% { background-position: 180px 120px, 240px 210px, 300px 150px; }
}

.hero { position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -10%; z-index: 0; opacity: .55; pointer-events: none;
  background-image:
    radial-gradient(circle, var(--pink) 7px, transparent 8px),
    radial-gradient(circle, var(--mint) 6px, transparent 7px),
    radial-gradient(circle, var(--blue) 6px, transparent 7px);
  background-size: 140px 140px, 170px 170px, 190px 190px;
  background-position: 0 0, 60px 90px, 120px 30px;
}
.hero .wrap { position: relative; z-index: 1; }

/* Reveal-on-scroll targets: hidden only once JS confirms motion is OK (html.js-anim),
   so no-JS visitors and prefers-reduced-motion visitors always see full content. */
html.js-anim section .panel,
html.js-anim section .cat-card,
html.js-anim .section-head {
  opacity: 0; transform: translateY(18px) scale(.98);
  transition: opacity .55s ease, transform .55s cubic-bezier(.34,1.3,.64,1);
}
html.js-anim .panel.is-visible,
html.js-anim .cat-card.is-visible,
html.js-anim .section-head.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: no-preference) {
  .hero .eyebrow { animation: rf-pop-in .55s ease both; }
  .hero h1 { animation: rf-pop-in .55s ease .07s both; }
  .hero .lede { animation: rf-pop-in .55s ease .14s both; }
  .hero .btn-row { animation: rf-pop-in .55s ease .21s both; }
  .hero .stat-row { animation: rf-pop-in .55s ease .28s both; }
  .hero-art { animation: rf-pop-in .6s ease .1s both, rf-bob 5s ease-in-out 1s infinite; }
  .hero::before { animation: rf-confetti-drift 16s linear infinite; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

h1, h2, h3 { font-family: var(--display); font-weight: 800; margin: 0 0 0.45em; line-height: 1.15; color: var(--ink); }
h1 { font-size: clamp(2.1rem, 5.8vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3.8vw, 2.4rem); }
h3 { font-size: 1.2rem; }

p { color: var(--ink-soft); }
.lede { color: var(--ink); font-size: 1.18rem; font-weight: 600; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
section { padding: clamp(36px, 7vw, 92px) 0; }
section.alt { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--white);
  padding: 10px 16px; z-index: 100; border-radius: 0 0 8px 0; font-weight: 800;
}
.skip-link:focus { left: 0; }

/* Header */
header.site { position: sticky; top: 0; z-index: 40; background: rgba(255, 247, 223, 0.92); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; padding-top: 12px; padding-bottom: 12px; gap: 16px; }
.brand-logo { height: 34px; width: auto; }
nav.primary { display: flex; align-items: center; gap: clamp(12px, 2vw, 26px); font-weight: 800; }
nav.primary a:not(.btn) { text-decoration: none; color: var(--ink); font-size: 1.02rem; }
nav.primary a:not(.btn):hover, nav.primary a:not(.btn):focus-visible { color: var(--coral); }
.nav-toggle { display: none; background: var(--white); border: 2px solid var(--ink); border-radius: var(--radius-sm); width: 48px; height: 48px; font-size: 1.3rem; color: var(--ink); }

/* Buttons: big, rounded. This app is built around big buttons, so is the site */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--display); font-weight: 700; text-decoration: none; border-radius: 999px;
  padding: 15px 30px; font-size: 1.05rem; border: 3px solid transparent; min-height: 56px; cursor: pointer;
  transition: transform .18s cubic-bezier(.34,1.56,.64,1), box-shadow .18s ease, filter .18s ease;
}
.btn:hover { transform: translateY(-2px) scale(1.03); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn-primary {
  background: var(--yellow); color: var(--ink); box-shadow: 0 6px 0 var(--yellow-dark);
  animation: rf-pulse 2.6s ease-in-out infinite;
}
.btn-primary:hover, .btn-primary:focus-visible { filter: brightness(1.04); }
.btn-primary:active { box-shadow: 0 2px 0 var(--yellow-dark); }
.btn-secondary { background: var(--white); color: var(--ink); border-color: var(--ink); }
.btn-secondary:hover, .btn-secondary:focus-visible { background: var(--lilac); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--muted); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.btn[aria-disabled="true"] { opacity: 0.5; pointer-events: none; }

/* Hero */
.hero { padding-top: clamp(40px, 7vw, 76px); }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 40px; align-items: center; }
.eyebrow { font-family: var(--display); font-weight: 700; letter-spacing: 0.02em; color: var(--coral-dark); background: var(--pink); padding: 4px 14px; border-radius: 999px; font-size: 0.85rem; margin-bottom: 16px; display: inline-block; }
.eyebrow::before { content: "\2605"; margin-right: 6px; }
.hero-art { max-width: 380px; margin: 0 auto; }
.hero-art img { border-radius: 24px; box-shadow: 0 24px 60px -16px rgba(67, 38, 95, 0.28); }
.stat-row { display: flex; gap: clamp(10px, 3vw, 20px); margin-top: 30px; flex-wrap: wrap; }
.stat { background: var(--white); border: 2px solid var(--line); border-radius: 999px; padding: 8px 18px 6px; box-shadow: 0 3px 0 var(--line); }
.stat b { display: block; font-family: var(--display); font-size: 1.9rem; color: var(--coral-dark); line-height: 1; }
.stat span { font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; font-weight: 700; }

/* Cards */
.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; transition: transform .2s ease, box-shadow .2s ease; }
section .panel:hover { transform: translateY(-3px); box-shadow: 0 14px 28px -16px rgba(67,38,95,.3); }
.grid { display: grid; gap: 20px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.cat-card { border-radius: var(--radius); padding: 22px; transition: transform .2s cubic-bezier(.34,1.56,.64,1), box-shadow .2s ease; }
.cat-card:hover { transform: translateY(-5px) rotate(-1deg) scale(1.02); box-shadow: 0 14px 28px -14px rgba(67,38,95,.35); }
.cat-card h3 { margin-bottom: 6px; }
.cat-card p { color: var(--ink); opacity: 0.75; margin: 0; font-size: 0.95rem; }
.cat-dot { width: 14px; height: 14px; border-radius: 50%; display: inline-block; margin-bottom: 10px; }

.section-head { max-width: 720px; margin-bottom: 36px; }

/* Gallery */
.gallery { display: flex; gap: 18px; overflow-x: auto; padding-bottom: 14px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.gallery figure { flex: 0 0 auto; width: min(58vw, 230px); margin: 0; scroll-snap-align: start; }
.gallery img { border-radius: var(--radius); border: 1px solid var(--line); }
.gallery figcaption { font-family: var(--display); font-weight: 700; font-size: 0.9rem; color: var(--purple-dark); margin-top: 10px; text-align: center; }
/* Tall phone panels beside text: cap them so they stay sharp (760px source = 2x+) and
   never outgrow a laptop screen. */
.grid-2 > figure { width: 100%; max-width: 340px; justify-self: center; }

/* Embed / play */
.embed-shell { background: var(--white); border: 2px dashed var(--purple); border-radius: var(--radius); aspect-ratio: 16/9; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.embed-shell iframe { width: 100%; height: 100%; border: 0; display: none; }
.embed-placeholder { text-align: center; padding: 32px; max-width: 480px; }
.embed-placeholder .glyph { font-size: 2.6rem; margin-bottom: 14px; }
.install-steps { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.install-steps li { display: flex; gap: 14px; align-items: flex-start; }
.install-steps b { font-family: var(--display); background: var(--yellow); color: var(--ink); border-radius: 50%; width: 30px; height: 30px; min-width: 30px; display: flex; align-items: center; justify-content: center; font-size: 0.95rem; }

/* Founder / about */
.founder { display: grid; grid-template-columns: 220px 1fr; gap: 36px; align-items: start; }
.founder img { border-radius: var(--radius); border: 1px solid var(--line); }

/* Footer */
footer.site { border-top: 1px solid var(--line); padding: 44px 0 36px; background: var(--paper); }
footer.site .wrap { display: flex; flex-direction: column; gap: 18px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 10px 24px; font-family: var(--display); font-weight: 700; font-size: 0.95rem; }
.foot-links a { text-decoration: none; color: var(--ink); }
.foot-links a:hover { color: var(--coral); }
.foot-fine { font-size: 0.85rem; color: var(--muted); max-width: 760px; }
.foot-fine a { color: var(--muted); text-decoration: underline; }

.badge-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.store-badge { height: 48px; }

.center { text-align: center; }
.mt-0 { margin-top: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 880px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .founder { grid-template-columns: 1fr; }
  .founder img { width: 160px; }
}

@media (max-width: 600px) {
  nav.primary { position: fixed; inset: 64px 12px auto 12px; background: var(--white); border: 1px solid var(--line);
    border-radius: var(--radius); flex-direction: column; align-items: flex-start; padding: 18px; gap: 16px;
    box-shadow: 0 16px 40px -12px rgba(67,38,95,0.3);
    transform: translateY(-12px); opacity: 0; pointer-events: none; transition: all .18s ease; }
  nav.primary.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-toggle { display: block; }
  .grid-4, .grid-3 { grid-template-columns: 1fr 1fr; }
}
