/* ================================================================
   ScopeDue — page-directory.css
   Directory / parent pages (Group 7: 8 pages)
   /features/, /tools/, /templates/, /use-cases/, /resources/,
   /compare/, /alternatives/, /customers/
   Replaces directory-enhance.css. Scoped to body.dir-enhanced.
   ================================================================ */

/* ── Page atmosphere ────────────────────────────────────────────── */
body.dir-enhanced {
  background:
    radial-gradient(1180px 560px at 8% -10%, rgba(79,70,229,.07), transparent 60%),
    radial-gradient(960px 520px at 102% -4%, rgba(55,48,163,.055), transparent 58%),
    linear-gradient(180deg, #fcfcfe 0%, var(--bg) 36%);
  background-attachment: fixed;
}

/* ── Hero — layered, luminous ───────────────────────────────────── */
body.dir-enhanced .hero {
  border-radius: var(--r-xl);
  border-color: rgba(12,12,16,.06);
  background: linear-gradient(180deg, #ffffff 0%, #fbfbff 58%, #f6f7fd 100%);
  box-shadow: var(--sh-lg), inset 0 1px 0 rgba(255,255,255,.9);
  isolation: isolate;
}
body.dir-enhanced .hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -8%; bottom: -46%;
  width: 540px; height: 540px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(79,70,229,.18), transparent 62%);
  pointer-events: none;
}
body.dir-enhanced .hero h1 { letter-spacing: -.03em; line-height: 1.04; }
body.dir-enhanced .hero .lead { color: var(--text-body); }

/* Staggered entrance for hero content */
@keyframes dirRise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
body.dir-enhanced .hero > *:not(::before):not(::after) {
  animation: dirRise .62s cubic-bezier(.22,.61,.36,1) both;
}
body.dir-enhanced .hero > *:nth-child(1) { animation-delay: .04s; }
body.dir-enhanced .hero > *:nth-child(2) { animation-delay: .10s; }
body.dir-enhanced .hero > *:nth-child(3) { animation-delay: .16s; }
body.dir-enhanced .hero > *:nth-child(4) { animation-delay: .22s; }
body.dir-enhanced .hero > *:nth-child(5) { animation-delay: .28s; }
body.dir-enhanced .hero > *:nth-child(6) { animation-delay: .34s; }

/* ── Section heading accent bar ─────────────────────────────────── */
body.dir-enhanced main.page > article > section,
body.dir-enhanced main.page > section {
  scroll-margin-top: calc(var(--nav-h) + 1.25rem);
}
body.dir-enhanced section > h2:first-child,
body.dir-enhanced section > h2.section-h,
body.dir-enhanced .soft > h2:first-child {
  position: relative;
  padding-top: .35rem;
}
body.dir-enhanced section > h2:first-child::before {
  content: "";
  position: absolute;
  top: -.55rem; left: 0;
  width: 38px; height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--ink), var(--ink-mid));
  opacity: .9;
}

/* ── Premium card hover ─────────────────────────────────────────── */
body.dir-enhanced .card,
body.dir-enhanced .feature-card {
  border-radius: var(--r-lg);
  background: rgba(255,255,255,.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition:
    transform .24s cubic-bezier(.22,.61,.36,1),
    box-shadow .24s ease,
    border-color .24s ease,
    background .24s ease;
}
body.dir-enhanced .feature-card {
  padding: var(--s5);
  border: 1px solid var(--border);
  box-shadow: var(--sh-xs);
  position: relative;
}
/* Animated accent line on top edge */
body.dir-enhanced .card::before,
body.dir-enhanced .feature-card::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 3px;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  background: linear-gradient(90deg, var(--ink), var(--ink-mid) 70%, #818cf8);
  opacity: 0;
  transform: scaleX(.35);
  transform-origin: left center;
  transition: opacity .26s ease, transform .3s cubic-bezier(.22,.61,.36,1);
  pointer-events: none;
}
body.dir-enhanced .card:hover,
body.dir-enhanced .feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--sh-lg);
  border-color: var(--ink-border);
  background: #fff;
}
body.dir-enhanced .card:hover::before,
body.dir-enhanced .feature-card:hover::before { opacity: 1; transform: scaleX(1); }
body.dir-enhanced .card h3,
body.dir-enhanced .feature-card h3 { letter-spacing: -.015em; }

/* ── Grid breathing room ────────────────────────────────────────── */
body.dir-enhanced .grid { gap: var(--s5); }

/* ── Path selector ──────────────────────────────────────────────── */
body.dir-enhanced .path-selector {
  display: grid;
  gap: var(--s4);
  margin: var(--s5) 0;
}
@media (min-width: 720px) {
  body.dir-enhanced .path-selector { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
body.dir-enhanced .notice  { border-radius: var(--r-lg); }
body.dir-enhanced .soft    { border-radius: var(--r-xl); }

/* ── Scroll reveal (JS-driven) ──────────────────────────────────── */
body.dir-enhanced .dir-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s cubic-bezier(.22,.61,.36,1), transform .6s cubic-bezier(.22,.61,.36,1);
  will-change: opacity, transform;
}
body.dir-enhanced .dir-reveal.in { opacity: 1; transform: none; }

/* ── Reduced motion ─────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  body.dir-enhanced .hero > *,
  body.dir-enhanced .card,
  body.dir-enhanced .feature-card,
  body.dir-enhanced .dir-reveal {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
