:root {
    --clr-protea: 207 72% 25%;
    --clr-bg: 210 20% 98%;
    --clr-fg: 222 47% 11%;
    --clr-fg-2: 215 25% 27%;
    --clr-muted: 210 25% 96%;
    --clr-muted-fg: 215 25% 45%;
    --clr-border: 210 25% 90%;
    --clr-card: 0 0% 100%;
    --radius: 16px;
    --shadow-1: 0 1px 3px hsl(210 20% 85% / .35), 0 1px 2px hsl(210 20% 85% / .25);
    --shadow-2: 0 6px 12px -2px hsl(210 20% 85% / .45), 0 2px 6px -1px hsl(210 20% 85% / .35);
    --shadow-3: 0 14px 28px -6px hsl(210 20% 85% / .45), 0 10px 14px -6px hsl(210 20% 85% / .35);
    --easing: cubic-bezier(.16,1,.3,1);
    --t-fast: 160ms var(--easing);
    --t-slow: 320ms var(--easing);
}

*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
    cursor: pointer;
}

body {
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    background: hsl(var(--clr-bg));
    color: hsl(var(--clr-fg));
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.wrap {
    width: 100%;
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: 20px;
}

.section {
    padding-block: 50px;
}

.section--lg {
    padding-block: 88px;
}

.grid {
    display: grid;
    gap: 20px;
}

.grid-2 {
    grid-template-columns: 1fr;
}

.stack > * + * {
    margin-top: 14px;
}

.stack-lg > * + * {
    margin-top: 20px;
}

.text-center {
    text-align: center;
}

.muted {
    color: hsl(var(--clr-muted-fg));
}

.lead {
    font-size: clamp(1rem, 1vw + .9rem, 1.28rem);
    color: hsl(var(--clr-fg-2));
}

h1 {
    margin: 0;
    line-height: 1.15;
    font-size: clamp(2.1rem,2.4vw + 1.5rem,3rem);
}

h2 {
    margin: 0;
    line-height: 1.2;
    font-size: clamp(1.6rem,1.4vw + 1.1rem,2.25rem);
}

h3 {
    margin: 0;
    line-height: 1.25;
    font-size: clamp(1.05rem,.8vw + 1rem,1.35rem);
}

h4 {
    margin: 0;
    font-size: 1.05rem;
}

.card {
    background: hsl(var(--clr-card));
    border: 1px solid hsl(var(--clr-border));
    border-radius: var(--radius);
    box-shadow: var(--shadow-1);
}

.pad {
    padding: 18px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .8rem 1.1rem;
    border-radius: 14px;
    border: 1px solid transparent;
    font-weight: 600;
    transition: transform var(--t-fast), box-shadow var(--t-fast), background var(--t-fast), color var(--t-fast);
}

.btn--primary {
    background: hsl(var(--clr-protea));
    color: #fff;
    box-shadow: var(--shadow-2);
}

    .btn--primary:hover {
        transform: translateY(-1px);
        box-shadow: var(--shadow-3);
    }

.btn--ghost {
    background: transparent;
    color: hsl(var(--clr-protea));
    border-color: hsl(var(--clr-protea));
}

    .btn--ghost:hover {
        background: hsl(var(--clr-protea));
        color: #fff;
    }

.feature {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.feature__icon {
    flex: 0 0 auto;
    padding: .6rem;
    border-radius: 12px;
    color: hsl(var(--clr-protea));
    background: hsl(var(--clr-protea) / .08);
}

.feature__text p {
    margin: .25rem 0 0;
    color: hsl(var(--clr-fg-2));
}

/* ===== Form styles (Material icon 'mail' + més gran) ===== */
.form {
    display: flex;
    gap: .5rem;
    align-items: center;
    background: #fff;
    border: 1px solid hsl(var(--clr-border));
    border-radius: 18px;
    padding: .45rem;
    box-shadow: var(--shadow-3);
}

.form__field {
    position: relative;
    flex: 1;
    min-width: 0;
}

.form__input {
    width: 100%;
    border: 0;
    background: transparent;
    outline: none;
    padding: .9rem 1rem .9rem 2.8rem;
    font-size: 1.05rem;
    color: hsl(var(--clr-fg));
}

    .form__input::placeholder {
        color: hsl(var(--clr-muted-fg));
    }

.form__icon {
    position: absolute;
    left: .8rem;
    top: 50%;
    translate: 0 -50%;
    color: hsl(var(--clr-muted-fg));
    font-size: 24px;
    line-height: 1;
    width: auto;
    height: auto;
}
/* REEMPLAÇA les definicions de .ms i .msr per aquestes */
.ms, .msr {
    font-family: 'Material Symbols Rounded' !important;
    font-style: normal;
    font-weight: 400;
    display: inline-block;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
    font-variation-settings: 'FILL' var(--ms-fill, 0), 'wght' var(--ms-wght, 400), 'GRAD' var(--ms-grad, 0), 'opsz' var(--ms-opsz, 24);
}

.msr {
    font-size: 26px;
}
/* icona camps una mica més gran */
.ms {
    font-size: 30px;
}
/* icones de la secció “¿Por qué Protea?” */

/* HERO */
.hero {
    position: relative;
    min-height: 92vh;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: linear-gradient(135deg, hsl(210 25% 98%) 0%, hsl(207 30% 94%) 30%, hsl(207 40% 92%) 100%);
}

.brand {
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 45px;
}

    .brand img {
        height: 100px;
        width: auto;
    }

.hero__container {
    width: 100%;
    max-width: 980px;
    padding-inline: 20px;
    padding-top: 140px;
    position: relative;
    z-index: 2;
}

.hero__inner {
    display: grid;
    gap: 16px;
    justify-items: center;
}

.hero__title {
    text-align: center;
}

.hero__lead {
    text-align: center;
    max-width: 60ch;
}

/* Ambient bubbles (òrbites) */
.orbit {
    position: absolute;
    width: 0;
    height: 0;
    animation: spin linear infinite;
    will-change: transform;
    z-index:0;
}

.bubble {
    display: block;
    border-radius: 999px;
    filter: blur(26px);
    opacity: .75;
    width: var(--size);
    height: var(--size);
    background: hsl(var(--clr-protea) / .55);
    transform: translateX(var(--r)) scale(var(--scale,1));
    animation: breathe 6s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes breathe {
    0%,100% {
        transform: translateX(var(--r)) scale(1);
    }

    50% {
        transform: translateX(var(--r)) scale(1.03);
    }
}

.o1 {
    top: 22%;
    right: 10%;
    --r: 110px;
    --size: 200px;
    animation-duration: 42s;
}

.o2 {
    bottom: 12%;
    left: 24%;
    --r: 85px;
    --size: 120px;
    animation-duration: 36s;
}

.o3 {
    bottom: 8%;
    right: 22%;
    --r: 100px;
    --size: 180px;
    animation-duration: 40s;
}

.o4 {
    top: 18%;
    right: 34%;
    --r: 90px;
    --size: 150px;
    animation-duration: 44s;
}

.o5 {
    top: 30%;
    left: 16%;
    --r: 130px;
    --size: 240px;
    animation-duration: 48s;
}

/* Sticky Pills */
.pills {
    position: sticky;
    top: 0;
    z-index: 40;
    margin-top: -32px;
    padding-top: 32px;
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity var(--t-slow), transform var(--t-slow);
}

    .pills.is-visible {
        opacity: 1;
        transform: none;
        pointer-events: auto;
    }

.pills__wrap {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.pills__list {
    display: flex;
    gap: 6px;
    padding: 6px;
    border: 1px solid hsl(var(--clr-border));
    border-radius: 999px;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow-3);
}

.pills__btn {
    border: 0;
    background: transparent;
    padding: .72rem 1.15rem;
    border-radius: 999px;
    font-weight: 600;
    transition: background var(--t-fast), color var(--t-fast), box-shadow var(--t-fast);
}

    .pills__btn:hover {
        background: hsl(var(--clr-muted));
    }

    .pills__btn.is-active {
        background: hsl(var(--clr-protea));
        color: #fff;
        box-shadow: var(--shadow-2);
    }

/* Bands */
.band {
    border-radius: 20px;
    padding: 26px;
}

.band--mint {
    background: linear-gradient(to bottom, #E8F6F5, #F7FBFB);
}

.band--lav {
    background: linear-gradient(to bottom, #F3F0FA, #FAF9FD);
}

.band--peach {
    background: linear-gradient(to bottom, #FFF4ED, #FFF9F6);
}

/* Why Protea */
.why-wrap {
    display: grid;
    gap: 18px;
}

@media (min-width:768px) {
    .why-wrap {
        grid-template-columns: repeat(2, minmax(0,1fr));
    }
}

.why {
    position: relative;
    overflow: hidden;
    display: grid;
    gap: 10px;
    padding: 85px 22px 34px;
    border-radius: 20px;
    border: 1px solid hsl(var(--clr-border));
    background: #fff;
    box-shadow: var(--shadow-1);
    transition: box-shadow var(--t-fast), transform var(--t-fast);
    z-index: 0;
}

    .why:hover {
        box-shadow: var(--shadow-3);
        transform: translateY(-2px);
    }

.why__badge {
    position: absolute;
    top: 12px;
    left: 12px;
    font-weight: 600;
    font-size: .95rem;
    padding: .45rem .9rem;
    border-radius: 999px;
    background: rgba(255,255,255,.92);
    border: 1px solid hsl(var(--clr-border));
    backdrop-filter: blur(8px);
    z-index: 1;
}

.why__head {
    display: flex;
    align-items: center;
    gap: .85rem;
}

.why__chip {
    display: inline-grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: hsl(var(--clr-protea) / .08);
    color: hsl(var(--clr-protea));
    box-shadow: inset 0 0 0 1px hsl(var(--clr-protea) / .12);
}

.why h3 {
    margin-top: 2px;
}

.why p {
    margin: 0;
    color: hsl(var(--clr-fg-2));
}

.why::after {
    content: "";
    position: absolute;
    right: -40px;
    bottom: -40px;
    width: 180px;
    height: 180px;
    background: radial-gradient(closest-side, hsl(var(--clr-protea) / .08), transparent 65%);
    filter: blur(10px);
    z-index: 0;
}

/* Reveal */
.reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity var(--t-slow), transform var(--t-slow);
}

    .reveal.in {
        opacity: 1;
        transform: none;
    }

/* ===== Desktop/tablet: centra verticalment els dos blocs de cada secció ===== */
@media (min-width:768px) {
    .grid-2 {
        grid-template-columns: repeat(2, minmax(0,1fr));
        gap: 32px;
        align-items: center;
    }
    /* <- clau */
    .hero__container {
        max-width: 1100px;
    }
}

.sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

.icon {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

/* ========= Mobile tweaks ========= */
@media (min-width: 768px) {
    .brand {
        left: 16px;
        top: 16px;
        transform: none;
        margin-top: 0; /* anul·la el marge que el feia baixar */
    }

        .brand img {
            height: 80px; /* una mica més petit en desktop */
            width: auto;
        }

    .hero__container {
        padding-top: 96px; /* menys espai perquè el logo ja no està centrat a sobre */
    }

   

    .hero {
        min-height: 75vh;
    }
}

@media (max-width: 767px) {
    .brand {
        left: 50% !important;
        top: 20px !important;
        transform: translateX(-50%);
    }

        .brand img {
            height: 120px; /* mida fixa en alçada per evitar deformacions */
            width: auto; /* respecta proporció */
            max-width: 80vw; /* evita que s’apropi massa als marges */
            padding-top: 0; /* treu el padding que el deformava */
            object-fit: contain; /* seguretat extra */
        }

    .hero__container {
        padding-top: 30px; /* espai suficient entre logo i text */
    }
    /* Amagar imatges de seccions */
    section figure.card {
        display: none;
    }

    /* Amagar pills a mòbil */
    .pills {
        display: none !important;
    }

    .btn--ghost {
        display: block; /* perquè el margin:auto funcioni fora de flex */
        width: max-content; /* s’ajusta al contingut */
        margin: 12px auto; /* centra horitzontalment */
        text-align: center;
    }
}

/* Toast flotant */
.toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translate(-50%, 20px);
    z-index: 9999;
    max-width: min(92vw, 560px);
    padding: 14px 16px;
    border-radius: 14px;
    box-shadow: 0 10px 20px rgba(0,0,0,.12), 0 6px 10px rgba(0,0,0,.08);
    font-weight: 600;
    opacity: 0;
    pointer-events: none;
    transition: opacity 280ms cubic-bezier(.16,1,.3,1), transform 280ms cubic-bezier(.16,1,.3,1);
}

    .toast.show {
        opacity: 1;
        transform: translate(-50%, 0);
        pointer-events: auto;
    }

    .toast.success {
        background: #16a34a;
        color: #fff;
    }

    .toast.error {
        background: #dc2626;
        color: #fff;
    }

#demo {
    scroll-margin-top: 80px;
}

#hero-form,
#demo-form {
    width: 100%;
    max-width: 540px;
    margin-inline: auto; /* centra el formulari dins del contenidor */
}


@media (max-width: 400px) {
    .brand img {
        height: 96px; /* més petit */
        max-width: 70vw;
        width: auto;
    }

    .hero__container {
        padding-top: 120px; /* més espai perquè no se superposi amb el text */
    }

    /* Botó del formulari més petit per no tapar el placeholder */
    .btn {
        padding: .55rem .85rem;
        font-size: .95rem;
        border-radius: 12px;
        font-weight: 300;
    }

    .form {
        padding: .35rem;
    }

    .form__input {
        padding: .75rem .8rem .75rem 2.6rem;
        font-size: 1rem;
    }


}