/* AsuraTech Design System
   Load order: design-system → header/footer/forms → page stylesheet. */

:root {
    --brand-violet: #745bc7;
    --brand-plum: #a34eaa;
    --brand-magenta: #c73678;
    --brand-gradient: linear-gradient(120deg, #745bc7 0%, #a34eaa 52%, #c73678 100%);
    --brand-wash: linear-gradient(135deg, rgb(116 91 199 / 10%), rgb(199 54 120 / 5%));

    --ink: #121827;
    --ink-muted: #5f6879;
    --canvas: #f5f6fa;
    --surface: #ffffff;
    --surface-muted: #f0eff7;
    --surface-dark: #171d2d;
    --line: #dfe2ea;
    --line-strong: #c8ccd8;

    --success: #087f5b;
    --warning: #ad650c;
    --danger: #c43f59;
    --info: #4966ca;

    --shadow-xs: 0 1px 2px rgb(18 24 39 / 4%);
    --shadow-sm: 0 10px 30px rgb(18 24 39 / 7%);
    --shadow-md: 0 24px 70px rgb(18 24 39 / 12%);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --header-height: 82px;
    --content-width: 1240px;
    --ease: 220ms ease;

    /* Compatibility aliases used by existing markup and inline SVG rules. */
    --primary-color: var(--brand-violet);
    --secondary-color: var(--brand-plum);
    --accent-color: var(--brand-magenta);
    --dark-bg: var(--surface);
    --darker-bg: var(--canvas);
    --text-light: var(--ink);
    --text-gray: var(--ink-muted);
    --border-color: var(--line);
    --success-color: var(--success);
    --warning-color: var(--warning);
    --error-color: var(--danger);
    --transition-speed: 0.22s;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background: var(--canvas);
}

body {
    margin: 0;
    overflow-x: hidden;
    color: var(--ink);
    background: var(--canvas);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1rem;
    line-height: 1.65;
    letter-spacing: -0.01em;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body::before {
    content: '';
    position: fixed;
    inset: 0 0 auto;
    z-index: 10002;
    height: 3px;
    background: var(--brand-gradient);
    pointer-events: none;
}

::selection {
    color: #fff;
    background: var(--brand-plum);
}

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

button,
input,
select,
textarea {
    color: inherit;
    font: inherit;
}

:where(button, a) {
    -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid rgb(116 91 199 / 28%);
    outline-offset: 3px;
}

.container {
    width: min(calc(100% - 3rem), var(--content-width));
    margin-inline: auto;
}

h1,
h2,
h3,
h4,
:where(.section-title, .page-title, .coming-soon-title) {
    margin-top: 0;
    color: var(--ink);
    font-family: 'Manrope', 'Inter', sans-serif;
    letter-spacing: -0.045em;
    text-wrap: balance;
}

p {
    margin-top: 0;
    text-wrap: pretty;
}

/* Editorial rhythm */
section {
    position: relative;
}

.section-title,
.page-title {
    max-width: 820px;
    margin-bottom: 1rem;
    font-size: clamp(2.15rem, 4vw, 3.7rem);
    font-weight: 760;
    line-height: 1.08;
    text-align: left;
}

.section-title::before,
.page-title::before {
    content: '';
    display: block;
    width: 54px;
    height: 4px;
    margin-bottom: 1.2rem;
    border-radius: 1px;
    background: var(--brand-gradient);
    transform: skewX(-28deg);
}

.section-subtitle {
    max-width: 660px;
    margin: 0 0 3.5rem;
    color: var(--ink-muted);
    font-size: clamp(1rem, 1.5vw, 1.14rem);
    line-height: 1.75;
    text-align: left;
}

.surface-section {
    background: var(--surface);
}

.muted-section {
    background: var(--canvas);
}

/* Shared hero composition */
.hero,
.hero-remote,
.servicios-hero,
.custom-ideas,
.coming-soon-section {
    min-height: min(820px, 90vh);
    padding: calc(var(--header-height) + 5rem) 0 5rem;
    display: flex;
    align-items: center;
    overflow: hidden;
    background:
        radial-gradient(circle at 82% 22%, rgb(116 91 199 / 12%), transparent 30%),
        radial-gradient(circle at 72% 78%, rgb(199 54 120 / 7%), transparent 26%),
        linear-gradient(115deg, #fbfbfd 0 58%, #f1eff8 58% 100%);
}

.hero::before,
.hero-remote::before,
.servicios-hero::before,
.custom-ideas::before,
.coming-soon-section::before {
    content: '';
    position: absolute;
    top: var(--header-height);
    right: max(2rem, calc((100vw - var(--content-width)) / 2));
    width: min(31vw, 390px);
    height: min(58vh, 540px);
    border: 1px solid rgb(116 91 199 / 14%);
    background-image:
        linear-gradient(rgb(116 91 199 / 8%) 1px, transparent 1px),
        linear-gradient(90deg, rgb(116 91 199 / 8%) 1px, transparent 1px);
    background-size: 34px 34px;
    transform: skewY(-5deg);
    pointer-events: none;
}

.hero::after,
.hero-remote::after,
.servicios-hero::after,
.custom-ideas::after,
.coming-soon-section::after {
    content: '';
    position: absolute;
    right: max(1.2rem, calc((100vw - var(--content-width)) / 2 - 18px));
    bottom: 3.6rem;
    width: min(34vw, 430px);
    height: 8px;
    background: var(--brand-gradient);
    clip-path: polygon(0 0, 100% 0, 96% 100%, 0 100%);
    pointer-events: none;
}

.hero-grid,
.hero-background-effects {
    position: absolute;
    inset: 0;
    opacity: 0.18;
    background-image:
        linear-gradient(rgb(116 91 199 / 8%) 1px, transparent 1px),
        linear-gradient(90deg, rgb(116 91 199 / 8%) 1px, transparent 1px);
    background-size: 72px 72px;
    pointer-events: none;
}

.hero-circle-1,
.hero-circle-2 {
    display: none;
}

.hero-content,
.hero-content-remote,
.hero-content-servicios,
.ideas-content,
.coming-soon-content {
    position: relative;
    z-index: 2;
    width: min(100%, 820px);
    margin: 0;
    text-align: left;
}

.hero h1,
.hero-remote h1,
.servicios-hero h1,
.custom-ideas h1,
.coming-soon-title {
    max-width: 850px;
    margin-bottom: 1.5rem;
    color: var(--ink);
    font-size: clamp(3.15rem, 5.3vw, 5.4rem);
    font-weight: 770;
    line-height: 0.98;
}

.highlight-text {
    color: var(--brand-plum);
}

.hero-subtitle,
.hero-remote .hero-subtitle,
.coming-soon-subtitle {
    max-width: 680px;
    margin: 0 0 2.4rem;
    color: var(--ink-muted);
    font-size: clamp(1.05rem, 1.8vw, 1.28rem);
    line-height: 1.7;
    text-align: left;
}

.hero-badge,
.coming-soon-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 2rem;
    padding: 0.58rem 0.8rem;
    color: var(--brand-plum);
    border: 1px solid rgb(116 91 199 / 24%);
    border-left: 4px solid var(--brand-violet);
    border-radius: 4px;
    background: rgb(255 255 255 / 68%);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-badge-icon {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    stroke: currentColor;
}

:where(
    .hero-features,
    .hero-features-badges,
    .hero-benefits,
    .hero-stats,
    .hero-cta,
    .hero-cta-buttons,
    .hero-buttons
) {
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    text-align: left;
}

.hero-features,
.hero-features-badges,
.hero-benefits {
    margin-bottom: 2.4rem;
}

.feature-badge,
.hero-feature-badge,
.hero-feature-item,
.benefit-badge,
.feature-pill {
    min-height: 40px;
    padding: 0.45rem 0.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--ink);
    font-size: 0.88rem;
    font-weight: 700;
}

.feature-badge + .feature-badge,
.hero-feature-badge + .hero-feature-badge,
.hero-feature-item + .hero-feature-item,
.benefit-badge + .benefit-badge {
    padding-left: 1.25rem;
    border-left: 1px solid var(--line-strong);
}

.badge-icon,
.pill-icon {
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    color: var(--brand-violet);
}

.badge-icon svg,
.pill-icon svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

.hero-stats {
    gap: 0;
    margin: 2rem 0 2.5rem;
}

.stat-item {
    min-width: 145px;
    padding: 0 1.5rem;
    border-left: 1px solid var(--line-strong);
}

.stat-item:first-child {
    padding-left: 0;
    border-left: 0;
}

.stat-number {
    color: var(--brand-violet);
    font-size: 2rem;
    font-weight: 800;
}

.stat-label {
    color: var(--ink-muted);
    font-size: 0.78rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

/* Shared controls */
:where(
    .cta-button-hero,
    .cta-button,
    .contact-button,
    .cta-button-remote,
    .final-cta-button,
    .hero-cta-button,
    .hero-btn-primary,
    .hero-btn-secondary,
    .cta-button-services,
    .btn-action,
    .cta-btn-final,
    .cta-button-soon,
    .plan-button,
    .license-btn-primary,
    .modal-button,
    .modal-btn-primary-full,
    .submit-button,
    .error-button,
    .download-button
) {
    min-height: 50px;
    padding: 0.9rem 1.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    color: #fff;
    border: 1px solid var(--ink);
    border-radius: 10px;
    background: var(--ink);
    box-shadow: none;
    font-size: 0.92rem;
    font-weight: 760;
    letter-spacing: -0.01em;
    text-decoration: none;
    cursor: pointer;
    transition: transform var(--ease), color var(--ease), border-color var(--ease), background var(--ease), box-shadow var(--ease);
}

.cta-button-hero,
.hero-btn-primary,
.hero-cta-button.primary,
.btn-primary,
.modal-btn-primary-full,
.submit-button,
.plan-button.featured {
    border-color: transparent;
    background: var(--brand-gradient);
}

.cta-button.secondary,
.contact-button.secondary,
.hero-btn-secondary,
.hero-cta-button.secondary,
.btn-secondary,
.cta-button-soon.secondary,
.error-button.secondary {
    color: var(--ink);
    border-color: var(--line-strong);
    background: transparent;
}

.cta-button-hero:hover,
.cta-button:hover,
.contact-button:hover,
.cta-button-remote:hover,
.final-cta-button:hover,
.hero-cta-button:hover,
.hero-btn-primary:hover,
.hero-btn-secondary:hover,
.cta-button-services:hover,
.btn-action:hover,
.cta-btn-final:hover,
.cta-button-soon:hover,
.plan-button:hover,
.license-btn-primary:hover,
.modal-button:hover,
.modal-btn-primary-full:hover,
.submit-button:hover:not(:disabled),
.error-button:hover,
.download-button:hover {
    color: #fff;
    border-color: var(--brand-violet);
    background: var(--brand-violet);
    box-shadow: 0 12px 28px rgb(116 91 199 / 18%);
    transform: translateY(-2px);
}

.button-icon,
.btn-icon,
.btn-arrow,
.link-arrow {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    transition: transform var(--ease);
}

.btn-icon,
.button-icon svg,
.btn-icon svg {
    display: block;
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    stroke: currentColor;
}

.cta-section .cta-button-hero,
.cta-section .cta-button,
.cta-remote .cta-button-remote,
.final-cta-remote .final-cta-button,
.cta-final-section .cta-btn-final {
    border-color: transparent;
    background: var(--brand-gradient);
}

.cta-section .cta-button.secondary,
.cta-remote .hero-cta-button.secondary,
.final-cta-remote .hero-cta-button.secondary,
.cta-final-section .cta-btn-final.secondary {
    color: #fff;
    border-color: rgb(255 255 255 / 28%);
    background: rgb(255 255 255 / 7%);
}

.cta-section .cta-button.secondary:hover,
.cta-remote .hero-cta-button.secondary:hover,
.final-cta-remote .hero-cta-button.secondary:hover,
.cta-final-section .cta-btn-final.secondary:hover {
    color: var(--ink);
    border-color: #fff;
    background: #fff;
}

/* Shared card language */
.service-card,
.benefit-item,
.feature-item,
.license-card,
.plan-card,
.step-card,
.faq-item,
.benefit-card-compact,
.service-item-compact,
.area-card-services,
.domicilio-card,
.zona-item,
.info-card,
.info-card-ubicacion,
.soon-feature,
.visual-step {
    position: relative;
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: var(--shadow-xs);
    transition: transform var(--ease), border-color var(--ease), box-shadow var(--ease);
}

.service-card:hover,
.benefit-item:hover,
.feature-item:hover,
.license-card:hover,
.plan-card:hover,
.step-card:hover,
.faq-item:hover,
.benefit-card-compact:hover,
.service-item-compact:hover,
.area-card-services:hover,
.domicilio-card:hover,
.info-card:hover,
.info-card-ubicacion:hover,
.zona-item:hover {
    border-color: rgb(116 91 199 / 42%);
    box-shadow: var(--shadow-sm);
    transform: translateY(-4px);
}

.service-card p,
.benefit-item p,
.feature-item p,
.license-card p,
.plan-card p,
.step-card p,
.faq-item p,
.area-card-services p,
.domicilio-card p,
.info-card p,
.info-card-ubicacion p,
.service-highlights li,
.plan-features li,
.modal-list li {
    color: var(--ink-muted);
}

.service-icon,
.benefit-icon,
.feature-icon,
.license-card-icon,
.step-icon,
.idea-icon,
.area-icon-services,
.domicilio-icon,
.info-icon,
.explanation-icon,
.modal-icon {
    display: grid;
    place-items: center;
    color: var(--brand-violet);
    border: 1px solid rgb(116 91 199 / 16%);
    border-radius: 10px;
    background: var(--surface-muted);
}

.service-icon svg,
.benefit-icon svg,
.feature-icon svg,
.step-icon svg {
    stroke: currentColor;
}

.check-icon,
.feature-check,
.zona-check,
.payment-check {
    display: inline-grid;
    place-items: center;
    color: var(--success);
    background: rgb(8 127 91 / 9%);
}

.service-price,
.license-price,
.plan-price,
.modal-price,
.price,
.price-value,
.price-amount {
    color: var(--brand-violet);
}

.price-badge,
.license-badge,
.discount-badge,
.availability-notice,
.highlight-badge,
.info-badge {
    color: var(--brand-plum);
    border-color: rgb(116 91 199 / 22%);
    background: rgb(116 91 199 / 9%);
}

/* Shared dark CTA band */
.cta-section,
.cta-remote,
.final-cta-remote,
.cta-final-section {
    padding: clamp(4.5rem, 8vw, 7rem) 0;
    overflow: hidden;
    color: #fff;
    background: var(--surface-dark);
}

.cta-section::before,
.cta-remote::before,
.final-cta-remote::before,
.cta-final-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(90deg, rgb(255 255 255 / 4.5%) 1px, transparent 1px),
        linear-gradient(rgb(255 255 255 / 4.5%) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: linear-gradient(to right, #000, transparent 75%);
}

.cta-content,
.cta-content-remote,
.final-cta-box,
.cta-final-box {
    position: relative;
    z-index: 1;
    max-width: 1040px;
    margin: 0;
    text-align: left;
}

.cta-content h2,
.cta-content-remote h2,
.final-cta-box h2,
.cta-final-box h2 {
    color: #fff;
    font-size: clamp(2.2rem, 4vw, 4rem);
    line-height: 1.08;
}

.cta-content p,
.cta-content-remote p,
.final-cta-box p,
.cta-final-box p {
    color: #bfc6d4;
}

/* Shared contact section */
.contact {
    padding: clamp(4.5rem, 8vw, 7.5rem) 0;
    background: var(--surface);
}

.contact-content {
    max-width: 1080px;
    margin: 0;
}

.contact-header { text-align: left; }

.contact-item .contact-header {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    text-align: left;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 340px));
    gap: 1rem;
}

.contact-item {
    min-height: 0;
    padding: 1.6rem;
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--canvas);
    text-align: left;
}

.contact-item h4 {
    margin: 0.75rem 0 0.35rem;
    color: var(--ink);
}

.contact-item p {
    margin-bottom: 1rem;
    color: var(--ink-muted);
}

.contact .contact-icon {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: grid;
    place-items: center;
    color: var(--brand-violet);
    border: 1px solid rgb(116 91 199 / 16%);
    border-radius: 10px;
    background: var(--surface-muted);
}

.contact .contact-icon svg {
    width: 21px;
    height: 21px;
    stroke: currentColor;
}

/* Feedback and utility states */
.fade-in {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 500ms ease, transform 500ms cubic-bezier(0.2, 0.75, 0.25, 1);
}

.fade-in.visible {
    opacity: 1;
    transform: none;
}

.back-to-top {
    position: fixed;
    right: 29px;
    bottom: 26px;
    z-index: 999;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    color: #fff;
    border: 0;
    border-radius: 9px;
    background: var(--ink);
    box-shadow: var(--shadow-sm);
    opacity: 0;
    visibility: hidden;
    cursor: pointer;
    transition: opacity var(--ease), visibility var(--ease), transform var(--ease), background var(--ease);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--brand-violet);
    transform: translateY(-2px);
}

.back-to-top svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

@media (max-width: 1024px) {
    .container {
        width: min(calc(100% - 2.5rem), var(--content-width));
    }

    .hero::before,
    .hero-remote::before,
    .servicios-hero::before,
    .custom-ideas::before,
    .coming-soon-section::before {
        opacity: 0.6;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 70px;
    }

    .container {
        width: min(calc(100% - 2rem), var(--content-width));
    }

    .hero,
    .hero-remote,
    .servicios-hero,
    .custom-ideas,
    .coming-soon-section {
        min-height: auto;
        padding: calc(var(--header-height) + 4.5rem) 0 5rem;
        background: radial-gradient(circle at 92% 12%, rgb(116 91 199 / 12%), transparent 32%), #fafafd;
    }

    .hero::before,
    .hero-remote::before,
    .servicios-hero::before,
    .custom-ideas::before,
    .coming-soon-section::before {
        right: -4rem;
        width: 52vw;
        height: 35vh;
        opacity: 0.5;
    }

    .hero::after,
    .hero-remote::after,
    .servicios-hero::after,
    .custom-ideas::after,
    .coming-soon-section::after {
        right: 1rem;
        bottom: 2rem;
        width: 44vw;
    }

    .hero h1,
    .hero-remote h1,
    .servicios-hero h1,
    .custom-ideas h1,
    .coming-soon-title {
        font-size: clamp(2.7rem, 12vw, 4.7rem);
    }

    .hero-features,
    .hero-features-badges,
    .hero-benefits {
        display: none;
    }

    .section-title,
    .page-title {
        font-size: clamp(2rem, 9vw, 3.1rem);
    }

    .contact-info {
        grid-template-columns: 1fr;
        max-width: 420px;
    }
}

@media (max-width: 480px) {
    .container {
        width: min(calc(100% - 1.5rem), var(--content-width));
    }

    .hero,
    .hero-remote,
    .servicios-hero,
    .custom-ideas,
    .coming-soon-section {
        padding-top: calc(var(--header-height) + 3.5rem);
    }

    .hero h1,
    .hero-remote h1,
    .servicios-hero h1,
    .custom-ideas h1,
    .coming-soon-title {
        font-size: clamp(2.45rem, 13vw, 3.6rem);
    }

    .hero-badge {
        font-size: 0.68rem;
    }

    .hero-stats {
        gap: 1.2rem;
    }

    .stat-item {
        min-width: calc(50% - 0.6rem);
        padding: 0;
        border-left: 0;
    }

    .hero-buttons,
    .hero-cta,
    .hero-cta-buttons,
    .contact-buttons,
    .cta-buttons,
    .cta-buttons-final,
    .error-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-buttons > *,
    .hero-cta > *,
    .hero-cta-buttons > *,
    .contact-buttons > *,
    .cta-buttons > *,
    .cta-buttons-final > *,
    .error-actions > * {
        width: 100%;
    }

    .back-to-top {
        right: 15px;
        bottom: 16px;
        width: 42px;
        height: 42px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
