/* ═══════════════════════════════════════════════════════════════════
   DewRitual Design System — Pink & Lavender K-Beauty
   Inspired by COSRX + Medicube's editorial premium aesthetic
   ═══════════════════════════════════════════════════════════════════ */

/* ── Fonts ─────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

/* ── Design Tokens ─────────────────────────────────────────────── */
:root {
    /* Primary palette — pink + lavender */
    --rose: #E8A0BF;
    --rose-deep: #D4789C;
    --rose-light: #F5D5E0;
    --lavender: #C3B1E1;
    --lavender-deep: #9B7FC4;
    --lavender-light: #EDE5F5;
    --mauve: #8B5E83;

    /* Neutrals */
    --cream: #FFF8F5;
    --cream-warm: #FFF0EB;
    --blush: #FCEEF0;
    --charcoal: #2D2226;
    --charcoal-light: #4A3F44;
    --warm-gray: #9B8E93;
    --warm-gray-light: #C5B9BE;
    --soft-white: rgba(255, 255, 255, 0.75);

    /* Accents */
    --gold: #D4A853;
    --gold-light: #F0E0C0;

    /* Functional */
    --glass: rgba(255, 255, 255, 0.65);
    --glass-strong: rgba(255, 255, 255, 0.85);
    --border: rgba(232, 160, 191, 0.2);
    --border-hover: rgba(232, 160, 191, 0.4);
    --shadow-sm: 0 2px 12px rgba(139, 94, 131, 0.06);
    --shadow-md: 0 8px 30px rgba(139, 94, 131, 0.08);
    --shadow-lg: 0 20px 60px rgba(139, 94, 131, 0.12);
    --shadow-xl: 0 30px 80px rgba(139, 94, 131, 0.15);

    /* Gradients */
    --gradient-rose: linear-gradient(135deg, #E8A0BF, #D4789C);
    --gradient-lavender: linear-gradient(135deg, #C3B1E1, #9B7FC4);
    --gradient-hero: linear-gradient(135deg, #E8A0BF 0%, #C3B1E1 50%, #D4789C 100%);
    --gradient-warm: linear-gradient(180deg, #FFF8F5 0%, #FCEEF0 50%, #FFF8F5 100%);

    /* Typography */
    --font-display: 'Instrument Serif', serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;

    /* Spacing */
    --nav-height: 72px;
    --section-pad: clamp(3rem, 8vw, 6rem);
    --container: 1200px;
    --container-narrow: 900px;

    /* Transitions */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

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

body {
    font-family: var(--font-body);
    background: var(--cream);
    color: var(--charcoal);
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font-family: var(--font-body); }

/* ── Ambient Background ─────────────────────────────────────── */
.orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.25;
    z-index: 0;
    pointer-events: none;
    will-change: transform;
}
.orb-rose {
    width: 500px; height: 500px;
    background: var(--rose-light);
    top: -150px; right: -150px;
    animation: orbFloat 20s ease-in-out infinite;
}
.orb-lavender {
    width: 400px; height: 400px;
    background: var(--lavender-light);
    bottom: 10%; left: -120px;
    animation: orbFloat 25s ease-in-out infinite reverse;
}
.orb-blush {
    width: 350px; height: 350px;
    background: var(--blush);
    top: 50%; right: -80px;
    animation: orbFloat 22s ease-in-out infinite 5s;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(20px, -30px) scale(1.05); }
    50% { transform: translate(-15px, 20px) scale(0.95); }
    75% { transform: translate(25px, 15px) scale(1.03); }
}

/* ── Navigation ────────────────────────────────────────────── */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--nav-height);
    padding: 0 clamp(1.25rem, 4vw, 3rem);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(255, 248, 245, 0.88);
    border-bottom: 1px solid var(--border);
    transition: box-shadow 0.3s var(--ease);
}
nav.scrolled {
    box-shadow: var(--shadow-sm);
}

.logo {
    font-family: var(--font-display);
    font-size: 1.6rem;
    color: var(--charcoal);
    text-decoration: none;
    letter-spacing: -0.5px;
    transition: opacity 0.2s;
}
.logo:hover { opacity: 0.8; }
.logo em {
    font-style: italic;
    color: var(--rose-deep);
}

/* Desktop nav links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}
.nav-links a {
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--warm-gray);
    transition: color 0.2s var(--ease);
    position: relative;
}
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--rose-deep);
    transition: width 0.3s var(--ease);
}
.nav-links a:hover,
.nav-links a.active {
    color: var(--charcoal);
}
.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}
.nav-cta {
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    background: var(--gradient-rose) !important;
    color: white !important;
    padding: 0.55rem 1.3rem !important;
    border-radius: 50px !important;
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease) !important;
    border: none;
}
.nav-cta::after { display: none !important; }
.nav-cta:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 15px rgba(212, 120, 156, 0.3) !important;
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
    background: none;
    border: none;
}
.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--charcoal);
    border-radius: 2px;
    transition: all 0.3s var(--ease);
    transform-origin: center;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu overlay */
.mobile-menu {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(255, 248, 245, 0.97);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    opacity: 0;
    transition: opacity 0.3s var(--ease);
}
.mobile-menu.open {
    display: flex;
    opacity: 1;
}
.mobile-menu a {
    text-decoration: none;
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--charcoal);
    transition: color 0.2s;
}
.mobile-menu a:hover { color: var(--rose-deep); }
.mobile-menu .nav-cta-mobile {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    background: var(--gradient-rose);
    color: white;
    padding: 0.85rem 2.5rem;
    border-radius: 50px;
    margin-top: 1rem;
    transition: transform 0.2s var(--ease), box-shadow 0.2s;
}
.mobile-menu .nav-cta-mobile:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 20px rgba(212, 120, 156, 0.3);
}

/* ── Typography ────────────────────────────────────────────── */
.section-eyebrow {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--rose-deep);
    margin-bottom: 1rem;
}
.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.2rem);
    line-height: 1.15;
    margin-bottom: 1rem;
    color: var(--charcoal);
}
.section-title em {
    font-style: italic;
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.section-subtitle {
    font-size: 1.1rem;
    font-weight: 300;
    color: var(--warm-gray);
    line-height: 1.7;
    max-width: 550px;
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 2rem;
    background: var(--charcoal);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    font-family: var(--font-body);
    transition: all 0.25s var(--ease);
    position: relative;
    overflow: hidden;
}
.btn-primary:hover {
    background: var(--rose-deep);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 120, 156, 0.25);
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 2rem;
    background: transparent;
    color: var(--charcoal);
    border: 1.5px solid var(--border-hover);
    border-radius: 50px;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    font-family: var(--font-body);
    transition: all 0.25s var(--ease);
}
.btn-secondary:hover {
    border-color: var(--rose);
    background: var(--blush);
    transform: translateY(-2px);
}

.btn-rose {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 2rem;
    background: var(--gradient-rose);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    font-family: var(--font-body);
    transition: all 0.25s var(--ease);
}
.btn-rose:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(212, 120, 156, 0.3);
}

/* ── Cards ─────────────────────────────────────────────────── */
.glass-card {
    background: var(--glass-strong);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 24px;
    transition: all 0.35s var(--ease);
}
.glass-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

/* ── Trust Badges ──────────────────────────────────────────── */
.trust-badges {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 2.5rem;
}
.trust-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--warm-gray);
}
.trust-badge-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--blush);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

/* ── Footer ────────────────────────────────────────────────── */
footer {
    position: relative;
    z-index: 1;
    background: var(--charcoal);
    color: rgba(255, 255, 255, 0.6);
    padding: clamp(3rem, 6vw, 5rem) clamp(1.25rem, 4vw, 3rem);
}
.footer-inner {
    max-width: var(--container);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
}
.footer-brand .logo {
    color: white;
    margin-bottom: 1rem;
    display: inline-block;
}
.footer-brand .logo em { color: var(--rose); }
.footer-brand p {
    font-size: 0.85rem;
    line-height: 1.7;
    max-width: 280px;
    color: rgba(255,255,255,0.5);
}
.footer-col h4 {
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.4);
    margin-bottom: 1.25rem;
}
.footer-col a {
    display: block;
    text-decoration: none;
    font-size: 0.88rem;
    color: rgba(255,255,255,0.6);
    padding: 0.3rem 0;
    transition: color 0.2s;
}
.footer-col a:hover { color: var(--rose-light); }
.footer-bottom {
    max-width: var(--container);
    margin: 3rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
}
.footer-bottom a {
    text-decoration: none;
    color: rgba(255,255,255,0.4);
    transition: color 0.2s;
}
.footer-bottom a:hover { color: var(--rose); }

/* ── Animations ────────────────────────────────────────────── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}
@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Ingredient Marquee ────────────────────────────────────── */
.marquee {
    overflow: hidden;
    padding: 2rem 0;
    position: relative;
    z-index: 1;
}
.marquee::before,
.marquee::after {
    content: '';
    position: absolute;
    top: 0;
    width: 100px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}
.marquee::before {
    left: 0;
    background: linear-gradient(90deg, var(--cream), transparent);
}
.marquee::after {
    right: 0;
    background: linear-gradient(270deg, var(--cream), transparent);
}
.marquee-track {
    display: flex;
    gap: 1.5rem;
    animation: scroll 30s linear infinite;
    width: max-content;
}
.ingredient-pill {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 1.4rem;
    background: var(--glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 50px;
    white-space: nowrap;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--charcoal-light);
    transition: all 0.2s var(--ease);
}
.ingredient-pill:hover {
    border-color: var(--rose);
    background: var(--blush);
}
.ingredient-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--rose);
}

/* ── Product Cards ─────────────────────────────────────────── */
.product-card {
    background: var(--glass-strong);
    backdrop-filter: blur(15px);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.35s var(--ease);
    cursor: pointer;
    position: relative;
}
.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-hover);
}

.product-img-area {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.4s var(--ease);
}
.product-card:hover .product-img-area {
    transform: scale(1.03);
}

/* Category gradients — pink/lavender palette */
.product-img-area.category-cleanser { background: linear-gradient(145deg, #FCEEF0, #F5D5E0); }
.product-img-area.category-toner { background: linear-gradient(145deg, #EDE5F5, #D5CCE8); }
.product-img-area.category-essence { background: linear-gradient(145deg, #FFF0EB, #FCDFD5); }
.product-img-area.category-serum { background: linear-gradient(145deg, #F5D5E0, #E8C4D5); }
.product-img-area.category-ampoule { background: linear-gradient(145deg, #E8D5F0, #D5C0E8); }
.product-img-area.category-moisturizer { background: linear-gradient(145deg, #F0E5F5, #E5D5F0); }
.product-img-area.category-sunscreen { background: linear-gradient(145deg, #FFF5E8, #FDE8D0); }
.product-img-area.category-mask { background: linear-gradient(145deg, #F8E0F0, #F0D0E5); }

.product-featured-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--gradient-rose);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 0.3rem 0.75rem;
    border-radius: 50px;
}
.product-ingredient-badge {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: var(--glass-strong);
    backdrop-filter: blur(8px);
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--charcoal-light);
    padding: 0.25rem 0.7rem;
    border-radius: 50px;
}
.product-info { padding: 1.5rem; }
.product-brand {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--rose-deep);
    margin-bottom: 0.35rem;
}
.product-name {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 0.5rem;
    color: var(--charcoal);
}
.product-desc {
    font-size: 0.82rem;
    font-weight: 300;
    color: var(--warm-gray);
    line-height: 1.55;
    margin-bottom: 1.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.product-price {
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--charcoal);
}
.product-size {
    font-size: 0.72rem;
    color: var(--warm-gray);
    margin-left: 0.25rem;
}
.btn-add {
    padding: 0.5rem 1.25rem;
    background: var(--charcoal);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s var(--ease);
    font-family: var(--font-body);
}
.btn-add:hover {
    background: var(--rose-deep);
    transform: scale(1.05);
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .hamburger { display: flex; }

    .footer-inner {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }
    .trust-badges {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .footer-inner {
        grid-template-columns: 1fr;
    }
}

/* ── Utility ───────────────────────────────────────────────── */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 clamp(1.25rem, 4vw, 3rem);
}
.container-narrow {
    max-width: var(--container-narrow);
    margin: 0 auto;
    padding: 0 clamp(1.25rem, 4vw, 3rem);
}
.text-center { text-align: center; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
