* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --void: #0a0a12;
    --dark: #1a1025;
    --purple: #6b21a8;
    --purple-light: #9333ea;
    --purple-soft: #c084fc;
    --emerald: #059669;
    --emerald-light: #34d399;
    --emerald-dark: #047857;
    --cream: #faf8f5;
    --gold: #fbbf24;
    /* High contrast alternatives */
    --focus-ring: #67e8f9;
    --text-muted: #a3a3a3;
}

html { background: var(--void); }

body {
    font-family: 'Syne', sans-serif;
    background: var(--void);
    color: var(--cream);
    overflow-x: hidden;
    cursor: none;
}

/* ========== ACCESSIBILITY ========== */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--void);
    color: var(--cream);
    padding: 1rem 2rem;
    border: 2px solid var(--focus-ring);
    border-radius: 8px;
    font-weight: 600;
    z-index: 10000;
    text-decoration: none;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 1rem;
    outline: none;
}

/* Global focus styles */
*:focus {
    outline: 2px solid var(--focus-ring);
    outline-offset: 3px;
}

*:focus:not(:focus-visible) {
    outline: none;
}

*:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 3px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .loader { display: none; }
    .cursor, .cursor-trail { display: none; }
    body { cursor: auto; }
}

/* ========== LOADING SCREEN ========== */
.loader {
    position: fixed;
    inset: 0;
    background: var(--void);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-moon {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fefefe 0%, #e0dce8 100%);
    box-shadow: 0 0 60px rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.loader-moon-shadow {
    position: absolute;
    top: 0; right: 0;
    width: 100%; height: 100%;
    background: var(--void);
    border-radius: 50%;
    animation: moonPhase 2s ease-in-out infinite;
}

@keyframes moonPhase {
    0%, 100% { transform: translateX(0%); }
    50% { transform: translateX(100%); }
}

.loader-text {
    margin-top: 2rem;
    font-family: 'Instrument Serif', serif;
    font-style: italic;
    font-size: 1rem;
    color: var(--purple-soft);
    letter-spacing: 0.1em;
}

/* ========== CUSTOM CURSOR ========== */
.cursor {
    position: fixed;
    width: 24px;
    height: 24px;
    pointer-events: none;
    z-index: 10000;
    color: var(--gold);
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease, opacity 0.2s ease;
    opacity: 0;
}

.cursor.visible { opacity: 1; }

.cursor.hovering {
    transform: translate(-50%, -50%) scale(1.5);
    color: var(--emerald-light);
}

.cursor-trail {
    position: fixed;
    width: 8px;
    height: 8px;
    background: var(--purple-soft);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
}

@media (max-width: 768px) {
    body { cursor: auto; }
    .cursor, .cursor-trail { display: none; }
}

/* ========== SOUND TOGGLE ========== */
.sound-toggle {
    position: fixed;
    bottom: 2.5rem;
    left: 3rem;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: none;
    z-index: 100;
    transition: background 0.3s, border-color 0.3s;
}

.sound-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--emerald-light);
}

.sound-toggle svg {
    width: 20px;
    height: 20px;
    color: var(--cream);
}

.sound-toggle .sound-on { display: none; }
.sound-toggle .sound-off { display: block; }
.sound-toggle.playing .sound-on { display: block; }
.sound-toggle.playing .sound-off { display: none; }

@media (max-width: 768px) {
    .sound-toggle { bottom: 1.5rem; left: 1.5rem; cursor: pointer; }
}

/* ========== STARS ========== */
.stars-container {
    position: fixed;
    top: 0; left: 0;
    width: 600%; height: 100%;
    pointer-events: none;
    z-index: 1;
}

.star {
    position: absolute;
    background: var(--cream);
    border-radius: 50%;
}

.star.twinkle { animation: twinkle 3s ease-in-out infinite; }

@keyframes twinkle {
    0%, 100% { opacity: 0.2; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* ========== CLOUDS ========== */
.clouds-container {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 4;
    overflow: visible;
    mix-blend-mode: soft-light;
}

.cloud {
    position: absolute;
    fill: white;
    opacity: 0.6;
    animation: cloudDrift linear infinite;
}

.cloud-1 { top: 10%; left: 100%; width: 180px; animation-duration: 80s; }
.cloud-2 { top: 30%; left: 100%; width: 220px; animation-duration: 100s; animation-delay: -30s; }
.cloud-3 { top: 60%; left: 100%; width: 160px; animation-duration: 70s; animation-delay: -50s; }

@keyframes cloudDrift {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-100vw - 300px)); }
}

/* ========== NAVIGATION ========== */
nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    padding: 2rem 4vw;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    mix-blend-mode: difference;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--cream);
    text-decoration: none;
}

.nav-links { display: flex; gap: 2.5rem; }

.nav-links a {
    color: var(--cream);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.1);
}

.nav-links a:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}

@media (max-width: 768px) {
    nav { 
        padding: 1rem 1rem; 
    }
    .nav-links { 
        gap: 1.5rem; 
    }
}

/* ========== SCROLL PROGRESS ========== */
.scroll-progress {
    position: fixed;
    bottom: 2.5rem; right: 3rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 100;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--cream);
}

.progress-bar {
    width: 80px; height: 2px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%; width: 0%;
    background: linear-gradient(90deg, var(--purple), var(--emerald-light));
}

@media (max-width: 768px) {
    .scroll-progress { display: none; }
}

/* ========== SCROLL CONTAINER ========== */
.scroll-container { width: 100%; }

#main {
    display: flex;
    width: max-content;
}

@media (max-width: 768px) {
    #main { flex-direction: column; width: 100%; }
}

section {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}

/* ========== HERO ========== */
.hero {
    width: 100vw;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, var(--void) 0%, var(--dark) 50%, var(--purple) 100%);
}

.constellation {
    position: absolute;
    top: 10%;
    right: 5%;
    width: 350px;
    height: auto;
    opacity: 0.6;
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2rem;
}

.hero-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    overflow: hidden;
}

.hero-title .title-top {
    font-family: 'Instrument Serif', serif;
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-weight: 400;
    font-style: italic;
    color: var(--emerald-light);
    letter-spacing: 0.3em;
    text-transform: lowercase;
    margin-bottom: 0.5rem;
}

.hero-title .title-main {
    font-family: "Barrio", system-ui;
    font-size: clamp(5rem, 15vw, 12rem);
    font-weight: 400;
    line-height: 0.9;
    color: var(--cream);
    display: flex;
}

.hero-title .title-main .letter {
    display: inline-block;
}

.hero-visual {
    position: relative;
    width: 400px;
    height: 350px;
}

.hero-perri {
    position: absolute;
    width: 300px;
    height: auto;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    filter: drop-shadow(0 10px 40px rgba(0,0,0,0.4));
    z-index: 2;
}

/* ========== ABOUT - MOON + TAROT ========== */
.about {
    width: 100vw;
    overflow: hidden;
}

.about-bg {
    position: absolute;
    inset: 0;
    background: var(--void);
}

.about-content {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 6rem;
}

.moon-reveal {
    display: flex;
    align-items: center;
    justify-content: center;
}

.moon-circle {
    width: 450px;
    height: 450px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fefefe 0%, #f0ecf5 40%, #e0dce8 100%);
    box-shadow: 
        0 0 60px rgba(255, 255, 255, 0.3),
        0 0 120px rgba(147, 51, 234, 0.3),
        inset 0 0 60px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.moon-shadow {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: var(--void);
    border-radius: 50%;
    transform: translateX(0);
}

.moon-text {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 3rem;
    opacity: 0;
}

.moon-text p {
    font-family: 'Instrument Serif', serif;
    font-size: 1.3rem;
    font-style: italic;
    color: var(--void);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.moon-text p:last-child {
    margin-bottom: 0;
    font-size: 1.1rem;
}

.about-tarot {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
}

.about-tarot-title {
    font-family: 'Instrument Serif', serif;
    font-size: 2rem;
    font-weight: 400;
}

.about-tarot-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    max-width: 240px;
}

.about-tarot-card .tarot-card-icon {
    font-size: 2rem;
    color: var(--gold);
    margin-bottom: 0.5rem;
}

.about-tarot-card h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.about-tarot-card .tarot-description {
    font-size: 0.85rem;
    color: rgba(250, 248, 245, 0.85);
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.about-tarot-card .tarot-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--emerald-light);
    margin-bottom: 0.25rem;
}

.about-tarot-card .tarot-time {
    font-size: 0.75rem;
    color: rgba(250, 248, 245, 0.6);
}

.about-tarot .tarot-cta {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--purple-light), var(--emerald));
    color: var(--cream);
    text-decoration: none;
    font-weight: 600;
    border-radius: 50px;
    font-size: 0.9rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.about-tarot .tarot-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(5, 150, 105, 0.4);
}

@media (max-width: 768px) {
    .about-content {
        flex-direction: column;
        gap: 3rem;
    }
    
    .moon-circle { width: 320px; height: 320px; }
    .moon-text { padding: 2rem; }
    .moon-text p { font-size: 1.1rem; }
}

/* ========== GALLERY - SCRAPBOOK ========== */
.gallery {
    width: 150vw;
    overflow: visible;
}

.gallery-bg {
    position: absolute;
    inset: 0;
    background: var(--purple);
}

.scrapbook {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scrap-item {
    position: absolute;
    overflow: hidden;
    padding: 0.5rem;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 4px;
}

.scrap-item:hover {
    transform: scale(1.05) rotate(0deg) !important;
    z-index: 50 !important;
}

.scrap-item:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px var(--focus-ring);
    z-index: 50 !important;
}

.scrap-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.scrap-price {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background: var(--void);
    color: var(--emerald-light);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s, transform 0.3s;
}

.scrap-item:hover .scrap-price {
    opacity: 1;
    transform: translateY(0);
}

/* Scrapbook positions */
.scrap-1 { width: 380px; height: 450px; left: 8%; top: 15%; transform: rotate(-6deg); z-index: 10; }
.scrap-2 { width: 480px; height: 620px; left: 18%; top: 7%; transform: rotate(4deg); z-index: 15; }
.scrap-3 { width: 400px; height: 460px; left: 21%; top: 55%; transform: rotate(-3deg); z-index: 12; }
.scrap-4 { width: 340px; height: 280px; left: 24%; top: 25%; transform: rotate(7deg); z-index: 18; }
.scrap-5 { width: 360px; height: 500px; left: 35%; top: 35%; transform: rotate(-5deg); z-index: 14; }
.scrap-6 { width: 550px; height: 400px; left: 35%; top: 10%; transform: rotate(7deg); z-index: 16; }
.scrap-7 { width: 500px; height: 300px; left: 62%; top: 45%; transform: rotate(-8deg); z-index: 20; }
.scrap-8 { width: 580px; height: 540px; left: 48%; top: 20%; transform: rotate(-4deg); z-index: 17; }

/* ========== FEATURED PRODUCTS ========== */
.featured {
    width: 100vw;
    overflow: hidden;
}

.featured-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, var(--purple) 0%, var(--dark) 100%);
}

.featured-content {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 2rem;
}

.featured-title {
    font-family: 'Instrument Serif', serif;
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 400;
    margin-bottom: 3rem;
}

.highlight {
    color: var(--emerald-light);
    font-style: italic;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto 2rem;
}

.product-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: var(--cream);
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-8px);
    border-color: var(--emerald-light);
}

.product-card:focus-visible {
    outline: none;
    border-color: var(--focus-ring);
    box-shadow: 0 0 0 3px rgba(103, 232, 249, 0.3);
}

.product-image {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: var(--emerald);
    color: var(--cream);
    padding: 0.3rem 0.7rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.product-badge.sold {
    background: var(--purple-light);
}

.product-info {
    padding: 1rem;
    text-align: left;
}

.product-info h3 {
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 0.3rem;
}

.product-price {
    color: var(--emerald-light);
    font-weight: 600;
}

.featured-cta {
    display: inline-block;
    padding: 1rem 2rem;
    border: 2px solid var(--cream);
    color: var(--cream);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 500;
    transition: background 0.3s, color 0.3s, box-shadow 0.3s;
}

.featured-cta:hover {
    background: var(--cream);
    color: var(--void);
}

.featured-cta:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--focus-ring);
}

/* ========== SHOP ========== */
.shop {
    width: 100vw;
    overflow: hidden;
}

.shop-bg {
    position: absolute;
    inset: 0;
    background: var(--void);
}

.shop-stars {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.shop-content {
    position: relative;
    z-index: 10;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.shop-title {
    font-family: 'Instrument Serif', serif;
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 400;
    line-height: 1.1;
}

.shop-subtitle {
    font-size: 1.1rem;
    color: rgba(250, 248, 245, 0.85);
    max-width: 400px;
}

.shop-reviews {
    display: flex;
    gap: 2rem;
    margin: 1.5rem 0;
    list-style: none;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 900px;
}

.shop-review {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    font-family: 'Instrument Serif', serif;
    font-style: italic;
    font-size: 0.95rem;
    color: rgba(250, 248, 245, 0.85);
    max-width: 250px;
}

.shop-review .review-stars {
    font-size: 0.8rem;
    color: var(--gold);
    letter-spacing: 0.1em;
    font-style: normal;
}

.shop-link {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, var(--purple-light), var(--emerald));
    color: var(--cream);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    border-radius: 50px;
    transition: transform 0.3s, box-shadow 0.3s;
    margin-top: 1rem;
}

.shop-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(5, 150, 105, 0.4);
}

.shop-link:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--focus-ring), 0 10px 30px rgba(5, 150, 105, 0.4);
}

/* ========== FOOTER ========== */
footer {
    position: fixed;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    color: rgba(250, 248, 245, 0.6);
    z-index: 100;
    letter-spacing: 0.02em;
}

footer a {
    color: var(--emerald-light);
    text-decoration: none;
    transition: color 0.2s;
    padding: 0.25rem;
    border-radius: 4px;
}

footer a:hover {
    color: var(--purple-soft);
}

footer a:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    section { 
        height: auto; 
        min-height: 100vh; 
        padding: 4rem 1.5rem; 
    }
    
    .hero-visual { width: 280px; height: 280px; }
    .hero-perri { width: 220px; }
    
    .constellation { width: 200px; top: 5%; right: 2%; }
    
    .moon-circle { width: 320px; height: 320px; }
    .moon-text { padding: 2rem; }
    .moon-text p { font-size: 1.1rem; }
    
    .gallery { width: 100%; min-height: 100vh; height: auto; padding: 6rem 0; }
    .scrapbook { width: 100%; height: 600px; }
    .scrap-item { position: absolute; }
    .scrap-1 { width: 140px; height: 170px; left: 5%; top: 5%; transform: rotate(-8deg); z-index: 10; }
    .scrap-2 { width: 160px; height: 200px; left: 35%; top: 0%; transform: rotate(5deg); z-index: 15; }
    .scrap-3 { width: 130px; height: 160px; left: 60%; top: 8%; transform: rotate(-4deg); z-index: 12; }
    .scrap-4 { width: 120px; height: 100px; left: 10%; top: 32%; transform: rotate(6deg); z-index: 18; }
    .scrap-5 { width: 150px; height: 180px; left: 40%; top: 28%; transform: rotate(-6deg); z-index: 14; }
    .scrap-6 { width: 140px; height: 110px; left: 65%; top: 35%; transform: rotate(8deg); z-index: 16; }
    .scrap-7 { width: 160px; height: 120px; left: 5%; top: 58%; transform: rotate(-5deg); z-index: 20; }
    .scrap-8 { width: 180px; height: 160px; left: 45%; top: 55%; transform: rotate(4deg); z-index: 17; }
    
    .featured-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
    
    .tarot-offerings { grid-template-columns: 1fr; gap: 1rem; }
    
    .reviews-carousel { gap: 1rem; }
    .review-card { flex: 0 0 260px; padding: 1.5rem; }
    
    footer { left: 1.5rem; transform: none; }
}
