/* ================================================
   BASE.CSS — Reset, Variables, Typography
   Minimal / Swiss / Editorial — Premium Beauty Studio
   ================================================ */

/* ----- CSS Custom Properties ----- */
:root {
    /* Background */
    --bg-primary: #FAF9F6;
    --bg-white: #FFFFFF;
    --bg-warm: #F5F3EF;
    --bg-dark: #1A1A1A;
    --bg-dark-soft: #2C2C2C;

    /* Accent */
    --accent: #B89B71;
    --accent-light: #D4BC94;
    --accent-dark: #97794D;
    --accent-bg: rgba(184, 155, 113, 0.08);
    --accent-bg-hover: rgba(184, 155, 113, 0.14);

    /* Text */
    --text-primary: #1A1A1A;
    --text-secondary: #6B6B6B;
    --text-muted: #9E9E9E;
    --text-inverse: #FFFFFF;

    /* Borders & Lines */
    --border: #E8E6E1;
    --border-light: #F0EEEA;
    --border-dark: #D4D1CC;

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 24px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 48px rgba(0,0,0,0.10);
    --shadow-card: 0 1px 3px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.04);

    /* Glass (точечно) */
    --glass-bg: rgba(255, 255, 255, 0.72);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-blur: 24px;

    /* Layout */
    --container: 1200px;
    --container-narrow: 800px;
    --section-gap: clamp(80px, 10vw, 140px);
    --gutter: clamp(16px, 4vw, 32px);

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 999px;

    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
    --duration-fast: 0.2s;
    --duration-md: 0.4s;
    --duration-slow: 0.7s;

    /* Header */
    --header-h: 80px;
    --header-h-compact: 64px;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 400;
    line-height: 1.65;
    color: var(--text-primary);
    background: var(--bg-primary);
    overflow-x: hidden;
}

body.no-scroll { overflow: hidden; }

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }

::selection { background: var(--accent); color: var(--text-inverse); }

/* ----- Scrollbar ----- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border-dark); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ----- Typography ----- */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.15;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

/* Editorial display headings — Cormorant Garamond */
.display-heading {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 500;
    letter-spacing: -0.03em;
    line-height: 1.05;
}

h1 { font-size: clamp(2.25rem, 5.5vw, 4rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.125rem; }

p { color: var(--text-secondary); margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }

.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.8125rem; }
.text-lg { font-size: 1.125rem; }

.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent); }
.text-center { text-align: center; }
.text-uppercase { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.75rem; font-weight: 600; }

.lead {
    font-size: clamp(1.05rem, 1.8vw, 1.2rem);
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 580px;
}

/* ----- Container ----- */
.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.container-narrow {
    max-width: var(--container-narrow);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

/* ----- Section ----- */
.section {
    padding: var(--section-gap) 0;
    position: relative;
}

.section-header {
    margin-bottom: clamp(40px, 6vw, 64px);
}

.section-header h2 {
    margin-bottom: 12px;
}

.section-label {
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 16px;
}

.section-divider {
    width: 48px;
    height: 2px;
    background: var(--accent);
    margin-top: 20px;
}

/* ----- Breadcrumbs ----- */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.breadcrumbs a {
    color: var(--text-muted);
    transition: color var(--duration-fast) ease;
}

.breadcrumbs a:hover { color: var(--accent); }

.breadcrumbs .sep {
    font-size: 0.625rem;
    opacity: 0.5;
}

.breadcrumbs .current { color: var(--text-primary); }

/* ----- Visibility Helpers ----- */
.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;
}

.desktop-only { display: block; }
.mobile-only { display: none; }

@media (max-width: 768px) {
    .desktop-only { display: none; }
    .mobile-only { display: block; }
}

/* ----- GSAP Fallback ----- */
/* If GSAP never loads (CDN blocked), or reduced motion, show everything */
.no-gsap [data-reveal],
.no-gsap [data-stagger] > *,
.no-gsap .step-item,
.no-gsap .step-item .step-number,
.no-gsap .step-item .step-content,
.no-gsap .step-item .step-line {
    opacity: 1 !important;
    transform: none !important;
}

/* ----- 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;
    }

    [data-reveal],
    [data-stagger] > *,
    .step-item,
    .step-item .step-number,
    .step-item .step-content,
    .step-item .step-line {
        opacity: 1 !important;
        transform: none !important;
    }
}

