/* CaseHub Landing · arte + mobile polish + interatividade
 * Carrega DEPOIS dos outros 3 CSS — sobrescreve onde precisa.
 */

/* ─── Art layer · gradient blobs flutuantes ─────────────────────────── */
body {
  position: relative;
  overflow-x: hidden;
}
.art {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  overflow: hidden;
}
.art .blob {
  position: absolute; border-radius: 50%;
  filter: blur(80px); opacity: 0.45;
  animation: drift 24s ease-in-out infinite;
  mix-blend-mode: multiply;
}
.art .blob.a {
  width: 520px; height: 520px;
  background: radial-gradient(circle, #DBE64C 0%, transparent 60%);
  top: -120px; right: -100px;
  animation-delay: -4s;
}
.art .blob.b {
  width: 620px; height: 620px;
  background: radial-gradient(circle, #6FBE54 0%, transparent 60%);
  top: 30%; left: -180px;
  animation-delay: -10s;
}
/* Blobs serve the rest of the page now — hero is its own colored canvas.
   Dimmed so they don't compete with the dark hero surface above. */
.art .blob.c {
  width: 480px; height: 480px;
  background: radial-gradient(circle, #1E4890 0%, transparent 60%);
  bottom: 12%; right: 6%;
  opacity: 0.22;
  animation-delay: -16s;
}
.art .blob.d {
  width: 460px; height: 460px;
  background: radial-gradient(circle, #2552A8 0%, #1E4890 30%, transparent 70%);
  bottom: -60px; left: 22%;
  opacity: 0.18;
  animation-delay: -22s;
  position: absolute; border-radius: 50%;
  filter: blur(80px);
  mix-blend-mode: multiply;
  animation: drift 24s ease-in-out infinite;
}
@keyframes drift {
  0%,100% { transform: translate(0,0) scale(1); }
  33%     { transform: translate(40px,-30px) scale(1.08); }
  66%     { transform: translate(-30px,40px) scale(0.94); }
}

/* tudo do conteúdo flutua acima da arte */
.nav-wrap, .hero, .section, footer { position: relative; z-index: 2; }

/* ─── Cube floating · hero ──────────────────────────────────────────── */
.hero-card { position: relative; }
/* Pollen cube on the dark hero canvas — visible but not loud (opacity 0.16). */
.hero-cube {
  position: absolute; right: -60px; bottom: -80px;
  width: 360px; height: 360px;
  z-index: 0; pointer-events: none;
  opacity: 0.16;
  transform: rotate(-12deg);
  filter:
    drop-shadow(0 30px 60px rgba(0,0,0,0.45))
    drop-shadow(0 0 24px rgba(219,230,76,0.25));
}

/* ─── Iframe demo option ────────────────────────────────────────────── */
.demo-window { background: #0E1A2C; }
.demo-iframe-wrap {
  position: relative; aspect-ratio: 16 / 11;
  background: var(--c-paper); border-radius: 14px; overflow: hidden;
  box-shadow: 0 30px 60px -16px rgba(0,0,0,0.55);
}
.demo-iframe-wrap iframe {
  position: absolute; inset: 0; width: 100%; height: 100%;
  border: none; background: var(--c-paper);
}
.demo-iframe-wrap .titlebar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 2;
  background: rgba(244, 241, 236, 0.92);
  backdrop-filter: blur(8px);
}

/* ─── Scroll reveal ─────────────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.3,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal:nth-child(2) { transition-delay: 80ms; }
.reveal:nth-child(3) { transition-delay: 160ms; }
.reveal:nth-child(4) { transition-delay: 240ms; }

/* ─── Hover tilt — cards reagem ─────────────────────────────────────── */
.principle, .plan, .compare-row .feat, .split-card {
  transition: transform .35s cubic-bezier(.2,.7,.3,1), box-shadow .35s;
}

/* ─── Mobile (< 720) ────────────────────────────────────────────────── */
@media (max-width: 720px) {
  body { font-size: 15px; }

  /* nav */
  .nav-wrap { padding: 12px 0 0; }
  .nav { padding: 8px 10px; gap: 8px; flex-wrap: wrap; }
  .nav-brand { padding: 2px 6px; gap: 6px; }
  .nav-brand-word { font-size: 16px; }
  .nav-right { gap: 6px; }
  .nav-status { display: none; }
  .nav-cta { padding: 8px 14px; font-size: 12px; }

  /* hero card */
  .hero { padding: 16px 0 0; }
  .hero-card {
    border-radius: 24px;
    padding: 28px 22px;
    gap: 28px;
  }
  /* Grain overlay covers the whole card on mobile too; no override needed. */
  .hero h1 { font-size: clamp(36px, 9vw, 52px); }
  .hero-lede { font-size: 15px; }
  .hero-stats { gap: 18px; flex-wrap: wrap; }
  .hero-stat .n { font-size: 22px; }
  .hero-stat .n span { font-size: 12px !important; }
  .hero-meta { gap: 6px; }
  .hero-meta span { font-size: 9px; padding: 6px 10px; letter-spacing: 0.12em; }
  .hero-badge { font-size: 9.5px; padding: 7px 12px; }
  .hero-badge .pill { font-size: 8.5px; padding: 2px 7px; }
  .hero-cube { width: 220px; height: 220px; right: -50px; bottom: -50px; opacity: 0.10; }

  /* login */
  .login-card { padding: 22px 18px; border-radius: 22px; }
  .login-title { font-size: 18px; }
  .login-tab { padding: 5px 9px; font-size: 9.5px; }
  .field input { padding: 12px 14px; font-size: 16px; /* iOS no-zoom */ }
  .login-submit { padding: 14px 18px; font-size: 14px; }
  .login-foot { font-size: 9px; flex-direction: column; gap: 6px; align-items: flex-start; }

  /* sections */
  .section { padding: 56px 0 0; }
  .section-head { grid-template-columns: 1fr; gap: 12px; margin-bottom: 22px; }
  .section-head .title { font-size: clamp(28px, 7vw, 40px); }
  .section-head .lede { justify-self: stretch; max-width: none; font-size: 14px; }

  /* principles */
  .principles { grid-template-columns: 1fr; gap: 12px; }
  .principle { padding: 20px; gap: 10px; }
  .principle h3 { font-size: 17px; }
  .principle p { font-size: 13px; }

  /* split */
  .split { gap: 12px; }
  .split-card { min-height: auto; padding: 28px 22px; border-radius: 22px; gap: 16px; }
  .split-card h3 { font-size: 26px; }
  .split-card .lede { font-size: 13.5px; }
  .split-card li { font-size: 12.5px; }
  .split-card .codeblock { font-size: 10.5px; padding: 14px; }
  .split-card .quote { font-size: 14px; padding: 16px 18px; }
  .split-card .quote .by { font-size: 9.5px; }

  /* demo */
  .demo { border-radius: 24px; }
  .demo-inner { padding: 28px 22px; gap: 24px; }
  .demo h3 { font-size: 28px; }
  .demo .lede { font-size: 14px; }
  .demo-cta { flex-direction: column; align-items: stretch; }
  .demo-cta .btn { padding: 12px 18px; font-size: 13px; }

  /* compare — vira lista vertical */
  .compare-row, .compare-row.head {
    grid-template-columns: 1fr;
    padding: 16px;
    gap: 8px;
    border-bottom: 1px solid var(--c-line);
  }
  .compare-row.head { display: none; }
  .compare-row .feat { font-size: 14px; }
  .compare-row .cell {
    text-align: left;
    font-size: 12px;
    display: flex; justify-content: space-between; align-items: center;
    padding: 6px 10px; border-radius: 8px;
    background: var(--c-bone);
    box-shadow: inset var(--shadow-dark-xs), inset var(--shadow-light-xs);
  }
  .compare-row .cell::before {
    content: attr(data-label);
    font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em;
    color: var(--c-mute); font-weight: 700; margin-right: auto;
  }
  .compare-row .cell.us { background: var(--c-pollen); color: var(--c-navy); box-shadow: none; }
  .compare-row .cell.us::before { content: "CASEHUB"; color: var(--c-navy); }
  .compare-row .cell.us::after { display: none; }

  /* pricing */
  .pricing { gap: 12px; }
  .plan { padding: 26px 22px; }
  .plan.featured { transform: none; }
  .plan h3 { font-size: 22px; }
  .plan .price .v { font-size: 42px; }
  .plan ul { font-size: 13px; }
  .plan .cta { padding: 13px 16px; font-size: 13.5px; }
  .badge-feat { top: 12px; right: 12px; font-size: 8.5px; padding: 3px 7px; }

  /* faq */
  .faq summary { font-size: 14.5px; }
  .faq details { padding: 14px 18px; }
  .faq details p { font-size: 13px; }

  /* final */
  .final { margin-top: 56px; padding: 44px 24px; border-radius: 24px; }
  .final h3 { font-size: clamp(28px, 7vw, 44px); }
  .final p { font-size: 15px; }
  .final-cta { flex-direction: column; align-items: stretch; }
  .final-cta .btn { padding: 14px 20px; font-size: 14px; }

  /* footer */
  footer { padding: 40px 0 32px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; padding-bottom: 24px; }
  .footer-brand .desc { font-size: 13px; }
  .footer-col h5 { margin-bottom: 10px; }
}

/* ─── Tablet (720–980) ─────────────────────────────────────────────── */
@media (max-width: 980px) and (min-width: 721px) {
  .hero h1 { font-size: clamp(44px, 7vw, 64px); }
  .principles { grid-template-columns: 1fr 1fr; }
  .pricing { grid-template-columns: 1fr 1fr; }
  .plan.featured { transform: none; grid-column: 1 / -1; }
}

/* ─── Reduce motion ─────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .art .blob { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
