/* =====================================================
   OTTICA BOERIS — Design System
   ===================================================== */

/* ── Google Fonts ──────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&family=Playfair+Display:ital,wght@0,400..900;1,400..900&display=swap');

/* ── CSS Variables ─────────────────────────────── */
:root {
    --ivory: #FAF7F2;
    --ivory-dark: #F5F0E8;
    --gold: #B8923E;
    --gold-light: #C9A55A;
    --gold-dark: #9A7A34;
    --gold-bg: #F0E6D3;
    --dark: #2D2D2D;
    --dark-footer: #1A1A1A;
    --text: #4A4A4A;
    --text-light: #7A7A7A;
    --white: #FFFFFF;
    --border: #E5DDD0;
    --shadow: rgba(0, 0, 0, 0.08);
    --shadow-lg: rgba(0, 0, 0, 0.12);

    --font-serif: 'Playfair Display', Georgia, serif;
    --font-sans: 'Montserrat', sans-serif;
    --font-display: 'Playfair Display', serif;

    --container: 1280px;
    --section-padding: clamp(60px, 10vh, 100px) 0;
    --section-padding-sm: clamp(40px, 6vh, 60px) 0;
    --radius: 16px;
    --radius-sm: 8px;
    --radius-lg: 24px;
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);

    /* ── Brand Soul Extensions ── */
    --lens-glow: linear-gradient(90deg, transparent 0%, var(--gold) 50%, transparent 100%);
    --savoy-corner-size: 24px;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    width: 100%;
    overflow-x: hidden;
}

body {
    font-family: var(--font-sans);
    color: var(--text);
    background: var(--ivory);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    width: 100%;
    overflow-x: hidden;
    position: relative;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul,
ol {
    list-style: none;
}

button,
input,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
    border: none;
    outline: none;
}

button {
    cursor: pointer;
}

/* ── Focus States ──────────────────────────────── */
:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 4px;
}

.btn:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

/* ── Smooth Reveal Transitions (AOS-Style) ─────────────────── */
.js-enabled .animate-up,
.js-enabled .reveal,
.js-enabled .reveal-elevated,
.js-enabled .grid-animate>* {
    transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 1s cubic-bezier(0.16, 1, 0.3, 1),
        visibility 1s;
}

/* Fail-safe: elements should be visible if no JS or if .is-visible is added */
.animate-up.is-visible,
.reveal.is-visible,
.reveal-elevated.is-visible,
.is-visible>*,
.grid-animate.is-visible>* {
    opacity: 1 !important;
    transform: translate3d(0, 0, 0) !important;
    visibility: visible !important;
}

/* Staggering reveals handled via CSS */
.reveal-delay-1 {
    transition-delay: 0.1s !important;
}

.reveal-delay-2 {
    transition-delay: 0.2s !important;
}

.reveal-delay-3 {
    transition-delay: 0.3s !important;
}

.reveal-delay-4 {
    transition-delay: 0.4s !important;
}

/* Grid stagger logic for parent-based reveal */
.grid-animate.is-visible>*:nth-child(1) {
    transition-delay: 0.1s;
}

.grid-animate.is-visible>*:nth-child(2) {
    transition-delay: 0.2s;
}

.grid-animate.is-visible>*:nth-child(3) {
    transition-delay: 0.3s;
}

.grid-animate.is-visible>*:nth-child(4) {
    transition-delay: 0.4s;
}

/* ── Container ─────────────────────────────────── */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 5vw;
}

@media (min-width: 1280px) {
    .container {
        padding: 0 40px;
    }
}

/* ── Global Utilities ──────────────────────────── */
.display-serif {
    font-family: var(--font-serif);
    font-weight: 400;
}

.display-serif em {
    font-style: italic;
    color: var(--gold);
    letter-spacing: -0.02em;
    position: relative;
    display: inline-block;
}

.display-serif em::after {
    content: '';
    position: absolute;
    bottom: 0.1em;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--lens-glow);
    opacity: 0.4;
}

.section-label-gold {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 4px;
    color: var(--gold);
    text-transform: uppercase;
    margin-bottom: 20px;
}

.divider-gold-center {
    width: 60px;
    height: 1px;
    background: var(--gold);
    margin: 30px auto;
    opacity: 0.6;
}

/* ── Typography ────────────────────────────────── */
h1,
h2,
h3,
h4 {
    font-family: var(--font-serif);
    color: var(--dark);
    line-height: 1.2;
    font-weight: 500;
    /* Ensure Cormorant is well visible */
}

h1 {
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
}

h2 {
    font-size: clamp(1.3rem, 2.8vw, 2rem);
}

h3 {
    font-size: clamp(1.2rem, 2.5vw, 1.6rem);
}

h4 {
    font-size: 1.1rem;
}

p {
    margin-bottom: 1rem;
}

em,
.accent {
    font-family: var(--font-serif);
    font-style: italic;
    color: var(--gold);
    letter-spacing: -0.01em;
}

/* ── Signature Motif: Lens Glow Rule ── */
.lens-rule {
    width: 100%;
    height: 1px;
    background: var(--lens-glow);
    margin: 40px 0;
    opacity: 0.6;
    position: relative;
}

.lens-rule::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 4px;
    height: 4px;
    background: var(--white);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--gold-light);
}

/* ── Signature Motif: Savoy Frame ── */
.savoy-frame {
    position: relative;
    padding: 20px;
}

.savoy-frame::before,
.savoy-frame::after {
    content: '';
    position: absolute;
    width: var(--savoy-corner-size);
    height: var(--savoy-corner-size);
    border-color: var(--gold);
    border-style: solid;
    opacity: 0.5;
    transition: var(--transition);
}

/* Top Left */
.savoy-frame::before {
    top: 0;
    left: 0;
    border-width: 1px 0 0 1px;
}

/* Bottom Right */
.savoy-frame::after {
    bottom: 0;
    right: 0;
    border-width: 0 1px 1px 0;
}

.savoy-frame:hover::before,
.savoy-frame:hover::after {
    opacity: 1;
    width: calc(var(--savoy-corner-size) + 10px);
    height: calc(var(--savoy-corner-size) + 10px);
}

.section-label {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 12px;
    display: block;
}

.section-subtitle {
    font-size: clamp(1rem, 2vw, 1.1rem);
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto 3rem;
    text-align: center;
}

.text-center {
    text-align: center;
}

.text-gold {
    color: var(--gold);
}

/* ── Spacing Utilities ─────────────────────────── */
.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mt-4 {
    margin-top: 2rem;
}

.mt-5 {
    margin-top: 2rem;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

.mb-5 {
    margin-bottom: 3rem;
}

.p-4 {
    padding: 2rem;
}

.p-5 {
    padding: 3rem;
}

/* ── Typography Utilities ──────────────────────── */
.ts-small {
    font-size: 0.85rem;
}

.ts-normal {
    font-size: 1rem;
}

.ts-large {
    font-size: 1.1rem;
}

/* ── Brands Carousel Redesign (Scratch Rebuild) ── */
.brands-section {
    padding: 120px 0 80px;
    background: var(--white);
    overflow: hidden;
    border: none !important;
    position: relative;
    z-index: 10;
}

.marquee-header {
    margin-bottom: 60px;
}

.marquee-header .section-title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    letter-spacing: -0.02em;
}

.marquee-container {
    mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
    overflow: hidden;
    padding: 20px 0;
}

.marquee-content {
    display: flex;
    width: max-content;
    animation: marqueeScrolling 40s linear infinite;
}

.marquee-track {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.brand-item {
    display: block;
    margin: 0 45px;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.brand-item img {
    height: 70px;
    /* Reduced from 140px for a more balanced, high-end look */
    max-width: 180px;
    /* Prevents wide logos from appearing too large */
    width: auto;
    object-fit: contain;
    filter: grayscale(1);
    /* High-contrast grayscale but not solid black */
    mix-blend-mode: multiply;
    /* Removes white backgrounds from logos */
    opacity: 0.7;
    /* Default state for a sophisticated feel */
    transition: all 0.4s ease;
    display: block;
}

.brand-item:hover {
    transform: translateY(-5px) scale(1.05);
    /* Subtle, elegant scale */
}

.brand-item:hover img {
    filter: grayscale(0);
    /* Reveal subtle brand color on hover */
    opacity: 1;
    /* Full visibility on hover */
}

@keyframes marqueeScrolling {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .brands-section {
        padding: 60px 0 40px;
    }

    .brand-item {
        margin: 0 -2px;
    }

    .brand-item img {
        height: 45px;
        /* Scaled down for mobile accessibility */
    }

    .marquee-content {
        animation-duration: 45s;
    }
}

.marquee-footer {
    border-top: none !important;
    position: relative;
    z-index: 11;
}

/* ── Story Section Reset (removing possible top line) ── */
#storia {
    border-top: none !important;
}