/* ==========================================
   JENSSY STERLING · ESCRITORA
   ========================================== */

/* ---------- RESET ---------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #faf8f9;
    color: #1a1a1a;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ---------- VARIABLES ---------- */
:root {
    --primary: #e85d8a;
    --primary-dark: #c94a74;
    --primary-light: #f5d4df;
    --secondary: #b8a0d4;
    --text: #1a1a1a;
    --text-light: #555;
    --text-muted: #888;
    --bg-white: #ffffff;
    --bg-soft: #faf8f9;
    --border: #eee;
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 16px 48px rgba(0, 0, 0, 0.10);
    --radius: 20px;
    --radius-sm: 12px;
    --transition: all 0.25s ease;
}

/* ---------- TIPOGRAFÍA ---------- */
h1,
h2,
h3 {
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

h1 {
    font-size: 3.6rem;
}
h2 {
    font-size: 2rem;
}
h3 {
    font-size: 1.25rem;
}

p {
    color: var(--text-light);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    display: block;
}

/* ---------- CONTENEDOR ---------- */
.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ---------- SECCIONES ---------- */
.section {
    padding: 4rem 0;
}

.section-alt {
    background: var(--bg-white);
}

.section-title {
    font-size: 2rem;
    text-align: center;
    color: var(--text);
    margin-bottom: 0.2rem;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 2.5rem;
}

/* ==========================================
   SCROLLBAR PERSONALIZADA
   ========================================== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* ==========================================
   HEADER / NAVEGACIÓN
   ========================================== */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0.8rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text);
}

.logo-mark {
    color: var(--primary);
    font-size: 1.2rem;
}

.logo-name {
    letter-spacing: -0.02em;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4.5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.menu-toggle span {
    width: 26px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(4.5px, 4.5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(4.5px, -4.5px);
}

.nav-list {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-list a {
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-light);
    transition: var(--transition);
}

.nav-list a:hover {
    color: var(--text);
    background: var(--bg-soft);
}


/* ==========================================
   HERO
   ========================================== */
.hero {
    padding: 4rem 1.5rem;
    text-align: center;
    position: relative;
    background: linear-gradient(170deg, #fcf6f8 0%, #f5edf0 100%);
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 640px;
    margin: 0 auto;
}

.hero-eyebrow {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--primary);
    background: var(--primary-light);
    padding: 0.2rem 1rem;
    border-radius: 50px;
    margin-bottom: 0.75rem;
}

.hero h1 {
    font-size: 3.6rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.hero h1 .accent {
    color: var(--primary);
}

.hero-description {
    font-size: 1.15rem;
    color: var(--text-light);
    max-width: 480px;
    margin: 0 auto;
    font-weight: 350;
    font-style: italic;
}

.hero-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin: 1.5rem auto 0;
    width: 120px;
}

.hero-divider span {
    display: block;
    height: 1px;
    background: var(--border);
    flex: 1;
}

.hero-divider span:first-child,
.hero-divider span:last-child {
    flex: 2;
}

.hero-divider span:nth-child(2) {
    flex: 0;
    color: var(--primary);
    font-size: 0.7rem;
    background: none;
    height: auto;
}

.hero-ornaments {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}

.ornament {
    position: absolute;
    font-size: 1.4rem;
    color: var(--primary);
    opacity: 0.10;
    animation: float 8s ease-in-out infinite;
}

@keyframes float {
    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-16px) rotate(4deg);
    }
}


/* ==========================================
   HISTORIAS
   ========================================== */
.stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.story-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.story-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: transparent;
}

.story-cover {
    position: relative;
    background: var(--bg-soft);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
}

.story-cover img {
    max-height: 200px;
    object-fit: contain;
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.story-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.2rem 0.8rem;
    border-radius: 50px;
    background: var(--primary);
    color: #fff;
}

.story-badge.finished {
    background: #2e7d32;
}

.story-badge.new {
    background: #6c5ce7;
}

.story-coming .story-cover {
    background: linear-gradient(135deg, #f0edf5 0%, #e8e4f0 100%);
}

.story-icon {
    font-size: 4rem;
    opacity: 0.3;
}

.gradient-cover {
    background: linear-gradient(135deg, #f0edf5 0%, #e8e4f0 100%);
}

.story-body {
    padding: 1.5rem;
}

.story-body h3 {
    font-size: 1.3rem;
    color: var(--text);
    margin-bottom: 0.2rem;
}

.story-meta {
    display: flex;
    gap: 0.8rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.8rem;
}

/* MEJORA: Truncado de texto para descripciones largas */
.story-body p {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1.2rem;
    max-height: calc(1.6em * 4); /* 4 líneas */
    overflow: hidden;
    position: relative;
}

/* Degradado al final */
.story-body p::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 60%;
    height: 1.6em;
    background: linear-gradient(to right, transparent, var(--bg-white));
}

.btn {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateX(4px);
}

.btn-disabled {
    background: var(--border);
    color: var(--text-muted);
    cursor: default;
}


/* ==========================================
   PROYECTOS
   ========================================== */
.projects-list {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.project-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.2rem 1.5rem;
    background: var(--bg-white);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.project-item:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow);
}

.project-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-light);
    line-height: 1;
    min-width: 48px;
    opacity: 0.5;
}

.project-info h3 {
    font-size: 1.1rem;
    color: var(--text);
    margin-bottom: 0.1rem;
}

.project-info p {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 0.4rem;
}

.project-tags {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.tag {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.7rem;
    border-radius: 50px;
    background: var(--bg-soft);
    color: var(--text-muted);
}

.tag-done {
    background: #e8f5e9;
    color: #2e7d32;
}

.tag-progress {
    background: #e3f2fd;
    color: #0d47a1;
}

.tag-idea {
    background: #f5f5f5;
    color: #616161;
}

.tag-light {
    background: var(--bg-soft);
    color: var(--text-muted);
}


/* ==========================================
   PROCESO
   ========================================== */
.process-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.process-step {
    background: var(--bg-white);
    padding: 2rem 1.5rem;
    border-radius: var(--radius);
    text-align: center;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.process-step:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: transparent;
}

.step-icon {
    font-size: 2.6rem;
    display: block;
    margin-bottom: 0.5rem;
}

.process-step h3 {
    font-size: 1.1rem;
    color: var(--text);
    margin-bottom: 0.3rem;
}

.process-step p {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.6;
}


/* ==========================================
   PLATAFORMAS
   ========================================== */
.platforms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.platform-card {
    background: var(--bg-white);
    padding: 2rem 1.5rem;
    border-radius: var(--radius);
    text-align: center;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.platform-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-light);
}

.platform-icon {
    font-size: 2.8rem;
    display: block;
    margin-bottom: 0.3rem;
}

.platform-card h3 {
    font-size: 1.1rem;
    color: var(--text);
    margin-bottom: 0.1rem;
}

.platform-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
}

.platform-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    transition: var(--transition);
}

.platform-card:hover .platform-link {
    transform: translateX(4px);
    color: var(--primary-dark);
}


/* ==========================================
   MOODBOARD
   ========================================== */
.moodboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.moodboard-item {
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: var(--transition);
    aspect-ratio: 1 / 1;
}

.moodboard-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.moodboard-item:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-hover);
    border-color: transparent;
}

.moodboard-item:hover img {
    transform: scale(1.04);
}


/* ==========================================
   FOOTER
   ========================================== */

.footer {
    background: #1a1a1a;
    color: rgba(255, 255, 255, 0.7);
    padding: 2.5rem 1.5rem 2rem;
    text-align: center;
}

.footer-inner {
    max-width: 820px;
    margin: 0 auto;
}

.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin-bottom: 0.2rem;
}

.footer-mark {
    color: var(--primary);
    font-size: 1rem;
}

.footer-name {
    font-weight: 600;
    font-size: 1.2rem;
    color: #fff;
}

.footer-tagline {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
    margin-bottom: 1.5rem;
}

/* SECCIÓN DEL FOOTER (Plataformas / Redes Sociales) */
.footer-section {
    margin-bottom: 1.2rem;
}

.footer-section:last-of-type {
    margin-bottom: 1.5rem;
}

.footer-label {
    display: block;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.25);
    margin-bottom: 0.5rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.3rem 0.5rem;
}

.footer-links a {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    padding: 0.2rem 0.8rem;
    border-radius: 50px;
    transition: var(--transition);
    text-decoration: none;
}

.footer-links a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

/* Línea divisoria entre secciones (opcional) */
.footer-section + .footer-section {
    position: relative;
}

.footer-section + .footer-section::before {
    content: '';
    display: block;
    width: 40px;
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
    margin: 0 auto 1rem auto;
}

.footer-bottom {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* ==========================================
   ANIMACIONES (NUEVO)
   ========================================== */

@keyframes lightboxFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 🔥 MEJORA: Clase para animaciones al hacer scroll */
.animate-in {
    opacity: 1 !important;
    transform: translateY(0) !important;
}


/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 820px) {
    h1 {
        font-size: 2.8rem;
    }
    .hero h1 {
        font-size: 2.8rem;
    }
    .stories-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .menu-toggle {
        display: flex;
    }

    .nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-white);
        border-bottom: 1px solid var(--border);
        padding: 1rem 1.5rem;
        display: none;
        box-shadow: var(--shadow);
    }

    .nav.is-open {
        display: block;
    }

    .nav-list {
        flex-direction: column;
        align-items: stretch;
        gap: 0.25rem;
    }

    .nav-list a {
        text-align: center;
        padding: 0.6rem;
        border-radius: var(--radius-sm);
    }

    .hero {
        padding: 3rem 1rem;
    }

    .hero h1 {
        font-size: 2.4rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .stories-grid {
        grid-template-columns: 1fr;
    }

    .story-cover {
        min-height: 180px;
        padding: 1rem;
    }

    .story-cover img {
        max-height: 160px;
    }

    .process-grid {
        grid-template-columns: 1fr 1fr;
    }

    .platforms-grid {
        grid-template-columns: 1fr;
    }

    .moodboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .project-item {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }

    .project-number {
        font-size: 1.4rem;
        min-width: auto;
    }

    .footer-links {
        gap: 0.3rem;
    }

    .footer-links a {
        font-size: 0.75rem;
        padding: 0.15rem 0.6rem;
    }

    .footer-bottom {
        font-size: 0.7rem;
        flex-direction: column;
        gap: 0.2rem;
    }
}

@media (max-width: 400px) {
    .hero h1 {
        font-size: 2rem;
    }

    .process-grid {
        grid-template-columns: 1fr;
    }

    .moodboard-grid {
        grid-template-columns: 1fr 1fr;
    }

    .section {
        padding: 2.5rem 0;
    }

    .section-title {
        font-size: 1.6rem;
    }
}