/* ==========================================================================
   CIANA V4 — LIQUID GLASS STUDIO DESIGN TOKENS (2026)
   Inspired by Apple Liquid Glass & Dior Backstage
   ========================================================================== */

:root {
    /* Core Studio Surfaces */
    --bg-canvas: #f8f9fb;
    --bg-store-canvas: #faf7f2;
    --bg-salon-canvas: #f2fafb;
    --bg-elevated: #ffffff;

    /* Liquid Glass Materiality (Multi-layer Optical Refraction) */
    --glass-fill: rgba(255, 255, 255, 0.72);
    --glass-fill-strong: rgba(255, 255, 255, 0.86);
    --glass-fill-subtle: rgba(255, 255, 255, 0.54);
    --glass-dark-fill: rgba(17, 18, 22, 0.78);

    --glass-blur: blur(28px) saturate(190%);
    --glass-blur-heavy: blur(36px) saturate(200%);

    --glass-border-outer: rgba(255, 255, 255, 0.78);
    --glass-border-hairline: rgba(17, 18, 22, 0.07);
    --glass-specular-inset: inset 0 1.5px 1px rgba(255, 255, 255, 0.96),
                            inset 0 -1px 1px rgba(255, 255, 255, 0.38);

    /* Spatial Elevation Shadows */
    --shadow-glass-sm: 0 8px 24px -6px rgba(15, 18, 26, 0.06),
                       0 2px 6px -1px rgba(15, 18, 26, 0.04);
    --shadow-glass-md: 0 18px 42px -10px rgba(15, 18, 26, 0.09),
                       0 4px 12px -2px rgba(15, 18, 26, 0.04);
    --shadow-glass-lg: 0 28px 68px -14px rgba(15, 18, 26, 0.14),
                       0 8px 20px -4px rgba(15, 18, 26, 0.06);

    /* Dual-World Chromatic Accents */
    --accent-shop: #c9a050;
    --accent-shop-deep: #9e782f;
    --accent-shop-soft: rgba(201, 160, 80, 0.15);
    --accent-shop-glow: rgba(201, 160, 80, 0.32);

    --accent-salon: #00b8c4;
    --accent-salon-deep: #008b94;
    --accent-salon-soft: rgba(0, 184, 196, 0.14);
    --accent-salon-glow: rgba(0, 184, 196, 0.30);

    /* Active Context Accent (dynamically switches by section) */
    --accent-active: var(--accent-shop);
    --accent-active-glow: var(--accent-shop-glow);

    /* Crystal-Clear Typography Ink */
    --ink-primary: #111216;
    --ink-secondary: #353842;
    --ink-muted: #6e7382;
    --ink-on-dark: #fbfcfe;

    /* Status Colors */
    --status-ok: #16a34a;
    --status-low: #d97706;
    --status-out: #dc2626;

    /* Typography Families */
    --font-heading: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-serif: 'Playfair Display', Georgia, serif;
    --font-editorial: 'Bodoni Moda', 'Playfair Display', Georgia, serif;
    --font-cursive: 'Alex Brush', cursive;

    /* Radii (Liquid Spatial Geometry) */
    --radius-pill: 999px;
    --radius-xl: 32px;
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 12px;

    /* Motion Curves */
    --ease-liquid: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-spring: cubic-bezier(0.34, 1.45, 0.64, 1);
    --duration-fast: 0.25s;
    --duration-med: 0.5s;
    --duration-slow: 0.85s;
}

/* Salon context overrides active accent automatically */
body[data-section="salon"] {
    --accent-active: var(--accent-salon);
    --accent-active-glow: var(--accent-salon-glow);
}

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

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

body {
    background-color: var(--bg-canvas);
    color: var(--ink-primary);
    font-family: var(--font-body);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.overlay-locked {
    overflow: hidden;
}

img, svg {
    display: block;
    max-width: 100%;
}

button, input, select, textarea {
    font: inherit;
    color: inherit;
}

a {
    color: inherit;
}

/* Native View Transitions API Polish */
@supports (view-transition-name: none) {
    ::view-transition-old(root) {
        animation: vtFadeOut 0.28s var(--ease-liquid) both;
    }
    ::view-transition-new(root) {
        animation: vtFadeIn 0.38s var(--ease-liquid) both;
    }
}

@keyframes vtFadeOut {
    from { opacity: 1; transform: scale(1); }
    to { opacity: 0; transform: scale(0.99); }
}

@keyframes vtFadeIn {
    from { opacity: 0; transform: scale(1.01); }
    to { opacity: 1; transform: scale(1); }
}

/* Subtle Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(17, 18, 22, 0.16);
    border-radius: var(--radius-pill);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-active);
}

/* Scroll-Reveal Utility */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s var(--ease-liquid), transform 0.7s var(--ease-liquid);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Reusable Inline Brand Vector Logos (100% Device-Consistent Typography) */
.brand-svg-mark {
    width: 100%;
    height: auto;
    overflow: visible;
    user-select: none;
}

/* Satin Liquid Pill Buttons */
.btn-liquid {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.95rem 2.1rem;
    border-radius: var(--radius-pill);
    font-family: var(--font-heading);
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid rgba(17, 18, 22, 0.9);
    background: var(--ink-primary);
    color: var(--ink-on-dark);
    box-shadow: 0 10px 26px -6px rgba(17, 18, 22, 0.28),
                inset 0 1px 0 rgba(255, 255, 255, 0.22);
    overflow: hidden;
    transition: transform var(--duration-fast) var(--ease-liquid),
                background-color 0.3s ease,
                border-color 0.3s ease,
                color 0.3s ease,
                box-shadow 0.3s ease;
}

.btn-liquid::before {
    content: '';
    position: absolute;
    top: 0;
    left: -110%;
    width: 65%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
    transform: skewX(-22deg);
    transition: left 0.65s var(--ease-liquid);
    pointer-events: none;
}

.btn-liquid:hover::before {
    left: 145%;
}

.btn-liquid:hover {
    transform: translateY(-2px);
}

.btn-liquid--gold {
    color: #f6dfb1;
}

.btn-liquid--gold:hover {
    background: var(--accent-shop);
    border-color: var(--accent-shop);
    color: var(--ink-primary);
    box-shadow: 0 14px 30px -6px var(--accent-shop-glow),
                inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.btn-liquid--cyan {
    background: rgba(17, 18, 22, 0.92);
    color: #ffffff;
}

.btn-liquid--cyan:hover {
    background: var(--accent-salon);
    border-color: var(--accent-salon);
    color: #ffffff;
    box-shadow: 0 14px 30px -6px var(--accent-salon-glow),
                inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.btn-liquid--glass {
    background: var(--glass-fill-strong);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border-outer);
    color: var(--ink-primary);
    box-shadow: var(--shadow-glass-sm), var(--glass-specular-inset);
}

.btn-liquid--glass:hover {
    background: #ffffff;
    border-color: var(--accent-active);
    box-shadow: var(--shadow-glass-md), var(--glass-specular-inset);
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
