/**
 * EDVICE Design System
 * Premium SaaS product marketing — tokens + reusable components.
 * Load after theme.css, before edvice-custom.css.
 */

:root {
    /* Brand */
    --edv-green: #00d350;
    --edv-green-dark: #00b845;
    --edv-indigo: #5a00ff;
    --edv-indigo-dark: #4800cc;
    --edv-dark: #0e0923;
    --edv-cream: #f2f7f2;
    --edv-muted: rgba(14, 9, 35, 0.72);
    --edv-muted-on-dark: rgba(242, 247, 242, 0.78);

    /* Surfaces */
    --edv-surface-light: #f2f7f2;
    --edv-surface-dark: #0e0923;
    --edv-surface-card: #ffffff;
    --edv-surface-card-dark: rgba(242, 247, 242, 0.06);
    --edv-border: rgba(14, 9, 35, 0.12);
    --edv-border-dark: rgba(242, 247, 242, 0.18);

    /* Typography */
    --edv-font: "Unbounded", sans-serif;
    --edv-text-xs: 0.75rem;
    --edv-text-sm: 0.875rem;
    --edv-text-base: 1rem;
    --edv-text-lg: 1.125rem;
    --edv-text-xl: 1.35rem;
    --edv-text-2xl: clamp(1.5rem, 3vw, 2rem);
    --edv-text-3xl: clamp(1.75rem, 4vw, 2.75rem);
    --edv-text-hero: clamp(1.85rem, 4.5vw, 3.25rem);

    /* Spacing */
    --edv-space-xs: 0.5rem;
    --edv-space-sm: 1rem;
    --edv-space-md: 1.5rem;
    --edv-space-lg: 2.5rem;
    --edv-space-xl: 4rem;
    --edv-space-2xl: 6rem;

    /* Radius & shadow */
    --edv-radius-sm: 8px;
    --edv-radius-md: 14px;
    --edv-radius-lg: 20px;
    --edv-shadow-sm: 0 4px 20px rgba(14, 9, 35, 0.06);
    --edv-shadow-md: 0 12px 40px rgba(14, 9, 35, 0.1);
    --edv-shadow-glow: 0 0 0 1px rgba(90, 0, 255, 0.15), 0 20px 50px rgba(90, 0, 255, 0.12);

    /* Layout */
    --edv-max-width: 1140px;
    --edv-transition: 0.25s ease;
    --edv-section-pad-y: clamp(4.5rem, 8vw, 6.5rem);
}

/* ——— Typography utilities ——— */

.edv-eyebrow {
    display: inline-block;
    font-family: var(--edv-font);
    font-size: var(--edv-text-xs);
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--edv-indigo);
    margin-bottom: var(--edv-space-sm);
}

.edv-section--dark .edv-eyebrow {
    color: var(--edv-green);
}

.edv-section__title {
    font-family: var(--edv-font);
    font-size: var(--edv-text-3xl);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: var(--edv-space-md);
    color: var(--edv-dark);
}

.edv-section--dark .edv-section__title {
    color: var(--edv-cream);
}

.edv-section__lead {
    font-family: var(--edv-font);
    font-size: var(--edv-text-lg);
    font-weight: 400;
    line-height: 1.6;
    color: var(--edv-muted);
    max-width: 42rem;
    margin-bottom: 0;
}

.edv-section--dark .edv-section__lead {
    color: var(--edv-muted-on-dark);
}

/* ——— Section shell ——— */

.edv-section {
    position: relative;
    z-index: 2;
}

.edv-section__header {
    margin-bottom: var(--edv-space-xl);
}

.edv-section__header--center {
    text-align: center;
}

.edv-section__header--center .edv-section__lead {
    margin-left: auto;
    margin-right: auto;
}

/* ——— Buttons ——— */

.edv-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-family: var(--edv-font);
    font-size: var(--edv-text-sm);
    font-weight: 600;
    line-height: 1.2;
    padding: 0.85rem 1.6rem;
    border-radius: 999px;
    border: 2px solid transparent;
    text-decoration: none !important;
    transition: transform var(--edv-transition), background var(--edv-transition), border-color var(--edv-transition), color var(--edv-transition);
    cursor: pointer;
}

.edv-btn:hover {
    transform: translateY(-2px);
    text-decoration: none !important;
}

.edv-btn__icon,
.lucide-arrow-up-right.edv-btn__icon {
    width: 1em;
    height: 1em;
    flex-shrink: 0;
    stroke: currentColor;
}

.edv-section-inner {
    padding-top: 0;
    padding-bottom: 0;
}

footer {
    padding-top: var(--edv-section-pad-y);
    padding-bottom: var(--edv-space-lg);
}

.edv-btn--primary {
    background: var(--edv-green);
    color: var(--edv-dark) !important;
    border-color: var(--edv-green);
}

.edv-btn--primary:hover {
    background: var(--edv-green-dark);
    border-color: var(--edv-green-dark);
    color: var(--edv-dark) !important;
}

.edv-btn--secondary {
    background: var(--edv-indigo);
    color: var(--edv-cream) !important;
    border-color: var(--edv-indigo);
}

.edv-btn--secondary:hover {
    background: var(--edv-indigo-dark);
    border-color: var(--edv-indigo-dark);
    color: var(--edv-cream) !important;
}

.edv-btn--ghost {
    background: transparent;
    color: var(--edv-cream) !important;
    border-color: rgba(242, 247, 242, 0.45);
}

.edv-btn--ghost:hover {
    background: rgba(242, 247, 242, 0.08);
    border-color: var(--edv-cream);
    color: var(--edv-cream) !important;
}

.edv-btn--outline-dark {
    background: transparent;
    color: var(--edv-dark) !important;
    border-color: var(--edv-dark);
}

.edv-btn--outline-dark:hover {
    background: var(--edv-dark);
    color: var(--edv-cream) !important;
}

.edv-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--edv-space-sm);
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 10;
}

/* ——— Cards ——— */

.edv-card {
    background: var(--edv-surface-card);
    border: 1px solid var(--edv-border);
    border-radius: var(--edv-radius-md);
    padding: var(--edv-space-lg);
    height: 100%;
    box-shadow: var(--edv-shadow-sm);
    transition: transform var(--edv-transition), box-shadow var(--edv-transition);
}

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

.edv-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--edv-radius-sm);
    background: rgba(90, 0, 255, 0.1);
    color: var(--edv-indigo);
    font-size: 1.25rem;
    margin-bottom: var(--edv-space-md);
}

.edv-card__title {
    font-family: var(--edv-font);
    font-size: var(--edv-text-lg);
    font-weight: 700;
    margin-bottom: var(--edv-space-xs);
    color: var(--edv-dark);
}

.edv-card__text {
    font-family: var(--edv-font);
    font-size: var(--edv-text-sm);
    font-weight: 400;
    line-height: 1.55;
    color: var(--edv-muted);
    margin: 0;
}

.edv-card-grid {
    row-gap: var(--edv-space-md);
}

/* ——— Atlas UI preview (product mock) ——— */

.atlas-ui-preview {
    position: absolute;
    right: 3%;
    bottom: 10%;
    width: min(360px, 40vw);
    z-index: 5;
    pointer-events: none;
}

.atlas-ui-preview .atlas-device--portal {
    transform: perspective(900px) rotateY(-6deg) rotateX(2deg);
}

.atlas-ui-preview__chrome {
    background: var(--edv-dark);
    border-radius: var(--edv-radius-md) var(--edv-radius-md) 0 0;
    padding: 0.5rem 0.75rem;
    display: flex;
    gap: 0.35rem;
    align-items: center;
}

.atlas-ui-preview__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(242, 247, 242, 0.25);
}

.atlas-ui-preview__dot--green { background: var(--edv-green); }

.atlas-ui-preview__body {
    background: #fff;
    border: 1px solid var(--edv-border);
    border-top: none;
    border-radius: 0 0 var(--edv-radius-md) var(--edv-radius-md);
    padding: 1rem;
    box-shadow: var(--edv-shadow-glow);
}

.atlas-ui-preview__label {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--edv-indigo);
    margin-bottom: 0.5rem;
}

.atlas-ui-preview__row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--edv-border);
    font-size: 0.7rem;
    color: var(--edv-dark);
}

.atlas-ui-preview__bar {
    flex: 1;
    height: 6px;
    border-radius: 99px;
    background: rgba(0, 211, 80, 0.25);
    overflow: hidden;
}

.atlas-ui-preview__bar span {
    display: block;
    height: 100%;
    border-radius: 99px;
    background: var(--edv-green);
}

/* ——— Scroll reveal (progressive enhancement) ——— */

.edv-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.edv-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 991px) {
    .atlas-ui-preview {
        display: none;
    }
}

@media (max-width: 767px) {
    .edv-hero__actions {
        flex-direction: column;
        width: 100%;
    }

    .edv-hero__actions .edv-btn {
        width: 100%;
        max-width: 280px;
    }
}
