/* ==========================================================================
   Cénematic — "See Cénematic Incredible Features" section

   Linear layout: premium glass cards on a soft branded background.
   Each card = title on top, text on the left, media on the right.
   On mobile a card stacks vertically: media, then title, then text.
   Cards render from capabilities.js.
   ========================================================================== */

.caps {
  position: relative;
  padding: 72px 0 0;
  color: var(--ink);
  /* warm-neutral wash with brand glows staggered down the section so the
     frosted cards always have color behind them to diffuse */
  background:
    radial-gradient(42% 50% at 12% 3%, rgba(255, 193, 7, 0.22), transparent 62%),
    radial-gradient(42% 50% at 88% 12%, rgba(255, 138, 0, 0.18), transparent 62%),
    radial-gradient(46% 40% at 4% 34%, rgba(20, 184, 166, 0.15), transparent 62%),
    radial-gradient(46% 40% at 96% 52%, rgba(255, 193, 7, 0.18), transparent 62%),
    radial-gradient(46% 40% at 8% 74%, rgba(255, 138, 0, 0.14), transparent 62%),
    radial-gradient(55% 50% at 50% 102%, rgba(20, 184, 166, 0.13), transparent 62%),
    linear-gradient(180deg, #f3f0ea 0%, #ece8de 100%);
}

/* Detail layer the glass actually frosts: vivid blobs + fine grain repeat
   down the section, so inside a card they blur milky-smooth while staying
   crisp in the gaps — that edge contrast is what sells the glass. */
.caps::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%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)' opacity='0.05'/%3E%3C/svg%3E"),
    radial-gradient(460px 340px at 12% 160px, rgba(255, 167, 0, 0.35), transparent 68%),
    radial-gradient(420px 320px at 88% 420px, rgba(20, 184, 166, 0.28), transparent 68%),
    radial-gradient(380px 300px at 50% 760px, rgba(255, 110, 0, 0.3), transparent 68%),
    radial-gradient(440px 330px at 18% 1120px, rgba(14, 165, 233, 0.22), transparent 68%),
    radial-gradient(400px 310px at 82% 1360px, rgba(255, 193, 7, 0.33), transparent 68%);
  background-size: 180px 180px, 100% 1500px, 100% 1500px, 100% 1500px, 100% 1500px, 100% 1500px;
  background-repeat: repeat, repeat-y, repeat-y, repeat-y, repeat-y, repeat-y;
}

.caps__heading {
  position: relative; /* paints above the .caps::before detail layer */
  margin: 0 auto 52px;
  max-width: 1100px;
  padding: 0 40px;
  text-align: center;
  font-size: clamp(34px, 5.5vw, 76px);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -0.02em;
}

/* Full-width cards, one per row, generous gap between them */
.caps__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  max-width: 1340px;
  margin: 0 auto 88px;
  padding: 0 40px;
  box-sizing: border-box;
}

/* Glassmorphic card: gradient glass + crisp light edge + soft shadow */
.caps__card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  grid-template-areas:
    "title title"
    "text  media";
  gap: 28px 52px;
  padding: 64px 68px;
  border-radius: 46px;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0.28) 55%, rgba(255, 255, 255, 0.44) 100%);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 10px 24px -24px rgba(30, 22, 12, 0.25);
  -webkit-backdrop-filter: blur(28px) saturate(1.5);
  backdrop-filter: blur(28px) saturate(1.5);
}
/* diagonal light sheen across the glass, kept under the content */
.caps__card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0) 70%, rgba(255, 255, 255, 0.25) 100%);
}

.caps__title {
  grid-area: title;
  margin: 0;
  text-align: center;
  font-size: clamp(24px, 2.3vw, 34px);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.01em;
  color: var(--ink);
}
/* hand-picked punch words inside titles — multi-hue gradient, deep enough
   to stay readable on the warm glass */
.caps__title-accent {
  background: linear-gradient(105deg, #e04c00 0%, #d61f69 34%, #7c3aed 66%, #0ea5e9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
/* multi-color gradient phrase — one hue per "speaker" */
.caps__title-multi {
  background: linear-gradient(105deg, #e04c00 0%, #d61f69 34%, #7c3aed 66%, #0ea5e9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
/* extra-bold phrase (pairs with .caps__title-under for the brush stroke) */
.caps__title-bu {
  font-weight: 900;
}
/* hand-painted brush underline inside a title (same stroke as .paint-underline;
   inlined because the local icon assets moved to the CDN) */
.caps__title-under {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 36' preserveAspectRatio='none'%3E%3Cpath fill='%23ff8a00' d='M3 16Q120 0 237 16 236 24 237 32 120 12 3 32 4 24 3 16Z'/%3E%3C/svg%3E") no-repeat left bottom;
  background-size: 100% 0.45em;
  padding-bottom: 0.28em;
}
/* short brand-gradient accent under each title */
.caps__title::after {
  content: "";
  display: block;
  width: 64px;
  height: 4px;
  margin: 16px auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffc107, #ff8a00);
}
/* titles with a brush-stroke ink mark don't need the short accent line too */
.caps__title:has(.caps__title-under)::after {
  display: none;
}

.caps__text {
  grid-area: text;
  align-self: center;
}
.caps__text p {
  margin: 0;
  font-size: clamp(17px, 1.5vw, 21px);
  line-height: 1.55;
  color: #4a4d5b;
}
.caps__text p + p { margin-top: 12px; }

/* media sits in its own inset glass frame for depth */
.caps__media {
  grid-area: media;
  margin: 0;
  align-self: center;
  padding: 12px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 36px -28px rgba(30, 22, 12, 0.4);
}
.caps__img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
}

/* Supporting features — light band, 2-up colorful grid ------------------- */
.caps__more {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 88px 0;
  background: #fff;
}
/* faint multicolor aurora wash so images have something warm to pop against */
.caps__more::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(38% 60% at 10% 18%, rgba(20, 184, 166, 0.10), transparent 60%),
    radial-gradient(38% 60% at 90% 18%, rgba(255, 138, 0, 0.10), transparent 60%),
    radial-gradient(50% 65% at 50% 112%, rgba(245, 158, 11, 0.08), transparent 60%);
  pointer-events: none;
}

.caps__more-title {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto 48px;
  padding: 0 40px;
  text-align: center;
  color: var(--ink);
  font-size: clamp(28px, 3.6vw, 48px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.caps__more-accent {
  background: linear-gradient(105deg, #ffc107, #ff8a00, #ff3d00);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.caps__sub-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 56px 100px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 40px;
}
.caps__sub { text-align: center; }
.caps__sub-media {
  position: relative;
  display: flex;
  justify-content: center;
  margin: 0 0 20px;
}
.caps__sub-media .caps__img {
  position: relative;
  z-index: 1;
  max-width: 100%;
  margin-inline: auto;
  border-radius: 12px;
}
/* colored glow pooled under each media, cycling for vibrancy */
.caps__sub-media::before {
  content: "";
  position: absolute;
  inset: 14% 8% -12%;
  z-index: 0;
  border-radius: 18px;
  background: var(--glow, #ff8a00);
  filter: blur(30px);
  opacity: 0.4;
}
.caps__sub:nth-child(6n+1) { --glow: #14b8a6; }
.caps__sub:nth-child(6n+2) { --glow: #0ea5e9; }
.caps__sub:nth-child(6n+3) { --glow: #ef4444; }
.caps__sub:nth-child(6n+4) { --glow: #ea580c; }
.caps__sub:nth-child(6n+5) { --glow: #22c55e; }
.caps__sub:nth-child(6n+6) { --glow: #f59e0b; }
.caps__sub-title { margin-bottom: 6px; font-size: 19px; font-weight: 800; letter-spacing: -0.01em; color: var(--ink); }
.caps__sub-body { font-size: 15px; line-height: 1.55; color: var(--muted); }

/* Responsive -------------------------------------------------------------- */
@media (max-width: 960px) {
  .caps { padding: 56px 0 0; }
}

@media (max-width: 640px) {
  .caps__heading,
  .caps__grid { padding-left: 20px; padding-right: 20px; }
  .caps__card {
    grid-template-columns: 1fr;
    grid-template-areas:
      "media"
      "title"
      "text";
    gap: 16px;
    padding: 24px;
    border-radius: 30px;
  }
  .caps__title::after { margin-top: 12px; }
  .caps__media { padding: 8px; border-radius: 18px; }
  .caps__img { border-radius: 12px; }
  .caps__text { text-align: center; }
  .caps__more { padding: 64px 0; }
  .caps__sub-grid { grid-template-columns: 1fr; gap: 44px; }
}
