/* =====================================================================
   landing-enhance.css — Marketing & interactivity layer for index.php
   ConcreteInfo · v3.9.3
   ---------------------------------------------------------------------
   - Scroll-reveal utilities (broad, staggered, reduced-motion safe)
   - "What's New in 3.9" update showcase
   - Reusable feature-detail modal styling
   - Floating Help FAB
   - Animated gradient marketing headings + trust bar
   - Hover micro-interactions on existing cards
   Matches heroReveal easing: cubic-bezier(0.22, 1, 0.36, 1)
   ===================================================================== */

/* ----------  Scroll reveal  ---------- */
[data-reveal] {
    opacity: 0;
    transform: translateY(28px);
    transition:
        opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}
[data-reveal].is-visible {
    opacity: 1;
    transform: none;
}
/* stagger children inside a reveal group */
[data-reveal-stagger] > * {
    opacity: 0;
    transform: translateY(22px);
    transition:
        opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
[data-reveal-stagger].is-visible > * {
    opacity: 1;
    transform: none;
}
[data-reveal-stagger].is-visible > *:nth-child(1)  { transition-delay: 0ms; }
[data-reveal-stagger].is-visible > *:nth-child(2)  { transition-delay: 70ms; }
[data-reveal-stagger].is-visible > *:nth-child(3)  { transition-delay: 140ms; }
[data-reveal-stagger].is-visible > *:nth-child(4)  { transition-delay: 210ms; }
[data-reveal-stagger].is-visible > *:nth-child(5)  { transition-delay: 280ms; }
[data-reveal-stagger].is-visible > *:nth-child(6)  { transition-delay: 350ms; }
[data-reveal-stagger].is-visible > *:nth-child(7)  { transition-delay: 420ms; }
[data-reveal-stagger].is-visible > *:nth-child(8)  { transition-delay: 490ms; }

@media (prefers-reduced-motion: reduce) {
    [data-reveal],
    [data-reveal-stagger] > * {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* ----------  Marketing gradient text  ---------- */
.ci-gradient-text {
    background: linear-gradient(95deg, #e5461f 0%, #ff6b47 45%, #f59e0b 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
.ci-gradient-text.animate {
    background-size: 220% auto;
    animation: ci-shimmer 6s linear infinite;
}
@keyframes ci-shimmer {
    to { background-position: 220% center; }
}

/* ----------  Trust bar (under hero CTAs)  ---------- */
.ci-trustbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1.25rem 2rem;
    margin-top: 2.25rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.ci-trustbar-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}
.ci-trustbar-item i {
    color: #ff6b47;
    font-size: 0.9rem;
}

/* ----------  Hero CTA glow  ---------- */
.btn-hero-primary {
    position: relative;
    overflow: hidden;
}
.btn-hero-primary::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.28) 50%, transparent 70%);
    transform: translateX(-120%);
    transition: transform 0.7s ease;
}
.btn-hero-primary:hover::after {
    transform: translateX(120%);
}
.btn-hero-primary:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

/* ----------  Navbar scroll state  ---------- */
.ci-nav-scrolled {
    box-shadow: 0 6px 24px rgba(13, 11, 9, 0.08);
    backdrop-filter: saturate(180%) blur(10px);
}

/* ----------  Animated stat counters  ---------- */
.stats-strip-value[data-count] {
    transition: transform 0.3s ease;
}
.stats-strip-item:hover .stats-strip-value {
    transform: scale(1.08);
    color: var(--color-brand, #e5461f);
}
.stats-strip-item {
    transition: background 0.25s ease;
}
.stats-strip-item:hover {
    background: rgba(229, 70, 31, 0.05);
}

/* =====================================================================
   WHAT'S NEW IN 3.9  —  latest updates showcase
   ===================================================================== */
.whatsnew-section {
    padding: 4.5rem 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% 0%, rgba(229, 70, 31, 0.06), transparent 70%),
        linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
}
.dark .whatsnew-section {
    background:
        radial-gradient(ellipse 80% 50% at 50% 0%, rgba(229, 70, 31, 0.10), transparent 70%),
        linear-gradient(180deg, #1a1714 0%, #0d0b09 100%);
}

.whatsnew-head {
    text-align: center;
    max-width: 46rem;
    margin: 0 auto 3rem;
}
.whatsnew-version-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.875rem;
    border-radius: 9999px;
    background: rgba(229, 70, 31, 0.10);
    border: 1px solid rgba(229, 70, 31, 0.25);
    color: #e5461f;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}
.whatsnew-version-badge .pulse-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #e5461f;
    animation: ci-pulse-dot 1.8s ease-in-out infinite;
}
@keyframes ci-pulse-dot {
    0%, 100% { box-shadow: 0 0 0 0 rgba(229, 70, 31, 0.55); }
    50%      { box-shadow: 0 0 0 6px rgba(229, 70, 31, 0); }
}
.whatsnew-title {
    font-family: 'IBM Plex Sans Condensed', 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(1.85rem, 4vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1.1;
    color: #1a1a1a;
    margin-bottom: 0.75rem;
}
.dark .whatsnew-title { color: #ffffff; }
.whatsnew-sub {
    font-size: 1.0625rem;
    color: #6b6b6b;
    line-height: 1.6;
}
.dark .whatsnew-sub { color: #a3a3a3; }

.whatsnew-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}
@media (max-width: 1024px) { .whatsnew-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .whatsnew-grid { grid-template-columns: 1fr; } }

/* update card */
.update-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1.5rem 1.25rem;
    background: #ffffff;
    border: 1px solid #ececec;
    border-radius: 16px;
    cursor: pointer;
    text-align: left;
    transition:
        transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.3s ease,
        border-color 0.3s ease;
    overflow: hidden;
}
.dark .update-card {
    background: #1a1714;
    border-color: #2a2520;
}
.update-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #e5461f, #ff6b47);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.update-card:hover {
    transform: translateY(-6px);
    border-color: rgba(229, 70, 31, 0.35);
    box-shadow: 0 16px 40px rgba(229, 70, 31, 0.12), 0 2px 8px rgba(13, 11, 9, 0.06);
}
.update-card:hover::before { transform: scaleX(1); }

.update-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}
.update-card-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(229, 70, 31, 0.12), rgba(245, 158, 11, 0.10));
    color: #e5461f;
    font-size: 1.25rem;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.update-card:hover .update-card-icon {
    transform: scale(1.1) rotate(-6deg);
}
.update-card-new {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 9999px;
    background: linear-gradient(95deg, #e5461f, #ff6b47);
    color: #fff;
    font-size: 0.625rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(229, 70, 31, 0.35);
}
.update-card-new.is-improved {
    background: linear-gradient(95deg, #1a7a56, #10b981);
    box-shadow: 0 2px 8px rgba(26, 122, 86, 0.35);
}
.update-card-title {
    font-size: 1.0625rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 0.4rem;
    line-height: 1.3;
}
.dark .update-card-title { color: #ffffff; }
.update-card-desc {
    font-size: 0.875rem;
    color: #6b6b6b;
    line-height: 1.55;
    flex: 1;
}
.dark .update-card-desc { color: #a3a3a3; }
.update-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 1rem;
    font-size: 0.8125rem;
    font-weight: 700;
    color: #e5461f;
}
.update-card-cta i {
    transition: transform 0.25s ease;
}
.update-card:hover .update-card-cta i {
    transform: translateX(4px);
}

/* =====================================================================
   FEATURE-DETAIL MODAL  (one shell, populated by landing-enhance.js)
   ===================================================================== */
/* Root overlay — self-contained (CIModal toggles display:flex/none via inline style).
   z-index MUST stay 1065 — strictly ABOVE the shared CIModal `.modal-backdrop`
   (assets/css/components/modal.css: z-index 1055, backdrop-filter: blur(4px)).
   CIModal.show() appends that .modal-backdrop to <body>; at an equal z-index the
   backdrop (later in DOM order) paints ON TOP of this dialog, and its
   backdrop-filter then samples+blurs the dialog text behind it — the exact "fuzzy
   modal" symptom reported on the landing page — while also intercepting pointer
   events on the close button and links. Sitting one layer above (1065, matching
   the generic `.modal` token) makes the dialog paint above the backdrop so it
   renders crisp and stays clickable. The dark ::before scrim below is a fallback
   for the manual (non-CIModal) open path in landing-enhance.js, which creates no
   .modal-backdrop of its own. */
.feature-modal {
    position: fixed;
    inset: 0;
    z-index: 1065;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow-y: auto;
}
.feature-modal::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background: rgba(13, 11, 9, 0.7);
}
/* Scroll lock applied to <body> while a feature modal is open. */
body.ci-modal-open {
    overflow: hidden;
}
.feature-modal .modal-dialog {
    width: 100%;
    max-width: 620px;
    margin: auto;
    animation: ci-modal-in 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes ci-modal-in {
    from { opacity: 0; transform: translateY(24px) scale(0.97); }
    to   { opacity: 1; transform: none; }
}
.feature-modal .modal-content {
    position: relative;
    background: #ffffff;
    border: none;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 24px 70px rgba(13, 11, 9, 0.22);
}
.dark .feature-modal .modal-content { background: #1a1714; }
@media (prefers-reduced-motion: reduce) {
    .feature-modal .modal-dialog { animation: none; }
}
.feature-modal-head {
    position: relative;
    padding: 1.75rem 1.75rem 1.25rem;
    background:
        radial-gradient(ellipse 60% 80% at 0% 0%, rgba(229, 70, 31, 0.18), transparent 60%),
        linear-gradient(135deg, #1f1f1f 0%, #2a2520 100%);
    color: #fff;
}
.feature-modal-head::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 3px;
    background: linear-gradient(90deg, #e5461f, #ff6b47, #f59e0b);
}
.feature-modal-icon {
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.10);
    color: #ff6b47;
    font-size: 1.5rem;
    margin-bottom: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
}
.feature-modal-title {
    font-family: 'IBM Plex Sans Condensed', 'Plus Jakarta Sans', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1.15;
    margin: 0;
}
.feature-modal-tag {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
}
.feature-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}
.feature-modal-close:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}
.feature-modal-body {
    padding: 1.5rem 1.75rem 1.75rem;
}
.feature-modal-blurb {
    font-size: 0.9375rem;
    color: #4a4a4a;
    line-height: 1.65;
    margin-bottom: 1.25rem;
}
.dark .feature-modal-blurb { color: #c4c4c4; }
.feature-modal-benefits {
    list-style: none;
    padding: 0;
    margin: 0 0 1.25rem;
    display: grid;
    gap: 0.6rem;
}
.feature-modal-benefits li {
    display: flex;
    gap: 0.65rem;
    font-size: 0.875rem;
    color: #3a3a3a;
    line-height: 1.5;
}
.dark .feature-modal-benefits li { color: #d4d4d4; }
.feature-modal-benefits li i {
    flex-shrink: 0;
    margin-top: 0.15rem;
    color: #1a7a56;
    font-size: 0.85rem;
}
.feature-modal-standards {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
}
.feature-modal-standard {
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    background: rgba(229, 70, 31, 0.08);
    color: #c93a18;
    font-size: 0.72rem;
    font-weight: 600;
}
.dark .feature-modal-standard {
    background: rgba(229, 70, 31, 0.15);
    color: #ff6b47;
}
.feature-modal-foot {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid #ececec;
}
.dark .feature-modal-foot { border-color: #2a2520; }
.feature-modal-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.65rem 1.25rem;
    border-radius: 8px;
    background: linear-gradient(95deg, #e5461f, #ff6b47);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.feature-modal-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(229, 70, 31, 0.35);
    color: #fff;
}
.feature-modal-help {
    font-size: 0.8125rem;
    color: #6b6b6b;
    text-decoration: none;
}
.feature-modal-help:hover { color: #e5461f; }

/* =====================================================================
   FLOATING HELP FAB
   ===================================================================== */
.ci-help-fab {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    z-index: 1030;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #e5461f, #ff6b47);
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(229, 70, 31, 0.40);
    display: grid;
    place-items: center;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.ci-help-fab:hover {
    transform: scale(1.08) rotate(8deg);
}
.ci-help-fab::before {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid rgba(229, 70, 31, 0.35);
    animation: ci-fab-ring 2.4s ease-out infinite;
}
@keyframes ci-fab-ring {
    0%   { transform: scale(0.9); opacity: 0.8; }
    100% { transform: scale(1.4); opacity: 0; }
}
.ci-help-fab-label {
    position: absolute;
    right: 64px;
    top: 50%;
    transform: translateY(-50%) translateX(8px);
    white-space: nowrap;
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    background: #1a1a1a;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.ci-help-fab:hover .ci-help-fab-label {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}
@media (max-width: 640px) {
    .ci-help-fab { width: 48px; height: 48px; right: 1rem; bottom: 5rem; }
    .ci-help-fab-label { display: none; }
}

/* ----------  Help-quick modal list  ---------- */
.help-quick-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.5rem;
}
.help-quick-list a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    background: #fafbfc;
    border: 1px solid #ececec;
    color: #1a1a1a;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.help-quick-list a:hover {
    transform: translateX(4px);
    border-color: rgba(229, 70, 31, 0.4);
    background: rgba(229, 70, 31, 0.05);
}
.help-quick-list a i {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: rgba(229, 70, 31, 0.10);
    color: #e5461f;
    flex-shrink: 0;
}
.dark .help-quick-list a {
    background: #1a1714;
    border-color: #2a2520;
    color: #ffffff;
}
.dark .help-quick-list a:hover { background: rgba(229, 70, 31, 0.10); }

/* ----------  Existing-card interactivity hooks  ---------- */
[data-feature] { cursor: pointer; }
.method-card[data-feature]:hover,
.qaqc-card[data-feature]:hover {
    transform: translateY(-4px);
}
