/* Gallerie Vianello — CSS custom (companion di Tailwind CDN) */

/* Grain texture globale */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    opacity: 0.06;
    mix-blend-mode: multiply;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.font-display {
    font-family: 'Fraunces', 'Times New Roman', serif;
    font-optical-sizing: auto;
    font-variation-settings: 'opsz' 144, 'SOFT' 30;
    letter-spacing: -0.02em;
    line-height: 0.95;
}
.font-editorial {
    font-family: 'Fraunces', serif;
    font-optical-sizing: auto;
    font-variation-settings: 'opsz' 72, 'SOFT' 50;
}
.font-mono { font-family: 'JetBrains Mono', monospace; letter-spacing: 0.02em; }

::selection { background: #0E1524; color: #F1ECE0; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #E9E1D0; }
::-webkit-scrollbar-thumb { background: #0E1524; border: 2px solid #E9E1D0; }
::-webkit-scrollbar-thumb:hover { background: #B08D5C; }

html { scroll-behavior: smooth; }

.eyebrow {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #2A3550;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}
.eyebrow::before {
    content: '';
    width: 2rem;
    height: 1px;
    background: #B08D5C;
}

.serif-number {
    font-family: 'Fraunces', serif;
    font-variation-settings: 'opsz' 144, 'SOFT' 100;
    line-height: 1;
    font-weight: 300;
}

/* Reveal animation */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    animation: reveal 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.reveal-1 { animation-delay: 0.1s; }
.reveal-2 { animation-delay: 0.2s; }
.reveal-3 { animation-delay: 0.35s; }
.reveal-4 { animation-delay: 0.5s; }
.reveal-5 { animation-delay: 0.65s; }
@keyframes reveal { to { opacity: 1; transform: translateY(0); } }

/* Marquee */
.marquee {
    display: flex;
    gap: 4rem;
    animation: marquee 60s linear infinite;
    will-change: transform;
}
@keyframes marquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* Link underline */
.link-underline {
    position: relative;
    display: inline-block;
    transition: color 0.3s ease;
}
.link-underline::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    height: 1px;
    background: currentColor;
    transform-origin: right;
    transform: scaleX(1);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.link-underline:hover::after {
    transform-origin: left;
    transform: scaleX(0);
    animation: linkIn 0.6s 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes linkIn {
    from { transform-origin: left; transform: scaleX(0); }
    to   { transform-origin: left; transform: scaleX(1); }
}

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.75rem;
    background: #0E1524;
    color: #F1ECE0;
    font-family: 'Instrument Sans', sans-serif;
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    font-weight: 500;
    border: 1px solid #0E1524;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}
.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: #B08D5C;
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 0;
}
.btn-primary:hover::before { transform: translateY(0); }
.btn-primary > * { position: relative; z-index: 1; }
.btn-primary:hover { border-color: #B08D5C; }

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.75rem;
    background: transparent;
    color: #0E1524;
    font-family: 'Instrument Sans', sans-serif;
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    font-weight: 500;
    border: 1px solid #0E1524;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-ghost:hover { background: #0E1524; color: #F1ECE0; }

/* WhatsApp float pulse */
.wa-pulse::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 9999px;
    background: #25D366;
    opacity: 0.25;
    animation: wa-ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
    z-index: -1;
}
@keyframes wa-ping {
    75%, 100% { transform: scale(1.6); opacity: 0; }
}

/* Header morphing */
.header-scrolled {
    background: rgba(241, 236, 224, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid #C9BFA9;
}

/* Form inputs */
.form-input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid #0E1524;
    padding: 0.75rem 0;
    font-family: 'Fraunces', serif;
    font-size: 1.125rem;
    color: #0E1524;
    outline: none;
    transition: border-color 0.3s;
}
.form-input:focus { border-bottom-color: #B08D5C; }
select.form-input { appearance: none; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%230E1524' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E") no-repeat right center; padding-right: 1.5rem; }

/* Hover shift utility */
.hover-shift { transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1); }
.hover-shift:hover { transform: translateX(8px); }
