/* =========================================================
   Landing Page — Codingram Publisher
   ========================================================= */

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

body {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    background-color: var(--md-sys-color-surface);
    color: var(--md-sys-color-on-surface);
    line-height: 1.6;
    min-height: 100vh;
}

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

/* ----- Layout container ------------------------------------- */
.landing-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ----- Buttons ---------------------------------------------- */
.landing-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    border-radius: var(--md-sys-shape-corner-extra-large);
    cursor: pointer;
    transition:
        background-color 0.2s,
        transform 0.1s;
    white-space: nowrap;
}

.landing-btn--primary {
    background-color: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    border: none;
}

.landing-btn--primary:hover {
    background-color: var(--md-sys-color-primary-hover);
    transform: translateY(-1px);
}

.landing-btn--sm {
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    min-height: 44px;
}

.landing-btn--lg {
    padding: 0.875rem 2rem;
    font-size: 1rem;
    min-height: 52px;
}

/* ----- Header ----------------------------------------------- */
.landing-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: var(--md-sys-color-surface);
    border-bottom: 1px solid var(--md-sys-color-outline);
}

.landing-header__inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.landing-header__logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--md-sys-color-on-surface);
    letter-spacing: 0.2px;
    text-decoration: none;
}

.landing-header__actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ----- Section headings ------------------------------------- */
.landing-section__title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.75rem;
}

.landing-section__subtitle {
    text-align: center;
    color: var(--md-sys-color-on-surface-variant);
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

/* ----- Hero ------------------------------------------------- */
@keyframes hero-gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.landing-hero {
    padding: 5rem 0 4rem;
    background: linear-gradient(
        135deg,
        var(--md-sys-color-surface) 0%,
        color-mix(in srgb, var(--md-sys-color-primary) 12%, var(--md-sys-color-surface)) 40%,
        color-mix(in srgb, var(--md-sys-color-tertiary) 8%, var(--md-sys-color-surface)) 70%,
        var(--md-sys-color-surface) 100%
    );
    background-size: 300% 300%;
    animation: hero-gradient-shift 8s ease infinite;
}

@media (prefers-reduced-motion: reduce) {
    .landing-hero {
        animation: none;
    }
}

.landing-hero__split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.landing-hero__content {
    text-align: left;
}

.landing-hero__title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.25rem;
}

.landing-hero__highlight {
    color: var(--md-sys-color-primary);
}

.landing-hero__subtitle {
    font-size: 1.15rem;
    color: var(--md-sys-color-on-surface-variant);
    margin-bottom: 2.5rem;
}

.landing-hero__actions {
    display: flex;
    justify-content: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ----- Hero visual (Telegram mockup) ----------------------- */

/* Tokens del mockup — dark (default) */
:root,
:root[data-theme='dark'] {
    --tg-topbar-bg: #2b5278;
    --tg-feed-bg: #1c2733;
    --tg-bubble-bg: #2b5278;
    --tg-image-grad: linear-gradient(135deg, #1e3a5f 0%, #2d6a9f 100%);
    --tg-image-icon: rgba(255, 255, 255, 0.35);
    --tg-text-primary: #ffffff;
    --tg-text-secondary: rgba(255, 255, 255, 0.68);
    --tg-text-muted: rgba(255, 255, 255, 0.4);
    --tg-price-old: rgba(255, 255, 255, 0.42);
    --tg-link: #64b5f6;
    --tg-ticks: #64b5f6;
}

/* Tokens del mockup — light */
:root[data-theme='light'] {
    --tg-topbar-bg: #3d7ab5;
    --tg-feed-bg: #dce8f5;
    --tg-bubble-bg: #ffffff;
    --tg-image-grad: linear-gradient(135deg, #bdd8f5 0%, #90bfe8 100%);
    --tg-image-icon: rgba(59, 130, 198, 0.35);
    --tg-text-primary: #0d1b2a;
    --tg-text-secondary: #374151;
    --tg-text-muted: #6b7280;
    --tg-price-old: #9ca3af;
    --tg-link: #1d6fa4;
    --tg-ticks: #1d6fa4;
}

/* Tokens de éxito (precio + badge) — compartidos ambos temas */
:root {
    --tg-price-new: var(--md-sys-color-success);
    --tg-badge-bg: var(--md-sys-color-success);
    --tg-badge-text: var(--md-sys-color-on-success);
    --tg-sent-text: var(--md-sys-color-success);
    --tg-sent-border: color-mix(in srgb, var(--md-sys-color-success) 30%, transparent);
    --tg-sent-bg: color-mix(in srgb, var(--md-sys-color-success) 10%, transparent);
}

.landing-hero__visual {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.tg-mockup {
    max-width: 360px;
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--md-sys-elevation-4);
    font-size: 0.875rem;
}

/* Topbar */
.tg-mockup__topbar {
    background-color: var(--tg-topbar-bg);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.tg-mockup__avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--md-sys-color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tg-mockup__avatar .material-symbols-rounded {
    font-size: 1.25rem;
    color: #ffffff;
}

.tg-mockup__channel-info {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.tg-mockup__channel-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.2;
}

.tg-mockup__channel-members {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.65);
}

/* Feed */
.tg-mockup__feed {
    background-color: var(--tg-feed-bg);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Burbuja de mensaje */
.tg-mockup__message {
    background-color: var(--tg-bubble-bg);
    border-radius: 4px 12px 12px 12px;
    overflow: hidden;
    box-shadow: var(--md-sys-elevation-1);
}

.tg-mockup__product-image {
    background: var(--tg-image-grad);
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tg-mockup__product-image .material-symbols-rounded {
    font-size: 3.5rem;
    color: var(--tg-image-icon);
}

.tg-mockup__message-body {
    padding: 0.75rem 0.875rem 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.tg-mockup__product-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--tg-text-primary);
    line-height: 1.3;
}

.tg-mockup__product-desc {
    font-size: 0.78rem;
    color: var(--tg-text-secondary);
    line-height: 1.4;
}

.tg-mockup__prices {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.1rem;
}

.tg-mockup__price-old {
    font-size: 0.78rem;
    color: var(--tg-price-old);
    text-decoration: line-through;
}

.tg-mockup__price-new {
    font-size: 1rem;
    font-weight: 800;
    color: var(--tg-price-new);
}

.tg-mockup__badge {
    background-color: var(--tg-badge-bg);
    color: var(--tg-badge-text);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.1rem 0.4rem;
    border-radius: 99px;
}

.tg-mockup__link {
    font-size: 0.8rem;
    color: var(--tg-link);
    margin-top: 0.1rem;
    display: block;
}

.tg-mockup__meta {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.875rem 0.5rem;
}

.tg-mockup__time {
    font-size: 0.7rem;
    color: var(--tg-text-muted);
}

/* Badge "Publicado" */
.tg-mockup__sent-badge {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background-color: var(--tg-sent-bg);
    border: 1px solid var(--tg-sent-border);
    border-radius: 8px;
    padding: 0.4rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--tg-sent-text);
}

.tg-mockup__sent-badge .material-symbols-rounded {
    font-size: 1rem;
    color: var(--tg-sent-text);
}

/* ----- Features --------------------------------------------- */

.landing-features {
    padding: 4rem 0;
    background-color: var(--md-sys-color-surface-variant);
}

.landing-features__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.feature-card--blue {
    --card-accent: var(--md-sys-color-primary);
}
.feature-card--violet {
    --card-accent: var(--md-sys-color-tertiary);
}
.feature-card--green {
    --card-accent: var(--md-sys-color-success);
}
.feature-card--amber {
    --card-accent: var(--md-sys-color-warning);
}

.feature-card {
    background-color: var(--md-sys-color-surface-container-high);
    border-radius: var(--md-sys-shape-corner-extra-large);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    box-shadow: var(--md-sys-elevation-2);
    border-top: 3px solid var(--card-accent, var(--md-sys-color-primary));
    transition:
        transform 0.2s,
        box-shadow 0.2s;
}

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

.feature-card__icon {
    font-size: 2.5rem;
    color: var(--card-accent, var(--md-sys-color-primary));
}

.feature-card__title {
    font-size: 1.1rem;
    font-weight: 700;
}

.feature-card__desc {
    font-size: 0.95rem;
    color: var(--md-sys-color-on-surface-variant);
    line-height: 1.6;
}

/* ----- Benefits --------------------------------------------- */
.landing-benefits {
    padding: 4rem 0;
}

.landing-benefits__list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    max-width: 720px;
    margin: 0 auto;
}

.benefit-item__stat {
    display: block;
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--md-sys-color-primary);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
}

.benefit-item__icon {
    font-size: 2.5rem;
    color: var(--md-sys-color-primary);
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.benefit-item__title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.benefit-item__desc {
    font-size: 0.95rem;
    color: var(--md-sys-color-on-surface-variant);
    line-height: 1.6;
}

/* ----- Steps (Cómo empezar) --------------------------------- */
.landing-steps {
    padding: 4rem 0;
    background-color: var(--md-sys-color-surface-variant);
}

.landing-steps__list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 720px;
    margin: 0 auto;
    counter-reset: none;
    position: relative;
}

.landing-steps__list::before {
    content: '';
    position: absolute;
    left: 1.4rem;
    top: 1.5rem;
    bottom: 1.5rem;
    width: 2px;
    background: linear-gradient(
        to bottom,
        var(--md-sys-color-primary),
        var(--md-sys-color-tertiary)
    );
    opacity: 0.3;
    pointer-events: none;
}

.step-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

.step-item__number {
    flex-shrink: 0;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background-color: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    font-size: 1.25rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    box-shadow:
        0 0 0 6px color-mix(in srgb, var(--md-sys-color-primary) 20%, transparent),
        var(--md-sys-elevation-2);
}

.step-item__title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.step-item__desc {
    font-size: 0.95rem;
    color: var(--md-sys-color-on-surface-variant);
    line-height: 1.6;
}

/* ----- Free ------------------------------------------------- */
.landing-free {
    padding: 4rem 0;
}

.landing-free__inner {
    display: flex;
    align-items: center;
    gap: 2rem;
    max-width: 720px;
    margin: 0 auto;
    background-color: var(--md-sys-color-primary-container);
    border-radius: var(--md-sys-shape-corner-extra-large);
    padding: 2.5rem 2rem;
}

.landing-free__icon {
    font-size: 3.5rem;
    color: var(--md-sys-color-on-primary-container);
    flex-shrink: 0;
}

.landing-free__title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    color: var(--md-sys-color-on-primary-container);
}

.landing-free__desc {
    font-size: 1rem;
    color: var(--md-sys-color-on-primary-container);
    line-height: 1.6;
    opacity: 0.9;
}

/* ----- Footer ----------------------------------------------- */
.landing-footer {
    background-color: var(--md-sys-color-surface-variant);
    padding: 3rem 0 1.5rem;
}

.landing-footer__cta {
    text-align: center;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--md-sys-color-outline);
    margin-bottom: 2.5rem;
}

.landing-footer__cta-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
}

.landing-footer__cta-subtitle {
    font-size: 1.05rem;
    color: var(--md-sys-color-on-surface-variant);
    margin-bottom: 1.75rem;
}

.landing-footer__cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2.5rem;
}

.landing-footer__col-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--md-sys-color-on-surface);
}

.landing-footer__col-desc {
    font-size: 0.9rem;
    color: var(--md-sys-color-on-surface-variant);
    line-height: 1.6;
}

.landing-footer__contact-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.landing-footer__contact-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.landing-footer__contact-list .material-symbols-rounded {
    font-size: 1.25rem;
    color: var(--md-sys-color-primary);
    flex-shrink: 0;
}

.landing-footer__contact-list a {
    color: var(--md-sys-color-on-surface-variant);
    text-decoration: none;
    transition: color 0.2s;
}

.landing-footer__contact-list a:hover {
    color: var(--md-sys-color-primary);
}

.landing-footer__bottom {
    border-top: 1px solid var(--md-sys-color-outline);
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--md-sys-color-on-surface-variant);
}

.landing-footer__bottom a {
    color: var(--md-sys-color-primary);
    text-decoration: underline;
}

/* ----- Responsive ------------------------------------------- */
@media (max-width: 1024px) {
    .landing-hero__title {
        font-size: 2.5rem;
    }

    .landing-hero__split {
        grid-template-columns: 1fr;
    }

    .landing-hero__content {
        text-align: center;
    }

    .landing-hero__actions {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .landing-hero {
        padding: 3rem 0 2.5rem;
    }

    .landing-hero__title {
        font-size: 2rem;
    }

    .landing-features__grid {
        grid-template-columns: 1fr;
    }

    .landing-benefits__list {
        grid-template-columns: 1fr;
    }

    .landing-section__title {
        font-size: 1.6rem;
    }

    .landing-footer__cta-title {
        font-size: 1.75rem;
    }

    .landing-footer__cols {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .landing-free__inner {
        flex-direction: column;
        text-align: center;
        gap: 1.25rem;
    }
}

@media (max-width: 480px) {
    .landing-hero__title {
        font-size: 1.65rem;
    }

    .landing-hero__subtitle {
        font-size: 1rem;
    }

    .landing-hero__visual {
        display: none;
    }

    .benefit-item {
        flex-direction: column;
        gap: 0.75rem;
    }

    .step-item {
        flex-direction: column;
        gap: 0.75rem;
    }
}
