/*
 * SonPres — Landing Page
 * Typography: Space Grotesk (display) + DM Sans (body)
 * Signature: Subrayado animado en headline del hero
 */

/* ================================================
   TOKENS
   ================================================ */
:root {
    --bg:           #F5F7F5;
    --bg-dark:      #0E3A10;
    --bg-darker:    #0A2B0B;
    --primary:      #1F6B21;
    --primary-deep: #174F19;
    --surface:      #EAF0EA;
    --border:       #D4DDD4;
    --text:         #111412;
    --text-muted:   #5A6B5B;
    --white:        #FFFFFF;
    --gold:         #B8962E;

    --font-display: 'Space Grotesk', sans-serif;
    --font-body:    'DM Sans', sans-serif;

    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;

    --ease:      cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out:  cubic-bezier(0, 0, 0.2, 1);

    --max-w: 1200px;
    --sp:    100px 24px;
}

/* ================================================
   RESET
   ================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; }

/* ================================================
   BUTTONS
   ================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 26px;
    border-radius: var(--radius-sm);
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 15px;
    border: 2px solid transparent;
    transition: background 0.25s var(--ease),
                border-color 0.25s var(--ease),
                transform 0.25s var(--ease),
                box-shadow 0.25s var(--ease);
    white-space: nowrap;
    line-height: 1;
}
.btn--lg { padding: 16px 32px; font-size: 16px; }
.btn--full { width: 100%; }

.btn--primary {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}
.btn--primary:hover {
    background: var(--primary-deep);
    border-color: var(--primary-deep);
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(31, 107, 33, 0.32);
}

.btn--ghost {
    background: transparent;
    color: var(--text);
    border-color: var(--border);
}
.btn--ghost:hover {
    background: var(--surface);
    transform: translateY(-2px);
}

.btn--outline {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}
.btn--outline:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
}

.btn--white {
    background: var(--white);
    color: var(--primary);
    border-color: var(--white);
    font-weight: 600;
}
.btn--white:hover {
    background: var(--surface);
    border-color: var(--surface);
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.14);
}

/* ================================================
   TYPOGRAPHY UTILS
   ================================================ */
.section-eyebrow {
    display: block;
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 16px;
}
.section-eyebrow--light { color: rgba(255, 255, 255, 0.6); }

.section-title {
    font-family: var(--font-display);
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.025em;
    color: var(--text);
}

/* ================================================
   REVEAL ANIMATIONS
   ================================================ */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.75s var(--ease-out),
                transform 0.75s var(--ease-out);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(48px);
    transition: opacity 0.85s var(--ease-out) 0.15s,
                transform 0.85s var(--ease-out) 0.15s;
}
.reveal-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Stagger feature cards */
.features__grid .feature-card:nth-child(1) { transition-delay: 0.05s; }
.features__grid .feature-card:nth-child(2) { transition-delay: 0.12s; }
.features__grid .feature-card:nth-child(3) { transition-delay: 0.19s; }
.features__grid .feature-card:nth-child(4) { transition-delay: 0.26s; }
.features__grid .feature-card:nth-child(5) { transition-delay: 0.33s; }
.features__grid .feature-card:nth-child(6) { transition-delay: 0.40s; }

/* ================================================
   NAV
   ================================================ */
.nav {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    padding: 22px 0;
    transition: background 0.35s var(--ease),
                padding 0.35s var(--ease),
                box-shadow 0.35s var(--ease);
}
.nav.scrolled {
    background: rgba(245, 247, 245, 0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding: 14px 0;
    box-shadow: 0 1px 0 var(--border);
}
.nav__container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 48px;
}
.nav__logo {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.035em;
    flex-shrink: 0;
}
.nav__links {
    display: flex;
    gap: 36px;
    margin-left: auto;
}
.nav__links a {
    font-size: 14px;
    color: var(--text-muted);
    transition: color 0.2s;
    font-family: var(--font-display);
    font-weight: 400;
}
.nav__links a:hover { color: var(--text); }
.nav__cta { flex-shrink: 0; margin-left: 8px; }
.nav__toggle { display: none; }

/* ================================================
   HERO
   ================================================ */
.hero {
    padding: 164px 24px 108px;
    overflow: hidden;
}
.hero__container {
    max-width: var(--max-w);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}
.hero__eyebrow {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--primary);
    background: var(--surface);
    padding: 6px 16px;
    border-radius: 100px;
    margin-bottom: 28px;
}
.hero__title {
    font-family: var(--font-display);
    font-size: clamp(38px, 5.5vw, 64px);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.035em;
    color: var(--text);
    margin-bottom: 24px;
}
.hero__title--accent {
    color: var(--primary);
    position: relative;
    display: inline-block;
}
.hero__title--accent::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
    transition: width 1.1s var(--ease-out) 0.4s;
}
.hero__title--accent.draw-line::after { width: 100%; }

.hero__description {
    font-size: 18px;
    color: var(--text-muted);
    line-height: 1.72;
    margin-bottom: 40px;
    max-width: 460px;
}
.hero__actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}
.hero__visual { position: relative; }
.hero__img {
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.13), 0 8px 24px rgba(0, 0, 0, 0.07);
    will-change: transform;
}

/* ================================================
   STATS
   ================================================ */
.stats {
    background: var(--primary);
    padding: 64px 24px;
}
.stats__container {
    max-width: var(--max-w);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
}
.stats__item { text-align: center; }
.stats__number {
    display: block;
    font-family: var(--font-display);
    font-size: 52px;
    font-weight: 700;
    color: var(--white);
    line-height: 1;
    margin-bottom: 10px;
    letter-spacing: -0.04em;
}
.stats__label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.5;
}

/* ================================================
   FEATURES
   ================================================ */
.features { padding: var(--sp); }
.features__container { max-width: var(--max-w); margin: 0 auto; }
.features__header { text-align: center; margin-bottom: 68px; }
.features__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.feature-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 32px;
    transition: transform 0.3s var(--ease),
                box-shadow 0.3s var(--ease),
                border-color 0.3s var(--ease);
}
.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.08);
    border-color: var(--primary);
}
.feature-card__icon {
    width: 48px;
    height: 48px;
    background: var(--surface);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--primary);
    transition: background 0.3s var(--ease);
}
.feature-card:hover .feature-card__icon { background: rgba(31, 107, 33, 0.12); }
.feature-card__icon svg { width: 22px; height: 22px; }
.feature-card__title {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 10px;
    letter-spacing: -0.015em;
}
.feature-card__desc {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.65;
}

/* ================================================
   SCREENSHOTS
   ================================================ */
.screenshots {
    padding: var(--sp);
    background: var(--surface);
}
.screenshots__container { max-width: var(--max-w); margin: 0 auto; }
.screenshots__header { text-align: center; margin-bottom: 80px; }

.screenshot-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    margin-bottom: 96px;
}
.screenshot-row:last-child { margin-bottom: 0; }
.screenshot-row--reverse .screenshot-row__content { order: 2; }
.screenshot-row--reverse .screenshot-row__visual  { order: 1; }

.screenshot-row__tag {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--primary);
    background: rgba(31, 107, 33, 0.1);
    padding: 4px 12px;
    border-radius: 100px;
    margin-bottom: 18px;
}
.screenshot-row__title {
    font-family: var(--font-display);
    font-size: clamp(22px, 3vw, 32px);
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.025em;
    line-height: 1.18;
    margin-bottom: 16px;
}
.screenshot-row__desc {
    font-size: 16px;
    color: var(--text-muted);
    line-height: 1.72;
}
.screenshot-row__visual img {
    width: 100%;
    border-radius: var(--radius-md);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.11), 0 4px 16px rgba(0, 0, 0, 0.06);
    transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.screenshot-row__visual img:hover {
    transform: translateY(-8px) rotate(-0.4deg);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.14), 0 8px 24px rgba(0, 0, 0, 0.07);
}

/* ================================================
   PLANES
   ================================================ */
.planes { padding: var(--sp); }
.planes__container { max-width: var(--max-w); margin: 0 auto; }
.planes__header { text-align: center; margin-bottom: 8px; }
.planes__subtitle {
    text-align: center;
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 64px;
    margin-top: 12px;
}
.planes__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    align-items: start;
}
.plan-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 36px;
    position: relative;
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.plan-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 52px rgba(0, 0, 0, 0.08);
}
.plan-card--featured {
    background: var(--primary);
    border-color: var(--primary);
    transform: scale(1.04);
}
.plan-card--featured:hover {
    transform: scale(1.04) translateY(-5px);
    box-shadow: 0 28px 64px rgba(31, 107, 33, 0.28);
}
.plan-card__badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gold);
    color: var(--white);
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 5px 18px;
    border-radius: 100px;
    white-space: nowrap;
}
.plan-card__name {
    display: block;
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 14px;
}
.plan-card--featured .plan-card__name { color: rgba(255, 255, 255, 0.65); }

.plan-card__price {
    display: flex;
    align-items: baseline;
    gap: 2px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}
.plan-card__currency {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 500;
    color: var(--text);
    align-self: flex-start;
    margin-top: 8px;
}
.plan-card__amount {
    font-family: var(--font-display);
    font-size: 44px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.04em;
    line-height: 1;
}
.plan-card__period {
    font-size: 13px;
    color: var(--text-muted);
    margin-left: 4px;
    align-self: flex-end;
    padding-bottom: 6px;
}
.plan-card--featured .plan-card__currency,
.plan-card--featured .plan-card__amount { color: var(--white); }
.plan-card--featured .plan-card__period  { color: rgba(255, 255, 255, 0.55); }

.plan-card__features {
    display: flex;
    flex-direction: column;
    gap: 13px;
    margin-bottom: 32px;
}
.plan-card__features li {
    font-size: 14px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1.4;
}
.plan-card__features li::before {
    content: '';
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    border-radius: 50%;
    background-color: var(--surface);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%231F6B21' stroke-width='3'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 10px;
}
.plan-card--featured .plan-card__features li { color: rgba(255, 255, 255, 0.82); }
.plan-card--featured .plan-card__features li::before {
    background-color: rgba(255, 255, 255, 0.15);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}

/* ================================================
   CTA SECTION
   ================================================ */
.cta-section {
    background: var(--bg-dark);
    padding: var(--sp);
}
.cta-section__container {
    max-width: 680px;
    margin: 0 auto;
    text-align: center;
}
.cta-section__title {
    font-family: var(--font-display);
    font-size: clamp(28px, 4.5vw, 48px);
    font-weight: 700;
    color: var(--white);
    letter-spacing: -0.035em;
    line-height: 1.12;
    margin-bottom: 16px;
}
.cta-section__desc {
    font-size: 17px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.65;
    margin-bottom: 48px;
}
.cta-section__form {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 16px;
}
.cta-input {
    flex: 1;
    min-width: 180px;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-sm);
    color: var(--white);
    font-family: var(--font-body);
    font-size: 15px;
    outline: none;
    transition: background 0.2s, border-color 0.2s;
}
.cta-input::placeholder { color: rgba(255, 255, 255, 0.38); }
.cta-input:focus {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.38);
}
.cta-section__note {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.35);
}

/* ================================================
   FOOTER
   ================================================ */
.footer {
    background: var(--bg-darker);
    padding: 48px 24px 0;
}
.footer__container {
    max-width: var(--max-w);
    margin: 0 auto;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.footer__logo {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--white);
    letter-spacing: -0.035em;
    display: block;
    margin-bottom: 10px;
}
.footer__tagline {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.35);
    max-width: 240px;
    line-height: 1.55;
}
.footer__links {
    display: flex;
    gap: 32px;
    align-items: center;
}
.footer__links a {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.45);
    transition: color 0.2s;
    font-family: var(--font-display);
}
.footer__links a:hover { color: var(--white); }
.footer__bottom {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 20px 0;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.25);
    text-align: center;
}
.footer__bottom a {
    color: var(--white);
}
.footer__bottom a:hover {
    color: rgba(255, 255, 255, 0.85);
}

/* ================================================
   WHATSAPP FLOATING BUTTON
   ================================================ */
.whatsapp-bubble {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 200;
    width: 62px;
    height: 62px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #25D366;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    line-height: 1;
}
.whatsapp-bubble:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.24);
}
.whatsapp-bubble svg {
    width: 33px;
    height: 33px;
    display: block;
    flex-shrink: 0;
}

/* ================================================
   RESPONSIVE
   ================================================ */
@media (max-width: 1024px) {
    .stats__container  { grid-template-columns: repeat(2, 1fr); }
    .features__grid    { grid-template-columns: repeat(2, 1fr); }
    .screenshot-row    { gap: 48px; }
}

@media (max-width: 768px) {
    :root { --sp: 72px 20px; }

    /* Nav mobile */
    .nav__links { display: none; }
    .nav__cta   { display: none; }
    .nav__toggle {
        display: flex;
        flex-direction: column;
        gap: 5px;
        background: none;
        border: none;
        padding: 6px;
        margin-left: auto;
    }
    .nav__toggle span {
        display: block;
        width: 22px;
        height: 2px;
        background: var(--text);
        border-radius: 2px;
        transition: all 0.25s var(--ease);
    }
    .nav__toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .nav__toggle.open span:nth-child(2) { opacity: 0; }
    .nav__toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

    /* Mobile nav drawer */
    .nav__links.mobile-open {
        display: flex;
        flex-direction: column;
        gap: 4px;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(245, 247, 245, 0.97);
        backdrop-filter: blur(14px);
        padding: 16px 24px 24px;
        border-bottom: 1px solid var(--border);
        animation: slideDown 0.25s var(--ease-out);
    }
    .nav__links.mobile-open a {
        font-size: 16px;
        padding: 10px 0;
        border-bottom: 1px solid var(--border);
    }
    .nav__links.mobile-open a:last-child { border-bottom: none; }

    @keyframes slideDown {
        from { opacity: 0; transform: translateY(-8px); }
        to   { opacity: 1; transform: translateY(0); }
    }

    /* Hero */
    .hero { padding: 120px 20px 72px; }
    .hero__container { grid-template-columns: 1fr; gap: 48px; }
    .hero__description { font-size: 16px; }
    .hero__actions { flex-direction: column; }
    .hero__actions .btn { width: 100%; justify-content: center; }
    .hero__img {
        aspect-ratio: 4 / 3;
        object-fit: cover;
        object-position: top center;
        max-height: 320px;
    }

    /* Stats */
    .stats__container { grid-template-columns: repeat(2, 1fr); gap: 28px; }
    .stats__number { font-size: 38px; }

    /* Features */
    .features__grid { grid-template-columns: 1fr; }

    /* Screenshots */
    .screenshot-row {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .screenshot-row--reverse .screenshot-row__content { order: 0; }
    .screenshot-row--reverse .screenshot-row__visual  { order: 0; }

    /* Planes */
    .planes__grid { grid-template-columns: 1fr; }
    .plan-card--featured { transform: scale(1); }
    .plan-card--featured:hover { transform: translateY(-5px); }

    /* CTA */
    .cta-section__form { flex-direction: column; }
    .cta-input { min-width: unset; flex: none; }

    /* Footer */
    .footer__container { flex-direction: column; align-items: flex-start; }
    .footer__links { flex-wrap: wrap; gap: 16px 24px; }
    .footer__tagline { max-width: none; }
}

@media (max-width: 480px) {
    .stats__container { grid-template-columns: 1fr 1fr; gap: 20px; }
    .stats__number { font-size: 30px; }
    .whatsapp-bubble {
        width: 52px;
        height: 52px;
        right: 16px;
        bottom: 16px;
    }
    .whatsapp-bubble svg { width: 28px; height: 28px; }
}

/* ================================================
   REDUCED MOTION
   ================================================ */
@media (prefers-reduced-motion: reduce) {
    .reveal, .reveal-right {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .hero__title--accent::after {
        transition: none;
        width: 100%;
    }
    .hero__img { will-change: auto; }
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}