/* ============================================
   AELARA JEWELS — Design Tokens
   Palette extracted from actual product photos:
   --petal  from the raw-silk linen in flatlay shots
   --blush  from the rose-quartz bead clusters
   --aqua   from the teal crystal earring tops
   --gold   from the wire-wrapping
   --dusk   warm near-black for text
   --mist   linen-warm grey for dividers
   ============================================ */

:root {
    --petal:    #F9F1EC;
    --blush:    #E8B4B8;
    --aqua:     #7EC8C8;
    --gold:     #C5A455;
    --dusk:     #3D2E2E;
    --mist:     #D4C5BB;

    --text-xs:    0.6875rem;
    --text-sm:    0.8125rem;
    --text-base:  0.9375rem;
    --text-lg:    1.125rem;
    --text-xl:    1.5rem;
    --text-hero:  2.25rem;

    --space-xs:  0.5rem;
    --space-sm:  1rem;
    --space-md:  1.5rem;
    --space-lg:  2.5rem;
    --space-xl:  4rem;

    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}


/* ============================================
   Reset & Base
   ============================================ */

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'DM Sans', system-ui, sans-serif;
    font-weight: 400;
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--dusk);
    background-color: var(--petal);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

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

button {
    background: none;
    border: none;
    cursor: pointer;
    font: inherit;
    color: inherit;
}


/* ============================================
   Header
   ============================================ */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    transition: background-color 0.5s ease, box-shadow 0.5s ease;
}

.site-header.is-scrolled {
    background-color: rgba(249, 241, 236, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(212, 197, 187, 0.4);
}

.brand-mark {
    font-family: 'DM Sans', sans-serif;
    font-size: var(--text-sm);
    font-weight: 500;
    letter-spacing: 0.25em;
    color: var(--dusk);
}

/* Hamburger — two thin lines, animates to X */
.nav-toggle {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px;
    z-index: 101;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 1.5px;
    background-color: var(--dusk);
    transition: transform 0.35s var(--ease-out), opacity 0.25s ease;
    transform-origin: center;
}

.nav-toggle.is-active span:first-child {
    transform: translateY(3.75px) rotate(45deg);
}

.nav-toggle.is-active span:last-child {
    transform: translateY(-3.75px) rotate(-45deg);
}


/* ============================================
   Mobile Navigation
   ============================================ */

.mobile-nav {
    position: fixed;
    inset: 0;
    z-index: 99;
    background-color: var(--petal);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.mobile-nav.is-open {
    opacity: 1;
    pointer-events: auto;
}

.nav-link {
    font-size: var(--text-xl);
    font-weight: 300;
    letter-spacing: 0.04em;
    color: var(--dusk);
    opacity: 0;
    transform: translateY(12px);
    transition: color 0.25s ease, opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}

.mobile-nav.is-open .nav-link {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger the link reveals */
.mobile-nav.is-open .nav-link:nth-child(1) { transition-delay: 0.08s; }
.mobile-nav.is-open .nav-link:nth-child(2) { transition-delay: 0.14s; }
.mobile-nav.is-open .nav-link:nth-child(3) { transition-delay: 0.20s; }
.mobile-nav.is-open .nav-link:nth-child(4) { transition-delay: 0.26s; }

.nav-link:hover,
.nav-link:focus-visible {
    color: var(--gold);
}


/* ============================================
   Hero
   ============================================ */

.hero {
    position: relative;
    height: 100svh;
    height: 100vh; /* fallback */
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding-bottom: 8svh;
    overflow: hidden;
}

.hero-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
    z-index: 0;
}

/* Gradient dissolve — image melts into page background */
.hero-fade {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(249, 241, 236, 0.15) 20%,
        rgba(249, 241, 236, 0.5) 45%,
        rgba(249, 241, 236, 0.82) 65%,
        var(--petal) 88%
    );
    z-index: 1;
    pointer-events: none;
}

/* Hero text fades in on load */
.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 var(--space-md);
    opacity: 0;
    transform: translateY(16px);
    animation: heroReveal 1.1s var(--ease-out) 0.5s forwards;
}

.hero-tagline {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: var(--text-hero);
    font-weight: 400;
    line-height: 1.2;
    color: var(--dusk);
    margin-bottom: var(--space-lg);
}

/* Outlined pill — references the fine wire in the jewelry */
.hero-cta {
    display: inline-block;
    padding: 0.875rem 2.25rem;
    border: 1px solid var(--dusk);
    color: var(--dusk);
    background: transparent;
    font-family: 'DM Sans', sans-serif;
    font-size: var(--text-xs);
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    border-radius: 100px;
    transition: background-color 0.35s ease, color 0.35s ease, transform 0.35s var(--ease-out);
}

.hero-cta:hover {
    background-color: var(--dusk);
    color: var(--petal);
    transform: translateY(-1px);
}

.hero-cta:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
}

@keyframes heroReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ============================================
   Craft Story
   ============================================ */

.craft {
    padding: var(--space-xl) var(--space-md);
    text-align: center;
    max-width: 480px;
    margin: 0 auto;
}

.eyebrow {
    display: block;
    font-size: var(--text-xs);
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--blush);
    margin-bottom: var(--space-md);
}

.craft-text {
    font-size: var(--text-base);
    font-weight: 300;
    line-height: 1.85;
    color: var(--dusk);
}

.floret-divider {
    margin-top: var(--space-lg);
    font-size: 0.875rem;
    color: var(--blush);
    opacity: 0.5;
    user-select: none;
}


/* ============================================
   Shop
   ============================================ */

.shop {
    padding: var(--space-lg) var(--space-md) var(--space-xl);
}

.section-title {
    font-family: 'DM Sans', sans-serif;
    font-size: var(--text-xl);
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--dusk);
    margin-bottom: var(--space-lg);
    text-align: center;
}

.product-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
    max-width: 480px;
    margin: 0 auto;
}

.product-card {
    cursor: pointer;
}

.product-image-wrapper {
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid rgba(212, 197, 187, 0.5);
    margin-bottom: var(--space-sm);
    box-shadow: 0 6px 24px rgba(61, 46, 46, 0.06);
}

.product-image {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    transition: transform 0.7s var(--ease-out);
}

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

.product-info {
    padding: 0 var(--space-xs);
}

.product-name {
    font-family: 'DM Sans', sans-serif;
    font-size: var(--text-lg);
    font-weight: 500;
    color: var(--dusk);
    margin-bottom: 0.25rem;
    transition: color 0.3s ease;
}

.product-card:hover .product-name {
    color: var(--gold);
}

.product-materials {
    font-size: var(--text-sm);
    font-weight: 400;
    color: var(--blush);
    margin-bottom: 0.375rem;
}

.product-price {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--gold);
}


/* ============================================
   Cascade Reveal Animation
   The products drift upward into view, staggered,
   like beads settling along a chain.
   ============================================ */

.product-card {
    opacity: 0;
    transform: translateY(28px);
}

.product-card.is-revealed {
    animation: cascadeIn 0.9s var(--ease-out) forwards;
}

.product-card[data-cascade="2"].is-revealed {
    animation-delay: 180ms;
}

@keyframes cascadeIn {
    from {
        opacity: 0;
        transform: translateY(28px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ============================================
   Footer
   ============================================ */

.site-footer {
    padding: var(--space-lg) var(--space-md) var(--space-xl);
    text-align: center;
}

.site-footer .floret-divider {
    margin-top: 0;
    margin-bottom: var(--space-lg);
}

.footer-brand {
    font-size: var(--text-sm);
    font-weight: 500;
    letter-spacing: 0.25em;
    color: var(--dusk);
    margin-bottom: var(--space-xs);
}

.footer-origin {
    font-size: var(--text-xs);
    font-weight: 300;
    color: var(--mist);
    margin-bottom: var(--space-sm);
}

.footer-social {
    display: inline-block;
    font-size: var(--text-xs);
    font-weight: 400;
    color: var(--gold);
    letter-spacing: 0.04em;
    transition: color 0.25s ease;
}

.footer-social:hover {
    color: var(--dusk);
}


/* ============================================
   Reduced Motion
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .hero-content {
        opacity: 1;
        transform: none;
        animation: none;
    }

    .product-card {
        opacity: 1;
        transform: none;
    }

    .product-card.is-revealed {
        animation: none;
    }

    .hero-cta,
    .product-image,
    .nav-toggle span,
    .mobile-nav,
    .nav-link,
    .product-name,
    .footer-social {
        transition: none !important;
    }
}


/* ============================================
   Tablet & Desktop — 768px+
   ============================================ */

@media (min-width: 768px) {
    :root {
        --text-hero:  3.25rem;
        --text-xl:    1.75rem;
        --text-lg:    1.25rem;
        --text-base:  1rem;
    }

    .site-header {
        padding: 1.5rem 2.5rem;
    }

    .hero {
        padding-bottom: 10svh;
    }

    .hero-img {
        object-position: center 35%;
    }

    .craft {
        max-width: 560px;
        padding: var(--space-xl) var(--space-lg) var(--space-xl);
    }

    .shop {
        max-width: 960px;
        margin: 0 auto;
        padding: var(--space-xl) var(--space-lg);
    }

    .product-grid {
        flex-direction: row;
        gap: var(--space-lg);
        max-width: none;
    }

    .product-card {
        flex: 1;
    }
}

@media (min-width: 1024px) {
    :root {
        --text-hero: 3.75rem;
    }

    .site-header {
        padding: 1.75rem 3.5rem;
    }

    .shop {
        max-width: 1080px;
    }

    .craft {
        max-width: 620px;
    }
}

@media (min-width: 1280px) {
    :root {
        --text-hero: 4.25rem;
    }

    .hero-fade {
        height: 50%;
    }
}
