/* ============================================
   SELECTMOOD - Custom CSS
   Supplements the Tailwind build output
   ============================================ */

:root {
    --color-primary: #1A1A1A;
    --color-secondary: #4A3B2F;
    --color-accent: #7A6348;
    --color-accent-light: #9A8668;
    --color-bg: #FAF9F6;
    --color-bg-alt: #F3EEE7;
    --color-surface: #FFFFFF;
    --color-text: #1A1A1A;
    --color-text-secondary: #5C5854;
    --color-text-muted: #8C847E;
    --color-border: #E8E2D9;
    --color-border-light: #F0EBE3;
    --color-success: #3D644B;
    --color-error: #964F4A;
    --section-py: 160px;
    --section-py-mobile: 80px;
    --container-max: 1280px;
    --transition-base: 400ms cubic-bezier(0.25, 0.1, 0.25, 1);
    --transition-slow: 800ms cubic-bezier(0.25, 0.1, 0.25, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
        system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Apple SD Gothic Neo",
        "Noto Sans KR", "Malgun Gothic", sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Grain Texture Overlay */
body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Typography */
.font-heading {
    font-family: var(--font-playfair, "Playfair Display"), "Georgia", serif;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.font-accent {
    font-family: var(--font-cormorant, "Cormorant Garamond"), "Georgia", serif;
    font-style: italic;
    letter-spacing: 0.05em;
}

.font-nav {
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* Scroll Reveal */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 1.2s cubic-bezier(0.2, 0.8, 0.2, 1),
                    transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
    }
    .scroll-reveal.is-visible {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .scroll-reveal {
        opacity: 1;
        transform: none;
    }
}

/* Selection */
::selection {
    background-color: var(--color-accent);
    color: #fff;
}

/* Buttons */
.btn-premium {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2.5rem;
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: all 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
    overflow: hidden;
}

.btn-premium-primary {
    background-color: var(--color-primary);
    color: #fff;
}

.btn-premium-primary:hover {
    background-color: var(--color-accent);
}

.btn-premium-outline {
    border: 1px solid currentColor;
    color: inherit;
}

.btn-premium-outline:hover {
    opacity: 0.85;
}

/* Vertical text */
.vertical-text {
    writing-mode: vertical-rl;
}

/* Scroll line animation */
@keyframes scroll-line {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(200%); }
}

.animate-scroll-line {
    animation: scroll-line 2.5s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

/* Header scroll state (JS managed via inline styles as fallback) */
#site-header.scrolled {
    background-color: rgba(250, 249, 246, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border-light);
    height: 4rem;
}

@media (min-width: 1024px) {
    #site-header.scrolled {
        height: 5rem;
    }
}
