/* ============================================================
   FontanHello — Homepage (one-page)
   CSS specifico della home. Lo stile comune (header, footer,
   bottoni, base, helper) vive in /assets/frontend/css/style.css.
   Le variabili :root sono definite lì e qui ereditate.
   ============================================================ */

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    text-transform: uppercase;
    letter-spacing: .16em;
    font-size: .78rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0 0 1rem;
}

/* ====================== STORE BADGES ====================== */
.store-btn {
    display: inline-flex;
    align-items: center;
    gap: .7rem;
    padding: .7rem 1.35rem;
    border-radius: 16px;
    background: var(--ink);
    color: #fff;
    transition: transform .2s var(--ease), box-shadow .2s var(--ease);
    box-shadow: var(--shadow-md);
}
.store-btn:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.store-btn__icon { width: 26px; height: 26px; fill: #fff; flex: none; }
/* Il glifo Apple riempie meno il viewBox: ingrandito per pareggiare il peso visivo del logo Play */
.store-btn__icon--apple { width: 31px; height: 31px; margin: -2px -2px -2px 0; }
.store-btn__txt { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.store-btn__txt small { font-size: .68rem; opacity: .8; }
.store-btn__txt strong { font-size: 1.05rem; font-weight: 700; }
.hero .store-btn__txt strong { color: var(--white); }
.store-btn--light { background: #fff; color: var(--ink); }
.store-btn--light .store-btn__icon { fill: var(--ink); }

/* ====================== GLASS ====================== */
.glass {
    background: rgba(255, 255, 255, .65);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, .8);
    box-shadow: var(--shadow-md);
}

/* ====================== HERO ====================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 7.5rem 0 9rem;
    background:
        radial-gradient(120% 90% at 85% -10%, var(--aqua-100) 0%, transparent 55%),
        radial-gradient(130% 100% at 10% 0%, #ECF7F9 0%, transparent 50%),
        linear-gradient(180deg, #F6FBFC 0%, #E6F4F6 100%);
    overflow: hidden;
}

.hero__bg { position: absolute; inset: 0; pointer-events: none; }
.bubble {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .9), rgba(115, 199, 210, .25));
    box-shadow: inset 0 0 16px rgba(255, 255, 255, .6);
    animation: floatBubble 14s ease-in-out infinite;
    opacity: .55;
}
.bubble--1 { width: 120px; height: 120px; left: 8%; top: 22%; animation-duration: 16s; }
.bubble--2 { width: 70px; height: 70px; left: 80%; top: 60%; animation-duration: 13s; animation-delay: -3s; }
.bubble--3 { width: 180px; height: 180px; left: 65%; top: 12%; animation-duration: 19s; animation-delay: -6s; opacity: .4; }
.bubble--4 { width: 50px; height: 50px; left: 30%; top: 70%; animation-duration: 11s; animation-delay: -2s; }
.bubble--5 { width: 90px; height: 90px; left: 45%; top: 18%; animation-duration: 17s; animation-delay: -8s; opacity: .35; }

@keyframes floatBubble {
    0%, 100% { transform: translateY(0) translateX(0) scale(1); }
    33% { transform: translateY(-26px) translateX(14px) scale(1.05); }
    66% { transform: translateY(12px) translateX(-12px) scale(.97); }
}

.hero__grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    align-items: center;
    gap: clamp(2rem, 5vw, 4rem);
}

.hero__title {
    margin-bottom: .35em;
    line-height: 1;
}
.hero__logo {
    width: clamp(240px, 30vw, 380px);
    height: auto;
}
.hero__subtitle {
    font-size: clamp(1.25rem, 2.5vw, 1.7rem);
    font-weight: 700;
    color: var(--ink);
    margin: 0 0 1rem;
}
.hero__text {
    font-size: 1.15rem;
    color: var(--ink-soft);
    max-width: 46ch;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 1rem; margin: 2rem 0 1rem; }
.hero__meta { font-size: .9rem; color: var(--muted); font-weight: 600; }

/* Hero visual + phone */
.hero__visual { position: relative; display: flex; justify-content: center; }
.hero__glow {
    position: absolute;
    inset: 10% 5%;
    background: radial-gradient(circle, rgba(30, 111, 184, .35), transparent 65%);
    filter: blur(40px);
    z-index: -1;
    animation: pulseGlow 6s ease-in-out infinite;
}
@keyframes pulseGlow { 0%, 100% { opacity: .6; } 50% { opacity: 1; } }

.phone {
    position: relative;
    width: 280px;
    aspect-ratio: 9 / 19.5;
    background: linear-gradient(160deg, #1a2740, #0c1726);
    border-radius: 42px;
    padding: 12px;
    box-shadow: var(--shadow-lg), inset 0 0 0 2px rgba(255, 255, 255, .06);
}
.phone--hero { animation: floatPhone 6s ease-in-out infinite; }
@keyframes floatPhone { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-16px) rotate(1deg); } }

.phone__notch {
    position: absolute;
    top: 18px; left: 50%;
    transform: translateX(-50%);
    width: 38%; height: 22px;
    background: #0c1726;
    border-radius: 0 0 14px 14px;
    z-index: 3;
}
.phone__screen {
    width: 100%; height: 100%;
    border-radius: 32px;
    overflow: hidden;
    position: relative;
    background: var(--aqua-50);
}
.phone__shot {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}

/* Hero wave divider */
.hero__wave { position: absolute; left: 0; right: 0; bottom: -1px; line-height: 0; z-index: 1; }
.hero__wave svg { width: 100%; height: clamp(70px, 10vw, 130px); }
.hero__wave-back { fill: rgba(255, 255, 255, .55); }
.hero__wave-front { fill: #ffffff; }

/* ====================== PROGETTO ====================== */
.section--project { background: #fff; }
.project__grid {
    display: grid;
    grid-template-columns: .85fr 1.15fr;
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: center;
}
.project__media { display: grid; gap: 1.2rem; }
.project__card {
    border-radius: var(--radius);
    padding: 1.8rem;
    display: flex;
    flex-direction: column;
    background: linear-gradient(160deg, rgba(30, 111, 184,.07), rgba(115, 199, 210,.16));
    border: 1px solid rgba(30, 111, 184, .14);
    transition: transform .3s var(--ease);
}
.project__card:hover { transform: translateY(-6px); }
.project__card--alt { background: linear-gradient(160deg, rgba(231, 52, 76,.06), rgba(255,180,190,.14)); border-color: rgba(231, 52, 76,.16); margin-left: 2.5rem; }
.project__stat-num { font-size: 3rem; font-weight: 800; color: var(--primary); line-height: 1; }
.project__card--alt .project__stat-num { color: var(--secondary); }
.project__stat-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); font-weight: 700; margin-top: .4rem; }
.project__stat-city { font-size: 1.4rem; font-weight: 800; color: var(--ink); margin-top: .1rem; }

/* ====================== VALORE ====================== */
.section--value {
    background:
        radial-gradient(120% 80% at 100% 0%, var(--aqua-100), transparent 50%),
        linear-gradient(180deg, #fff, #F2FAFB);
}
.value__head { max-width: 60ch; margin: 0 auto 3rem; text-align: center; }
.value__lead { font-size: 1.15rem; color: var(--ink-soft); }
.value__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.4rem;
}
.value-card {
    border-radius: var(--radius);
    padding: 2rem 1.6rem;
    transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.value-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.value-card__icon {
    display: inline-grid;
    place-items: center;
    width: 58px; height: 58px;
    font-size: 1.7rem;
    border-radius: 16px;
    background: linear-gradient(160deg, var(--aqua-100), var(--aqua-200));
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
}
.value-card h3 { margin-bottom: .35rem; }
.value-card p { margin: 0; font-size: .96rem; }

/* ====================== MAPPA FONTANE ====================== */
.section--map { background: #fff; }
.map__head { max-width: 60ch; margin: 0 auto 2.5rem; text-align: center; }
.map__panel {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(30, 111, 184, .12);
}
#fountains-map {
    height: clamp(360px, 55vh, 560px);
    width: 100%;
    background: var(--aqua-50);
    z-index: 1;
}

/* Google Maps InfoWindow: strip the default chrome, the card is ours */
#fountains-map .gm-style-iw-c {
    padding: 0 !important;
    border-radius: var(--radius-sm);
    box-shadow: 0 12px 32px -10px rgba(11, 47, 87, .35), 0 2px 6px rgba(11, 47, 87, .08);
}
#fountains-map .gm-style-iw-d { overflow: hidden !important; }
#fountains-map .gm-style-iw-tc::after { box-shadow: none; }

.fountain-popup {
    position: relative;
    width: min(260px, 70vw);
    padding: 1rem 1.1rem 1.05rem;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--ink);
    line-height: 1.4;
}
.fountain-popup__title {
    margin: 0 1.6rem .2rem 0;
    font-size: .98rem;
    font-weight: 700;
    letter-spacing: -.01em;
    text-wrap: balance;
}
.fountain-popup__meta { margin: 0; color: var(--muted); font-size: .82rem; }
.fountain-popup__link {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin-top: .85rem;
    padding: .45rem .85rem;
    border-radius: 999px;
    background: var(--primary);
    color: #fff;
    font-size: .84rem;
    font-weight: 700;
    text-decoration: none;
    transition: background-color .2s var(--ease);
}
.fountain-popup__link:hover { background: var(--primary-dark); }
.fountain-popup__link:focus-visible,
.fountain-popup__close:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.fountain-popup__link svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s var(--ease); }
.fountain-popup__link:hover svg { transform: translateX(2px); }
.fountain-popup__close {
    position: absolute;
    top: .55rem;
    right: .55rem;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transition: background-color .2s var(--ease), color .2s var(--ease);
}
.fountain-popup__close:hover { background: var(--aqua-100); color: var(--ink); }
.fountain-popup__close svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

/* ====================== FUNZIONALITÀ ====================== */
.section--features { background: #fff; }
.features__head { max-width: 60ch; margin: 0 auto 3rem; text-align: center; }
.features__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.4rem;
}
.feature-card {
    display: flex;
    gap: 1.3rem;
    padding: 1.8rem;
    border-radius: var(--radius);
    background: linear-gradient(170deg, #FBFEFE, #EFF8FA);
    border: 1px solid rgba(30, 111, 184, .1);
    box-shadow: var(--shadow-sm);
    transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.feature-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: rgba(30, 111, 184,.3); }
.feature-card--wide { grid-column: span 1; }
.feature-card__icon {
    flex: none;
    display: inline-grid;
    place-items: center;
    width: 56px; height: 56px;
    font-size: 1.5rem;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary), #73C7D2);
    box-shadow: 0 10px 22px -8px rgba(30, 111, 184,.6);
}
.feature-card__body h3 { margin-bottom: .3rem; }
.feature-card__body p { margin: 0; font-size: .96rem; }

/* ====================== APP / SCREENSHOTS ====================== */
.section--app {
    background:
        radial-gradient(100% 80% at 0% 100%, var(--aqua-100), transparent 55%),
        linear-gradient(180deg, #F2FAFB, #E3F3F5);
    overflow: hidden;
}
.app__phones {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-end;
    gap: clamp(1rem, 3vw, 2.2rem);
}
.app__phones .phone {
    width: clamp(180px, 22vw, 230px);
    transition: transform .4s var(--ease);
}
.app__phones .phone:hover { transform: translateY(-14px) scale(1.03); }
.app__phones .phone:nth-child(odd) { margin-bottom: 1.6rem; }

/* ====================== DAL BLOG ====================== */
.section--home-blog {
    background:
        radial-gradient(120% 80% at 0% 0%, var(--aqua-100), transparent 50%),
        linear-gradient(180deg, #fff, #F2FAFB);
}
.home-blog__cta { text-align: center; margin-top: 2.5rem; }

/* ====================== CTA FINALE ====================== */
.section--cta { padding: 0; }
.cta {
    position: relative;
    margin: 0 auto;
    overflow: hidden;
    background:
        radial-gradient(120% 120% at 100% 0%, #73C7D2 0%, transparent 50%),
        linear-gradient(135deg, var(--primary-deep) 0%, var(--primary) 60%, var(--primary-dark) 100%);
    color: #fff;
}
.cta__bg { position: absolute; inset: 0; pointer-events: none; }
.cta__bg .bubble { opacity: .18; background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.7), transparent); }
.cta__inner {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: clamp(4rem, 9vw, 7rem) 0;
}
.cta__inner h2 { color: #fff; }
.cta__inner p { color: rgba(255, 255, 255, .9); font-size: 1.15rem; max-width: 56ch; margin: 0 auto 2rem; }
.cta__buttons { justify-content: center; }

/* ====================== SCROLL REVEAL ====================== */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .7s var(--ease), transform .7s var(--ease);
    transition-delay: var(--d, 0ms);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ====================== RESPONSIVE ====================== */
@media (max-width: 900px) {
    .hero__grid { grid-template-columns: 1fr; text-align: center; }
    .hero__content { order: 2; }
    .hero__visual { order: 1; }
    .hero__text { margin-inline: auto; }
    .hero__cta { justify-content: center; }
    .project__grid { grid-template-columns: 1fr; }
    .project__media { grid-template-columns: 1fr 1fr; }
    .project__card--alt { margin-left: 0; }
    .features__grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .project__media { grid-template-columns: 1fr; }
    .hero__cta, .cta__buttons { flex-direction: column; }
    .store-btn { justify-content: center; }

    /* CTA "Porta FontanHello con te" su mobile */
    .cta__inner { padding: 3.5rem 0; }
    .cta__inner p { font-size: 1.05rem; }
    .cta__buttons { width: 100%; max-width: 320px; margin-inline: auto; }
    .cta__buttons .store-btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; }
}
