/* Saifee ERP features page — builds on main.css tokens */

/* Animations (only hidden when JS is on) */
.js .anim {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .7s var(--ease), transform .7s var(--ease);
    transition-delay: var(--delay, 0s);
}

.js .f-shot {
    opacity: 0;
    transition: opacity .8s var(--ease), transform .8s var(--ease);
}

.js .f-shot.from-left { transform: translateX(-48px); }
.js .f-shot.from-right { transform: translateX(48px); }

.js .anim.anim-visible,
.js .f-shot.anim-visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .js .anim, .js .f-shot { opacity: 1; transform: none; transition: none; }
}

/* Hero */
.f-hero {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    color: #fff;
    padding-block: clamp(120px, 16vw, 190px) clamp(70px, 10vw, 120px);
    text-align: center;
}

.f-hero-bg {
    position: absolute;
    inset: -20% 0 0;
    z-index: -1;
    background:
        radial-gradient(circle at 80% 10%, rgba(255, 255, 255, .16), transparent 45%),
        var(--gradient);
    will-change: transform;
}

.f-hero-bg::after {
    content: "";
    position: absolute;
    right: -8%;
    top: 10%;
    width: 520px;
    aspect-ratio: 1;
    border-radius: 999px;
    border: 70px solid rgba(255, 255, 255, .07);
}

.f-hero .label { color: rgba(255, 255, 255, .85); }
.f-hero .label::before { background: #fff; }

.f-hero h1 {
    max-width: 18ch;
    margin: 18px auto 0;
    font-size: clamp(2.2rem, 6vw, 4.2rem);
}

.f-hero p {
    max-width: 38rem;
    margin: 20px auto 0;
    font-size: 1.15rem;
    color: rgba(255, 255, 255, .86);
}

.f-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 32px;
}

/* Why */
.f-why { padding-block: clamp(48px, 7vw, 80px); }

.f-why-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* Modules */
.f-module {
    display: grid;
    grid-template-columns: 1fr 1.35fr;
    align-items: center;
    gap: clamp(28px, 5vw, 64px);
    margin-top: clamp(56px, 9vw, 110px);
}

.f-module.is-flip { grid-template-columns: 1.35fr 1fr; }
.f-module.is-flip .f-text { order: 2; }

.f-text h3 {
    margin-top: 14px;
    font-size: clamp(1.5rem, 3vw, 2.1rem);
    letter-spacing: -.02em;
}

.f-text p {
    margin-top: 12px;
    color: var(--text-muted);
}

.f-text ul {
    list-style: none;
    margin: 20px 0 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.f-text li {
    position: relative;
    padding-left: 28px;
    font-weight: 600;
}

.f-text li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .35em;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--gradient);
}

.f-shot {
    width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

/* CTA */
.cta-actions { display: flex; justify-content: flex-end; }

/* FAQ */
.f-faq-list {
    max-width: 48rem;
    margin-inline: auto;
    display: grid;
    gap: 12px;
}

.f-faq-list details {
    padding: 18px 22px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.f-faq-list summary {
    cursor: pointer;
    font-weight: 700;
    list-style: none;
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.f-faq-list summary::-webkit-details-marker { display: none; }

.f-faq-list summary::after {
    content: "+";
    color: var(--accent);
    font-size: 1.4rem;
    line-height: 1;
}

.f-faq-list details[open] summary::after { content: "–"; }

.f-faq-list p {
    margin-top: 12px;
    color: var(--text-muted);
}

.f-faq-list p a { color: var(--accent); font-weight: 600; }

/* Footer */
.f-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
}

.f-links a { font-weight: 600; color: var(--text-muted); }
.f-links a:hover { color: var(--accent); }

@media (max-width: 860px) {
    .f-why-grid { grid-template-columns: repeat(2, 1fr); }
    .f-module, .f-module.is-flip { grid-template-columns: 1fr; }
    .f-module.is-flip .f-text { order: 0; }
    .js .f-shot.from-left, .js .f-shot.from-right { transform: translateY(32px); }
    .cta-actions { justify-content: flex-start; }
}

@media (max-width: 520px) {
    .f-why-grid { grid-template-columns: 1fr; }
}

/* Section jump links */
.f-jump { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 28px; }
.f-jump a { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-weight: 600; font-size: .92rem; color: var(--text-muted); transition: color .2s, border-color .2s; }
.f-jump a:hover { color: var(--accent); border-color: var(--accent); }
.f-module { scroll-margin-top: 90px; }

/* Check lists */
.f-check { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 10px; }
.f-check li { position: relative; padding-left: 28px; font-weight: 600; }
.f-check li::before { content: ""; position: absolute; left: 0; top: .3em; width: 16px; height: 16px; border-radius: 50%; background: var(--gradient); }
.f-check li::after { content: ""; position: absolute; left: 4px; top: calc(.3em + 4px); width: 8px; height: 4px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) scale(.8); }

/* Capability cards */
.f-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: clamp(32px, 5vw, 56px); }
.f-card { padding: 26px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-sm); }
.f-card h3 { font-size: 1.2rem; letter-spacing: -.01em; }
.f-card .f-check { margin-top: 16px; gap: 8px; }
.f-card .f-check li { font-weight: 500; font-size: .95rem; }
@media (max-width: 960px) { .f-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .f-cards { grid-template-columns: 1fr; } }

/* Sliders */
.f-slider { position: relative; overflow: hidden; min-width: 0; background: var(--surface); }
.f-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.f-track::-webkit-scrollbar { display: none; }
.f-slide { position: relative; flex: 0 0 100%; margin: 0; scroll-snap-align: start; aspect-ratio: 16 / 10; }
.f-slide img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.f-slide figcaption { position: absolute; left: 14px; bottom: 14px; padding: 6px 12px; border-radius: 999px; background: rgba(8, 11, 23, .78); color: #fff; font-size: .8rem; font-weight: 600; }
.f-nav { position: absolute; top: 50%; translate: 0 -50%; width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .94); color: #0b1330; box-shadow: 0 4px 14px rgba(0, 0, 0, .25); cursor: pointer; transition: opacity .2s; }
.f-nav svg { width: 20px; height: 20px; }
.f-prev { left: 12px; }
.f-next { right: 12px; }
.f-nav:disabled { opacity: 0; pointer-events: none; }
.f-dots { position: absolute; right: 14px; bottom: 20px; display: flex; gap: 6px; padding: 6px 8px; border-radius: 999px; background: rgba(255, 255, 255, .85); }
.f-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: rgba(8, 11, 23, .3); cursor: pointer; transition: width .2s; }
.f-dots button.on { width: 20px; border-radius: 999px; background: var(--accent); }

/* Built-for-the-counter intro */
.f-built .section-head p { max-width: 44rem; margin-inline: auto; }
.f-card .value-icon { margin-bottom: 16px; }
.f-card > p { margin-top: 10px; color: var(--text-muted); }

/* New badge */
.f-new { display: inline-block; padding: 4px 12px; border-radius: 999px; color: #fff; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; background: linear-gradient(110deg, var(--brand-1) 20%, var(--brand-2) 45%, #7fe0f5 50%, var(--brand-2) 55%, var(--brand-1) 80%); background-size: 250% 100%; animation: f-shimmer 3.6s linear infinite; }
.f-card .f-new { margin-bottom: 14px; }
.f-text .f-new + h3 { margin-top: 12px; }
@keyframes f-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* Reading progress */
.f-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; background: var(--gradient); transform-origin: 0 50%; transform: scaleX(0); pointer-events: none; }

/* Sticky jump bar: one scrollable row, current section highlighted */
.f-jump { position: sticky; top: 76px; z-index: 20; flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; margin-inline: auto; width: fit-content; max-width: 100%; padding: 8px; border-radius: 999px; border: 1px solid var(--border); background: var(--nav-bg); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: var(--shadow-sm); }
.f-jump::-webkit-scrollbar { display: none; }
.f-jump a { flex: none; border-color: transparent; background: transparent; padding: 7px 14px; transition: color .2s, background-color .25s, transform .2s; }
.f-jump a:hover { transform: translateY(-1px); }
.f-jump a.is-active { color: #fff; background: var(--gradient); border-color: transparent; }
.f-module { scroll-margin-top: 140px; }

/* Fewer points at first, the rest on request */
.f-toggle { margin-top: 14px; padding: 0; border: 0; background: none; color: var(--accent); font: inherit; font-weight: 700; font-size: .92rem; cursor: pointer; }
.f-toggle::after { content: " \2192"; display: inline-block; transition: transform .2s; }
.f-toggle[aria-expanded="true"]::after { content: " \2191"; }
.f-toggle:hover::after { transform: translateX(3px); }
.f-check li:not([hidden]) { animation: f-li .45s var(--ease) both; }
@keyframes f-li { from { opacity: 0; transform: translateY(6px); } }

/* Points appear one after another as a section scrolls in; ticks draw themselves */
.js .f-text .f-check li, .js .f-card .f-check li { opacity: 0; transform: translateX(-14px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.js .anim-visible .f-check li { opacity: 1; transform: none; }
.js .anim-visible .f-check li:nth-child(1) { transition-delay: .25s; }
.js .anim-visible .f-check li:nth-child(2) { transition-delay: .35s; }
.js .anim-visible .f-check li:nth-child(3) { transition-delay: .45s; }
.js .anim-visible .f-check li:nth-child(n+4) { transition-delay: .55s; }
.js .f-check li::after { transform: rotate(-45deg) scale(0); transition: transform .4s var(--ease) .5s; }
.js .anim-visible .f-check li::after { transform: rotate(-45deg) scale(.8); }
.f-check li:not([hidden]) { animation: none; }

/* Screenshots and cards */
.f-slide img { transition: transform 1.2s var(--ease); }
.f-slider:hover .f-slide img { transform: scale(1.025); }
.f-track { scroll-behavior: auto; }
.f-card { transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s; }
.f-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: rgba(var(--brand-1-rgb), .25); }
.f-hero-bg::after { animation: f-spin 60s linear infinite; }
@keyframes f-spin { to { transform: rotate(360deg); } }
.f-dots button { transition: width .3s var(--ease), background-color .3s; }

@media (max-width: 600px) { .f-jump { top: 68px; max-width: 100%; border-radius: 16px; } }
@media (prefers-reduced-motion: reduce) {
    .f-new, .f-hero-bg::after { animation: none; }
    .js .f-check li, .js .f-check li::after { opacity: 1; transform: none; transition: none; }
    .js .f-check li::after { transform: rotate(-45deg) scale(.8); }
    .f-slider:hover .f-slide img, .f-card:hover { transform: none; }
    .f-progress { display: none; }
}

/* Desktop: when the jump bar reaches the top it sits inside the site header, so it reads as one navbar
   (logo far left, theme + demo button far right, features in the middle) */
@media (min-width: 1000px) {
    .f-jump {
        top: 11px;
        z-index: 55;
        max-width: min(100%, 640px);
        transition: background-color .3s, border-color .3s, box-shadow .3s, backdrop-filter .3s;
        -webkit-mask-image: linear-gradient(90deg, transparent, #000 22px, #000 calc(100% - 22px), transparent);
        mask-image: linear-gradient(90deg, transparent, #000 22px, #000 calc(100% - 22px), transparent);
    }
    .f-jump.is-stuck {
        background: transparent;
        border-color: transparent;
        box-shadow: none;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }
    .f-module { scroll-margin-top: 110px; }
}

/* Bigger screenshots + click to enlarge */
.f-module { grid-template-columns: 1fr 1.7fr; }
.f-module.is-flip { grid-template-columns: 1.7fr 1fr; }
@media (max-width: 860px) { .f-module, .f-module.is-flip { grid-template-columns: 1fr; } }
.f-slide img { cursor: zoom-in; }
.f-zoom-hint { position: absolute; top: 12px; right: 12px; z-index: 2; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px 6px 9px; border: 0; border-radius: 999px; background: rgba(8, 11, 23, .78); color: #fff; font: inherit; font-size: .78rem; font-weight: 600; cursor: pointer; opacity: .9; transition: opacity .2s, transform .2s; }
.f-zoom-hint svg { width: 16px; height: 16px; }
.f-zoom-hint:hover { opacity: 1; transform: scale(1.04); }

.f-lightbox { position: fixed; inset: 0; z-index: 100; display: none; flex-direction: column; background: rgba(5, 8, 20, .92); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.f-lightbox.is-open { display: flex; animation: f-lb .25s var(--ease); }
@keyframes f-lb { from { opacity: 0; } }
.f-lb-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; color: #fff; font-weight: 600; }
.f-lb-bar span { font-size: .95rem; opacity: .85; }
.f-lb-btn { width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; cursor: pointer; transition: background-color .2s; }
.f-lb-btn:hover { background: rgba(255, 255, 255, .26); }
.f-lb-btn svg { width: 20px; height: 20px; }
.f-lb-stage { position: relative; flex: 1; min-height: 0; overflow: auto; display: grid; place-items: center; padding: 0 18px 24px; }
.f-lb-stage img { display: block; max-width: none; width: min(1440px, 100%); height: auto; border-radius: 10px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); animation: f-lbimg .35s var(--ease); }
.f-lb-stage img.is-fit { width: auto; max-width: 100%; max-height: 100%; cursor: zoom-in; }
.f-lb-stage img:not(.is-fit) { cursor: zoom-out; }
@keyframes f-lbimg { from { opacity: 0; transform: scale(.97); } }
.f-lb-prev, .f-lb-next { position: absolute; top: 50%; translate: 0 -50%; z-index: 2; }
.f-lb-prev { left: 14px; }
.f-lb-next { right: 14px; }
@media (prefers-reduced-motion: reduce) { .f-lightbox.is-open, .f-lb-stage img { animation: none; } }

/* Wide (landscape) screenshots keep their own proportions */
.f-slider.is-wide .f-slide { aspect-ratio: 1917 / 860; }
