/* ==================================================
   DESIGN SYSTEM
   SHAMÁ STUDIO MASSAGGI
================================================== */


/* ==================================================
   1. VARIABILI GENERALI
================================================== */

:root {

    /* ----------------------------------------------
       COLORI PRINCIPALI
    ---------------------------------------------- */

    --color-primary: #55705a;
    --color-primary-dark: #263f31;
    --color-primary-darker: #1d3025;
    --color-primary-light: #aeb99a;
    --color-primary-soft: #dfe5d8;

    --color-background: #f8f5ef;
    --color-background-alt: #f0ece3;
    --color-surface: #fffdf9;
    --color-surface-soft: #f5f2eb;

    --color-text: #2f342f;
    --color-text-dark: #20251f;
    --color-text-muted: #686d66;
    --color-text-light: #ffffff;

    --color-border: rgba(46, 63, 49, 0.14);
    --color-border-strong: rgba(46, 63, 49, 0.24);

    --color-whatsapp: #3d7139;
    --color-whatsapp-hover: #315f2e;

    --color-error: #8a4d48;
    --color-success: #55705a;


    /* ----------------------------------------------
       FONT
    ---------------------------------------------- */

    --font-heading: "Playfair Display", Georgia, serif;
    --font-body: "DM Sans", Arial, sans-serif;


    /* ----------------------------------------------
       DIMENSIONI TESTO
    ---------------------------------------------- */

    --font-size-xs: 0.72rem;
    --font-size-sm: 0.86rem;
    --font-size-base: 1rem;
    --font-size-md: 1.08rem;
    --font-size-lg: 1.25rem;
    --font-size-xl: 1.55rem;

    --font-size-h1: clamp(3.4rem, 6vw, 6rem);
    --font-size-h2: clamp(2.25rem, 4vw, 3.8rem);
    --font-size-h3: clamp(1.45rem, 2vw, 2rem);
    --font-size-h4: 1.25rem;


    /* ----------------------------------------------
       ALTEZZE DELLE RIGHE
    ---------------------------------------------- */

    --line-height-tight: 1.05;
    --line-height-heading: 1.12;
    --line-height-body: 1.7;
    --line-height-small: 1.5;


    /* ----------------------------------------------
       PESI FONT
    ---------------------------------------------- */

    --font-weight-regular: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;


    /* ----------------------------------------------
       SPAZIATURE
    ---------------------------------------------- */

    --space-2xs: 4px;
    --space-xs: 8px;
    --space-sm: 12px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;
    --space-4xl: 88px;
    --space-5xl: 112px;


    /* ----------------------------------------------
       CONTENITORI
    ---------------------------------------------- */

    --container-small: 760px;
    --container-medium: 1040px;
    --container-large: 1280px;
    --container-wide: 1380px;

    --page-padding-desktop: 5%;
    --page-padding-tablet: 40px;
    --page-padding-mobile: 24px;


    /* ----------------------------------------------
       ANGOLI
    ---------------------------------------------- */

    --radius-xs: 4px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --radius-round: 999px;


    /* ----------------------------------------------
       OMBRE
    ---------------------------------------------- */

    --shadow-small:
        0 8px 22px rgba(42, 55, 43, 0.06);

    --shadow-medium:
        0 16px 40px rgba(42, 55, 43, 0.09);

    --shadow-large:
        0 24px 60px rgba(42, 55, 43, 0.12);


    /* ----------------------------------------------
       TRANSIZIONI
    ---------------------------------------------- */

    --transition-fast: 180ms ease;
    --transition-base: 300ms ease;
    --transition-slow: 500ms cubic-bezier(0.22, 1, 0.36, 1);


    /* ----------------------------------------------
       HEADER
    ---------------------------------------------- */

    --header-height: 88px;
    --header-height-scrolled: 72px;
}


/* ==================================================
   2. RESET GENERALE
================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--color-background);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-regular);
    line-height: var(--line-height-body);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

body,
button,
input,
textarea,
select {
    font-family: var(--font-body);
}

img,
picture,
svg,
video {
    display: block;
    max-width: 100%;
}

img {
    height: auto;
}

a {
    color: inherit;
}

button,
a,
summary {
    -webkit-tap-highlight-color: transparent;
}


/* ==================================================
   3. TITOLI
================================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 0;
    color: var(--color-primary-dark);
    font-family: var(--font-heading);
    font-weight: var(--font-weight-medium);
    text-wrap: balance;
}

h1 {
    margin-bottom: var(--space-lg);
    font-size: var(--font-size-h1);
    line-height: var(--line-height-tight);
    letter-spacing: -0.035em;
}

h2 {
    margin-bottom: var(--space-lg);
    font-size: var(--font-size-h2);
    line-height: var(--line-height-heading);
    letter-spacing: -0.025em;
}

h3 {
    margin-bottom: var(--space-md);
    font-size: var(--font-size-h3);
    line-height: 1.2;
}

h4 {
    margin-bottom: var(--space-sm);
    font-size: var(--font-size-h4);
    line-height: 1.3;
}


/* ==================================================
   4. TESTI E PARAGRAFI
================================================== */

p {
    margin-top: 0;
    margin-bottom: var(--space-md);
    color: var(--color-text);
    font-size: var(--font-size-base);
    line-height: var(--line-height-body);
}

p:last-child {
    margin-bottom: 0;
}

.text-large {
    font-size: var(--font-size-md);
    line-height: 1.75;
}

.text-small {
    font-size: var(--font-size-sm);
    line-height: var(--line-height-small);
}

.text-muted {
    color: var(--color-text-muted);
}

.text-light {
    color: var(--color-text-light);
}

.text-center {
    text-align: center;
}

.text-balance {
    text-wrap: balance;
}


/* ==================================================
   5. ETICHETTE SOPRA I TITOLI
================================================== */

.eyebrow,
.section-eyebrow,
.treatment-eyebrow {
    margin-bottom: var(--space-md);
    color: var(--color-primary);
    font-family: var(--font-body);
    font-size: var(--font-size-xs);
    line-height: 1.2;
    font-weight: var(--font-weight-bold);
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.eyebrow--light {
    color: rgba(255, 255, 255, 0.82);
}


/* ==================================================
   6. CONTENITORI
================================================== */

.container {
    width: min(
        var(--container-large),
        calc(100% - (var(--page-padding-desktop) * 2))
    );
    margin-inline: auto;
}

.container--small {
    max-width: var(--container-small);
}

.container--medium {
    max-width: var(--container-medium);
}

.container--wide {
    width: min(
        var(--container-wide),
        calc(100% - (var(--page-padding-desktop) * 2))
    );
    margin-inline: auto;
}


/* ==================================================
   7. SEZIONI
================================================== */

.section {
    padding:
        var(--space-4xl)
        var(--page-padding-desktop);
}

.section--compact {
    padding-top: var(--space-3xl);
    padding-bottom: var(--space-3xl);
}

.section--large {
    padding-top: var(--space-5xl);
    padding-bottom: var(--space-5xl);
}

.section--light {
    background: var(--color-surface);
}

.section--beige {
    background: var(--color-background-alt);
}

.section--sage {
    background: var(--color-primary-soft);
}

.section--dark {
    background: var(--color-primary-dark);
    color: var(--color-text-light);
}

.section-heading {
    max-width: 760px;
    margin: 0 auto var(--space-2xl);
    text-align: center;
}

.section-heading h2 {
    margin-bottom: var(--space-md);
}

.section-heading p {
    color: var(--color-text-muted);
}


/* ==================================================
   8. PULSANTI
================================================== */

.button,
.btn,
.primary-button,
.treatment-primary-button {
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 24px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.92rem;
    line-height: 1.2;
    font-weight: var(--font-weight-semibold);
    letter-spacing: 0.01em;
    text-align: center;
    text-decoration: none;
    transition:
        color var(--transition-base),
        background-color var(--transition-base),
        border-color var(--transition-base),
        box-shadow var(--transition-base),
        transform var(--transition-base);
}

.button svg,
.btn svg,
.primary-button svg,
.treatment-primary-button svg {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
}


/* Pulsante principale */

.button--primary,
.btn-primary,
.primary-button {
    background: var(--color-primary-dark);
    color: var(--color-text-light);
    box-shadow: var(--shadow-small);
}

.button--primary:hover,
.btn-primary:hover,
.primary-button:hover {
    background: var(--color-primary-darker);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}


/* Pulsante WhatsApp */

.button--whatsapp,
.treatment-primary-button {
    background: var(--color-whatsapp);
    color: var(--color-text-light);
    box-shadow: var(--shadow-small);
}

.button--whatsapp:hover,
.treatment-primary-button:hover {
    background: var(--color-whatsapp-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}


/* Pulsante con bordo */

.button--outline {
    border-color: var(--color-primary-dark);
    background: transparent;
    color: var(--color-primary-dark);
}

.button--outline:hover {
    background: var(--color-primary-dark);
    color: var(--color-text-light);
    transform: translateY(-2px);
}


/* Pulsante chiaro */

.button--light {
    background: var(--color-surface);
    color: var(--color-primary-dark);
}

.button--light:hover {
    background: var(--color-background-alt);
    transform: translateY(-2px);
}


/* ==================================================
   9. LINK TESTUALI
================================================== */

.text-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--color-primary-dark);
    font-weight: var(--font-weight-semibold);
    text-decoration: none;
}

.text-link::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: -3px;
    left: 0;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform var(--transition-base);
}

.text-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}


/* ==================================================
   10. CARD
================================================== */

.card {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    box-shadow: var(--shadow-small);
    transition:
        transform var(--transition-base),
        box-shadow var(--transition-base),
        border-color var(--transition-base);
}

.card:hover {
    border-color: var(--color-border-strong);
    transform: translateY(-4px);
    box-shadow: var(--shadow-medium);
}


/* ==================================================
   11. IMMAGINI
================================================== */

.image-wrapper {
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--color-background-alt);
    box-shadow: var(--shadow-small);
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition:
        transform 700ms cubic-bezier(0.22, 1, 0.36, 1),
        opacity var(--transition-base);
}

.image-wrapper:hover img {
    transform: scale(1.035);
}


/* ==================================================
   12. BORDI E DIVISORI
================================================== */

.divider {
    width: 100%;
    height: 1px;
    border: 0;
    background: var(--color-border);
}

.divider--short {
    width: 64px;
}

.divider--light {
    background: rgba(255, 255, 255, 0.18);
}


/* ==================================================
   13. FOCUS ACCESSIBILE
================================================== */

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid rgba(85, 112, 90, 0.65);
    outline-offset: 4px;
}


/* ==================================================
   14. SELEZIONE DEL TESTO
================================================== */

::selection {
    background: var(--color-primary-light);
    color: var(--color-primary-darker);
}


/* ==================================================
   15. RESPONSIVE
================================================== */

@media (max-width: 900px) {

    :root {
        --font-size-h1: clamp(3rem, 10vw, 4.8rem);
        --font-size-h2: clamp(2.1rem, 7vw, 3.2rem);
        --space-4xl: 72px;
        --space-5xl: 88px;
    }

    .container,
    .container--wide {
        width: calc(100% - (var(--page-padding-tablet) * 2));
    }

    .section {
        padding-right: var(--page-padding-tablet);
        padding-left: var(--page-padding-tablet);
    }
}


@media (max-width: 650px) {

    :root {
        --font-size-base: 0.97rem;
        --font-size-h1: clamp(2.8rem, 14vw, 4rem);
        --font-size-h2: clamp(2rem, 10vw, 2.8rem);
        --font-size-h3: 1.45rem;

        --space-3xl: 52px;
        --space-4xl: 64px;
        --space-5xl: 76px;
    }

    .container,
    .container--wide {
        width: calc(100% - (var(--page-padding-mobile) * 2));
    }

    .section {
        padding-right: var(--page-padding-mobile);
        padding-left: var(--page-padding-mobile);
    }

    .button,
    .btn,
    .primary-button,
    .treatment-primary-button {
        width: 100%;
        min-height: 52px;
    }
}


/* ==================================================
   16. RIDUZIONE DELLE ANIMAZIONI
================================================== */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}