/* ============================================
   FUTURA — Soft Architectural Editorial UI
   Design tokens, typography, layout rhythm
   ============================================ */

:root {
    /* Primary palette */
    --color-zeppelin: #5F6468;
    --color-elephant: #7C7B78;
    --color-soft-white: #F6F5F3;
    --color-pure-white: #FFFFFF;
    --color-charcoal: #1A1A1A;
    --color-warm-stone: #C4B8A8;
    --color-muted: #7C7B78;
    --color-text: #1A1A1A;
    --color-text-light: #5C5A56;
    --color-border: rgba(0, 0, 0, 0.05);
    --color-border-strong: rgba(0, 0, 0, 0.08);
    --color-glass: rgba(255, 255, 255, 0.72);
    --color-glass-dark: rgba(0, 0, 0, 0.5);

    /* Backgrounds */
    --bg-main: #F6F5F3;
    --bg-surface: #FFFFFF;
    --bg-alt: #EFECE7;
    --bg-dark: #111111;

    /* Functional */
    --color-success: #2D6A4F;
    --color-error: #B43C3C;

    /* Typography */
    --font-display: 'Outfit', 'DM Sans', sans-serif;
    --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;

    --fs-display: clamp(2.75rem, 6vw, 4.5rem);
    --fs-hero: clamp(2.5rem, 5.5vw, 3.75rem);
    --fs-section: clamp(1.875rem, 3.2vw, 2.625rem);
    --fs-subsection: clamp(1.125rem, 2vw, 1.375rem);
    --fs-body: 1rem;
    --fs-small: 0.8125rem;
    --fs-xs: 0.75rem;

    --fw-regular: 400;
    --fw-medium: 500;
    --fw-semibold: 600;
    --fw-bold: 700;

    /* Spacing rhythm */
    --space-xs: 0.5rem;
    --space-sm: 0.75rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 4.5rem;
    --space-content-sm: 12px;
    --space-content-md: 24px;
    --space-content-lg: 48px;
    --space-content-xl: 72px;
    --space-section: clamp(4rem, 10vw, 7.5rem);

    /* Layout */
    --container-max: 1440px;
    --container-content: 1240px;
    --grid-columns: 12;
    --gutter: 24px;
    --nav-height: 88px;
    --prose-width: 38rem;

    /* Radius */
    --radius-main: 36px;
    --radius-secondary: 28px;
    --radius-nested: 20px;
    --radius-image: 24px;
    --radius-sm: 14px;
    --radius-pill: 999px;

    /* Depth — minimal */
    --shadow-soft: 0 10px 40px rgba(0, 0, 0, 0.04);
    --shadow-default: 0 10px 30px rgba(0, 0, 0, 0.04);
    --shadow-hover: 0 20px 50px rgba(0, 0, 0, 0.08);
    --shadow-nav: 0 8px 32px rgba(0, 0, 0, 0.05);
    --shadow-inset: inset 0 1px 0 rgba(255, 255, 255, 0.6);

    /* Motion */
    --ease-smooth: cubic-bezier(0.22, 1, 0.36, 1);
    --transition-fast: 0.4s var(--ease-smooth);
    --transition-base: 0.6s var(--ease-smooth);
    --transition-slow: 1.2s var(--ease-smooth);

    --z-nav: 200;
    --z-overlay: 300;
}

*, *::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);
    font-size: var(--fs-body);
    font-weight: var(--fw-regular);
    line-height: 1.7;
    letter-spacing: -0.01em;
    color: var(--color-text);
    background: var(--bg-main);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9998;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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 {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: var(--fw-medium);
    line-height: 1.1;
    letter-spacing: -0.04em;
    color: var(--color-charcoal);
}

h1 { font-size: var(--fs-hero); font-weight: var(--fw-semibold); }
h2 { font-size: var(--fs-section); }
h3 { font-size: var(--fs-subsection); }

p {
    color: var(--color-text-light);
}

strong {
    font-weight: var(--fw-semibold);
    color: var(--color-charcoal);
}

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

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

.section {
    padding: var(--space-section) 0;
    position: relative;
}

.section--alt {
    background: var(--bg-alt);
}

.section--surface {
    background: var(--bg-surface);
}

.section--inset {
    padding-left: var(--gutter);
    padding-right: var(--gutter);
}

.section--inset .section-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    background: var(--bg-surface);
    border-radius: var(--radius-main);
    border: 1px solid var(--color-border);
    padding: clamp(2rem, 5vw, 4.5rem);
    box-shadow: var(--shadow-soft);
}

/* Editorial section headers */
.section-header {
    margin-bottom: var(--space-content-lg);
}

.section-header--center {
    text-align: center;
    max-width: 40rem;
    margin-left: auto;
    margin-right: auto;
}

.section-header--left {
    text-align: left;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
}

.section-header--left .section-subtitle {
    margin-left: 0;
    max-width: 28rem;
}

.section-header--editorial {
    max-width: var(--prose-width);
}

.section-header--editorial .section-divider {
    margin-left: 0;
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: var(--space-md);
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--color-zeppelin);
    margin-bottom: var(--space-content-md);
}

.section-label::before {
    content: '';
    width: 32px;
    height: 1px;
    background: var(--color-warm-stone);
}

.section-header--center .section-label::before {
    display: none;
}

.section-label-light {
    color: rgba(255, 255, 255, 0.65);
}

.section-label-light::before {
    background: rgba(255, 255, 255, 0.35);
}

.section-title {
    margin-bottom: var(--space-lg);
}

.section-title-light {
    color: var(--color-pure-white);
}

.section-subtitle-light {
    color: rgba(255, 255, 255, 0.62);
}

.section-divider {
    width: 56px;
    height: 1px;
    background: linear-gradient(90deg, var(--color-zeppelin), transparent);
    margin: 0 0 var(--space-xl);
}

.section-divider--center {
    margin-left: auto;
    margin-right: auto;
}

.section-divider-light {
    background: linear-gradient(90deg, rgba(255,255,255,0.5), transparent);
}

.section-subtitle {
    font-size: var(--fs-body);
    max-width: 36rem;
    line-height: 1.75;
}

.section-header--center .section-subtitle {
    margin-left: auto;
    margin-right: auto;
}

/* Surface primitives */
.surface {
    background: var(--bg-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-main);
    padding: var(--space-content-lg);
    box-shadow: var(--shadow-soft);
}

.surface--secondary {
    border-radius: var(--radius-secondary);
    padding: var(--space-content-md);
}

.surface--nested {
    border-radius: var(--radius-nested);
    padding: var(--space-content-md);
    background: var(--bg-main);
    border-color: var(--color-border);
    box-shadow: none;
}

/* Prose */
.prose {
    max-width: var(--prose-width);
}

.prose p + p {
    margin-top: var(--space-lg);
}

/* Lazy-loaded images */
img.img-lazy-pending {
    background: var(--bg-alt);
}

img.img-lazy-loaded {
    animation: imgLazyFade 0.4s var(--ease-smooth) both;
}

@keyframes imgLazyFade {
    from { opacity: 0.85; }
    to { opacity: 1; }
}

/* Below-fold sections — skip layout/paint until near viewport */
.section:not(.hero-section):not(.products-hero) {
    content-visibility: auto;
    contain-intrinsic-size: auto 600px;
}

/* Image treatment */
.img-editorial {
    border-radius: var(--radius-image);
    overflow: hidden;
}

.img-editorial img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.img-editorial:hover img {
    transform: scale(1.04);
}

/* Reveal */
.reveal-up,
.reveal-left,
.reveal-right,
.reveal-fade,
.reveal-scale {
    opacity: 0;
    transition: opacity 0.9s var(--ease-smooth), transform 0.9s var(--ease-smooth);
    will-change: opacity, transform;
}

.reveal-up { transform: translateY(36px); }
.reveal-left { transform: translateX(-48px); }
.reveal-right { transform: translateX(48px); }
.reveal-fade { transform: none; }
.reveal-scale { transform: scale(0.96); }

.reveal-up.revealed,
.reveal-left.revealed,
.reveal-right.revealed,
.reveal-fade.revealed,
.reveal-scale.revealed {
    opacity: 1;
    transform: none;
}

.reveal-stagger > * {
    opacity: 0;
    transition: opacity 0.85s var(--ease-smooth), transform 0.85s var(--ease-smooth);
    will-change: opacity, transform;
}

.reveal-stagger > *.revealed {
    opacity: 1;
    transform: none;
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }
.delay-6 { transition-delay: 0.6s; }

/* Hover utilities */
.hover-lift {
    transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.hover-glow:hover {
    border-color: rgba(95, 100, 104, 0.35);
}

/* Hero — wait for loader */
body.is-loading .hero-section .fade-up {
    opacity: 0;
    animation: none;
}

body.is-loaded .hero-section .fade-up {
    animation: fadeUp 1.1s var(--ease-smooth) forwards;
}

body.is-loaded .hero-section .fade-up.delay-1 { animation-delay: 0.15s; }
body.is-loaded .hero-section .fade-up.delay-2 { animation-delay: 0.35s; }
body.is-loaded .hero-section .fade-up.delay-3 { animation-delay: 0.55s; }

.fade-up {
    opacity: 0;
    transform: translateY(28px);
    animation: fadeUp 1.1s var(--ease-smooth) forwards;
}

.fade-up.delay-1 { animation-delay: 0.15s; }
.fade-up.delay-2 { animation-delay: 0.35s; }
.fade-up.delay-3 { animation-delay: 0.55s; }

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

@keyframes heroZoomOut {
    from { transform: scale(1.14); }
    to { transform: scale(1); }
}

@keyframes scrollWheel {
    0% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(10px); }
}

@keyframes floatSoft {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

@keyframes lineGrow {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    .reveal-up, .reveal-left, .reveal-right,
    .reveal-fade, .reveal-scale,
    .reveal-stagger > *,
    .fade-up {
        opacity: 1;
        transform: none;
        animation: none;
    }
}

@media (max-width: 1024px) {
    :root {
        --radius-main: 28px;
        --radius-secondary: 22px;
    }
}

@media (max-width: 768px) {
    :root {
        --gutter: 20px;
        --nav-height: 76px;
        --space-section: 4rem;
    }
}

@media (max-width: 480px) {
    :root {
        --gutter: 16px;
        --radius-main: 24px;
    }
}
