/* ============================================
   VenusTrama Cloud — Marketing Site
   Light pastel theme with modern typography
   ============================================ */

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg:          #f8f6f9;
    --bg-card:     #ffffff;
    --bg-card-hover: #f3eef7;
    --surface:     #efe9f4;
    --accent:      #9b8ec4;
    --accent-light:#bdb2d9;
    --accent-dim:  rgba(155,142,196,0.10);
    /* alias del vecchio tema ancora usati nelle pagine */
    --gold:        var(--accent);
    --gold-dim:    var(--accent-dim);
    --peach:       #f0c4a8;
    --mint:        #a8dcc8;
    --rose:        #e4a8b8;
    --sky:         #a8cee8;
    --text:        #3a3540;
    --text-dim:    #7a7085;
    --text-muted:  #ada3b8;
    --border:      #e8e0ef;
    --radius:      12px;
    --radius-lg:   20px;
    --font:        'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    --font-display:'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --max-w:       1200px;
    --nav-h:       72px;
    --transition:  .25s cubic-bezier(.4,0,.2,1);
}

html { scroll-behavior: smooth; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-light); }

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

/* "Accedi" aggiunto da main.js al menu: visibile solo nel menu aperto su telefono */
.nav-links .mobile-accedi { display: none; }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

/* ---------- Navigation ---------- */
.nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    height: var(--nav-h);
    background: rgba(248,246,249,0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    transition: background var(--transition);
}
.nav .container {
    display: flex; align-items: center; justify-content: space-between;
    height: 100%;
}
.nav-logo {
    font-family: var(--font-display);
    font-size: 24px; font-weight: 700;
    color: var(--accent);
    letter-spacing: -0.02em;
}
.nav-logo span { color: var(--text); font-weight: 400; }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a {
    color: var(--text-dim); font-size: 14px; font-weight: 500;
    letter-spacing: 0.02em; text-transform: uppercase;
    transition: color var(--transition);
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--accent); }
.nav-actions { display: flex; align-items: center; gap: 12px; }

/* Hamburger */
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; transition: var(--transition); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 28px; border-radius: 50px;
    font-size: 14px; font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer; border: none;
    transition: all var(--transition);
    text-decoration: none;
}
.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: #fff;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(155,142,196,0.3);
    color: #fff;
}
.btn-ghost {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}
.btn-ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.btn-sm { padding: 8px 20px; font-size: 13px; }

/* ---------- Hero ---------- */
.hero {
    min-height: 100vh;
    display: flex; align-items: center;
    padding-top: var(--nav-h);
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute; top: -50%; right: -30%;
    width: 800px; height: 800px;
    background: radial-gradient(circle, rgba(155,142,196,0.08) 0%, transparent 70%);
    pointer-events: none;
}
.hero .container {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 60px; align-items: center;
}
.hero-content { position: relative; z-index: 1; }
.hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 16px; border-radius: 50px;
    background: var(--accent-dim);
    color: var(--accent);
    font-size: 13px; font-weight: 600;
    margin-bottom: 24px;
}
.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 800; line-height: 1.15;
    margin-bottom: 20px;
    color: var(--text);
    letter-spacing: -0.03em;
}
.hero h1 em {
    font-style: normal;
    color: var(--accent);
    text-decoration: underline;
    text-decoration-color: rgba(155,142,196,0.35);
    text-underline-offset: 6px;
}
.hero-sub {
    font-size: 18px; color: var(--text-dim);
    max-width: 480px; margin-bottom: 32px;
    line-height: 1.7;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 40px; }
.hero-stats {
    display: flex; gap: 40px;
}
.hero-stat { text-align: left; }
.hero-stat-value {
    font-size: 28px; font-weight: 700;
    color: var(--accent);
}
.hero-stat-label {
    font-size: 13px; color: var(--text-dim);
    margin-top: 2px;
}

/* Hero Visual */
.hero-visual {
    position: relative; display: flex;
    justify-content: center; align-items: center;
}

/* ---------- Section Base ---------- */
section { padding: 100px 0; }
.section-label {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12px; font-weight: 700; letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent); margin-bottom: 12px;
}
.section-title {
    font-family: var(--font-display);
    font-size: clamp(28px, 3.5vw, 42px);
    font-weight: 800; color: var(--text);
    margin-bottom: 16px; line-height: 1.2;
    letter-spacing: -0.02em;
}
.section-sub {
    font-size: 16px; color: var(--text-dim);
    max-width: 600px; line-height: 1.7;
}
.section-header { text-align: center; margin-bottom: 60px; }
.section-header .section-sub { margin: 0 auto; }

/* ---------- Features Grid ---------- */
.features { background: var(--bg); }
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    transition: all var(--transition);
    position: relative; overflow: hidden;
}
.feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(155,142,196,0.3);
    box-shadow: 0 20px 40px rgba(0,0,0,0.06);
}
.feature-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    opacity: 0; transition: opacity var(--transition);
}
.feature-card:hover::before { opacity: 1; }
.feature-icon {
    width: 48px; height: 48px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 12px;
    background: var(--accent-dim);
    color: var(--accent);
    font-size: 22px; margin-bottom: 20px;
}
.feature-card h3 {
    font-size: 17px; font-weight: 700;
    color: var(--text); margin-bottom: 10px;
}
.feature-card p {
    font-size: 14px; color: var(--text-dim);
    line-height: 1.65;
}

/* ---------- Highlight Section ---------- */
.highlight {
    background: linear-gradient(180deg, var(--bg) 0%, var(--surface) 50%, var(--bg) 100%);
}
.highlight .container {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 60px; align-items: center;
}
.highlight-list { list-style: none; margin-top: 24px; }
.highlight-list li {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 12px 0; font-size: 15px; color: var(--text-dim);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}
.highlight-list li:last-child { border-bottom: none; }
.highlight-check {
    flex-shrink: 0; width: 22px; height: 22px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: var(--accent-dim); color: var(--accent);
    font-size: 13px; margin-top: 2px;
}


/* ---------- Hours Section ---------- */
.hours-section {
    padding: 80px 0;
    text-align: center;
}
.hours-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 48px;
    max-width: 800px;
    margin-left: auto; margin-right: auto;
}
.hours-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    text-align: center;
    transition: transform var(--transition), box-shadow var(--transition);
}
.hours-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.06); }
.hours-icon { font-size: 36px; color: var(--accent); margin-bottom: 12px; }
.hours-card h3 { font-size: 16px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.hours-time { font-size: 15px; color: var(--accent); font-weight: 600; }
.hours-closed { opacity: .7; }
.hours-closed .hours-icon { color: var(--rose); }
.hours-closed .hours-time { color: var(--rose); }
@media (max-width: 600px) {
    .hours-grid { grid-template-columns: 1fr; gap: 12px; }
    .hours-card { padding: 20px 16px; }
}

/* ---------- CTA Section ---------- */
.cta-section {
    padding: 80px 0;
    text-align: center;
    background: linear-gradient(180deg, var(--bg) 0%, rgba(155,142,196,0.05) 50%, var(--bg) 100%);
}
.cta-section .section-title { margin-bottom: 24px; }
.cta-section .section-sub { margin: 0 auto 32px; }

/* ---------- FAQ ---------- */
.faq { background: var(--bg); }
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 12px;
    overflow: hidden;
    background: var(--bg-card);
    transition: border-color var(--transition);
}
.faq-item.open { border-color: rgba(155,142,196,0.3); }
.faq-question {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 24px;
    cursor: pointer; user-select: none;
    font-size: 15px; font-weight: 600;
    color: var(--text);
    transition: color var(--transition);
}
.faq-question:hover { color: var(--accent); }
.faq-icon {
    flex-shrink: 0; width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; background: var(--surface);
    font-size: 18px; color: var(--text-dim);
    transition: transform var(--transition), color var(--transition);
}
.faq-item.open .faq-icon { transform: rotate(45deg); color: var(--accent); }
.faq-answer {
    max-height: 0; overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
}
.faq-item.open .faq-answer { max-height: 300px; }
.faq-answer-inner {
    padding: 0 24px 20px;
    font-size: 14px; color: var(--text-dim);
    line-height: 1.7;
}

/* ---------- Footer ---------- */
.footer {
    padding: 40px 0;
    border-top: 1px solid var(--border);
}
.footer .container {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 16px;
}
.footer-logo {
    font-family: var(--font-display);
    font-size: 18px; font-weight: 700;
    color: var(--accent);
}
.footer-logo span { color: var(--text-dim); font-weight: 400; }
.footer-links { display: flex; gap: 24px; }
.footer-links a { color: var(--text-muted); font-size: 13px; }
.footer-links a:hover { color: var(--text); }
.footer-copy { font-size: 12px; color: var(--text-muted); }

/* ---------- Page Header (for sub-pages) ---------- */
.page-header {
    padding: 140px 0 60px;
    text-align: center;
    background: linear-gradient(180deg, rgba(155,142,196,0.05) 0%, var(--bg) 100%);
}

/* ---------- Feature Detail (funzionalita page) ---------- */
.feature-detail { padding: 60px 0; }
.feature-detail:nth-child(even) { background: var(--surface); }
.feature-detail .container {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 60px; align-items: center;
}
.feature-detail:nth-child(even) .container { direction: rtl; }
.feature-detail:nth-child(even) .container > * { direction: ltr; }
.feature-detail-visual {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.04);
}
.feature-detail-content h3 {
    font-family: var(--font-display);
    font-size: 28px; font-weight: 700; color: var(--text);
    margin-bottom: 16px;
}
.feature-detail-content p {
    font-size: 15px; color: var(--text-dim); line-height: 1.7;
}

/* ---------- Responsive — Tablet (max 960px) ---------- */
@media (max-width: 960px) {
    .hero .container { grid-template-columns: 1fr; text-align: center; }
    .hero-sub { margin: 0 auto 32px; }
    .hero-cta { justify-content: center; }
    .hero-stats { justify-content: center; }
    .hero-visual { margin-top: 40px; }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .highlight .container { grid-template-columns: 1fr; text-align: center; }
    .highlight-list { max-width: 560px; margin-left: auto; margin-right: auto; text-align: left; }
    .highlight .section-sub { margin-left: auto; margin-right: auto; }
    .feature-detail .container { grid-template-columns: 1fr; }
    .feature-detail:nth-child(even) .container { direction: ltr; }
    section { padding: 70px 0; }
    .section-header { margin-bottom: 40px; }
    .page-header { padding: 120px 0 50px; }
}

/* ---------- Responsive — Small tablet / Large phone (max 768px) ---------- */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-actions { display: none; }
    .nav-toggle { display: block; }
    .nav-links.open {
        display: flex; flex-direction: column;
        position: absolute; top: var(--nav-h); left: 0; right: 0;
        background: rgba(248,246,249,0.97);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        padding: 20px 24px;
        border-bottom: 1px solid var(--border);
        box-shadow: 0 8px 24px rgba(0,0,0,0.06);
        gap: 0;
        z-index: 999;
    }
    .nav-links.open a {
        padding: 14px 0;
        font-size: 15px;
        border-bottom: 1px solid var(--border);
    }
    .nav-links.open a:last-child { border-bottom: none; }
    .nav-links .mobile-accedi { display: none; }
    .nav-links.open .mobile-accedi {
        display: block;
        padding: 14px 0;
        font-size: 15px; font-weight: 600;
        color: var(--accent);
        border-top: 1px solid var(--border);
        margin-top: 4px;
    }
    /* Hamburger → X animation */
    .nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
    .nav-toggle.active span:nth-child(2) { opacity: 0; }
    .nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }
    .features-grid { grid-template-columns: 1fr; gap: 16px; }
    .feature-card { padding: 24px 20px; }
    .hero h1 { font-size: clamp(28px, 7vw, 40px); }
    .hero-sub { font-size: 16px; }
    .hero-stats { flex-wrap: wrap; gap: 24px; }
    .footer .container { flex-direction: column; text-align: center; gap: 12px; }
    .footer-links { flex-wrap: wrap; justify-content: center; gap: 16px; }
}

/* ---------- Responsive — Mobile (max 480px) ---------- */
@media (max-width: 480px) {
    .container { padding: 0 16px; }
    section { padding: 50px 0; }
    .hero { min-height: auto; padding-top: calc(var(--nav-h) + 20px); padding-bottom: 40px; }
    .hero h1 { font-size: 28px; }
    .hero-sub { font-size: 15px; line-height: 1.6; }
    .hero-badge { font-size: 12px; padding: 5px 12px; }
    .hero-cta { flex-direction: column; align-items: center; }
    .hero-cta .btn { width: 100%; justify-content: center; }
    .hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 12px; justify-items: center; }
    .hero-stat { text-align: center; }
    .hero-stat-value { font-size: 22px; }
    .hero-visual { margin-top: 24px; }
    .section-title { font-size: clamp(22px, 6vw, 32px); }
    .section-sub { font-size: 14px; }
    .section-header { margin-bottom: 32px; }
    .page-header { padding: 96px 0 8px; }
    .highlight-list li { font-size: 14px; gap: 8px; text-align: left; }
    .hours-grid { gap: 10px; }
    .hours-card { padding: 16px 12px; }
    .hours-card h3 { font-size: 14px; }
    .hours-time { font-size: 13px; }
    .cta-section { padding: 50px 0; }
    .cta-section .btn { width: 100%; justify-content: center; }
    .faq-question { padding: 16px; font-size: 14px; }
    .faq-answer-inner { padding: 0 16px 16px; font-size: 13px; }
    .faq-icon { width: 24px; height: 24px; font-size: 16px; }
    .nav-logo { font-size: 20px; }
    .btn { padding: 10px 22px; font-size: 13px; }
    .btn-sm { padding: 7px 16px; font-size: 12px; }
}

/* ---------- Schermate reali dell'app ---------- */
.hero .container > *, .highlight .container > * { min-width: 0; }
.app-shot { margin: 0; width: 100%; min-width: 0; }
.app-shot.narrow { max-width: 440px; margin-left: auto; margin-right: auto; }
.app-shot.narrow.small { max-width: 300px; }
.app-shot-frame {
    border-radius: 14px; overflow: hidden;
    border: 1px solid var(--border); background: var(--bg-card);
    box-shadow: 0 30px 60px rgba(58,53,64,0.10);
}
.app-shot-bar {
    display: flex; align-items: center; gap: 6px;
    padding: 9px 14px; background: var(--surface);
    border-bottom: 1px solid var(--border);
}
.app-shot-bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--rose); }
.app-shot-bar i:nth-child(2) { background: var(--peach); }
.app-shot-bar i:nth-child(3) { background: var(--mint); }
.app-shot-bar span {
    margin-left: auto; font-size: 11px; font-weight: 500; color: var(--text-muted);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.app-shot img, .app-phone img { display: block; width: 100%; height: auto; }
.app-shot figcaption, .app-phones figcaption {
    margin-top: 10px; font-size: 13px; color: var(--text-muted); text-align: center;
}
.app-phones {
    display: flex; justify-content: center; align-items: flex-start; gap: 24px;
    flex-wrap: wrap; margin: 0;
}
.app-phones figcaption { flex-basis: 100%; }
.app-phone {
    width: 240px; max-width: 100%; flex-shrink: 1; overflow: hidden;
    border: 7px solid #2f2a35; border-radius: 30px; background: #fff;
    box-shadow: 0 30px 60px rgba(58,53,64,0.14);
}
.app-phone img { aspect-ratio: 9 / 17; object-fit: cover; object-position: top; }
.app-phones .app-phone + .app-phone { margin-top: 36px; }

/* Hero: agenda + telefono */
.hero-visual { padding: 0 0 40px 40px; }
.hero-visual .app-shot-frame { box-shadow: 0 40px 80px rgba(58,53,64,0.12); }
.hero-phone {
    position: absolute; left: 0; bottom: 0; width: 150px;
    border-width: 5px; border-radius: 22px;
}

/* Schermate dentro FAQ e schede */
.faq-answer-inner .app-shot, .faq-answer-inner .app-phones,
.legal-card .app-shot, .legal-card .app-phones { margin-top: 18px; }
.faq-answer-inner .app-shot-frame, .legal-card .app-shot-frame { box-shadow: 0 12px 30px rgba(58,53,64,0.08); }
.faq-answer-inner .app-phone, .legal-card .app-phone { width: 210px; }

@media (max-width: 960px) {
    .hero-visual { max-width: 640px; margin-left: auto; margin-right: auto; }
}
/* Schermata ingrandibile (visore a schermo intero, js/main.js) */
.app-shot[data-zoom] .app-shot-frame { cursor: zoom-in; position: relative; }
.shot-zoom-hint {
    display: none; position: absolute; right: 10px; bottom: 10px;
    align-items: center; gap: 5px; padding: 6px 11px; border-radius: 999px;
    background: rgba(47,42,53,0.82); color: #fff; font-size: 12px; font-weight: 600;
    pointer-events: none;
}
.shot-zoom-hint svg { width: 14px; height: 14px; }
.shot-zoom {
    position: fixed; inset: 0; z-index: 2000; background: rgba(28,25,32,0.94);
    display: flex; flex-direction: column;
}
.shot-zoom-head {
    display: flex; align-items: center; gap: 12px; padding: 12px 16px; color: #fff;
    font-size: 14px; font-weight: 600;
}
.shot-zoom-head span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shot-zoom-close {
    width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
    background: rgba(255,255,255,0.14); color: #fff; font-size: 24px; line-height: 1;
}
.shot-zoom-body { flex: 1; overflow: auto; -webkit-overflow-scrolling: touch; padding: 0 16px 24px; }
.shot-zoom-body img { display: block; max-width: none; height: auto; border-radius: 10px; margin: 0 auto; background: #fff; }
.shot-zoom-tip { color: rgba(255,255,255,0.7); font-size: 12px; text-align: center; padding: 0 16px 14px; }

@media (max-width: 600px) {
    /* Hero: lo schermo del telefono (leggibile) al posto dell'agenda desktop rimpicciolita */
    .hero-visual { padding: 0; }
    .hero-visual > .app-shot { display: none; }
    .app-phone.hero-phone {
        position: static; width: min(260px, 72%); margin: 0 auto;
        border-width: 6px; border-radius: 26px;
    }
    /* Più telefoni: carosello orizzontale, telefoni grandi (prima due da 46% illeggibili) */
    .app-phones {
        flex-wrap: nowrap; justify-content: flex-start; gap: 16px;
        overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
        margin: 0 -16px; padding: 4px 16px 18px; scrollbar-width: none;
    }
    .app-phones::-webkit-scrollbar { display: none; }
    .app-phones figcaption { display: none; }
    .app-phone { flex: 0 0 68%; width: auto; border-width: 6px; border-radius: 24px; scroll-snap-align: center; }
    .app-phones .app-phone + .app-phone { margin-top: 0; }
    .app-phones.single { justify-content: center; overflow: visible; margin: 0; padding: 0; }
    .app-phones.single .app-phone { flex-basis: 72%; }
    .faq-answer-inner .app-phone, .legal-card .app-phone { width: auto; }
    .shot-zoom-hint { display: inline-flex; }
}
