/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Spacing */
    --unit: 100px;
    --space-lr: calc(var(--unit) / 2);
    --space-lr-wide: calc(var(--unit) * 2);
    --space-lr-narrow: calc(var(--unit) / 4);
    --space-tb: calc(var(--unit) * 1);
    --width-content: 1600px;
    --menu-height: 100px;
    --radius: 25px;

    /* Typography */
    --p: 1rem;
    --p-little: calc(var(--p) - 0.1rem);
    --p-tiny: calc(var(--p) - 0.2rem);
    --heading-1: 2.5rem;
    --heading-2: 2rem;
    --heading-3: 1.7rem;
    --heading-4: 1.25rem;
    --heading-5: 1.2rem;
    --heading-6: 1.1rem;
    --heading-7: 0.938rem;
    --heading-8: 0.813rem;
    --logo-w: 200px;

    /* Colors */
    --color-primary: #685D5A;
    --color-bg: #EFE9E7;
    --color-bg-light: #F5F3ED;
    --color-section-title: #A29A96;
    --color-white: #FFFFFF;

    --verde: #b6c5b7;
    --verde-scuro: #7C9484;
    --azzurro: #C4DDE4;
    --azzurro-scuro: #9cbcc4;
    --arancione: #DFC7B1;
    --arancione-scuro: #c49c7c;
    --viola: #C4B4D4;
    --viola-scuro: #947ca4;
    --verde-acqua: #B4DCD8;
    --verde-acqua-scuro: #6cb4ac;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--menu-height);
}

body {
    font-family: 'Outfit', sans-serif;
    font-weight: 400;
    font-size: var(--p);
    line-height: 1.9;
    color: var(--color-primary);
    background-color: var(--color-bg);
    cursor: url('../img/cursor-default.png'), auto;
    -webkit-font-smoothing: antialiased;
}

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

img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 400;
    line-height: 1.3;
}

p { line-height: 1.9; }
p strong { font-weight: 600; }
p a { color: inherit; }

.title strong {
    font-weight: 400;
    background-color: var(--color-bg-light);
    border-radius: 20px;
    padding: 0 0.3em;
}

/* ============================================
   UTILITY
   ============================================ */
.section-title {
    text-transform: uppercase;
    color: var(--color-section-title);
    font-size: var(--heading-8);
    display: block;
    margin-bottom: 0.5rem;
}

.title { font-size: var(--heading-2); margin-bottom: 1.5rem; }

.container {
    max-width: var(--width-content);
    margin: 0 auto;
    padding: var(--space-tb) var(--space-lr-wide);
}
.container-full {
    width: 100%;
    padding: var(--space-lr-narrow);
}

.center { text-align: center; margin-top: 2rem; }

.btn-primary {
    display: inline-block;
    background-color: var(--color-primary);
    color: var(--color-white);
    font-family: 'Outfit', sans-serif;
    font-size: var(--p-little);
    font-weight: 500;
    padding: 0.75em 2em;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-decoration: none;
}
.btn-primary:hover {
    background-color: #4a413f;
    cursor: url('../img/cursor-hover.png'), pointer;
}

/* Custom cursor for interactive elements */
a:hover,
button:hover,
summary:hover {
    cursor: url('../img/cursor-hover.png'), pointer;
}

/* ============================================
   HEADER
   ============================================ */
#header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: var(--menu-height);
    padding: 10px var(--space-lr-narrow);
    display: flex;
    align-items: center;
    transition: background-color 0.3s;
}

#header.scrolled {
    background-color: rgba(239, 233, 231, 0.95);
    backdrop-filter: blur(10px);
}

.header-inner {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    width: var(--logo-w);
    max-width: var(--logo-w);
    border-radius: 0;
}

.nav-desktop ul {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 2rem;
}

.nav-desktop a {
    font-size: var(--p-tiny);
    position: relative;
}

.nav-desktop a:not(.btn-nav)::after {
    content: '';
    width: 0;
    height: 1px;
    background: var(--color-primary);
    position: absolute;
    bottom: -2px;
    left: 0;
    transition: width 500ms;
}
.nav-desktop a:not(.btn-nav):hover::after {
    width: 100%;
}

.btn-nav {
    background-color: var(--color-primary);
    color: var(--color-white) !important;
    padding: 0.5em 1.5em;
    border-radius: 50px;
    font-weight: 500;
}
.btn-nav:hover { background-color: #4a413f; }

/* Header gradient overlay */
#header-sfuma {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: calc(var(--menu-height) + 30px);
    background: linear-gradient(to bottom, var(--color-bg) 0%, transparent 100%);
    z-index: 99;
    pointer-events: none;
}

/* Hamburger */
.hamburger {
    display: none;
    background: none;
    border: none;
    padding: 8px;
    z-index: 101;
}

.hamburger-box {
    width: 30px;
    height: 24px;
    position: relative;
}

.hamburger-inner,
.hamburger-inner::before,
.hamburger-inner::after {
    width: 30px;
    height: 2px;
    background-color: var(--color-primary);
    border-radius: 4px;
    position: absolute;
    transition: transform 0.3s ease, opacity 0.2s ease;
}
.hamburger-inner { top: 50%; margin-top: -1px; }
.hamburger-inner::before,
.hamburger-inner::after { content: ''; display: block; }
.hamburger-inner::before { top: -10px; }
.hamburger-inner::after { bottom: -10px; }

/* Hamburger active */
.hamburger.is-active .hamburger-inner {
    transform: rotate(-45deg);
}
.hamburger.is-active .hamburger-inner::before {
    top: 0;
    transform: rotate(-90deg);
}
.hamburger.is-active .hamburger-inner::after {
    opacity: 0;
    bottom: 0;
}

/* Mobile menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 400px;
    height: 100vh;
    background: var(--color-bg);
    z-index: 100;
    padding: calc(var(--menu-height) + 2rem) 2rem 2rem;
    transition: right 0.4s ease;
}
.mobile-menu.is-open { right: 0; }

.mobile-menu ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.mobile-menu a { font-size: var(--heading-5); }

/* ============================================
   HERO
   ============================================ */
.hero {
    width: 100%;
    height: 100vh;
    padding: calc(var(--menu-height) + calc(var(--unit) / 5)) var(--space-lr-narrow) calc(var(--unit) / 4);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: var(--space-lr-narrow);
    background-size: cover;
    background-position: center;
    border-radius: var(--radius);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    width: 100%;
}

.hero-subtitle {
    font-size: var(--heading-4);
    font-weight: 400;
    color: var(--color-white);
    position: absolute;
    bottom: 0;
    left: var(--space-lr-narrow);
    text-align: left;
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInUp 1s ease-out 2.3s forwards;
}
.hero-subtitle-light { font-weight: 300; }

.box-title-highlight {
    display: flex;
    justify-content: center;
    align-items: center;
}

.highlight-title.verde {
    font-family: 'Gloock', serif;
    display: inline;
    line-height: 1.5;
    padding: 0.25em 1.2em;
    border-radius: 2em;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
    background-color: var(--verde);
    color: var(--color-white);
    font-size: var(--heading-1);
    opacity: 0;
}

.highlight-title.verde.animate {
    animation: fadeBg 1.5s ease-out forwards;
}
.highlight-title.verde.animate .word {
    display: inline-block;
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInWord 1s ease-out forwards;
}

.highlight-title.pesca {
    font-family: 'Gloock', serif;
    display: inline;
    line-height: 1.5;
    padding: 0.25em 1.2em;
    border-radius: 2em;
    background-color: var(--arancione);
    color: var(--color-primary);
    font-size: var(--heading-6);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeBg {
    from { background-color: rgba(182, 197, 183, 0); opacity: 0; }
    to { background-color: var(--verde); opacity: 1; }
}

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

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Scroll animation class */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Hero is special — don't use scroll animation, use its own */
.hero.animate-on-scroll { opacity: 1; transform: none; }

/* ============================================
   TWO COLUMN LAYOUT
   ============================================ */
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: calc(var(--unit) / 2);
    align-items: start;
}
.two-col-reverse { direction: rtl; }
.two-col-reverse > * { direction: ltr; }

.col-text { display: flex; flex-direction: column; gap: 1rem; }

.col-image { position: relative; }

.col-sticky {
    position: sticky;
    top: calc(var(--menu-height) + 20px);
}

.image-wrapper { position: relative; }

.badge-nome {
    position: absolute;
    bottom: 1.5rem;
    left: 1.5rem;
    z-index: 2;
}

/* ============================================
   BOX SFIDE (Carousel cards)
   ============================================ */
.sfide-intro {
    font-family: 'Gloock', serif;
    font-size: var(--heading-5);
    text-align: center;
    margin-bottom: 2rem;
}

.box-sfida {
    border: solid 2px;
    border-radius: 20px;
    min-height: 160px;
    padding: 15px;
    background-repeat: no-repeat;
    background-position: 95% 90%;
    background-size: 110px auto;
    cursor: pointer;
    transition: border-color 0.3s ease;
    display: flex;
    align-items: flex-start;
    text-align: left;
    width: 100%;
    font-family: 'Outfit', sans-serif;
}

.box-sfida h3 {
    width: 50%;
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    font-size: var(--heading-5);
    color: var(--color-primary);
}

.box-sfida.ansia {
    border-color: var(--verde);
    background-color: var(--verde);
    background-image: url('../img/ico-sfida-1.png');
    background-size: 130px auto;
}
.box-sfida.ansia:hover { border-color: var(--verde-scuro); }

.box-sfida.difficolta {
    border-color: var(--azzurro);
    background-color: var(--azzurro);
    background-image: url('../img/ico-sfida-2.png');
    background-size: 90px auto;
}
.box-sfida.difficolta:hover { border-color: var(--azzurro-scuro); }

.box-sfida.cambiamenti {
    border-color: var(--arancione);
    background-color: var(--arancione);
    background-image: url('../img/ico-sfida-3.png');
    background-size: 85px auto;
}
.box-sfida.cambiamenti:hover { border-color: var(--arancione-scuro); }

.box-sfida.relazioni {
    border-color: var(--viola);
    background-color: var(--viola);
    background-image: url('../img/ico-sfida-4.png');
    background-size: 85px auto;
}
.box-sfida.relazioni:hover { border-color: var(--viola-scuro); }

.box-sfida.tecniche {
    border-color: var(--verde-acqua);
    background-color: var(--verde-acqua);
    background-image: url('../img/ico-sfida-5.png');
    background-size: 110px auto;
}
.box-sfida.tecniche:hover { border-color: var(--verde-acqua-scuro); }

.sfide-note {
    text-align: center;
    margin: 2rem 0 1.5rem;
}

/* ============================================
   CITAZIONE
   ============================================ */
.citazione {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.cit {
    position: relative;
    font-size: var(--heading-3);
}

.cit::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    width: 65px;
    height: 50px;
    background-image: url('../img/ico-virgoletta.png');
    background-size: contain;
    background-repeat: no-repeat;
    z-index: -1;
}

/* ============================================
   LOTTIE
   ============================================ */
.lottie-container {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

/* ============================================
   ACCORDION
   ============================================ */
.accordion { display: flex; flex-direction: column; }

.accordion-item {
    border-bottom: 1px solid rgba(162, 154, 150, 0.3);
}

.accordion-item summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 0;
    cursor: pointer;
    list-style: none;
}
.accordion-item summary::-webkit-details-marker { display: none; }
.accordion-item summary::marker { display: none; }

.accordion-item summary h3,
.accordion-item summary p {
    font-size: var(--p);
    font-family: 'Outfit', sans-serif;
    font-weight: 400;
    line-height: 1.9;
    flex: 1;
}
.accordion-item summary h3 strong,
.accordion-item summary p strong {
    font-weight: 500;
}

.accordion-icon {
    width: 22px;
    height: 22px;
    position: relative;
    flex-shrink: 0;
    margin-left: 1rem;
}
.accordion-icon::before,
.accordion-icon::after {
    content: '';
    position: absolute;
    background: var(--color-section-title);
    transition: transform 0.4s ease;
}
.accordion-icon::before {
    width: 1px;
    height: 16px;
    top: 3px;
    left: 50%;
    transform: translateX(-50%);
}
.accordion-icon::after {
    width: 16px;
    height: 1px;
    top: 50%;
    left: 3px;
    transform: translateY(-50%);
}

.accordion-item[open] .accordion-icon::before {
    transform: translateX(-50%) rotate(90deg);
}

.accordion-content {
    padding: 0 0 1.25rem;
    animation: fadeIn 0.4s ease;
}

/* ============================================
   CTA BOXES (Contatto)
   ============================================ */
.contatto-wrapper {
    max-width: var(--width-content);
    margin: 0 auto;
    background-color: var(--color-bg-light);
    border-radius: var(--radius);
    padding: var(--space-tb) var(--space-lr-wide);
}

.contatto-header {
    margin-bottom: 2rem;
}

.cta-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.box-cta {
    border: solid 2px;
    border-radius: 20px;
    min-height: 160px;
    padding: 15px;
    background-repeat: no-repeat;
    background-position: 95% 90%;
    cursor: pointer;
    transition: border-color 0.3s ease;
    display: block;
    text-align: left;
    font-family: 'Outfit', sans-serif;
    text-decoration: none;
    color: var(--color-primary);
}

.box-cta h3 { font-size: var(--heading-5); margin-bottom: 0.5rem; }
.box-cta .title-box p { font-size: var(--p-little); line-height: 1.4; }

.box-cta.form {
    border-color: var(--arancione);
    background-color: var(--arancione);
    background-image: url('../img/ico-form.png');
    background-size: 110px auto;
}
.box-cta.form:hover { border-color: #C39B7B; }

.box-cta.whatsapp {
    border-color: var(--verde);
    background-color: var(--verde);
    background-image: url('../img/ico-whatsapp.png');
    background-size: 68px auto;
    background-position: 96% 85%;
}
.box-cta.whatsapp:hover { border-color: var(--verde-scuro); }

.box-cta.data {
    border-color: var(--verde-acqua);
    background-color: var(--verde-acqua);
    background-image: url('../img/ico-calendar.png');
    background-size: 70px auto;
    background-position: 94% 85%;
}
.box-cta.data:hover { border-color: var(--verde-acqua-scuro); }

/* ============================================
   ICON LIST
   ============================================ */
.icon-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.icon-list li {
    padding-left: 1.5rem;
    position: relative;
}
.icon-list li::before {
    content: '↗';
    position: absolute;
    left: 0;
    color: var(--color-section-title);
    font-size: 0.8em;
}

/* ============================================
   STUDIO CAROUSEL
   ============================================ */
.studio-carousel {
    border-radius: var(--radius);
    overflow: hidden;
}
.studio-carousel img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

/* ============================================
   MODALS
   ============================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(104, 93, 90, 0.5);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.modal-overlay.is-open {
    opacity: 1;
    pointer-events: all;
}

.modal {
    background: var(--color-bg);
    border-radius: var(--radius);
    max-width: 640px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2.5rem;
    position: relative;
    display: none;
}
.modal.is-active { display: block; }

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--color-primary);
    cursor: pointer;
    line-height: 1;
}

.modal h3 { font-size: var(--heading-3); margin-bottom: 0.5rem; }
.modal h4 { font-size: var(--heading-5); font-weight: 400; margin-bottom: 1rem; color: var(--color-section-title); }

/* ============================================
   FORM
   ============================================ */
.form-group {
    margin-bottom: 1rem;
}
.form-group label {
    display: block;
    font-size: var(--p-little);
    margin-bottom: 0.3rem;
    font-weight: 500;
}
.form-group input[type="text"],
.form-group input[type="tel"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(162, 154, 150, 0.4);
    border-radius: 12px;
    font-family: 'Outfit', sans-serif;
    font-size: var(--p);
    background: var(--color-white);
    color: var(--color-primary);
    outline: none;
    transition: border-color 0.3s;
}
.form-group input:focus { border-color: var(--color-primary); }

.form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}
.form-checkbox input { margin-top: 0.3rem; }
.form-checkbox label { font-size: var(--p-tiny); font-weight: 300; }

.btn-form {
    width: 100%;
    margin-top: 0.5rem;
    background: linear-gradient(45deg, #C39B7B, #C39B7B);
}
.btn-form:hover { background: linear-gradient(45deg, #B28866, #B28866); }

/* ============================================
   FOOTER
   ============================================ */
#footer {
    padding: var(--space-lr-narrow);
}

.footer-tagline {
    text-align: center;
    padding: 2rem 0;
}
.footer-tagline .title {
    font-size: var(--heading-3);
    font-family: 'Gloock', serif;
}

.footer-main {
    background-color: var(--color-bg-light);
    border-radius: var(--radius);
    padding: var(--space-lr) var(--space-lr-wide);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-grid p {
    font-size: var(--p-little);
    line-height: 1.4rem;
}

.footer-grid a {
    text-decoration: underline;
    color: inherit;
}

.footer-cta {
    background: linear-gradient(135deg, var(--verde), var(--arancione));
    border-radius: var(--radius);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-decoration: none;
    color: var(--color-primary);
    transition: opacity 0.3s;
}
.footer-cta:hover { opacity: 0.9; }
.footer-cta h3 { font-size: var(--heading-5); margin-bottom: 0.5rem; }
.footer-cta p { font-size: var(--p-tiny); }

.footer-main hr {
    border: none;
    border-top: 1px solid rgba(162, 154, 150, 0.3);
    margin: 2rem 0 1.5rem;
}

.footer-credits {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}
.footer-credits p { font-size: var(--p-tiny); }
.footer-credits a { text-decoration: underline; }

/* ============================================
   RESPONSIVE — TABLET (≤1024px)
   ============================================ */
@media (max-width: 1024px) {
    :root {
        --unit: 80px;
        --space-lr-wide: calc(var(--unit) / 2);
        --radius: 20px;
    }

    .hero { height: 90vh; }
    .nav-desktop { display: none; }
    .hamburger { display: block; }

    .two-col {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .two-col-reverse { direction: ltr; }

    .col-sticky { position: relative; top: auto; }

    .cta-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .highlight-title.verde { font-size: 2rem; }
}

/* ============================================
   RESPONSIVE — MOBILE (≤767px)
   ============================================ */
@media (max-width: 767px) {
    :root {
        --menu-height: 90px;
        --logo-w: 160px;
    }

    body { font-weight: 300; }
    p strong { font-weight: 500; }

    .hero { height: 85vh; }

    .container {
        padding: var(--space-tb) calc(var(--unit) / 3);
    }

    .highlight-title.verde { font-size: 1.65rem; }

    .box-sfida { min-height: 135px; }
    .box-sfida h3 { width: 66%; }

    .footer-grid { grid-template-columns: 1fr; }
    .footer-credits { flex-direction: column; text-align: center; }

    .contatto-wrapper { padding: 2rem 1.5rem; }
}

@media (max-width: 480px) {
    .highlight-title.verde { font-size: 1.55rem; }
}

/* ============================================
   WIDESCREEN (≥2400px)
   ============================================ */
@media (min-width: 2400px) {
    :root {
        --unit: 100px;
        --space-lr: calc(var(--unit) * 1);
        --space-lr-wide: calc(var(--unit) * 3);
        --space-lr-narrow: calc(var(--unit) / 1);
        --width-content: 1900px;
        --p: 1.45rem;
        --heading-1: 3.2rem;
        --heading-2: 2.8rem;
        --heading-3: 1.85rem;
        --heading-4: 1.7rem;
        --heading-5: 1.68rem;
        --heading-6: 1.45rem;
        --heading-7: 1.3rem;
        --heading-8: 1.25rem;
        --logo-w: 270px;
        --menu-height: 150px;
    }

    .box-sfida, .box-cta {
        min-height: 230px;
        padding: 20px;
        border-width: 3px;
    }
}
