/* ==========================================================================
   Nausica Ferrandi — tema globale (palette, tipografia, header, footer)
   ========================================================================== */

:root {
    --nf-bg: #F3F0EA;
    --nf-ink: #1C1A16;
    --nf-muted: #7A756B;
    --nf-body: #4A463F;
    --nf-cream-1: #E7E2D8;
    --nf-cream-2: #E2DCD0;
    --nf-hairline: rgba(28, 26, 22, 0.12);
    --nf-hairline-strong: rgba(28, 26, 22, 0.14);
    --nf-light: #F3F0EA;
    --nf-serif: "Bodoni Moda", serif;
    --nf-sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
    --nf-mono: "Space Mono", monospace;
    --nf-accent: #A8482E;
}

* { box-sizing: border-box; }

input[type="checkbox"] {
    appearance: none;
    width: 16px;
    height: 16px;
    margin: 0;
    border: 1px solid var(--nf-hairline-strong);
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
}
input[type="checkbox"]:hover { border-color: var(--nf-ink); }
input[type="checkbox"]:checked { background: var(--nf-ink); border-color: var(--nf-ink); }
input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid var(--nf-bg);
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg);
}

html, body { margin: 0; padding: 0; }

body {
    background: var(--nf-bg);
    color: var(--nf-ink);
    font-family: var(--nf-sans);
    -webkit-font-smoothing: antialiased;
}

::selection { background: var(--nf-ink); color: var(--nf-light); }

/* Focus da tastiera: l'anello e' del tema, e diventa chiaro sui fondi scuri */
:focus-visible { outline: 2px solid var(--nf-ink); outline-offset: 3px; }
.nf-scene--photo :focus-visible,
.nf-header.is-over-photo :focus-visible,
.nf-doors :focus-visible,
.nf-manifesto :focus-visible,
.nf-footer :focus-visible { outline-color: var(--nf-light); }

a { color: inherit; text-decoration: none; }

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

.nf-container { max-width: 1440px; margin: 0 auto; padding-left: 28px; padding-right: 28px; }

/* I blocchi a tutta larghezza allineano il testo alla stessa gabbia del container
   (1440 + 28px): cosi' un titolo a tutta pagina cade sulla verticale del foglio. */
:root { --nf-gutter: max(28px, calc((100vw - 1440px) / 2 + 28px)); }

/* ==========================================================================
   Ingresso allo scroll — le immagini si scoprono dal basso, i testi salgono.
   Le classi stanno nel markup (o le applica il JS di pagina); la classe
   .is-in la aggiunge un IntersectionObserver. Sotto i 767px e con
   prefers-reduced-motion l'effetto e' spento e il contenuto resta visibile.
   ========================================================================== */

.nf-reveal {
    clip-path: inset(100% 0 0 0);
    scale: 1.06;
    transition:
        clip-path 1.1s cubic-bezier(0.16, 1, 0.3, 1),
        scale 1.6s cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: var(--nf-d, 0s);
}
.nf-reveal.is-in { clip-path: inset(0 0 0 0); scale: 1; }

.nf-rise {
    opacity: 0;
    translate: 0 20px;
    transition:
        opacity 0.8s ease,
        translate 0.9s cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: var(--nf-d, 0s);
}
.nf-rise.is-in { opacity: 1; translate: 0 0; }

@media (prefers-reduced-motion: reduce), (max-width: 767px) {
    .nf-reveal, .nf-rise { clip-path: none; scale: 1; opacity: 1; translate: none; transition: none; }
}

/* Wash materico usato al posto delle foto di campagna (in attesa delle foto reali) */
.nf-swatch {
    position: relative;
    background:
        radial-gradient(130% 160% at 18% 12%, var(--nf-cream-1) 0%, #D9CEBC 60%, #C9BCA2 100%);
    overflow: hidden;
}
.nf-swatch::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.5;
    mix-blend-mode: multiply;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='matrix' values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.05 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
    pointer-events: none;
}

/* Etichette overline: small-caps del serif, non mono — la firma tipografica distintiva del sito */
.nf-over {
    font-family: var(--nf-serif);
    font-style: italic;
    font-variant: small-caps;
    text-transform: lowercase;
    font-size: 15px;
    letter-spacing: 0.08em;
    color: var(--nf-body);
}

/* Bottoni — contorno sottile di default (boutique), non riempimento pieno (da saldo) */
.nf-btn {
    display: inline-block;
    background: transparent;
    color: var(--nf-ink);
    border: 1px solid var(--nf-ink);
    cursor: pointer;
    font-family: var(--nf-sans);
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    padding: 16px 34px;
    transition: background 0.25s ease-out, color 0.25s ease-out, border-color 0.25s ease-out;
}
.nf-btn:hover { background: var(--nf-ink); color: var(--nf-light); }
.nf-btn--light { color: var(--nf-light); border-color: rgba(243, 240, 234, 0.6); }
.nf-btn--light:hover { background: var(--nf-light); color: var(--nf-ink); border-color: var(--nf-light); }
.nf-btn--ghost { border-color: var(--nf-hairline-strong); }
.nf-btn--ghost:hover { background: var(--nf-ink); color: var(--nf-light); border-color: var(--nf-ink); }

/* ==========================================================================
   Announcement bar
   ========================================================================== */

.nf-announce {
    background: var(--nf-ink);
    color: var(--nf-light);
    text-align: center;
    font-family: var(--nf-mono);
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    padding: 9px 16px;
}

/* ==========================================================================
   Header
   ========================================================================== */

.nf-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(243, 240, 234, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(28, 26, 22, 0.07);
    color: var(--nf-ink);
    transition: background 0.4s ease, backdrop-filter 0.4s ease, border-color 0.4s ease, color 0.4s ease;
}

/* Sopra una hero fotografica l'header si toglie di mezzo: niente fondo, testo chiaro.
   La classe la mette il JS della pagina che ha quella hero (home, arte su seta). */
.nf-header.is-over-photo {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom-color: transparent;
    color: var(--nf-light);
}
.nf-header.is-over-photo .nf-header__nav a:hover,
.nf-header.is-over-photo .nf-header__nav a.is-active { border-bottom-color: var(--nf-light); }
.nf-header.is-over-photo .nf-header__burger span { background: var(--nf-light); }

.nf-header__bar {
    max-width: 1440px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
    padding: 24px 32px;
}

.nf-header__nav {
    display: flex;
    gap: 30px;
    font-family: var(--nf-sans);
    font-size: 11.5px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    flex-wrap: wrap;
}
.nf-header__nav a { border-bottom: 1px solid transparent; }
.nf-header__nav a:hover, .nf-header__nav a.is-active { border-bottom-color: var(--nf-ink); }

.nf-header__brand {
    text-align: center;
    font-family: var(--nf-serif);
    font-size: clamp(19px, 2.4vw, 26px);
    letter-spacing: 0.24em;
    font-weight: 500;
    white-space: nowrap;
    text-transform: uppercase;
}

.nf-header__side {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
}

.nf-header__lang {
    display: flex;
    align-items: center;
    font-family: var(--nf-mono);
    font-size: 12px;
    letter-spacing: 0.08em;
}
.nf-header__lang a { padding: 2px 4px; opacity: 0.55; }
.nf-header__lang a.is-active { opacity: 1; font-weight: 700; }
.nf-header__lang span { opacity: 0.4; margin: 0 2px; }

.nf-header__link {
    font-family: var(--nf-mono);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.nf-header__link:hover { opacity: 0.6; }
.nf-header__link.is-active { opacity: 1; font-weight: 700; }
.nf-header__link--nav { border-bottom: 1px solid transparent; }
.nf-header__link--nav:hover, .nf-header__link--nav.is-active { border-bottom-color: var(--nf-ink); }
.nf-header__link--nav.is-active { font-weight: inherit; }

.nf-header__link--cart { display: flex; align-items: center; gap: 6px; }
.nf-header__cart-icon { width: 19px; height: 19px; flex-shrink: 0; }

/* Burger + drawer mobile */
.nf-header__burger {
    display: none;
    justify-self: start;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 0;
    flex-direction: column;
    gap: 4px;
    width: 26px;
}
.nf-header__burger span { height: 1.5px; background: var(--nf-ink); width: 100%; display: block; }

.nf-drawer {
    display: none;
    border-top: 1px solid var(--nf-hairline);
    padding: 8px 18px 20px;
    background: var(--nf-bg);
}
.nf-drawer.is-open { display: block; }
.nf-drawer, .nf-drawer a { color: var(--nf-ink); }
.nf-drawer a {
    display: block;
    font-family: var(--nf-serif);
    font-size: 19px;
    padding: 13px 0;
    border-bottom: 1px solid rgba(28, 26, 22, 0.1);
}
.nf-drawer .nf-header__lang { padding-top: 20px; font-size: 14px; }

@media (max-width: 900px) {
    .nf-header__bar { padding: 14px 18px; gap: 8px; }
    .nf-header__nav, .nf-header__side .nf-header__link--account, .nf-header__side .nf-header__link--nav, .nf-header__side .nf-header__lang { display: none; }
    .nf-header__burger { display: flex; }
    .nf-header__brand { font-size: 16px; letter-spacing: 0.16em; }
    .nf-header__side { gap: 12px; }
}

/* ==========================================================================
   Footer
   ========================================================================== */

.nf-footer {
    background: var(--nf-ink);
    color: var(--nf-light);
    padding: clamp(56px, 7vw, 88px) 28px 40px;
}

.nf-footer__inner { max-width: 1440px; margin: 0 auto; }

.nf-footer__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 40px 24px;
    padding-bottom: 52px;
    border-bottom: 1px solid rgba(243, 240, 234, 0.16);
}

.nf-footer__brand {
    font-family: var(--nf-serif);
    font-size: 22px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.nf-footer__tag {
    font-size: 13px;
    line-height: 1.7;
    color: rgba(243, 240, 234, 0.62);
    max-width: 240px;
    margin: 0 0 22px;
}

.nf-footer__title {
    font-family: var(--nf-mono);
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(243, 240, 234, 0.55);
    margin-bottom: 16px;
}

.nf-footer__links { display: flex; flex-direction: column; gap: 11px; font-size: 14px; }
.nf-footer__links a:hover { color: rgba(243, 240, 234, 0.6); }

.nf-footer__news { max-width: 260px; }
.nf-footer__news-tag { font-size: 13px; color: rgba(243, 240, 234, 0.62); margin: 0 0 10px; }
.nf-footer__news-form { display: flex; border: 1px solid rgba(243, 240, 234, 0.3); }
.nf-footer__news-form input {
    flex: 1;
    min-width: 0;
    background: none;
    border: none;
    outline: none;
    color: var(--nf-light);
    font-size: 13px;
    padding: 12px;
}
.nf-footer__news-form input::placeholder { color: rgba(243, 240, 234, 0.4); }
.nf-footer__news-form button {
    background: var(--nf-light);
    color: var(--nf-ink);
    border: none;
    cursor: pointer;
    font-family: var(--nf-mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 12px 16px;
}
.nf-footer__news-form button:hover { background: rgba(243, 240, 234, 0.85); }

.nf-footer__bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding-top: 28px;
    flex-wrap: wrap;
}

.nf-footer__copy, .nf-footer__pay {
    font-family: var(--nf-mono);
    font-size: 11px;
    letter-spacing: 0.06em;
    color: rgba(243, 240, 234, 0.5);
}
.nf-footer__pay { letter-spacing: 0.1em; }

.nf-footer__bottom-side { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }

.nf-footer__credit {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 28px;
    padding-top: 28px;
    border-top: 1px solid rgba(243, 240, 234, 0.12);
    font-family: var(--nf-mono);
    font-size: 13px;
    letter-spacing: 0.08em;
    color: rgba(243, 240, 234, 0.75);
    opacity: 0.9;
    transition: opacity 0.2s;
}
.nf-footer__credit:hover { opacity: 1; }
.nf-footer__credit img { height: 20px; width: auto; }

.nf-footer .nf-header__lang a { color: var(--nf-light); }

/* VIDEO FILL — riempie un contenitore position:relative (mosaici foto+video) */
.nf-video-fill { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
@media (prefers-reduced-motion: reduce) { .nf-video-fill { display: none; } }

/* ==========================================================================
   Card prodotto (home, shop, correlati)
   ========================================================================== */

/* Card prodotto */
.nf-card { display: block; }

.nf-card__media {
    aspect-ratio: 3 / 4;
    position: relative;
    margin-bottom: 18px;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px var(--nf-hairline);
}
.nf-card__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1), filter 0.9s ease;
}
.nf-card:hover .nf-card__media img { transform: scale(1.05); filter: saturate(1.06); }
@media (prefers-reduced-motion: reduce) { .nf-card__media img, .nf-card:hover .nf-card__media img { transition: none; transform: none; filter: none; } }

.nf-card__quick {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--nf-ink);
    color: var(--nf-light);
    font-family: var(--nf-mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-align: center;
    padding: 11px;
    transform: translateY(100%);
    transition: transform 0.25s;
}
.nf-card:hover .nf-card__quick { transform: translateY(0); }

.nf-card__row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}

.nf-card__name {
    font-family: var(--nf-serif);
    font-weight: 400;
    font-size: 19px;
    margin: 0;
}

.nf-card__price { font-family: var(--nf-mono); font-size: 13px; }
.nf-card__price-old { color: var(--nf-muted); text-decoration: line-through; margin-right: 5px; }

.nf-card__over { font-size: 12.5px; color: var(--nf-muted); margin-top: 4px; }

.nf-card__color { display: inline-flex; align-items: center; gap: 5px; font-family: var(--nf-sans); font-size: 12.5px; color: var(--nf-muted); font-weight: 400; margin-left: 8px; vertical-align: middle; }
.nf-card__dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }

/* ==========================================================================
   Masthead di pagina — condiviso da about, arte-su-seta, pittura, contatti
   ========================================================================== */

.nf-page-head { padding: clamp(40px, 5vw, 72px) 28px clamp(40px, 6vw, 64px); text-align: center; }
.nf-page-head--start { text-align: left; }
.nf-page-head__over { margin-bottom: 18px; }
.nf-page-head__title {
    font-family: var(--nf-serif);
    font-weight: 400;
    font-size: clamp(2.4rem, 5vw, 4rem);
    line-height: 1;
    margin: 0;
}

/* ==========================================================================
   Contact form — condiviso da arte-su-seta, pittura, contatti
   ========================================================================== */

.nf-contact-form { max-width: 560px; }
.nf-contact-form__title { font-family: var(--nf-serif); font-weight: 400; font-size: clamp(1.9rem, 3.4vw, 2.6rem); margin: 0 0 14px; }
.nf-contact-form__text { font-size: 15px; line-height: 1.65; color: var(--nf-body); margin: 0 0 32px; max-width: 46ch; }

.nf-contact-form__fields { display: flex; flex-direction: column; gap: 20px; }

.nf-field { display: flex; flex-direction: column; gap: 8px; }
.nf-field label { font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--nf-muted); }
.nf-field input, .nf-field textarea {
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--nf-hairline-strong);
    padding: 8px 0;
    font-family: var(--nf-sans);
    font-size: 15px;
    color: var(--nf-ink);
    outline: none;
    resize: vertical;
    transition: border-color 0.2s;
}
.nf-field input:focus, .nf-field textarea:focus { border-color: var(--nf-ink); }

.nf-checkbox { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; line-height: 1.5; color: var(--nf-body); cursor: pointer; }
.nf-checkbox input { margin-top: 3px; }
.nf-checkbox a { text-decoration: underline; text-underline-offset: 2px; }

.nf-contact-form__thanks, .nf-contact-form__error { font-size: 15px; line-height: 1.65; max-width: 46ch; }
.nf-contact-form__error { color: var(--nf-accent); }
