/* ==========================================================================
   PRODUCTION CSS - KhataClerk (Updated for scaling + consistency + perf)
   - No design overhaul. Same look. More consistent rhythm & responsive behavior.
   - Adds system tokens, section/card primitives, safer widths, and reduced layout jank.
   ========================================================================== */

/* CSS Variables */
:root {
    --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    --font-body: "DM Sans", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;

    /* Helps keep fallback sizing close (supported in modern Chromium) */
    font-synthesis: none;
}

:root {
    --emerald: #047857;
    --emerald-dark: #065f46;
    --emerald-light: #10b981;
    --orange: #f97316;
    --navy: #0f172a;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-600: #4b5563;
    --gray-900: #111827;

    --font-display: 'Bricolage Grotesque', sans-serif;
    --font-body: 'DM Sans', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --container-max: 1400px;
    --container-padding: clamp(1rem, 5vw, 2rem);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* ====== System scaling tokens (for consistent rhythm) ====== */
    --s-1: clamp(0.5rem, 1vw, 0.75rem);
    --s-2: clamp(0.75rem, 1.5vw, 1rem);
    --s-3: clamp(1rem, 2vw, 1.5rem);
    --s-4: clamp(1.5rem, 3vw, 2.5rem);
    --s-5: clamp(2rem, 4vw, 4rem);
    --s-6: clamp(3rem, 6vw, 6rem);

    --h1: clamp(2.5rem, 6.5vw, 4.5rem);
    --h2: clamp(2.2rem, 5.5vw, 3.5rem);
    --lead: clamp(1.05rem, 2.2vw, 1.3rem);
    --body: 16px;

    /* Navbar offset */
    --nav-h: 72px;
    /* fallback; JS will overwrite */
    --nav-gap: 12px;
    /* breathing room below navbar */
}

/* ===== Savings Calculator ===== */
.calc {
    border: 2px solid rgba(4, 120, 87, 0.18);
}

.calc__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--s-3);
    margin-bottom: var(--s-4);
}

.calc__badge {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--emerald);
    margin-bottom: 0.6rem;
}

.calc__title {
    font-family: var(--font-display);
    font-size: clamp(1.3rem, 2.6vw, 1.8rem);
    font-weight: 800;
    color: var(--navy);
    line-height: 1.15;
    margin-bottom: 0.5rem;
}

.calc__subtitle {
    color: var(--gray-600);
    font-size: 1rem;
    line-height: 1.6;
    max-width: 60ch;
}

.calc__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--s-4);
}

@media (min-width: 900px) {
    .calc__grid {
        grid-template-columns: 1.1fr 0.9fr;
        align-items: start;
    }
}

.calc__inputs {
    display: grid;
    gap: 0.9rem;
}

.calc__row {
    display: grid;
    gap: 0.5rem;
    padding: 0.85rem;
    border-radius: 14px;
    background: var(--gray-50);
    border: 1px solid var(--gray-100);
}

.calc__label {
    font-weight: 800;
    color: var(--navy);
    font-size: 0.95rem;
}

.calc__control {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.calc__input {
    width: 100%;
    max-width: 220px;
    padding: 0.75rem 0.9rem;
    border-radius: 12px;
    border: 2px solid rgba(15, 23, 42, 0.12);
    outline: none;
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--navy);
    background: white;
}

.calc__input:focus {
    border-color: rgba(4, 120, 87, 0.55);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

.calc__hint {
    font-weight: 700;
    color: var(--gray-600);
}

.calc__note {
    margin-top: 0.5rem;
    color: var(--gray-600);
    font-size: 0.95rem;
    line-height: 1.6;
}

.calc__outputs {
    display: grid;
    gap: 1rem;
}

.calc__kpi {
    padding: 1.1rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-100);
    background: white;
    box-shadow: var(--shadow-sm);
}

.calc__kpi--highlight {
    border-color: rgba(4, 120, 87, 0.25);
    background: linear-gradient(135deg, rgba(4, 120, 87, 0.06), rgba(16, 185, 129, 0.04));
}

.calc__kpi-label {
    font-weight: 800;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    margin-bottom: 0.4rem;
}

.calc__kpi-value {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    color: var(--navy);
    line-height: 1.2;
}

.calc__kpi-sub {
    margin-top: 0.35rem;
    color: var(--gray-600);
    font-weight: 700;
    font-family: var(--font-mono);
}

.calc__cta {
    margin-top: 0.25rem;
    display: grid;
    gap: 0.6rem;
}

.calc__disclaimer {
    color: var(--gray-600);
    font-size: 0.9rem;
    line-height: 1.5;
}


html {
    font-size: var(--body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-padding-top: calc(var(--nav-h) + var(--nav-gap));
}

/* Also protects normal scroll positions / deep links */
section,
[id] {
    scroll-margin-top: calc(var(--nav-h) + var(--nav-gap));
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ===== Mobile nav actions ===== */
.nav__actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Desktop links visible only on desktop */
.nav__links--desktop {
    display: none;
}

/* Burger button */
.nav__burger {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(4, 120, 87, 0.18);
    background: rgba(255, 255, 255, 0.9);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex-direction: column;
    cursor: pointer;
    transition: var(--transition);
}

.nav__burger span {
    width: 20px;
    height: 2px;
    background: var(--navy);
    border-radius: 999px;
    transition: var(--transition);
}

/* Mobile dropdown panel */
.nav__mobile {
    display: none;
    border-top: 1px solid rgba(4, 120, 87, 0.12);
    background: rgba(255, 255, 255, 0.97);
}

@supports (backdrop-filter: blur(10px)) {
    .nav__mobile {
        backdrop-filter: blur(10px);
    }
}

.nav__mobile-inner {
    padding-top: 0.75rem;
    padding-bottom: 1rem;
    display: grid;
    gap: 0.4rem;
}

.nav__mobile-link {
    padding: 0.85rem 0.75rem;
    border-radius: 12px;
    text-decoration: none;
    color: var(--gray-900);
    font-weight: 700;
    background: var(--gray-50);
    border: 1px solid var(--gray-100);
}

.nav__mobile-link:active {
    transform: scale(0.99);
}

/* Open state */
.nav__mobile.active {
    display: block;
}

/* Desktop layout rules */
@media (min-width: 768px) {
    .nav__links--desktop {
        display: flex;
        align-items: center;
        gap: clamp(1.5rem, 3vw, 2.5rem);
    }

    .nav__burger {
        display: none;
    }

    .nav__mobile {
        display: none !important;
    }
}


body {
    font-family: var(--font-body);
    color: var(--gray-900);
    line-height: 1.6;
    background: #ffffff;
    /* Removed overflow-x hidden: helps you catch real overflow issues during dev.
       If you truly need it, add it back AFTER confirming nothing overflows. */
}

img,
svg,
video {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Container */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
}

/* ====== Section primitive (consistent rhythm) ====== */
.section {
    padding: var(--s-6) 0;
}

.section--soft {
    background: var(--gray-50);
}

.section--grad-soft {
    background: linear-gradient(180deg, #ffffff 0%, var(--gray-50) 100%);
}

.section--grad-invert {
    background: linear-gradient(180deg, var(--gray-50) 0%, white 100%);
}

/* ====== Card primitive (shared look) ====== */
.card {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--s-4);
    border: 2px solid var(--gray-100);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.card--soft {
    background: var(--gray-50);
    border-color: transparent;
    box-shadow: none;
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(4, 120, 87, 0.1);
    padding: clamp(0.8rem, 2vw, 1.2rem) 0;
}

@supports (backdrop-filter: blur(10px)) {
    .nav {
        backdrop-filter: blur(10px);
    }
}

.nav__container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.nav__logo {
    font-family: var(--font-display);
    font-size: clamp(1.3rem, 2.5vw, 1.8rem);
    font-weight: 800;
    color: var(--emerald);
    text-decoration: none;
    letter-spacing: -0.02em;
    flex-shrink: 0;
}

.nav__links {
    display: none;
    align-items: center;
    gap: clamp(1.5rem, 3vw, 2.5rem);
}

.nav__link {
    color: var(--gray-600);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s;
    white-space: nowrap;
}

.nav__link:hover {
    color: var(--emerald);
}

@media (min-width: 768px) {
    .nav__links {
        display: flex;
    }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: clamp(0.9rem, 2vw, 1.1rem) clamp(1.5rem, 3vw, 2.2rem);
    border-radius: var(--radius-md);
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    font-weight: 700;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    will-change: transform;
}

.btn--small {
    padding: 0.7rem 1.5rem;
    font-size: 0.95rem;
}

.btn--primary {
    background: linear-gradient(135deg, var(--emerald), var(--emerald-dark));
    color: white;
    box-shadow: 0 4px 16px rgba(4, 120, 87, 0.3);
}

.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(4, 120, 87, 0.4);
}

.btn--secondary {
    background: white;
    color: var(--emerald-dark);
    border: 2px solid var(--emerald);
}

.btn--secondary:hover {
    background: var(--emerald);
    color: white;
}

.btn__icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: var(--s-5);
}

.section-header__badge {
    display: inline-block;
    font-size: clamp(0.8rem, 1.5vw, 0.9rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--s-2);
}

.section-header__badge--warning {
    color: var(--orange);
}

.section-header__badge--primary {
    color: var(--emerald);
}

.section-header__title {
    font-family: var(--font-display);
    font-size: var(--h2);
    font-weight: 800;
    color: var(--navy);
    line-height: 1.1;
    margin-bottom: var(--s-2);
    letter-spacing: -0.02em;
}

.section-header__subtitle {
    font-size: var(--lead);
    color: var(--gray-600);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Hero Section */
.hero {
    /* Keep your original hero vibe but use consistent tokens */
    padding: calc(var(--s-6) + 2rem) 0 var(--s-5);
    background: linear-gradient(135deg, #fefdf8 0%, #ffffff 100%);
}

.hero__container {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--s-5);
    align-items: start;
}

/* Make hero switch only once (more stable scaling) */
@media (min-width: 1024px) {
    .hero__container {
        grid-template-columns: 1.2fr 1fr;
        gap: var(--s-6);
    }
}

.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    background: linear-gradient(135deg, rgba(4, 120, 87, 0.1), rgba(251, 191, 36, 0.1));
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-size: clamp(0.85rem, 1.5vw, 0.9rem);
    font-weight: 600;
    color: var(--emerald-dark);
    margin-bottom: var(--s-3);
    border: 1px solid rgba(4, 120, 87, 0.2);
}

.hero__badge-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.hero__title {
    font-family: var(--font-display);
    font-size: var(--h1);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: var(--s-2);
    color: var(--navy);
}

.hero__title-highlight {
    background: linear-gradient(135deg, var(--emerald), var(--emerald-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero__subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    line-height: 1.7;
    color: var(--gray-600);
    margin-bottom: var(--s-4);
}

.hero__subtitle strong {
    color: var(--emerald-dark);
    font-weight: 700;
}

.hero__ctas {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-2);
    margin-bottom: var(--s-4);
}

@media (max-width: 520px) {
    .hero__ctas {
        flex-wrap: nowrap;
    }

    .hero__ctas .btn {
        flex: 1;
        padding-left: 0.8rem;
        padding-right: 0.8rem;
        font-size: 0.9rem;
    }
}

.hero__trust {
    display: flex;
    flex-direction: column;
    gap: var(--s-2);
    padding-top: var(--s-3);
    border-top: 1px solid rgba(4, 120, 87, 0.15);
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: clamp(0.95rem, 2vw, 1.05rem);
    color: var(--gray-600);
    font-weight: 500;
}

.trust-item__icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    background: var(--emerald);
    color: white;
    border-radius: 50%;
    padding: 4px;
}

.trust-item strong {
    color: var(--emerald-dark);
    font-weight: 700;
}

/* Hero Visual */
.hero__visual {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
    margin-top: var(--s-3);
    contain: layout paint;
    /* reduces repaint scope */
}

.invoice-demo {
    position: relative;
    display: grid;
    grid-template-areas: "stack";
    width: 100%;
}

.invoice-demo__indicator {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: clamp(0.85rem, 1.5vw, 1rem);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 20;
    white-space: nowrap;
    pointer-events: none;
}

.invoice-demo__indicator.active {
    opacity: 1;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.invoice-demo__stage {
    grid-area: stack;
    opacity: 0;
    transform: translateY(18px) scale(0.985);
    filter: blur(2px);
    pointer-events: none;

    transition: opacity 520ms cubic-bezier(0.22, 1, 0.36, 1),
        transform 520ms cubic-bezier(0.22, 1, 0.36, 1),
        filter 520ms cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform, filter;
}


.invoice-demo__stage--active {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
    pointer-events: auto;
    z-index: 2;
}

.invoice-demo__stage--leaving {
    z-index: 1;
}

/* Invoice Card */
.invoice-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: clamp(1.5rem, 3vw, 2.5rem);
    box-shadow: var(--shadow-lg);
    border: 2px solid var(--gray-100);
    position: relative;
    overflow: hidden;
}

.invoice-card__header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: clamp(1.2rem, 2vw, 1.8rem);
    padding-bottom: clamp(0.8rem, 2vw, 1.2rem);
    border-bottom: 2px solid var(--gray-100);
    gap: 1rem;
}

.invoice-card__logo {
    font-family: var(--font-display);
    font-size: clamp(1.3rem, 2.5vw, 1.8rem);
    font-weight: 800;
    color: var(--emerald);
}

.invoice-card__sub {
    font-size: clamp(0.7rem, 1.2vw, 0.75rem);
    color: var(--gray-600);
    margin-top: 0.3rem;
}

.invoice-card__type {
    font-size: clamp(0.75rem, 1.5vw, 0.9rem);
    font-weight: 700;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.invoice-card__company {
    font-size: clamp(0.8rem, 1.5vw, 0.9rem);
    color: var(--gray-600);
    line-height: 1.6;
    margin-bottom: clamp(1.2rem, 2vw, 1.8rem);
}

.invoice-card__company-name {
    font-weight: 700;
    color: var(--navy);
    font-size: clamp(0.95rem, 1.8vw, 1.1rem);
    margin-bottom: 0.4rem;
}

.invoice-card__gstin {
    font-family: var(--font-mono);
    font-size: clamp(0.75rem, 1.3vw, 0.85rem);
    margin-top: 0.6rem;
}

.invoice-card__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: clamp(0.8rem, 2vw, 1.2rem);
    margin-bottom: clamp(1.2rem, 2vw, 1.8rem);
}

.invoice-field {
    padding: 0.4rem 0;
}

.invoice-field__label {
    color: var(--gray-600);
    font-weight: 500;
    font-size: clamp(0.7rem, 1.2vw, 0.82rem);
    margin-bottom: 0.2rem;
}

.invoice-field__value {
    color: var(--navy);
    font-weight: 700;
    font-family: var(--font-mono);
    font-size: clamp(0.8rem, 1.5vw, 0.9rem);
    word-break: break-word;
}

.invoice-card__total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: clamp(0.8rem, 2vw, 1rem);
    margin-top: clamp(0.8rem, 2vw, 1rem);
    border-top: 2px solid var(--emerald);
    font-weight: 800;
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--emerald-dark);
    gap: 1rem;
}

.invoice-card__total-value {
    font-family: var(--font-mono);
}

.invoice-items {
    margin-top: 1rem;
    padding-top: 0.8rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    font-size: 0.85rem;
}

.invoice-items__header,
.invoice-items__row {
    display: grid;
    grid-template-columns: 1.8fr 0.5fr 0.8fr 0.9fr;
    gap: 0.6rem;
    padding: 0.45rem 0;
}

.invoice-items__header {
    font-weight: 700;
    color: #334155;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding-bottom: 0.6rem;
    margin-bottom: 0.3rem;
}

.invoice-items__row span:nth-child(2),
.invoice-items__row span:nth-child(3),
.invoice-items__row span:nth-child(4),
.invoice-items__header span:nth-child(2),
.invoice-items__header span:nth-child(3),
.invoice-items__header span:nth-child(4) {
    text-align: right;
}

/* Mapping Card */
.mapping-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: clamp(1.5rem, 3vw, 2.5rem);
    box-shadow: 0 30px 80px rgba(4, 120, 87, 0.3);
    border: 3px solid var(--emerald);
}

.mapping-card__header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: clamp(1.5rem, 3vw, 2rem);
}

.mapping-card__header svg {
    width: clamp(24px, 5vw, 32px);
    height: clamp(24px, 5vw, 32px);
    color: var(--emerald);
    flex-shrink: 0;
}

.mapping-card__header h3 {
    font-family: var(--font-display);
    font-size: clamp(1.3rem, 3vw, 1.6rem);
    color: var(--navy);
    font-weight: 800;
}

.mapping-card__rows {
    display: flex;
    flex-direction: column;
    gap: clamp(0.8rem, 2vw, 1.2rem);
}

.mapping-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: clamp(0.8rem, 2vw, 1.2rem);
    padding: clamp(0.8rem, 2vw, 1rem);
    background: var(--gray-50);
    border-radius: var(--radius-md);
}

.mapping-row__label {
    font-weight: 600;
    color: var(--gray-600);
    font-size: clamp(0.7rem, 1.2vw, 0.78rem);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-bottom: 0.3rem;
}

.mapping-row__value {
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--navy);
    font-size: clamp(0.85rem, 1.5vw, 0.95rem);
    word-break: break-word;
}

.mapping-row__arrow {
    color: var(--emerald);
    font-size: clamp(1.2rem, 2.5vw, 1.5rem);
    font-weight: 700;
    flex-shrink: 0;
}

.mapping-card__btn {
    margin-top: clamp(1.5rem, 3vw, 2rem);
    width: 100%;
    padding: clamp(1.1rem, 2vw, 1.3rem);
    background: linear-gradient(135deg, var(--emerald), var(--emerald-dark));
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 800;
    font-size: clamp(1rem, 2vw, 1.15rem);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    transition: var(--transition);
    will-change: transform;
}

.mapping-card__btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(4, 120, 87, 0.4);
}

.mapping-card__btn svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

/* Make invoice-items blend nicely inside mapping/success cards (minimal overrides) */
.mapping-card .invoice-items {
    margin-top: 1rem;
}

.success-card .invoice-items {
    margin-top: 1rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 0.8rem 1rem;
}

.success-card .invoice-items__header,
.success-card .invoice-items__row {
    border-color: rgba(255, 255, 255, 0.18);
}

.success-card .invoice-items__header {
    color: rgba(255, 255, 255, 0.95);
}

.success-card .invoice-items__row {
    color: rgba(255, 255, 255, 0.9);
}

/* Success Card */
.success-card {
    background: linear-gradient(135deg, var(--emerald-dark), var(--emerald));
    border-radius: var(--radius-lg);
    padding: clamp(1.5rem, 3vw, 2.5rem);
    box-shadow: 0 30px 80px rgba(4, 120, 87, 0.4);
    color: white;
    text-align: center;
}

.success-card__icon {
    width: clamp(50px, 10vw, 70px);
    height: clamp(50px, 10vw, 70px);
    margin: 0 auto clamp(1rem, 2vw, 1.5rem);
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.success-card__icon svg {
    width: clamp(28px, 6vw, 40px);
    height: clamp(28px, 6vw, 40px);
    color: var(--emerald);
}

.success-card__title {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin-bottom: clamp(1.2rem, 2vw, 1.8rem);
    font-weight: 800;
}

.success-card__details {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-md);
    padding: clamp(1.2rem, 2vw, 1.8rem);
    margin-bottom: clamp(0.8rem, 2vw, 1.2rem);
}

.success-card__row {
    display: flex;
    justify-content: space-between;
    padding: clamp(0.5rem, 1vw, 0.7rem) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    gap: 1rem;
    font-size: clamp(0.9rem, 1.8vw, 1rem);
}

.success-card__row:last-child {
    border-bottom: none;
}

.success-card__row--total {
    font-weight: 800;
    font-size: clamp(1rem, 2.2vw, 1.2rem);
    padding-top: clamp(0.8rem, 1.5vw, 1rem);
    margin-top: clamp(0.3rem, 1vw, 0.5rem);
    border-top: 2px solid rgba(255, 255, 255, 0.3);
}

.success-card__row span:last-child {
    font-family: var(--font-mono);
    font-weight: 700;
}

.success-card__note {
    font-size: clamp(0.9rem, 1.8vw, 1rem);
    font-weight: 500;
    opacity: 0.95;
}

/* Problem Section */
.problem {
    padding: var(--s-6) 0;
    background: linear-gradient(180deg, #ffffff 0%, var(--gray-50) 100%);
}

.problem__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: clamp(2rem, 4vw, 3rem);
}

.pain-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: clamp(1.8rem, 3vw, 2.5rem);
    box-shadow: var(--shadow-md);
    border: 2px solid var(--gray-100);
    transition: var(--transition);
    will-change: transform;
}

.pain-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--emerald);
}

.pain-card__icon {
    width: clamp(50px, 10vw, 70px);
    height: clamp(50px, 10vw, 70px);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: clamp(1rem, 2vw, 1.5rem);
}

.pain-card__icon svg {
    width: clamp(28px, 6vw, 36px);
    height: clamp(28px, 6vw, 36px);
}

.pain-card__icon--time {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.1), rgba(249, 115, 22, 0.2));
    color: var(--orange);
}

.pain-card__icon--money {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.1), rgba(220, 38, 38, 0.2));
    color: #dc2626;
}

.pain-card__icon--stress {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), rgba(251, 191, 36, 0.2));
    color: #f59e0b;
}

.pain-card__title {
    font-family: var(--font-display);
    font-size: clamp(1.2rem, 2.5vw, 1.5rem);
    font-weight: 800;
    color: var(--navy);
    margin-bottom: clamp(0.8rem, 1.5vw, 1rem);
    line-height: 1.3;
}

.pain-card__text {
    color: var(--gray-600);
    line-height: 1.7;
    margin-bottom: clamp(0.8rem, 1.5vw, 1.2rem);
    font-size: clamp(0.95rem, 1.8vw, 1.05rem);
}

.pain-card__stat {
    font-family: var(--font-mono);
    font-size: clamp(0.8rem, 1.5vw, 0.9rem);
    font-weight: 700;
    color: var(--emerald-dark);
    background: rgba(4, 120, 87, 0.05);
    padding: clamp(0.6rem, 1.5vw, 0.8rem) clamp(0.8rem, 1.5vw, 1rem);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--emerald);
}

/* Reality cards: icon + h3 in one line (same pattern as feature-card) */
.pain-card {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas:
        "icon title"
        "text text"
        "stat stat";
    column-gap: 1rem;
    align-items: center;
}

/* remove the "icon on top" spacing */
.pain-card__icon {
    grid-area: icon;
    margin-bottom: 0 !important;
}

/* keep title aligned with icon */
.pain-card__title {
    grid-area: title;
    margin-bottom: 0 !important;
    align-self: center;
}

/* content stays below */
.pain-card__text {
    grid-area: text;
    margin-top: 0.6rem;
}

.pain-card__stat {
    grid-area: stat;
}

/* Solution Section */
.solution {
    padding: var(--s-6) 0;
    background: white;
}

.solution__steps {
    display: flex;
    flex-direction: column;
    gap: clamp(3rem, 6vw, 4rem);
}

.step {
    display: grid;
    gap: clamp(2rem, 4vw, 3rem);
    align-items: center;
}

.step__number {
    font-family: var(--font-display);
    font-size: clamp(3rem, 7vw, 4rem);
    font-weight: 800;
    background: linear-gradient(135deg, var(--emerald), var(--emerald-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    text-align: center;
}

.step__visual {
    background: var(--gray-50);
    border-radius: var(--radius-xl);
    padding: clamp(1.5rem, 3vw, 2.5rem);
    min-height: clamp(200px, 30vw, 300px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.step__title {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3.5vw, 2rem);
    font-weight: 800;
    color: var(--navy);
    margin-bottom: clamp(0.8rem, 1.5vw, 1rem);
    line-height: 1.2;
}

.step__text {
    font-size: clamp(1rem, 2vw, 1.15rem);
    color: var(--gray-600);
    line-height: 1.7;
    margin-bottom: clamp(1rem, 2vw, 1.5rem);
}

.step__tags {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(0.6rem, 1.5vw, 0.8rem);
    margin-bottom: clamp(0.8rem, 1.5vw, 1rem);
}

.tag {
    background: rgba(4, 120, 87, 0.08);
    color: var(--emerald-dark);
    padding: clamp(0.4rem, 1vw, 0.5rem) clamp(0.8rem, 1.5vw, 1rem);
    border-radius: var(--radius-sm);
    font-size: clamp(0.85rem, 1.5vw, 0.9rem);
    font-weight: 600;
    border: 1px solid rgba(4, 120, 87, 0.15);
    white-space: nowrap;
}

.step__note {
    font-family: var(--font-mono);
    font-size: clamp(0.8rem, 1.5vw, 0.85rem);
    color: var(--emerald-dark);
    font-weight: 600;
    font-style: italic;
}

/* Step Visual Components */
.upload-demo {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: clamp(1rem, 2vw, 1.5rem);
}

.upload-demo__icon {
    width: clamp(60px, 12vw, 80px);
    height: clamp(60px, 12vw, 80px);
    background: linear-gradient(135deg, var(--emerald), var(--emerald-light));
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    order: 2;
}

.upload-demo__icon svg {
    width: clamp(28px, 6vw, 40px);
    height: clamp(28px, 6vw, 40px);
    color: white;
}

.upload-demo__files {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: clamp(0.8rem, 1.5vw, 1rem);
    order: 1;
    align-items: flex-start;
}

.file-badge {
    background: white;
    border: 2px solid var(--gray-100);
    border-radius: var(--radius-md);
    padding: clamp(0.8rem, 1.5vw, 1rem) clamp(1rem, 2vw, 1.5rem);
    align-items: center;
    gap: clamp(0.8rem, 1.5vw, 1rem);
    width: min(100%, 320px);
    /* UPDATED: was fixed 250px */
    display: inline-flex;
}

.file-badge svg {
    width: clamp(24px, 5vw, 32px);
    height: clamp(24px, 5vw, 32px);
    flex-shrink: 0;
}

.file-badge--pdf svg {
    color: #dc2626;
}

.file-badge--img svg {
    color: var(--emerald);
}

.file-badge span {
    font-family: var(--font-mono);
    font-size: clamp(0.8rem, 1.5vw, 0.9rem);
    font-weight: 600;
    color: var(--gray-600);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    /* UPDATED: was fixed 220px */
}

@media (max-width: 520px) {
    .upload-demo__icon {
        order: 0;
    }


    .file-badge {
        width: 100%;
        max-width: 320px;
    }

    .upload-demo__files {
        order: 1;
    }

}

.extract-demo {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: clamp(0.6rem, 1.5vw, 0.8rem);
}

.extract-demo__field {
    background: linear-gradient(135deg, var(--emerald), var(--emerald-light));
    color: white;
    padding: clamp(0.6rem, 1.5vw, 0.8rem) clamp(1rem, 2vw, 1.2rem);
    border-radius: var(--radius-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.extract-demo__label {
    font-size: clamp(0.75rem, 1.3vw, 0.8rem);
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.extract-demo__value {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: clamp(0.85rem, 1.5vw, 0.95rem);
}

.review-demo {
    background: white;
    border: 2px solid var(--emerald);
    border-radius: var(--radius-lg);
    padding: clamp(1rem, 2vw, 1.5rem);
    box-shadow: 0 8px 24px rgba(4, 120, 87, 0.15);
    width: 100%;
}

.review-demo__badge {
    display: inline-block;
    background: linear-gradient(135deg, rgba(4, 120, 87, 0.1), rgba(16, 185, 129, 0.1));
    color: var(--emerald-dark);
    padding: clamp(0.4rem, 1vw, 0.5rem) clamp(0.8rem, 1.5vw, 1rem);
    border-radius: var(--radius-sm);
    font-size: clamp(0.75rem, 1.3vw, 0.85rem);
    font-weight: 700;
    border: 1px solid var(--emerald);
    margin-bottom: clamp(0.8rem, 1.5vw, 1rem);
}

.review-demo__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: clamp(0.6rem, 1.5vw, 0.8rem);
    margin-bottom: clamp(0.4rem, 1vw, 0.6rem);
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    gap: 0.5rem;
    font-size: clamp(0.8rem, 1.5vw, 0.85rem);
}

.review-demo__row span:first-child {
    color: var(--gray-600);
    font-weight: 600;
}

.review-demo__row span:nth-child(2) {
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--navy);
}

.review-demo__edit {
    cursor: pointer;
    opacity: 0.5;
}

.review-demo__approve {
    margin-top: clamp(0.8rem, 1.5vw, 1rem);
    background: linear-gradient(135deg, var(--emerald), var(--emerald-dark));
    color: white;
    padding: clamp(0.8rem, 1.5vw, 1rem);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    font-weight: 700;
    font-size: clamp(0.9rem, 1.5vw, 1rem);
}

.review-demo__approve svg {
    width: 20px;
    height: 20px;
}

.post-demo {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(1rem, 2vw, 1.5rem);
}

.post-demo__check {
    background: linear-gradient(135deg, var(--emerald), var(--emerald-light));
    color: white;
    padding: clamp(1rem, 2vw, 1.2rem) clamp(1.5rem, 3vw, 2rem);
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: clamp(0.6rem, 1.5vw, 0.8rem);
    font-weight: 800;
    font-size: clamp(1rem, 2vw, 1.1rem);
}

.post-demo__check svg {
    width: clamp(20px, 4vw, 24px);
    height: clamp(20px, 4vw, 24px);
}

.post-demo__logos {
    display: flex;
    gap: clamp(1rem, 2vw, 1.5rem);
}

.software-badge {
    width: clamp(45px, 9vw, 60px);
    height: clamp(45px, 9vw, 60px);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: clamp(0.9rem, 1.8vw, 1.1rem);
}

.software-badge--tally {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
}

.software-badge--zoho {
    background: linear-gradient(135deg, #dc2626, #991b1b);
}

.software-badge--qb {
    background: linear-gradient(135deg, #16a34a, #15803d);
}

/* Solution CTA */
.solution__cta {
    margin-top: clamp(3rem, 6vw, 5rem);
    text-align: center;
    padding: clamp(2rem, 4vw, 3rem);
    background: linear-gradient(135deg, #fefdf8, #ffffff);
    border-radius: var(--radius-xl);
    border: 2px solid var(--emerald);
}

.solution__cta-title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 800;
    color: var(--navy);
    margin-bottom: clamp(0.8rem, 1.5vw, 1rem);
}

.solution__cta-text {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--gray-600);
    margin-bottom: clamp(1.5rem, 3vw, 2rem);
}

.solution__cta-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: clamp(0.8rem, 2vw, 1.2rem);
}

/* Key Features Section */
.features {
    padding: var(--s-6) 0;
    background: white;
}

.features__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
    gap: clamp(1.2rem, 2.5vw, 1.5rem);
}

.feature-card {
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    padding: clamp(1.5rem, 3vw, 2rem);
    transition: var(--transition);
    will-change: transform;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.feature-card__icon {
    width: clamp(45px, 9vw, 60px);
    height: clamp(45px, 9vw, 60px);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: clamp(1rem, 2vw, 1.2rem);
}

.feature-card__icon svg {
    width: clamp(24px, 5vw, 30px);
    height: clamp(24px, 5vw, 30px);
    color: white;
}

.feature-card__icon--emerald {
    background: linear-gradient(135deg, var(--emerald), var(--emerald-light));
}

.feature-card {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas:
        "icon title"
        "text text";
    column-gap: 1rem;
    align-items: center;
}

.feature-card__icon {
    grid-area: icon;
    margin-bottom: 0 !important;
}

.feature-card__title {
    grid-area: title;
    margin-bottom: 0 !important;
    align-self: center;
}

.feature-card__text {
    grid-area: text;
}

.feature-card__title {
    margin-bottom: 0;
}

.feature-card__text {
    margin-top: 0.6rem;
}

.feature-card__title {
    font-family: var(--font-display);
    font-size: clamp(1.1rem, 2.2vw, 1.3rem);
    font-weight: 800;
    color: var(--navy);
    margin-bottom: clamp(0.5rem, 1vw, 0.7rem);
}

.feature-card__text {
    color: var(--gray-600);
    font-size: clamp(0.9rem, 1.8vw, 1rem);
    line-height: 1.6;
}

/* Competitors Section */
.competitors {
    padding: var(--s-6) 0;
    background: var(--gray-50);
}

.comparison {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.comparison__header {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: clamp(0.5rem, 2vw, 1rem);
    padding: clamp(1rem, 2vw, 1.5rem);
    background: var(--navy);
    color: white;
}

.comparison__col {
    font-family: var(--font-display);
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    font-weight: 800;
    text-align: center;
}

.comparison__col--us {
    color: var(--emerald-light);
}

.comparison__row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: clamp(0.5rem, 2vw, 1rem);
    padding: clamp(0.8rem, 2vw, 1.2rem);
    border-bottom: 1px solid var(--gray-100);
    align-items: center;
}

.comparison__row:last-child {
    border-bottom: none;
}

.comparison__feature {
    font-weight: 600;
    color: var(--navy);
    font-size: clamp(0.85rem, 1.5vw, 0.95rem);
}

.comparison__value {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    text-align: center;
}

.comparison__value svg {
    width: clamp(16px, 4vw, 20px);
    height: clamp(16px, 4vw, 20px);
    flex-shrink: 0;
}

.comparison__value span {
    font-size: clamp(0.75rem, 1.3vw, 0.85rem);
    font-weight: 600;
}

.comparison__value--good svg {
    color: var(--emerald);
}

.comparison__value--good span {
    color: var(--emerald-dark);
}

.comparison__value--bad svg {
    color: #dc2626;
}

.comparison__value--bad span {
    color: var(--gray-600);
}

/* Audience Section */
.audience {
    padding: var(--s-6) 0;
    background: white;
}

.audience__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: clamp(1.2rem, 2.5vw, 1.5rem);
}

.audience-card {
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    padding: clamp(1.5rem, 3vw, 2rem);
    text-align: center;
    transition: var(--transition);
    will-change: transform;
}

.audience-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    background: white;
}

.audience-card__icon {
    font-size: clamp(2.5rem, 6vw, 3.5rem);
    margin-bottom: clamp(0.8rem, 2vw, 1rem);
}

.audience-card__title {
    font-family: var(--font-display);
    font-size: clamp(1.1rem, 2.2vw, 1.3rem);
    font-weight: 800;
    color: var(--navy);
    margin-bottom: clamp(0.5rem, 1vw, 0.7rem);
}

.audience-card__text {
    color: var(--gray-600);
    font-size: clamp(0.9rem, 1.8vw, 1rem);
    line-height: 1.6;
}

/* Pricing Section */
.pricing {
    padding: var(--s-6) 0;
    background: linear-gradient(180deg, var(--gray-50) 0%, white 100%);
}

.pricing__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
    gap: clamp(1.5rem, 3vw, 2rem);
    max-width: 1200px;
    margin: 0 auto;
}

.price-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: clamp(1.8rem, 3vw, 2.5rem);
    border: 2px solid var(--gray-100);
    position: relative;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    will-change: transform;
}

.price-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.price-card--featured {
    border-color: var(--emerald);
    box-shadow: 0 8px 32px rgba(4, 120, 87, 0.15);
}

.price-card--enterprise {
    background: linear-gradient(135deg, var(--navy), #1e293b);
    border-color: var(--navy);
    color: white;
}

.price-card__badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--emerald), var(--emerald-light));
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: clamp(0.75rem, 1.3vw, 0.85rem);
    font-weight: 700;
    white-space: nowrap;
}

.price-card__header {
    margin-bottom: clamp(1.5rem, 3vw, 2rem);
    padding-bottom: clamp(1.5rem, 3vw, 2rem);
    border-bottom: 2px solid var(--gray-100);
}

.price-card--enterprise .price-card__header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.price-card__name {
    font-family: var(--font-display);
    font-size: clamp(1.3rem, 2.5vw, 1.5rem);
    font-weight: 800;
    color: var(--navy);
    margin-bottom: clamp(1rem, 2vw, 1.5rem);
}

.price-card--enterprise .price-card__name {
    color: white;
}

.price-card__price {
    display: flex;
    align-items: baseline;
    gap: 0.3rem;
}

.price-card__currency {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    color: var(--emerald);
}

.price-card--enterprise .price-card__currency {
    color: var(--emerald-light);
}

.price-card__amount {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 3.5rem);
    font-weight: 800;
    color: var(--navy);
    line-height: 1;
}

.price-card--enterprise .price-card__amount {
    color: white;
}

.price-card__period {
    font-size: clamp(0.9rem, 1.8vw, 1rem);
    color: var(--gray-600);
}

.price-card--enterprise .price-card__period {
    color: rgba(255, 255, 255, 0.7);
}

.price-card__annual {
    margin-top: 0.5rem;
    font-size: clamp(0.8rem, 1.5vw, 0.9rem);
    color: var(--emerald-dark);
    font-weight: 600;
}

.price-card__features {
    list-style: none;
    margin-bottom: clamp(1.5rem, 3vw, 2rem);
    flex: 1;
}

.price-card__features li {
    display: flex;
    align-items: start;
    gap: 0.8rem;
    margin-bottom: clamp(0.8rem, 1.5vw, 1rem);
    font-size: clamp(0.9rem, 1.8vw, 1rem);
}

.price-card__features svg {
    width: 20px;
    height: 20px;
    color: var(--emerald);
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.price-card--enterprise .price-card__features svg {
    color: var(--emerald-light);
}

.price-card--enterprise .price-card__features span {
    color: rgba(255, 255, 255, 0.9);
}

.price-card__btn {
    width: 100%;
    justify-content: center;
}

.price-card__guarantee {
    margin-top: clamp(1rem, 2vw, 1.5rem);
    padding-top: clamp(1rem, 2vw, 1.5rem);
    border-top: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: clamp(0.8rem, 1.5vw, 0.85rem);
    color: var(--emerald-dark);
    font-weight: 600;
}

.price-card__guarantee svg {
    width: clamp(18px, 4vw, 22px);
    height: clamp(18px, 4vw, 22px);
    color: var(--emerald);
    flex-shrink: 0;
}

/* FAQ Section */
.faq {
    padding: var(--s-6) 0;
    background: white;
}

.faq__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 350px), 1fr));
    gap: clamp(1.5rem, 3vw, 2rem);
    max-width: 1000px;
    margin: 0 auto;
}

.faq-item {
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    padding: clamp(1.5rem, 3vw, 2rem);
}

.faq-item__question {
    font-family: var(--font-display);
    font-size: clamp(1.05rem, 2vw, 1.2rem);
    font-weight: 800;
    color: var(--navy);
    margin-bottom: clamp(0.6rem, 1.5vw, 0.8rem);
    line-height: 1.3;
}

.faq-item__answer {
    color: var(--gray-600);
    font-size: clamp(0.95rem, 1.8vw, 1.05rem);
    line-height: 1.7;
}

/* Guarantee Section */
.guarantee {
    padding: var(--s-6) 0;
    background: linear-gradient(135deg, var(--emerald-dark), var(--emerald));
}

.guarantee__card {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    color: white;
}

.guarantee__icon {
    width: clamp(70px, 14vw, 100px);
    height: clamp(70px, 14vw, 100px);
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto clamp(1.5rem, 3vw, 2rem);
}

.guarantee__icon svg {
    width: clamp(40px, 8vw, 60px);
    height: clamp(40px, 8vw, 60px);
    color: var(--emerald);
}

.guarantee__title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    margin-bottom: clamp(1rem, 2vw, 1.5rem);
    line-height: 1.2;
}

.guarantee__text {
    font-size: clamp(1.1rem, 2.2vw, 1.3rem);
    line-height: 1.7;
    opacity: 0.95;
    margin-bottom: clamp(2rem, 4vw, 3rem);
}

.guarantee__features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
    gap: clamp(1rem, 2vw, 1.5rem);
    margin-bottom: clamp(2rem, 4vw, 3rem);
}

.guarantee__feature {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: clamp(0.95rem, 1.8vw, 1.05rem);
    font-weight: 600;
}

.guarantee__feature svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.guarantee__cta {
    display: inline-flex;
}

/* Footer */
.footer {
    background: var(--navy);
    color: white;
    padding: clamp(3rem, 6vw, 4rem) 0 clamp(2rem, 4vw, 3rem);
}

.footer__main {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
    gap: clamp(2rem, 4vw, 3rem);
    margin-bottom: clamp(2rem, 4vw, 3rem);
}

.footer__col--brand {
    grid-column: 1 / -1;
}

.footer__logo {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    color: var(--emerald-light);
    margin-bottom: clamp(0.8rem, 1.5vw, 1rem);
}

.footer__tagline {
    font-size: clamp(1rem, 2vw, 1.1rem);
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.footer__company {
    font-size: clamp(0.85rem, 1.5vw, 0.9rem);
    opacity: 0.7;
}

.footer__title {
    font-family: var(--font-display);
    font-size: clamp(0.95rem, 1.8vw, 1.05rem);
    font-weight: 700;
    margin-bottom: clamp(0.8rem, 1.5vw, 1rem);
}

.footer__links {
    list-style: none;
}

.footer__links li {
    margin-bottom: clamp(0.5rem, 1vw, 0.7rem);
}

.footer__links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: clamp(0.85rem, 1.5vw, 0.9rem);
    transition: color 0.3s;
}

.footer__links a:hover {
    color: var(--emerald-light);
}

.footer__bottom {
    padding-top: clamp(1.5rem, 3vw, 2rem);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    font-size: clamp(0.8rem, 1.5vw, 0.85rem);
    opacity: 0.7;
}

.footer__made {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* Tablet & Desktop */
@media (min-width: 768px) {
    .step {
        grid-template-columns: 80px 1fr 1fr;
    }

    .step--reverse .step__visual {
        order: 3;
    }

    .step--reverse .step__content {
        order: 2;
    }

    .step__number {
        text-align: left;
    }

    .footer__col--brand {
        grid-column: span 2;
    }

    .comparison__header,
    .comparison__row {
        grid-template-columns: 2fr 1fr 1fr;
    }

    .comparison__value {
        flex-direction: row;
    }
}

@media (max-width: 767px) {
    .step__number {
        order: 0;
    }

    .step__content {
        order: 1;
    }

    .step__visual {
        order: 2;
    }
}

/* ===== SCANNING EFFECT ===== */
.scan-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
}

.scan-overlay.active {
    opacity: 1;
    transition: opacity 0.2s ease;
}

.scan-line {
    position: absolute;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--emerald), transparent);
    animation: scanMove 2s linear infinite;
}

@keyframes scanMove {
    0% {
        top: 0%;
    }

    100% {
        top: 100%;
    }
}

/* Highlight box that snaps to real fields (positioned by JS) */
.scan-highlight {
    position: absolute;
    border: 2px solid var(--emerald);
    border-radius: 8px;
    background: rgba(16, 185, 129, 0.10);
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.08);
    opacity: 0;
    transform: scale(0.98);
    transition: opacity 180ms ease, transform 180ms ease;
}

.scan-highlight.active {
    opacity: 1;
    transform: scale(1);
}

/* ===== Accessibility / perf: respect reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }

    .invoice-demo__stage {
        transition: none !important;
    }
}

/* ===== Solution carousel clean fix ===== */
#solutionSteps {
    position: relative;
}

/* Hide ALL steps */
#solutionSteps>.step {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
}

/* Show only active one */
#solutionSteps>.step.is-active {
    position: relative;
    opacity: 1;
    pointer-events: auto;
}

/* Smooth fade */
#solutionSteps>.step {
    transition: opacity 250ms ease;
}

/* ===== Solution Tabs (replaces dots) ===== */
.solution-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 22px;
}

.solution-tab {
    border: 2px solid rgba(4, 120, 87, 0.18);
    background: white;
    color: var(--navy);
    font-weight: 800;
    font-size: 0.95rem;
    padding: 0.7rem 1rem;
    border-radius: 999px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.solution-tab:hover {
    transform: translateY(-1px);
    border-color: rgba(4, 120, 87, 0.35);
}

.solution-tab.is-active {
    background: linear-gradient(135deg, var(--emerald), var(--emerald-dark));
    color: white;
    border-color: transparent;
    box-shadow: 0 8px 24px rgba(4, 120, 87, 0.25);
}

/* nicer on small screens */
@media (max-width: 520px) {
    .solution-tab {
        font-size: 0.9rem;
        padding: 0.65rem 0.9rem;
    }
}

/* space between tabs and the steps/carousel below */
.solution-tabs {
    margin-bottom: 70px;
}

@media (max-width: 640px) {
    .solution-tabs {
        gap: 10px;
        margin-bottom: 70px;
    }
}

@media (min-width: 1024px) {
    .solution-tabs {
        gap: 14px;
        margin-bottom: 70px;
    }
}

.demo-modal {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 9999;
}

.demo-modal.is-open {
    display: block;
}

.demo-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
}

.demo-modal__panel {
    position: relative;
    width: min(960px, calc(100vw - 32px));
    margin: 6vh auto 0;
    border-radius: 16px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.demo-modal__close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    border: 0;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    cursor: pointer;
}

.demo-modal__video {
    position: relative;
    padding-top: 56.25%;
}

.demo-modal__video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* ==========================================================================
   TUTORIAL PAGES MOBILE LAYOUT OVERRIDES & COMPONENTS
   ========================================================================== */

/* This fixes all tutorial pages by making the sidebar move BELOW the content 
   on mobile, so users don't have to scroll past the entire menu first. */
@media (max-width: 767px) {
    .tutorial-layout {
        display: flex !important;
        flex-direction: column-reverse !important;
        gap: var(--s-4) !important;
    }

    .tutorial-sidebar {
        width: 100% !important;
        border-top: 2px solid var(--gray-100) !important;
        padding-top: var(--s-4) !important;
        margin-top: var(--s-2) !important;
        position: relative !important;
        top: auto !important;
    }
}

/* Base styles for the "Quick Guide" steps (which lacked inline styles) */
.step-num {
    background: #047857;
    color: white;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 700;
    flex-shrink: 0;
    font-family: var(--font-mono);
}

.step-title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--navy);
    margin: 0 0 0.4rem 0;
    line-height: 1.2;
}

.step-text {
    font-family: var(--font-body);
    color: var(--gray-600);
    line-height: 1.6;
    margin: 0;
}

/* ==========================================================================
   TUTORIAL PAGES DESKTOP LAYOUT (Global Base)
   ========================================================================== */
.tutorial-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--s-5);
    align-items: start;
}

.tutorial-sidebar {
    position: relative;
}

.tutorial-sidebar ul a {
    transition: color 0.2s;
}

.tutorial-sidebar ul a:hover {
    color: var(--emerald) !important;
}

@media (min-width: 768px) {
    .tutorial-layout {
        grid-template-columns: 280px 1fr;
    }

    .tutorial-sidebar {
        position: sticky;
        top: 100px;
        height: max-content;
        padding-right: var(--s-3);
        border-right: 1px solid var(--gray-100);
    }
}

/* ==========================================================================
   FULL-WIDTH ALTERNATING CARDS (QUICK GUIDE)
   ========================================================================== */
.step-container {
    position: relative;
    max-width: 100%;
    margin: var(--s-3) 0 var(--s-5) 0;
    padding-left: clamp(40px, 4vw, 60px);
}

.step-container::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 20px;
    width: 4px;
    background: linear-gradient(180deg, rgba(4, 120, 87, 0.1), var(--emerald) 15%, var(--emerald) 85%, rgba(4, 120, 87, 0.1));
    border-radius: 999px;
}

.step-item {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: var(--s-3);
    margin-bottom: var(--s-5);
    background: white;
    padding: var(--s-5) var(--s-4) var(--s-4) var(--s-4);
    border-radius: 16px;
    border: 2px solid var(--gray-100);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: all 240ms ease-out;
    overflow: hidden;
}

/* Reverse the flex direction for even items to alternate left-right */
.step-item:nth-child(even) {
    flex-direction: row-reverse;
}

.step-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(4, 120, 87, 0.15);
    border-color: rgba(4, 120, 87, 0.4);
}

.step-dot {
    position: absolute;
    left: 0;
    top: 0;
    width: 44px;
    height: 44px;
    background: var(--emerald);
    color: white;
    border-radius: 14px 0 16px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.15rem;
    font-family: var(--font-mono);
    z-index: 2;
    transition: background 240ms ease-out;
}

.step-item:hover .step-dot {
    background: var(--emerald-dark);
}

.step-text-wrap {
    flex: 3;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.step-title {
    font-family: var(--font-display);
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    font-weight: 800;
    color: var(--navy);
    margin-bottom: 0.8rem;
    line-height: 1.2;
}

.step-desc {
    color: var(--gray-600);
    line-height: 1.6;
    font-size: 1.05rem;
    margin: 0;
}

.step-media-wrap {
    flex: 7;
    display: flex;
    align-items: center;
    justify-content: stretch;
    align-self: stretch;
    margin-top: calc((var(--s-5) * -1) + 3px);
    margin-bottom: calc((var(--s-4) * -1) + 3px);
    margin-right: calc((var(--s-4) * -1) + 3px);
}

.step-item:nth-child(even) .step-media-wrap {
    margin-right: 0;
    margin-left: calc((var(--s-4) * -1) + 3px);
}

.step-gif-box {
    width: 100%;
    aspect-ratio: 16/9;
    background: var(--gray-50);
    border: 2px dashed rgba(4, 120, 87, 0.25);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--emerald);
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 0.9rem;
    overflow: hidden;
    position: relative;
    transition: all 240ms ease-out;
    gap: 0.6rem;
}

.step-item:hover .step-gif-box {
    border-color: var(--emerald);
    background: linear-gradient(135deg, rgba(4, 120, 87, 0.05), rgba(16, 185, 129, 0.05));
    color: var(--emerald-dark);
}

.step-gif-img {
    width: 100%;
    height: auto;
    display: block;
    border: none;
    box-shadow: none;
    border-radius: 0 13px 13px 0;
    transition: transform 240ms ease-out;
}

.step-item:nth-child(even) .step-gif-img {
    border-radius: 13px 0 0 13px;
}

.step-item:hover .step-gif-img {
    transform: scale(1.02);
}

.step-media-wrap {
    cursor: default;
    position: relative;
    pointer-events: none;
}

.step-media-wrap.is-ready {
    cursor: pointer;
    pointer-events: auto;
}

/* --- VIDEO PLAYER STYLING --- */
.step-video-player {
    width: 100%;
    height: auto;
    display: none;
    border: none;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border-radius: 0 13px 13px 0;
    background: #000;
}

.step-media-wrap.is-playing .step-video-player {
    display: block;
}

.step-media-wrap.is-playing .step-gif-img {
    display: none;
}

.step-item:nth-child(even) .step-video-player {
    border-radius: 13px 0 0 13px;
}

/* --- PLAY HINT OVERLAY --- */
.step-media-wrap::after {
    content: '▶';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(4, 120, 87, 0.85);
    color: white;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    opacity: 0;
    transition: all 240ms ease-out;
    z-index: 5;
    box-shadow: 0 0 0 0 rgba(4, 120, 87, 0.4);
}

.step-media-wrap.is-ready::after {
    display: flex;
}

.step-media-wrap.is-ready:hover::after {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 0 20px 10px rgba(4, 120, 87, 0.2);
}

/* Hide play hint when video is playing */
.step-media-wrap.is-playing::after {
    display: none;
}

/* --- OPTIONAL STEP STYLING --- */
.step-item.is-optional {
    border: 2px dashed rgba(4, 120, 87, 0.4);
    background: #fdfdfd;
    box-shadow: none;
}

.step-item.is-optional .step-dot {
    background: #9ca3af;
    color: white;
}

.step-item.is-optional:hover {
    border-color: rgba(4, 120, 87, 0.6);
}

.step-item.is-optional:hover .step-dot {
    background: #6b7280;
}

.badge-optional {
    position: absolute;
    top: calc(var(--s-5) * -1 + 5px);
    left: 50%;
    transform: translateX(-50%);
    display: inline-block;
    padding: 0.25rem 2.5rem;
    font-size: 0.7rem;
    font-weight: 800;
    color: white;
    background: #ef4444;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: var(--font-mono);
    border-radius: 0 0 8px 8px;
    line-height: 1;
    z-index: 10;
    white-space: nowrap;
}

/* --- READ MORE STYLING --- */
.step-desc .dots {
    display: inline;
}

.step-desc .more-text {
    display: none;
    color: var(--gray-600);
}

.read-more-btn {
    display: inline-block;
    margin-top: 0.5rem;
    color: var(--emerald);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    font-family: var(--font-body);
    transition: color 0.2s;
}

.read-more-btn:hover {
    color: var(--emerald-dark);
    text-decoration: underline;
}

@media (max-width: 900px) {
    .step-container {
        padding-left: 28px;
    }

    .step-container::before {
        left: 10px;
    }

    .step-item {
        flex-direction: column !important;
        gap: var(--s-3);
    }

    .step-text-wrap,
    .step-media-wrap {
        flex: 1 1 100%;
        width: 100%;
    }

    .step-media-wrap {
        margin: 0 calc((var(--s-4) * -1) + 3px) calc((var(--s-4) * -1) + 3px) calc((var(--s-4) * -1) + 3px) !important;
    }

    .step-item:nth-child(even) .step-media-wrap {
        margin: 0 calc((var(--s-4) * -1) + 3px) calc((var(--s-4) * -1) + 3px) calc((var(--s-4) * -1) + 3px) !important;
    }

    .step-gif-img {
        border-radius: 0 0 13px 13px !important;
    }

    .step-item:nth-child(even) .step-gif-img {
        border-radius: 0 0 13px 13px !important;
    }
}