        *,
        *::before,
        *::after {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        :root {
            --kraft: #c8a97e;
            --kraft-light: #e8d5b0;
            --kraft-pale: #f5ead6;
            --kraft-dark: #8b6914;
            --ink: #2c1f0e;
            --ink-soft: #5c4a2a;
            --tape: #d4c97a;
            --tape-blue: #a8c4d4;
            --shadow: rgba(44, 31, 14, 0.18);
            --red-clip: #c0392b;
            --blue-sp :#01426A;
            --yellow-sp:#ffb300
        }

        body {
            background-color: #01426A;
            background-image:
                url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23noise)' opacity='0.08'/%3E%3C/svg%3E");
            font-family: 'DM Sans', sans-serif;
            color: var(--ink);
            min-height: 100vh;
            overflow-x: hidden;
        }
        html{
            overflow-x: hidden;
        }

        /* Texture overlay */
        body::before {
            content: '';
            position: fixed;
            inset: 0;
            background-image: repeating-linear-gradient(0deg,
                    transparent,
                    transparent 28px,
                    rgba(139, 105, 20, 0.04) 28px,
                    rgba(139, 105, 20, 0.04) 29px);
            pointer-events: none;
            z-index: 0;
        }

        /* ── HEADER ── */
        header {
            position: relative;
            text-align: center;
            padding: 3.5rem 2rem 2rem;
            z-index: 1;
            justify-content: center;
            display: flex;
        }
        .principal_image{
            width: 900px;
        }

        .header-star__1 {
            position: absolute;
            top: 35%;
            left: -130px;
            width: 450px;
            height: 450px;
            background: #003d60;
            clip-path: polygon(50% 0%, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0% 50%, 40% 40%);
            transform: rotate(-5deg);
        }

        .header-star__2 {
            position: absolute;
            top: 0%;
            left: 60%;
            width: 150px;
            height: 150px;
            background: #003d60;
            clip-path: polygon(50% 0%, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0% 50%, 40% 40%);
            transform: rotate(-5deg);
        }
        .header-star__3 {
            position: absolute;
            top: 57%;
            right: -5%;
            width: 300px;
            height: 300px;
            background: #003d60;
            clip-path: polygon(50% 0%, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0% 50%, 40% 40%);
            transform: rotate(5deg);
        }

     
        

        .brand-tag {
            display: inline-block;
            background: var(--ink);
            color: var(--kraft-pale);
            font-family: 'Caveat', cursive;
            font-size: 0.85rem;
            letter-spacing: 0.2em;
            text-transform: uppercase;
            padding: 0.3rem 1.2rem;
            border-radius: 2px;
            margin-bottom: 1rem;
            transform: rotate(-1deg);
        }

        h1 {
            font-family: 'Playfair Display', serif;
            font-size: clamp(2.8rem, 6vw, 5rem);
            font-weight: 700;
            color: var(--ink);
            line-height: 1;
            position: relative;
            display: inline-block;
        }

        h1 em {
            font-style: italic;
            color: var(--kraft-dark);
        }

        .subtitle {
            font-family: 'Caveat', cursive;
            font-size: 1.3rem;
            color: var(--ink-soft);
            margin-top: 0.6rem;
            transform: rotate(-0.5deg);
            display: inline-block;
        }

        /* Decorative brush stroke under title */
        .brush-line {
            width: 180px;
            height: 12px;
            background: var(--kraft-dark);
            margin: 1rem auto 0;
            border-radius: 50%;
            opacity: 0.3;
            clip-path: ellipse(50% 50% at 50% 50%);
            transform: scaleX(1.4) scaleY(0.4) rotate(-1deg);
        }


        /* ── GALLERY ── */
        .gallery {
            position: relative;
            z-index: 1;
            max-width: 1300px;
            margin: 0 auto;
            padding: 1rem 2.5rem 5rem;
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
            gap: 3.5rem 2.5rem;
        }

        /* ── CARD ── */
        .card {
            position: relative;
            cursor: pointer;
            transition: transform 0.3s ease;
        }

        .card:nth-child(odd) {
            transform: rotate(-1.5deg);
        }

        .card:nth-child(even) {
            transform: rotate(1.2deg);
        }

        .card:nth-child(3n) {
            transform: rotate(-0.5deg) translateY(-6px);
        }

        .card:hover {
            transform: rotate(0deg) translateY(-8px) scale(1.03);
            z-index: 10;
        }

        /* Tape decoration */
        .tape {
            position: absolute;
            top: -14px;
            left: 50%;
            transform: translateX(-50%) rotate(-2deg);
            width: 70px;
            height: 22px;
            background: var(--tape);
            opacity: 0.78;
            border-radius: 1px;
            z-index: 5;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
        }

        .card:nth-child(3n+1) .tape {
            background: var(--tape-blue);
            transform: translateX(-60%) rotate(2deg);
        }

        .card:nth-child(3n+2) .tape {
            background: #d4aa7a;
            transform: translateX(-40%) rotate(-3deg);
        }

        /* Paper backing */
        .paper {
            background: #faf4e8;
            padding: 0.9rem 0.9rem 1.4rem;
            box-shadow:
                0 4px 6px var(--shadow),
                0 12px 28px rgba(44, 31, 14, 0.14),
                inset 0 0 0 1px rgba(200, 169, 126, 0.3);
            position: relative;
        }

        .paper::after {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.35) 0%, transparent 50%);
            pointer-events: none;
        }

        /* Image container */
        .img-wrap {
            width: 100%;
            aspect-ratio: 3/4;
            background: #fff;
            overflow: hidden;
            position: relative;
            border: 1px solid rgba(200, 169, 126, 0.4);
        }

        .img-wrap img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
            transition: transform 0.4s ease;
            filter: contrast(1.05);
        }

        .card:hover .img-wrap img {
            transform: scale(1.04);
        }

        /* Difficulty dots */
        .difficulty {
            position: absolute;
            top: 8px;
            right: 8px;
            display: flex;
            gap: 3px;
            z-index: 3;
        }

        .dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: var(--kraft-dark);
            opacity: 0.2;
        }

        .dot.active {
            opacity: 1;
            background: var(--red-clip);
        }

        /* Card info */
        .card-info {
            padding: 0.7rem 0.2rem 0.2rem;
        }

        .card-title {
            font-size: 1.25rem;
            font-weight: 700;
            color: var(--blue-sp);
            display: block;
            line-height: 1.2;
            font-style: normal;
        }

        .card-meta {
            font-size: 0.72rem;
            color: var(--ink-soft);
            letter-spacing: 0.08em;
            text-transform: uppercase;
            margin-top: 0.2rem;
        }

        /* Download count */
        .download-count {
            font-family: 'Caveat', cursive;
            font-size: 0.95rem;
            color: var(--ink-soft);
            margin-top: 0.3rem;
            display: none;
        }

        .download-count::before {
            content: '↓ ';
        }

        /* Download button */
        .btn-download {
            display: block;
            width: 100%;
            margin-top: 0.8rem;
            background: var(--yellow-sp);
            color: #000;
            padding: 0.65rem 1rem;
            font-size: 1.1rem;
            letter-spacing: 0.05em;
            cursor: pointer;
            transition: background 0.2s, transform 0.15s;
            position: relative;
            overflow: hidden;
            border: 1px solid #000;
            border-radius: 10px;
            font-weight: 500;
            font-style: normal;
        }

        .btn-download:hover {
            background: var(--kraft-dark);
            transform: translateY(-1px);
            color: #fff;
        }

        .btn-download:active {
            transform: scale(0.98);
        }

        /* Ripple effect on button */
        .btn-download::after {
            content: '';
            position: absolute;
            inset: 0;
            background: rgba(255, 255, 255, 0.1);
            transform: scaleX(0);
            transform-origin: left;
            transition: transform 0.3s;
        }

        .btn-download:hover::after {
            transform: scaleX(1);
        }

        /* ── LIGHTBOX ── */
        .lightbox {
            display: none;
            position: fixed;
            inset: 0;
            z-index: 1000;
            align-items: center;
            justify-content: center;
            padding: 2rem;
            backdrop-filter: blur(4px);
        }

        .lightbox.open {
            display: flex;
        }

        .lightbox-paper {
            background: #faf4e8;
            padding: 1.2rem 1.2rem 2rem;
            max-width: 520px;
            width: 100%;
            position: relative;
            box-shadow: 0 20px 60px rgba(44, 31, 14, 0.5);
            animation: popIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
        }

        @keyframes popIn {
            from {
                transform: scale(0.85) rotate(-2deg);
                opacity: 0;
            }

            to {
                transform: scale(1) rotate(0deg);
                opacity: 1;
            }
        }

        .lightbox-tape {
            position: absolute;
            top: -16px;
            left: 50%;
            transform: translateX(-50%) rotate(-1.5deg);
            width: 90px;
            height: 26px;
            background: var(--tape);
            opacity: 0.8;
            border-radius: 2px;
        }

        .lightbox-img {
            width: 100%;
            aspect-ratio: 3/4;
            object-fit: contain;
            background: #fff;
            border: 1px solid rgba(200, 169, 126, 0.4);
            display: block;
        }

        .lightbox-title {
            font-size: 1.5rem;
            margin-top: 1rem;
            color: var(--blue-sp);
            font-weight: 500;
            font-style: normal;
        }

        .lightbox-sub {
            font-family: 'Caveat', cursive;
            color: var(--ink-soft);
            font-size: 1rem;
            margin-top: 0.2rem;
        }
        .lightbox-btn {
            display: block;
            width: 100%;
            margin-top: 1.2rem;
            border: none;
            padding: 0.9rem;
            font-size: 1.3rem;
            cursor: pointer;
            transition: background 0.2s;
            letter-spacing: 0.05em;
            background-color: var(--yellow-sp);
            color: #000;
            font-weight: 500;
            font-style: normal;
            border: 1px solid #000;
            border-radius: 10px;
        }

        .lightbox-btn:hover {
            background: var(--kraft-dark);
            color: #fff;
        }

        .lightbox-close {
            position: absolute;
            top: 0.5rem;
            right: 0.7rem;
            background: none;
            border: none;
            font-size: 1.6rem;
            cursor: pointer;
            color: var(--ink-soft);
            font-family: 'Caveat', cursive;
            line-height: 1;
        }

        /* ── FOOTER ── */
        footer {
            position: relative;
            z-index: 1;
            text-align: center;
            font-family: 'Caveat', cursive;
            font-size: 1.05rem;
            color: var(--ink-soft);
             line-height: 0;        /* ← esto elimina el espacio fantasma */
            overflow: hidden;   
        }
        .footer_image{
            width: 600px;
            z-index: 3;
            display: block;
            margin-left: auto;
            margin-right: auto;
            position: relative;
            margin-bottom: 0;
        }
        .footer-star__4 {
            position: absolute;
            top: 0;
            left: 15%;
            width: 300px;
            height: 300px;
            background: #003d60;
            clip-path: polygon(50% 0%, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0% 50%, 40% 40%);
            transform: rotate(-10deg);
        }
        .footer-star__5 {
            position: absolute;
            top: 22%;
            right: 10%;
            width: 500px;
            height: 500px;
            background: #003d60;
            clip-path: polygon(50% 0%, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0% 50%, 40% 40%);
            transform: rotate(5deg);
        }

        /* Toast */
        .toast {
            position: fixed;
            bottom: 2rem;
            left: 50%;
            transform: translateX(-50%) translateY(4rem);
            background: var(--ink);
            color: var(--kraft-pale);
            font-family: 'Caveat', cursive;
            font-size: 1.15rem;
            padding: 0.7rem 2rem;
            border-radius: 2px;
            z-index: 2000;
            transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
            pointer-events: none;
        }

        .toast.show {
            transform: translateX(-50%) translateY(0);
        }

        /* Paperclip decorative SVG */
        .clip {
            position: absolute;
            top: -6px;
            right: 22px;
            z-index: 6;
        }

        /* ── MOBILE (≤ 600px) ── */
        @media (max-width: 600px) {
            header {
                padding: 2rem 1.2rem 1.5rem;
            }

            h1 {
                font-size: 2.6rem;
            }

            .subtitle {
                font-size: 1.1rem;
            }

            /* Single column, tighter */
            .gallery {
                grid-template-columns: repeat(2, 1fr);
                padding: 1rem 1rem 5rem;
                gap: 2.8rem 1.2rem;
            }

            /* Reduce rotation on mobile so cards don't clip */
            .card:nth-child(odd) {
                transform: rotate(-1deg);
            }

            .card:nth-child(even) {
                transform: rotate(0.8deg);
            }

            .card:nth-child(3n) {
                transform: rotate(-0.4deg) translateY(-4px);
            }

            .card:hover {
                transform: rotate(0deg) translateY(-4px) scale(1.02);
            }

            .card-title {
                font-size: 1.05rem;
            }

            .card-meta {
                font-size: 0.65rem;
            }

            .download-count {
                font-size: 0.85rem;
            }

            /* Bigger tap target for download button */
            .btn-download {
                padding: 0.75rem 0.5rem;
                font-size: 1rem;
            }

            /* Lightbox full-screen on mobile */
            .lightbox {
                align-items: flex-end;
                padding: 0;
            }

            .lightbox-paper {
                max-width: 100%;
                width: 100%;
                border-radius: 12px 12px 0 0;
                padding: 1.5rem 1.2rem 2.5rem;
                animation: slideUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
            }

            .principal_image{
                width: 300px;
            }

            .header-star__1{
                left: 0px;
                width: 80px;
                height: 80px;
            }
            .header-star__2{
                width: 80px;
                height: 80px;
                left: 73%;
            }
            
            .header-star__3{
                right: -5%;
                width: 80px;
                height: 80px;
            }

            .footer_image{
                width: 200px;
            }
            .footer-star__4{
                left: 7%;
                width: 80px;
                height: 80px;
            }
            .footer-star__5{
                right: 4%;
                width: 80px;
                height: 80px;
            }

            @keyframes slideUp {
                from {
                    transform: translateY(100%);
                }

                to {
                    transform: translateY(0);
                }
            }

            .lightbox-img {
                max-height: 50vh;
                object-fit: contain;
            }

            .lightbox-btn {
                padding: 1rem;
                font-size: 1.4rem;
            }

            .lightbox-close {
                font-size: 2rem;
                padding: 0.3rem 0.6rem;
                top: 0.6rem;
                right: 0.8rem;
            }

            /* Toast bottom safe area */
            .toast {
                bottom: 1.5rem;
                font-size: 1rem;
                padding: 0.6rem 1.4rem;
                width: 90%;
                text-align: center;
            }

            .instructions {
                font-size: 1rem;
                padding: 0.75rem 0.5rem;
            }
        }

        /* ── TABLET (601px – 900px) ── */
        @media (min-width: 601px) and (max-width: 900px) {
            .gallery {
                grid-template-columns: repeat(2, 1fr);
                padding: 1rem 2rem 5rem;
                gap: 3rem 2rem;
            }

            .lightbox-paper {
                max-width: 420px;
            }
        }
