/* Homepage-only redesign — linked ONLY from index.html, never from
   /features, /pricing or /faq, so their existing look (marketing.css) is
   completely unaffected. Shares :root tokens/reset/.btn from styles.css and
   the nav/footer/.site-container from marketing.css for consistent chrome,
   but every visually-distinctive piece below (the gradient palette, the
   mesh hero, the bento grid) is new and scoped to this file alone. */

:root {
  --grad-1: #7c3aed; /* violet */
  --grad-2: #ec4899; /* pink */
  --grad-3: #f97316; /* amber */
  --grad-4: #06b6d4; /* cyan */
}

body.home { position: relative; }

/* Subtle film-grain texture over the whole page — the kind of detail that
   reads as "designed" rather than a plain flat fill. Pure CSS/SVG, no image
   asset, low enough opacity to never affect text contrast. */
body.home::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Hero ---------- */
.modern-hero {
  position: relative;
  overflow: hidden;
  padding: 140px 24px 110px;
  text-align: center;
}
.modern-hero-mesh {
  position: absolute;
  inset: -25%;
  z-index: 0;
  background:
    radial-gradient(circle at 18% 24%, rgba(124, 58, 237, 0.45), transparent 42%),
    radial-gradient(circle at 82% 22%, rgba(236, 72, 153, 0.38), transparent 42%),
    radial-gradient(circle at 50% 85%, rgba(249, 115, 22, 0.3), transparent 45%),
    radial-gradient(circle at 8% 85%, rgba(6, 182, 212, 0.28), transparent 42%);
  filter: blur(70px);
  animation: meshDrift 22s ease-in-out infinite alternate;
}
@keyframes meshDrift {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-3%, 2%) scale(1.1); }
}
@media (prefers-reduced-motion: reduce) {
  .modern-hero-mesh { animation: none; }
}
.modern-hero-grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 60% 70% at 50% 20%, black, transparent);
}
/* Targets .site-container specifically, not a wildcard child selector —
   the mesh/grid divs above are ALSO direct children of .modern-hero, and a
   `.modern-hero > *` rule here would win the specificity tie (equal
   specificity, later source order) and clobber their own position:absolute,
   collapsing them into normal document flow instead of a background layer. */
.modern-hero .site-container { position: relative; z-index: 1; }

.gradient-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 7px 16px;
  border-radius: 20px;
  margin-bottom: 28px;
  color: var(--text);
  background: linear-gradient(var(--bg), var(--bg)) padding-box,
    linear-gradient(120deg, var(--grad-1), var(--grad-2), var(--grad-3)) border-box;
  border: 1px solid transparent;
}
.gradient-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(120deg, var(--grad-2), var(--grad-3));
  box-shadow: 0 0 8px var(--grad-2);
}

.modern-hero h1 {
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.06;
  letter-spacing: -0.02em;
  font-weight: 800;
  margin: 0 0 22px;
}
.gradient-text {
  background: linear-gradient(100deg, var(--grad-1) 0%, var(--grad-2) 45%, var(--grad-3) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.modern-hero-sub {
  font-size: 18.5px;
  color: var(--text-dim);
  max-width: 640px;
  margin: 0 auto 38px;
  line-height: 1.6;
}

.btn-gradient {
  background: linear-gradient(120deg, var(--grad-1), var(--grad-2));
  color: white;
  border: none;
  box-shadow: 0 10px 35px -8px rgba(124, 58, 237, 0.55);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-gradient:hover {
  background: linear-gradient(120deg, var(--grad-1), var(--grad-2));
  transform: translateY(-2px);
  box-shadow: 0 14px 42px -6px rgba(236, 72, 153, 0.6);
}
.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); }

.modern-hero-note {
  margin-top: 20px;
  font-size: 13px;
  color: var(--text-dim);
}

/* ---------- Section shell ---------- */
.modern-section { padding: 88px 24px; position: relative; }
.modern-section-header { text-align: center; max-width: 620px; margin: 0 auto 48px; }
.modern-section-header .eyebrow {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
  background: linear-gradient(120deg, var(--grad-4), var(--grad-1));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.modern-section-header h2 {
  font-size: clamp(28px, 4vw, 38px);
  letter-spacing: -0.01em;
  margin: 0 0 14px;
}
.modern-section-header p { color: var(--text-dim); font-size: 16px; line-height: 1.6; margin: 0; }

/* ---------- Bento feature grid ---------- */
.bento-grid {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.bento-grid > :nth-child(1) { grid-column: span 2; grid-row: span 2; }
.bento-grid > :nth-child(2) { grid-column: span 2; }
.bento-grid > :nth-child(3) { grid-column: span 1; }
.bento-grid > :nth-child(4) { grid-column: span 1; }
.bento-grid > :nth-child(5) { grid-column: span 2; }
.bento-grid > :nth-child(6) { grid-column: span 2; }

.bento-card {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  padding: 26px;
  min-height: 168px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.78));
  border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(20, 22, 40, 0.04), 0 14px 34px -14px rgba(20, 22, 40, 0.14);
  backdrop-filter: blur(16px);
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.bento-card:hover { transform: translateY(-3px); border-color: rgba(var(--accent-rgb), 0.35); }
.bento-card::before {
  content: '';
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  top: -80px;
  right: -80px;
  background: var(--card-glow, var(--grad-1));
  filter: blur(64px);
  opacity: 0.32;
  pointer-events: none;
}
.bento-card .icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 16px;
  background: rgba(var(--accent-rgb), 0.08);
  border: 1px solid rgba(var(--accent-rgb), 0.16);
}
.bento-card h3 { font-size: 16.5px; margin: 0 0 8px; position: relative; }
.bento-card p { font-size: 13.5px; color: var(--text-dim); line-height: 1.6; margin: 0; position: relative; }
.bento-card:nth-child(1) h3 { font-size: 21px; }

/* ---------- Showcase (real screenshot + use-case photos) ---------- */
.showcase-grid {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.showcase-card {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: 0 14px 34px -14px rgba(20, 22, 40, 0.25);
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: flex-end;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.showcase-card:hover { transform: translateY(-3px); border-color: rgba(var(--accent-rgb), 0.35); }
.showcase-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.showcase-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(5, 5, 8, 0.92) 0%, rgba(5, 5, 8, 0.35) 55%, transparent 100%);
}
.showcase-card-copy {
  position: relative;
  z-index: 1;
  padding: 22px;
}
.showcase-card-copy .eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grad-3);
  margin-bottom: 8px;
}
.showcase-card-copy h3 { font-size: 17px; margin: 0 0 6px; color: #fff; }
.showcase-card-copy p { font-size: 13px; color: rgba(255, 255, 255, 0.78); line-height: 1.55; margin: 0; }
/* The real product screenshot is the "proof" shot — full width, wider aspect
   ratio to match its actual 16:9 UI content instead of being cropped square
   like the lifestyle photos beside it. */
.showcase-grid > :first-child { grid-column: 1 / -1; aspect-ratio: 21 / 9; }

@media (max-width: 760px) {
  .showcase-grid { grid-template-columns: 1fr; }
  .showcase-grid > :first-child { aspect-ratio: 4 / 3; }
}

/* ---------- Steps ---------- */
.step-row {
  max-width: 860px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.step-card { text-align: left; }
.step-num {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 17px;
  color: white;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--grad-1), var(--grad-2));
  box-shadow: 0 8px 22px -6px rgba(124, 58, 237, 0.5);
}
.step-card h3 { font-size: 16px; margin: 0 0 8px; }
.step-card p { font-size: 13.5px; color: var(--text-dim); line-height: 1.6; margin: 0; }

/* ---------- Final CTA ---------- */
.modern-cta {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 80px 24px;
  margin: 0 24px;
  border-radius: 28px;
  border: 1px solid var(--border);
}
.modern-cta-mesh {
  position: absolute;
  inset: -40%;
  background:
    radial-gradient(circle at 25% 30%, rgba(124, 58, 237, 0.4), transparent 45%),
    radial-gradient(circle at 75% 70%, rgba(236, 72, 153, 0.35), transparent 45%);
  filter: blur(60px);
}
/* Same reasoning as .modern-hero .site-container above — must not be a
   wildcard child selector, or it clobbers .modern-cta-mesh's own
   position:absolute via the specificity tie. */
.modern-cta .site-container { position: relative; }
.modern-cta h2 { font-size: clamp(26px, 3.6vw, 36px); margin: 0 0 14px; letter-spacing: -0.01em; }
.modern-cta p { color: var(--text-dim); margin: 0 0 30px; font-size: 15px; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .bento-grid { grid-template-columns: repeat(2, 1fr); }
  .bento-grid > :nth-child(1) { grid-column: span 2; grid-row: span 1; min-height: 200px; }
  .bento-grid > :nth-child(2) { grid-column: span 2; }
  .bento-grid > :nth-child(5),
  .bento-grid > :nth-child(6) { grid-column: span 1; }
  .step-row { grid-template-columns: 1fr; max-width: 420px; }
}
@media (max-width: 560px) {
  .modern-hero { padding: 100px 20px 80px; }
  .bento-grid { grid-template-columns: 1fr; }
  .bento-grid > * { grid-column: span 1 !important; grid-row: span 1 !important; min-height: auto; }
  .modern-cta { margin: 0 16px; padding: 56px 22px; }
}
