/* ====================================================
   Neomedios — Estilo Apple-like en grises
   ==================================================== */

:root {
    /* Paleta de grises (estilo Apple) */
    --c-bg: #ffffff;
    --c-bg-alt: #f5f5f7;
    --c-bg-dark: #1d1d1f;
    --c-text: #1d1d1f;
    --c-text-soft: #424245;
    --c-text-muted: #6e6e73;
    --c-text-light: #86868b;
    --c-border: #d2d2d7;
    --c-border-soft: #e8e8ed;
    --c-accent: #1d1d1f;

    /* Tipografía */
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', Arial, sans-serif;

    /* Espaciado */
    --container: 1180px;
    --radius: 14px;
    --radius-lg: 22px;

    /* Animación */
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 17px;
    line-height: 1.5;
    color: var(--c-text);
    background: var(--c-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ---------- Layout helper ---------- */
.section { padding: 120px 0; }
.section--alt { background: var(--c-bg-alt); }
.section__inner,
.nav__inner,
.hero__inner,
.stats__inner,
.footer__inner {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 32px;
}

/* ---------- NAVBAR ---------- */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--c-border-soft);
    transition: background .25s var(--ease);
}
.nav__inner {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.nav__brand { display: flex; align-items: center; }
.nav__menu {
    display: flex;
    gap: 36px;
    margin-left: auto;
    margin-right: 24px;
}
.nav__menu a {
    font-size: 14px;
    font-weight: 500;
    color: var(--c-text-soft);
    transition: color .2s var(--ease);
}
.nav__menu a:hover { color: var(--c-text); }
.nav__cta {
    display: inline-flex;
    align-items: center;
    height: 36px;
    padding: 0 18px;
    border-radius: 18px;
    background: var(--c-text);
    color: #fff;
    font-size: 13.5px;
    font-weight: 500;
    transition: transform .2s var(--ease), opacity .2s var(--ease);
}
.nav__cta:hover { transform: scale(1.03); opacity: .9; }
.nav__burger {
    display: none;
    background: transparent;
    border: 0;
    padding: 8px;
    flex-direction: column;
    gap: 4px;
}
.nav__burger span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--c-text);
    transition: transform .25s var(--ease), opacity .25s var(--ease);
}
.nav__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

/* ---------- HERO ---------- */
.hero {
    padding: 110px 0 90px;
    background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
    overflow: hidden;
}
.hero__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 72px;
    align-items: center;
}
.hero__text { text-align: left; }
.hero__eyebrow {
    font-size: 13px;
    font-weight: 500;
    color: var(--c-text-muted);
    letter-spacing: 0.8px;
    text-transform: uppercase;
    margin: 0 0 20px;
}
.hero__title {
    font-size: clamp(38px, 5vw, 62px);
    line-height: 1.06;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin: 0 0 22px;
    color: var(--c-text);
}
.hero__title-accent {
    color: var(--c-text-muted);
}
.hero__subtitle {
    font-size: clamp(16px, 1.5vw, 18px);
    color: var(--c-text-soft);
    max-width: 480px;
    margin: 0 0 36px;
    line-height: 1.6;
}
.hero__subtitle em { font-style: italic; color: var(--c-text); }
.hero__actions {
    display: flex;
    gap: 12px;
    justify-content: flex-start;
    flex-wrap: wrap;
}

/* Visual mockup */
.hero__visual {
    perspective: 1500px;
}
.visual-card {
    width: 100%;
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow:
        0 1px 2px rgba(0,0,0,0.04),
        0 24px 48px rgba(0,0,0,0.10),
        0 48px 96px rgba(0,0,0,0.05);
    overflow: hidden;
    transform: rotateX(3deg) rotateY(-2deg);
    transition: transform .9s var(--ease);
}
.visual-card:hover { transform: rotateX(0deg) rotateY(0deg) translateY(-6px); }
.visual-card__bar {
    height: 38px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 8px;
    background: #f5f5f7;
    border-bottom: 1px solid var(--c-border-soft);
}
.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot--r { background: #ff5f57; }
.dot--y { background: #febc2e; }
.dot--g { background: #28c840; }
.visual-card__url {
    margin-left: auto;
    margin-right: auto;
    transform: translateX(-30px);
    font-size: 12px;
    color: var(--c-text-light);
    background: #fff;
    padding: 4px 16px;
    border-radius: 6px;
    border: 1px solid var(--c-border-soft);
}
.visual-card__body {
    padding: 40px 50px;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    background:
        radial-gradient(circle at 20% 0%, rgba(29,29,31,0.04) 0%, transparent 50%),
        #fff;
}
.vc-line { height: 14px; border-radius: 4px; background: linear-gradient(90deg, #e8e8ed, #d2d2d7); }
.vc-line--lg { width: 70%; height: 22px; background: linear-gradient(90deg, #1d1d1f, #6e6e73); }
.vc-line--md { width: 50%; }
.vc-line--sm { width: 35%; margin-top: auto; }
.vc-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 12px 0;
}
.vc-box {
    aspect-ratio: 1.4 / 1;
    background: linear-gradient(135deg, #f5f5f7, #e8e8ed);
    border-radius: 10px;
}

/* ---------- BUTTONS ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    padding: 0 28px;
    border-radius: 25px;
    border: 0;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: -0.1px;
    transition: transform .2s var(--ease), background .2s var(--ease), color .2s var(--ease);
}
.btn--primary { background: var(--c-text); color: #fff; }
.btn--primary:hover { background: #0a0a0a; transform: scale(1.02); }
.btn--primary:active { transform: scale(0.98) translateY(1px); background: #0a0a0a; }
.btn--ghost {
    background: transparent;
    color: var(--c-text);
    border: 1px solid var(--c-border);
}
.btn--ghost:hover { background: var(--c-bg-alt); }
.btn--ghost:active { transform: scale(0.98) translateY(1px); }
.btn--full { width: 100%; }

/* ---------- STATS ---------- */
.stats {
    padding: 60px 0;
    border-top: 1px solid var(--c-border-soft);
    border-bottom: 1px solid var(--c-border-soft);
    background: var(--c-bg-alt);
}
.stats__inner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}
.stat { text-align: center; }
.stat__num {
    display: block;
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--c-text);
    line-height: 1;
    margin-bottom: 10px;
}
.stat__label {
    font-size: 14px;
    color: var(--c-text-muted);
    font-weight: 400;
}

/* ---------- SECTION HEAD ---------- */
.section__head {
    text-align: center;
    margin-bottom: 72px;
}
.eyebrow {
    font-size: 14px;
    font-weight: 600;
    color: var(--c-text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 0 0 14px;
}
.section__title {
    font-size: clamp(32px, 4.5vw, 52px);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin: 0;
    color: var(--c-text);
}
.muted { color: var(--c-text-light); font-weight: 600; }

/* ---------- SERVICES ---------- */
.services {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
.service {
    background: #fff;
    border: 1px solid var(--c-border-soft);
    border-radius: var(--radius-lg);
    padding: 36px 32px;
    transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.service:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px rgba(0,0,0,0.06);
    border-color: var(--c-border);
}
.service__icon {
    width: 52px; height: 52px;
    background: var(--c-bg-alt);
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--c-text);
    margin-bottom: 22px;
}
.service h3 {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.4px;
    margin: 0 0 10px;
}
.service p {
    margin: 0;
    color: var(--c-text-soft);
    font-size: 15.5px;
    line-height: 1.55;
}

/* ---------- PROCESO ---------- */
.process {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}
.process__step {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 36px 28px;
    position: relative;
}
.process__num {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: var(--c-text-light);
    letter-spacing: -0.5px;
    margin-bottom: 16px;
}
.process__step h3 {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.3px;
    margin: 0 0 8px;
}
.process__step p {
    margin: 0;
    color: var(--c-text-soft);
    font-size: 14.5px;
    line-height: 1.55;
}

/* ---------- NOVEDADES (últimos posts del blog) ---------- */
.news {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.news-card {
    background: #fff;
    border: 1px solid var(--c-border-soft);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px rgba(0,0,0,0.06);
    border-color: var(--c-border);
}
.news-card__thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 9;
    background-color: var(--c-bg-alt);
    background-size: cover;
    background-position: center;
    color: var(--c-text-light);
    transition: opacity .2s var(--ease);
}
.news-card__thumb:hover { opacity: .92; }
.news-card--no-image .news-card__thumb {
    background: linear-gradient(135deg, #f5f5f7, #e8e8ed);
}
.news-card__body {
    padding: 26px 26px 28px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.news-card__meta {
    margin: 0 0 10px;
    font-size: 13px;
    color: var(--c-text-muted);
    display: flex;
    gap: 8px;
    align-items: center;
}
.news-card__title {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.4px;
    line-height: 1.25;
    margin: 0 0 12px;
    color: var(--c-text);
}
.news-card__title a {
    transition: color .2s var(--ease);
}
.news-card__title a:hover { color: var(--c-text-soft); }
.news-card__excerpt {
    margin: 0 0 18px;
    color: var(--c-text-soft);
    font-size: 15px;
    line-height: 1.55;
    flex: 1;
}
.news-card__read {
    align-self: flex-start;
    font-size: 14px;
    font-weight: 500;
    color: var(--c-text);
    border-bottom: 1px solid var(--c-border);
    padding-bottom: 2px;
    transition: border-color .2s var(--ease);
}
.news-card__read:hover { border-color: var(--c-text); }
.news__cta {
    text-align: center;
    margin-top: 48px;
}

/* ---------- CONTACTO ---------- */
.contact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}
.contact__intro .section__title { text-align: left; }
.contact__intro .eyebrow { text-align: left; }
.contact__text {
    color: var(--c-text-soft);
    font-size: 17px;
    line-height: 1.55;
    margin-top: 20px;
    max-width: 460px;
}
.contact__text a {
    color: var(--c-text);
    border-bottom: 1px solid var(--c-border);
    transition: border-color .2s var(--ease);
}
.contact__text a:hover { border-color: var(--c-text); }

.contact__form {
    display: flex;
    flex-direction: column;
    gap: 18px;
    background: #e8e8ed;
    padding: 38px;
    border-radius: var(--radius-lg);
}
.field { display: flex; flex-direction: column; gap: 8px; }
.field label {
    font-size: 13.5px;
    font-weight: 500;
    color: var(--c-text-soft);
}
.opt { color: var(--c-text-light); font-weight: 400; }
.field input,
.field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--c-border);
    border-radius: 10px;
    background: #fff;
    font-family: inherit;
    font-size: 15.5px;
    color: var(--c-text);
    transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field input:focus,
.field textarea:focus {
    outline: 0;
    border-color: var(--c-text);
    box-shadow: 0 0 0 4px rgba(29,29,31,0.08);
}
.field textarea { resize: vertical; min-height: 120px; }
.hp {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    overflow: hidden;
}
.form__status {
    margin: 8px 0 0;
    font-size: 14px;
    min-height: 20px;
    text-align: center;
}
.form__status.is-ok { color: #047d3a; }
.form__status.is-error { color: #b3261e; }

/* ---------- FOOTER ---------- */
.footer {
    background: var(--c-bg-dark);
    color: #a1a1a6;
    padding: 70px 0 30px;
}
.footer__inner {
    display: grid;
    grid-template-columns: 1.3fr 2fr;
    gap: 60px;
    padding-bottom: 50px;
    border-bottom: 1px solid #2c2c2e;
}
.footer__brand img { filter: invert(1) brightness(2) grayscale(1); }
.footer__brand p {
    margin: 16px 0 0;
    font-size: 14px;
    line-height: 1.5;
    color: #86868b;
    max-width: 280px;
}
.footer__cols {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
.footer__cols h4 {
    font-size: 13px;
    font-weight: 600;
    color: #f5f5f7;
    margin: 0 0 14px;
    letter-spacing: -0.1px;
}
.footer__cols a {
    display: block;
    font-size: 13.5px;
    color: #86868b;
    margin-bottom: 8px;
    transition: color .2s var(--ease);
}
.footer__cols a:hover { color: #f5f5f7; }
.footer__bottom {
    padding-top: 28px;
    text-align: center;
    font-size: 12.5px;
    color: #6e6e73;
}
.footer__bottom p { margin: 0; }

/* ====================================================
   SCROLL STORY (video + servicios — sticky Apple-style)
   ==================================================== */

/* La sección es alta para dar recorrido al scroll.
   La altura real la fija JS con: section.style.height */
.scroll-story {
    position: relative;
    border-top: 1px solid var(--c-border-soft);
}

/* El inner sticky ocupa exactamente 100vh y no se mueve */
.scroll-story__sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: var(--c-bg);
}

/* Grid 50/50 centrado */
.scroll-story__inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 32px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 72px;
    align-items: center;
    width: 100%;
}

/* ---- Columna izquierda: video ---- */
.scroll-story__media {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Contenido en portrait: ancho auto, altura controlada */
.scroll-story__video {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 68vh;
    object-fit: contain;
    border-radius: 20px;
}

/* ---- Columna derecha: panel ---- */
.scroll-story__panel {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.scroll-story__eyebrow {
    text-align: left;
    margin-bottom: 28px;
}

/* Contenedor de los items: todos superpuestos (position: absolute) */
.scroll-story__slots {
    position: relative;
    height: 240px; /* espacio fijo para el contenido del item más largo */
    margin-bottom: 36px;
}

/* Todos los items superpuestos; solo .is-active visible */
.story-item {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
    pointer-events: none;
}
.story-item.is-active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.story-item__icon {
    width: 40px;
    height: 40px;
    background: var(--c-bg-alt);
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--c-text);
    margin-bottom: 18px;
    flex-shrink: 0;
}

.story-item__title {
    font-size: clamp(22px, 2.4vw, 32px);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin: 0 0 12px;
    color: var(--c-text);
}

.story-item__text {
    margin: 0;
    font-size: 16px;
    color: var(--c-text-soft);
    line-height: 1.65;
    max-width: 420px;
}

/* ---- Pie: contador + dots + flechitas ---- */
.scroll-story__footer {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 4px;
}

.scroll-story__count {
    font-size: 13px;
    color: var(--c-text-muted);
    font-weight: 500;
    letter-spacing: 0.3px;
    min-width: 48px;
}
.count-current {
    font-size: 17px;
    font-weight: 700;
    color: var(--c-text);
    letter-spacing: -0.5px;
}

.scroll-story__dots {
    display: flex;
    gap: 6px;
    align-items: center;
}
.sdot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--c-border);
    transition: background 0.3s var(--ease), transform 0.3s var(--ease);
}
.sdot.is-active {
    background: var(--c-text);
    transform: scale(1.5);
}

/* Flechitas de navegación */
.scroll-story__arrows {
    display: flex;
    gap: 8px;
    align-items: center;
}
.story-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px; height: 34px;
    border-radius: 50%;
    border: 1px solid var(--c-border);
    background: transparent;
    color: var(--c-text);
    font-size: 15px;
    transition: background .2s var(--ease), border-color .2s var(--ease), opacity .2s var(--ease);
}
.story-arrow:hover {
    background: var(--c-bg-alt);
    border-color: var(--c-text);
}
.story-arrow:disabled {
    opacity: 0.25;
    cursor: default;
    pointer-events: none;
}

/* ====================================================
   RESPONSIVE
   ==================================================== */
@media (max-width: 1024px) {
    .hero__inner { grid-template-columns: 1fr; gap: 56px; }
    .hero__text { text-align: center; }
    .hero__actions { justify-content: center; }
    .hero__subtitle { max-width: 560px; margin-left: auto; margin-right: auto; }
    .hero__visual { max-width: 640px; margin: 0 auto; }

    /* Scroll story: apilado en tablet */
    .scroll-story__sticky { height: auto; padding: 60px 0; position: relative; top: auto; }
    .scroll-story__inner { grid-template-columns: 1fr; gap: 40px; }
    .scroll-story__media { justify-content: center; }
    .scroll-story__video { max-height: 50vh; }
    .scroll-story__slots { height: auto; position: relative; }
    .story-item { position: relative; inset: auto; opacity: 1; transform: none; pointer-events: auto; display: none; }
    .story-item.is-active { display: flex; }
}
@media (max-width: 920px) {
    .services { grid-template-columns: repeat(2, 1fr); }
    .process { grid-template-columns: repeat(2, 1fr); }
    .news { grid-template-columns: 1fr 1fr; }
    .stats__inner { grid-template-columns: repeat(2, 1fr); gap: 36px; }
    .contact { grid-template-columns: 1fr; gap: 40px; }
    .footer__inner { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 640px) {
    .section { padding: 80px 0; }
    .section__inner, .nav__inner, .hero__inner, .stats__inner, .footer__inner { padding: 0 20px; }
    .nav__menu, .nav__cta { display: none; }
    .nav__burger { display: flex; }
    .nav__menu.is-open {
        display: flex;
        position: absolute;
        top: 64px;
        left: 0; right: 0;
        background: #fff;
        flex-direction: column;
        padding: 24px 28px;
        gap: 20px;
        border-bottom: 1px solid var(--c-border-soft);
    }
    .hero { padding: 64px 0 48px; }
    .hero__actions { flex-direction: column; align-items: stretch; gap: 10px; }
    .btn { width: 100%; }
    .services { grid-template-columns: 1fr; }
    .process { grid-template-columns: 1fr; }
    .news { grid-template-columns: 1fr; }
    .news-card:first-child { grid-row: auto; }
    .news-card:first-child .news-card__thumb { aspect-ratio: 16 / 9; min-height: unset; flex: unset; }
    .footer__cols { grid-template-columns: 1fr; gap: 28px; }
    .contact__form { padding: 24px; }
    .visual-card__body { padding: 24px; }
}

/* ====================================================
   ANIMACIONES on-scroll
   ==================================================== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.fade-in.is-visible {
    opacity: 1;
    transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .fade-in { opacity: 1; transform: none; }
}
