/* Features Cinematic Section
   What: Dark, cinematic features section with smoky background, reveal-on-scroll, and parallax glow.
   How to tweak: Adjust colors via CSS variables, card spacing, and grid breakpoints below.
   Why: Implements the provided design without adding React/Tailwind, consistent with site stack. */

:root {
  --tjm-bg: #0b0b0d;
  --tjm-text: #e5e5e7;
  --tjm-text-muted: rgba(229,229,231,0.85);
  --tjm-border: rgba(255,255,255,0.10);
  --tjm-border-strong: rgba(255,255,255,0.14);
  --tjm-card-bg: rgba(255,255,255,0.05);
  --tjm-orange: #ea580c; /* burnt orange */
  --tjm-orange-2: #7c2d12;
  --tjm-teal-1: #0ea5a4;
  --tjm-teal-2: #14b8a6;
  --tjm-shadow-outline: 0 0 0 1px rgba(255,255,255,0.04);
}

/* Animations */
@keyframes drift {
  0% { transform: translate3d(-10%, -2%, 0) scale(1); filter: blur(32px); }
  50% { transform: translate3d(10%, 2%, 0) scale(1.06); filter: blur(36px); }
  100% { transform: translate3d(-10%, -2%, 0) scale(1); filter: blur(32px); }
}
@keyframes emberPulse { 0%,100%{opacity:.22} 50%{opacity:.45} }
@keyframes reveal { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* Section base */
#features-cinematic {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--tjm-bg);
}
#features-cinematic .inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 64px 24px;
}

/* Typography */
#features-cinematic h2.section-title {
  color: var(--tjm-text);
  font-size: clamp(2rem, 2.8vw, 3rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
#features-cinematic p.lead {
  margin-top: 12px;
  color: var(--tjm-text-muted);
  font-size: 1.1rem;
}

/* Grid helpers */
.grid {
  display: grid;
  gap: 24px;
}
.grid.cols-3 {
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
}

.grid.cols-2 {
  grid-template-columns: 1fr;
}
@media (min-width: 1024px) {
  .grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
}

.grid.cols-4 {
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
}

/* Cards */
.card {
  position: relative;
  border-radius: 16px;
  border: 1px solid var(--tjm-border);
  background: var(--tjm-card-bg);
  box-shadow: var(--tjm-shadow-outline);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  padding: 20px;
}
.card .label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(200,200,205,0.8);
}
.card .title { margin-top: 8px; color: var(--tjm-text); font-weight: 600; font-size: 1.05rem; }
.card .body { margin-top: 8px; color: var(--tjm-text-muted); font-size: 0.95rem; }
.card .accent {
  position: absolute; inset: 0 0 0 0; pointer-events: none; border-radius: 16px;
}
.card .accent.left-bar { inset: 0 auto 0 0; width: 3px; background: color-mix(in srgb, var(--tjm-orange) 92%, transparent); border-top-left-radius: 16px; border-bottom-left-radius: 16px; transition: width .2s ease; }
.card:hover .accent.left-bar { width: 5px; }
.card .accent.glow { opacity: 0; transition: opacity .25s ease; background: radial-gradient(300px 120px at 20% 0%, rgba(234,88,12,0.18), transparent); }
.card:hover .accent.glow { opacity: 1; }

/* Principle + Step specific */
.card .kicker { font-size: 12px; color: rgba(200,200,205,0.8); }

/* Quick tools list */
.quick-list { margin-top: 14px; }
.quick-list li { display: flex; align-items: flex-start; gap: 10px; margin: 8px 0; color: var(--tjm-text); font-size: 0.95rem; }
.quick-dot { margin-top: 6px; width: 6px; height: 6px; border-radius: 999px; background: var(--tjm-orange); display: inline-block; }

/* Buttons */
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.btn { border-radius: 16px; padding: 10px 16px; font-size: 0.95rem; font-weight: 600; transition: background-color .2s ease, color .2s ease, border-color .2s ease; }
.btn-primary { background: #f97316; color: #0a0a0b; }
.btn-primary:hover { background: #fb923c; }
.btn-ghost { border: 1px solid rgba(255,255,255,0.15); color: var(--tjm-text); }
.btn-ghost:hover { background: rgba(255,255,255,0.06); }

/* CTA band */
.cta { margin-top: 48px; border-radius: 20px; overflow: hidden; border: 1px solid var(--tjm-border); }
.cta .wrap { position: relative; padding: 28px 24px; }
.cta .bg1 { position: absolute; inset: 0; z-index: -2; background: linear-gradient(135deg, #ea580c, #d97706, #be123c); }
.cta .bg2 { position: absolute; inset: 0; z-index: -1; opacity: .3; background: radial-gradient(700px 200px at 20% 0%, #ffffff55, transparent), radial-gradient(500px 200px at 80% 100%, #00000066, transparent); }
.cta .content { display: flex; flex-direction: column; gap: 16px; color: white; }
@media (min-width: 768px) { .cta .content { flex-direction: row; align-items: center; justify-content: space-between; gap: 20px; } }

/* Reveal */
[data-reveal].reveal-in { animation: reveal .7s ease-out both; }

/* Smoke background */
.smoke-bg { position: absolute; inset: 0; z-index: -1; }
.smoke-base { position: absolute; inset: 0; background: #0a0a0b; }
.smoke-parallax { position: absolute; inset: 0; opacity: .4; will-change: transform; }
.smoke-parallax.cool { opacity: .2; }
.plume { position: absolute; filter: blur(16px); animation: drift 16s ease-in-out infinite; }
.plume.warm { opacity: .5; background:
  radial-gradient(600px 240px at 30% 20%, rgba(234,88,12,0.11), transparent),
  radial-gradient(700px 300px at 70% 60%, rgba(124,45,18,0.15), transparent);
}
.plume.cool { opacity: .35; background:
  radial-gradient(600px 240px at 40% 40%, rgba(14,165,164,0.10), transparent),
  radial-gradient(700px 300px at 60% 70%, rgba(20,184,166,0.10), transparent);
}
.ember-speckle { pointer-events: none; position: absolute; inset: 0; mix-blend-mode: screen; background-image: radial-gradient(rgba(234,88,12,0.2) 1px, transparent 1px), radial-gradient(rgba(245,158,11,0.13) 1px, transparent 1px); background-position: 0 0, 12px 8px; background-size: 24px 24px, 24px 24px; animation: emberPulse 6s ease-in-out infinite; }

/* Topographic overlay */
.topo-overlay { position: absolute; inset: -10% -10% -10% -10%; pointer-events: none; opacity: .06; mix-blend-mode: overlay; background-image:
  linear-gradient(120deg, rgba(255,255,255,0.12) 1px, transparent 1px),
  linear-gradient(300deg, rgba(255,255,255,0.08) 1px, transparent 1px);
  background-size: 22px 22px, 28px 28px; will-change: transform; transform: translate3d(0, calc(var(--parallax, 0) * 0.2px), 0);
}

/* Card micro-interactions */
.card { will-change: transform; transition: transform .2s ease, box-shadow .2s ease; }
.card:hover { transform: translateY(-4px); box-shadow: 0 10px 30px rgba(0,0,0,.25); }

/* Banded sections */
.band { margin-top: 56px; border: 1px solid var(--tjm-border); border-radius: 16px; background: rgba(255,255,255,0.03); overflow: hidden; }
.band.slate { background: rgba(255,255,255,0.04); }
.band.charcoal { background: rgba(0,0,0,0.22); }
.band.ash { background: rgba(255,255,255,0.02); }
.band .section-header { padding: 24px; border-bottom: 1px solid var(--tjm-border); }
.band .section-header h3 { color: var(--tjm-text); font-weight: 600; font-size: 1.25rem; margin: 0 0 6px; }
.band .section-header p { color: var(--tjm-text-muted); margin: 0; }
.band .flow { list-style: none; margin: 0; padding: 16px 24px 24px; display: flex; flex-wrap: wrap; gap: 12px 18px; }
.band .flow li { color: var(--tjm-text); background: rgba(255,255,255,0.04); border: 1px solid var(--tjm-border); padding: 10px 14px; border-radius: 12px; font-weight: 500; }

/* Image blend block */
.image-blend { margin-top: 56px; position: relative; border-radius: 16px; border: 1px solid var(--tjm-border); padding: 16px; display: grid; grid-template-columns: 1fr; gap: 16px; overflow: visible; }
.image-blend .photo { aspect-ratio: 16/9; background-size: cover; background-position: center; filter: saturate(0.9) contrast(1.05) brightness(0.85); border-radius: 12px; border: 1px solid var(--tjm-border); overflow: hidden; }
.image-blend .overlay { position: static; inset: auto; transform: none; align-self: center; }
.image-blend img { width: 100%; border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.45); border: 1px solid var(--tjm-border-strong); background: #0b0b0dcc; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.image-blend .caption { margin-top: 8px; color: var(--tjm-text); font-weight: 600; text-shadow: 0 2px 10px rgba(0,0,0,0.35); }
@media (min-width: 900px) { .image-blend { grid-template-columns: 1fr 1fr; gap: 24px; padding: 20px; } }

/* Live counters */
.stats { margin-top: 56px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.stats .stat { background: rgba(255,255,255,0.05); border: 1px solid var(--tjm-border); border-radius: 16px; padding: 20px; text-align: center; }
.stats .stat-number { display: block; font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; color: var(--tjm-text); letter-spacing: -0.02em; }
.stats .stat-label { display: block; margin-top: 6px; color: var(--tjm-text-muted); font-weight: 500; }
@media (max-width: 640px) { .stats { grid-template-columns: 1fr; } }

/* Testimonials */
.testimonials { margin-top: 56px; position: relative; border-radius: 16px; border: 1px solid var(--tjm-border); background: rgba(255,255,255,0.03); overflow: hidden; }
.testimonials .testimonial { padding: 24px; opacity: 0; transition: opacity .4s ease; position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.testimonials .testimonial.active { opacity: 1; position: relative; }
.testimonials blockquote { color: var(--tjm-text); font-size: clamp(1.1rem, 2.2vw, 1.5rem); font-weight: 600; margin: 0; }
.testimonials cite { display: block; margin-top: 10px; color: var(--tjm-text-muted); font-style: normal; font-size: .95rem; }

/* Responsive adjustments */
@media (max-width: 768px) {
  #features-cinematic .inner { padding: 48px 16px; }
  .band .section-header { padding: 20px 16px; }
  .band .flow { padding: 12px 16px 20px; }
  .btn-row { gap: 8px; }
  .btn-row .btn { width: 100%; text-align: center; }
  .image-blend .photo { aspect-ratio: 4/3; }
  .image-blend .overlay { position: static; inset: auto; padding: 12px 16px 16px; }
  .image-blend img { width: 100%; }
  .testimonials .testimonial { position: relative; }
}
@media (max-width: 420px) {
  #features-cinematic h2.section-title { font-size: 1.75rem; }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .plume, .ember-speckle { animation: none !important; }
  [data-reveal].reveal-in { animation: none !important; opacity: 1 !important; transform: none !important; }
}
