/* Rostro Equity Group - pagina work in progress
   Palette ricavata dal logo provvisorio: bronzo patinato su fondo avorio */
:root {
    --ivory: #F5F2EA;
    --ivory-deep: #EBE6D8;
    --ink: #2B2819;
    --olive: #4D4A33;
    --bronze: #8C7647;
    --gold: #C2A66B;
    --gold-hi: #E4D3A3;
    --muted: #6B6247;

    /* Posizione della luce, aggiornata da scene.js */
    --lx: 32%;
    --ly: 26%;
    --lp: 32;

    --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .27 0 0 0 0 .15 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

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

body {
    font-family: 'Jost', system-ui, sans-serif;
    font-weight: 300;
    color: var(--ink);
    background: var(--ivory);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Velatura di luce che segue il puntatore + grana */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at var(--lx) var(--ly), rgba(228, 211, 163, 0.38) 0%, transparent 46%),
        radial-gradient(ellipse at 50% 110%, rgba(140, 118, 71, 0.14) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: var(--grain);
    opacity: 0.07;
    mix-blend-mode: multiply;
    pointer-events: none;
    z-index: 0;
}

.stage {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 1.5rem 2rem;
}

/* ---------- Superficie in bronzo liquido ---------- */
.ripples {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ---------- Wordmark ---------- */
.wordmark {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: clamp(2.8rem, 12vw, 7.5rem);
    line-height: 1;
    letter-spacing: 0.24em;
    padding-left: 0.24em; /* compensa lo spazio finale del tracking */
    text-transform: uppercase;
    background: linear-gradient(100deg,
        var(--olive) 0%, var(--bronze) 34%, var(--gold-hi) 50%, var(--bronze) 66%, var(--olive) 100%);
    background-size: 260% 100%;
    background-position: calc(var(--lp) * 1%) 50%;
    -webkit-background-clip: text;
            background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--bronze); /* fallback */
    animation: fadeUp 1.4s ease-out 0.3s both;
}

.sub {
    margin-top: 0.9rem;
    font-size: clamp(0.72rem, 1.6vw, 0.85rem);
    font-weight: 400;
    letter-spacing: 0.5em;
    padding-left: 0.5em;
    text-transform: uppercase;
    color: var(--muted);
    animation: fadeUp 1.4s ease-out 0.5s both;
}

/* ---------- Linea di galleggiamento ---------- */
.waterline {
    display: block;
    width: min(520px, 82vw);
    height: auto;
    margin: clamp(1.6rem, 4vmin, 2.6rem) 0 clamp(1.4rem, 3.5vmin, 2.2rem);
    overflow: visible;
}
.wl-main {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: draw 2.4s cubic-bezier(.5, 0, .2, 1) 0.8s forwards;
}
.wl-ripple {
    opacity: 0;
    animation: ripple 7s ease-in-out 3s infinite;
}

/* ---------- Testi ---------- */
.msg {
    font-size: clamp(1rem, 2.2vw, 1.15rem);
    line-height: 1.8;
    color: var(--muted);
    max-width: 30rem;
    animation: fadeUp 1.4s ease-out 1s both;
}

.contact {
    margin-top: 2.4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    animation: fadeUp 1.4s ease-out 1.2s both;
}
.contact-label {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.32em;
    padding-left: 0.32em;
    text-transform: uppercase;
    color: var(--bronze);
}
.contact-mail {
    color: var(--ink);
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 400;
    padding: 0.7rem 1.4rem;
    border: 1px solid rgba(140, 118, 71, 0.4);
    border-radius: 2px;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}
.contact-mail:hover {
    border-color: var(--bronze);
    background: rgba(194, 166, 107, 0.16);
}
.contact-mail:focus-visible {
    outline: 2px solid var(--olive);
    outline-offset: 3px;
}

.foot {
    position: relative;
    z-index: 1;
    padding: 1.6rem 1rem 2rem;
    text-align: center;
}
.foot p {
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    color: var(--muted);
}

/* ---------- Animazioni ---------- */
@keyframes rise {
    from { opacity: 0; transform: translateY(26px) scale(0.94); filter: blur(10px); }
    to   { opacity: 1; transform: none; filter: blur(0); }
}
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: none; }
}
@keyframes draw {
    to { stroke-dashoffset: 0; }
}
@keyframes ripple {
    0%, 100% { opacity: 0; transform: translateY(0); }
    50%      { opacity: 0.8; transform: translateY(4px); }
}

@media (max-width: 480px) {
    .sub { letter-spacing: 0.4em; padding-left: 0.4em; }
    .contact-mail { font-size: 0.95rem; padding: 0.65rem 1.1rem; }
}

/* Accessibilità: niente movimento se richiesto dal sistema */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }
    .wl-main { stroke-dashoffset: 0; }
    .wl-ripple { opacity: 0.5; }
}
