/* =====================================================================
   RIA — LANDING EDITORIAL LAYER
   Inspired by oryzo.ai / awwwards-grade product stories. Adapted to
   RIA's brand (violet/cyan) — we steal the *grammar* (oversized
   display type, section numbering, generous whitespace, cinematic
   reveals, magnetic CTAs, 3D perspective) without the orange palette
   or WebGL/Three.js weight.

   Loaded only on the landing (index.html). Authed app pages keep the
   sober Linear/Vercel feel.
   ===================================================================== */

:root {
  --editorial-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --editorial-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── Cinematic intro splash ──────────────────────────────────────────── */
.editorial-splash {
  position: fixed;
  inset: 0;
  background: var(--background-color, #09090b);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.5s var(--editorial-ease);
}
.editorial-splash.is-out {
  opacity: 0;
  pointer-events: none;
}
.editorial-splash-mark {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  opacity: 0;
  transform: translateY(8px);
  animation: splashIn 0.55s var(--editorial-ease) 0.1s forwards;
}
.editorial-splash-mark .dot {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--primary-color, #8b5cf6), var(--accent-color, #22d3ee));
  box-shadow: 0 0 24px rgba(139, 92, 246, 0.55);
  animation: splashPulse 1.6s ease-in-out infinite;
}
.editorial-splash-mark .word {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.025em;
  color: var(--text-primary, #ededef);
}
.editorial-splash-mark .word span {
  background: linear-gradient(135deg, var(--primary-color, #8b5cf6), var(--accent-color, #22d3ee));
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
}
@keyframes splashIn {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes splashPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 24px rgba(139, 92, 246, 0.55); }
  50%      { transform: scale(1.18); box-shadow: 0 0 36px rgba(34, 211, 238, 0.7); }
}

/* ── Floating particle canvas (positioned by JS) ─────────────────────── */
#editorial-particles {
  position: fixed;
  inset: 0;
  z-index: -1;        /* sit BEHIND all content; body bg shows through */
  pointer-events: none;
  opacity: 0.55;
}

/* ── Hero: editorial display type ────────────────────────────────────── */
.hero {
  position: relative;
  z-index: 1;
  padding-top: clamp(4rem, 8vw, 7rem) !important;
  padding-bottom: clamp(4rem, 8vw, 7rem) !important;
}
.hero h1 {
  font-family: var(--font-sans);
  font-weight: 800;
  letter-spacing: -0.045em !important;
  line-height: 0.95 !important;
  font-size: clamp(3rem, 4vw + 2rem, 7rem) !important;
  text-align: center;
  margin: 0 auto 1.5rem;
  max-width: 16ch;
  background: linear-gradient(180deg,
    #ffffff 0%,
    #ededef 40%,
    rgba(237, 237, 239, 0.65) 100%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero h1 .accent-word {
  background: linear-gradient(135deg,
    var(--primary-color, #8b5cf6) 0%,
    var(--accent-color, #22d3ee) 50%,
    #f472b6 100%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 220% 220%;
  animation: accentPan 9s ease-in-out infinite;
}
@keyframes accentPan {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}
.hero p {
  text-align: center;
  font-size: clamp(1rem, 0.4vw + 0.95rem, 1.18rem) !important;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.55;
  max-width: 56ch;
  margin: 0 auto 2.5rem;
  letter-spacing: -0.01em;
}

/* ── Editorial eyebrow (small uppercase label above headlines) ───────── */
.editorial-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
  padding: 0.35rem 0.75rem;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  position: relative;
}
.editorial-eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.6);
  animation: eyebrowPulse 1.8s ease-in-out infinite;
}
@keyframes eyebrowPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.4); opacity: 0.6; }
}

/* ── Section numbering (01 / 02 / 03) ────────────────────────────────── */
.editorial-section {
  position: relative;
  padding: clamp(4rem, 6vw, 7rem) 0;
}
.editorial-section-num {
  display: block;
  font-family: var(--font-mono, ui-monospace, Menlo, monospace);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
  text-align: center;
}
.editorial-section-num span {
  color: var(--primary-color);
  font-weight: 700;
}
.editorial-section-title {
  font-family: var(--font-sans);
  font-size: clamp(2rem, 1.6vw + 1.4rem, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.05;
  text-align: center;
  margin: 0 auto 1rem;
  max-width: 22ch;
  background: linear-gradient(180deg, #ffffff 0%, rgba(237, 237, 239, 0.7) 100%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
}
.editorial-section-sub {
  font-size: 1.05rem;
  color: var(--text-secondary);
  text-align: center;
  max-width: 56ch;
  margin: 0 auto 3rem;
  line-height: 1.55;
  letter-spacing: -0.005em;
}

/* ── Hero CTA row: more breathing room + editorial proportions ───────── */
.hero-cta-row {
  display: flex !important;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem !important;
  perspective: 1000px;
}
.hero .btn-lg {
  padding: 0.95rem 1.65rem !important;
  font-size: 0.98rem !important;
  letter-spacing: -0.01em;
  font-weight: 600;
  border-radius: 999px !important;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.4s var(--editorial-ease);
}

/* Magnetic CTA (JS sets --mx/--my to a 0..1 range on mousemove) */
.hero .btn-gradient[data-magnetic] {
  transform:
    translate3d(calc((var(--mx, 0) - 0.5) * 14px), calc((var(--my, 0) - 0.5) * 10px), 0)
    rotateX(calc((var(--my, 0) - 0.5) * -5deg))
    rotateY(calc((var(--mx, 0) - 0.5) * 8deg));
}

/* ── 3D perspective on bento grid ───────────────────────────────────── */
.bento-grid {
  perspective: 1400px;
  perspective-origin: 50% 0%;
}
.feature-card {
  transform-style: preserve-3d;
}
/* When [data-reveal] hasn't fired yet, lay them flat-tilted away. */
.feature-card[data-reveal] {
  opacity: 0;
  transform: translateY(40px) rotateX(8deg) translateZ(-30px);
  transition: opacity 0.9s var(--editorial-ease),
              transform 0.9s var(--editorial-ease);
}
.feature-card[data-reveal].is-revealed {
  opacity: 1;
  transform: translateY(0) rotateX(0) translateZ(0);
}

/* ── Marquee caption strip (optional decorative band) ───────────────── */
.editorial-marquee {
  overflow: hidden;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 1.2rem 0;
  margin: 5rem 0;
  background: linear-gradient(180deg,
    rgba(139, 92, 246, 0.025),
    rgba(34, 211, 238, 0.015));
}
.editorial-marquee-track {
  display: flex;
  gap: 3.5rem;
  white-space: nowrap;
  animation: marqueePan 38s linear infinite;
  width: max-content;
}
.editorial-marquee-track span {
  font-family: var(--font-sans);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: rgba(237, 237, 239, 0.45);
  display: inline-flex;
  align-items: center;
  gap: 1rem;
}
.editorial-marquee-track span::after {
  content: "•";
  color: var(--primary-color);
  font-size: 0.6em;
}
@keyframes marqueePan {
  to { transform: translateX(-50%); }
}

/* ── Reduced motion ──────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .editorial-splash,
  .editorial-splash-mark,
  .editorial-splash-mark .dot,
  .hero h1 .accent-word,
  .editorial-eyebrow::before,
  .editorial-marquee-track,
  .feature-card[data-reveal],
  .hero .btn-gradient[data-magnetic] {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
  .editorial-splash { display: none; }
  .feature-card[data-reveal] { opacity: 1 !important; }
}

/* ── Mobile tightening ───────────────────────────────────────────────── */
@media (max-width: 640px) {
  .hero h1 { font-size: clamp(2.5rem, 11vw, 3.5rem) !important; max-width: 14ch; }
  .editorial-marquee-track span { font-size: 1.05rem; }
  .editorial-section-title { font-size: clamp(1.6rem, 7vw, 2.2rem); }
}
