/* ============================================================
   home.css — Sezioni della home (caricato solo su front-page)
   Hero carosello + ASK + TRUST + VALUES + HOW + SWITCH + TEAM
   + FINAL + accordion definizione.
   Sfondo hero: hero.css (.lid-hero--fog). Token: style.css :root.
   ============================================================ */

/* ============ HERO — carosello domande ============ */
.hero-q-inner { position: relative; z-index: 2; }

.hero-q-meta { margin-bottom: 36px; }
.hero-q-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--color-accent);
}
.hero-q-eyebrow::before {
    content: "";
    width: 18px;
    height: 1px;
    background: var(--color-accent);
}

.question-stack { position: relative; min-height: 38vh; }
.q-slide {
    position: absolute;
    top: 0; left: 0;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .7s ease, transform .7s ease;
    pointer-events: none;
}
.q-slide.on {
    position: relative;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.q-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-sans);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: var(--color-accent);
    font-weight: 600;
    margin-bottom: 22px;
}
.q-label::before { content: ""; width: 18px; height: 1px; background: var(--color-accent); }
.q-text {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(44px, 6.4vw, 104px);
    line-height: .98;
    letter-spacing: -.035em;
    color: #fff;
    margin: 0 0 26px;
    max-width: 16ch;
    text-shadow: 0 2px 30px rgba(15,33,29,.4);
}
.q-text em { font-style: italic; color: var(--color-accent); font-weight: 500; }
.q-answer {
    font-family: var(--font-sans);
    font-size: 19px;
    line-height: 1.55;
    color: rgba(255,255,255,.82);
    max-width: 46ch;
    margin-bottom: 32px;
}
.q-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 26px;
    background: #fff;
    color: var(--color-primary);
    border-radius: var(--radius-pill);
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    transition: var(--transition);
}
.q-cta:hover { text-decoration: none; }
.team-card .li { text-decoration: none; }
.q-cta:hover { background: var(--color-accent); color: var(--color-green-dk); gap: 14px; }
.q-cta::after { content: "→"; }

/* pager */
.pager {
    margin-top: 48px;
    display: flex;
    align-items: center;
    gap: 22px;
    flex-wrap: wrap;
}
.pager-dots { display: flex; gap: 10px; }
.pager-dot {
    width: 36px; height: 4px;
    background: rgba(255,255,255,.2);
    border-radius: 99px;
    cursor: pointer;
    border: 0; padding: 0;
    transition: background .25s, width .25s;
}
.pager-dot.on { background: var(--color-accent); width: 56px; }
.pager-hint {
    font-family: var(--font-sans);
    font-size: 12px;
    color: rgba(255,255,255,.5);
    text-transform: uppercase;
    letter-spacing: .12em;
}
.pager-arrows { display: flex; gap: 8px; margin-left: auto; }
.pager-arrow {
    width: 44px; height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.22);
    background: transparent;
    color: #fff;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: var(--transition);
}
.pager-arrow:hover { border-color: var(--color-accent); color: var(--color-accent); }

/* tabs */
.q-tabs {
    display: flex;
    gap: 4px;
    margin-top: 56px;
    padding-top: 32px;
    border-top: 1px solid rgba(255,255,255,.12);
    flex-wrap: wrap;
}
.q-tab {
    padding: 10px 18px;
    border-radius: var(--radius-pill);
    font-family: var(--font-sans);
    font-size: 13.5px;
    color: rgba(255,255,255,.7);
    background: transparent;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,.15);
    transition: var(--transition);
}
.q-tab:hover { color: #fff; border-color: rgba(255,255,255,.4); }
.q-tab.on {
    background: var(--color-accent);
    color: var(--color-green-dk);
    border-color: var(--color-accent);
    font-weight: 600;
}
@media (max-width: 700px) {
    .question-stack { min-height: 50vh; }
    .pager-arrows { margin-left: 0; }
}

/* ============ sezioni — intestazioni comuni ============ */
.home-section { padding: 120px 0; }
.sec-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    margin-bottom: 16px;
}
.sec-eyebrow::before { content: ""; width: 18px; height: 1px; background: currentColor; }
.sec-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--t-h2);
    line-height: 1.04;
    letter-spacing: -.03em;
    color: var(--color-text);
}
.sec-title em { font-style: italic; font-weight: 500; color: var(--color-primary); }

/* ============ ASK — chat embed ============ */
.ask { padding: 120px 0; background: var(--color-light); }
.ask-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 72px;
    align-items: center;
}
.ask-intro .sec-eyebrow { color: var(--color-petroleum); }
.ask-intro h2 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--t-h2);
    line-height: 1.04;
    letter-spacing: -.03em;
    color: var(--color-text);
    margin-bottom: 20px;
}
.ask-intro h2 em { font-style: italic; color: var(--color-primary); font-weight: 500; }
.ask-intro p {
    color: var(--color-text);
    opacity: .72;
    font-size: 18px;
    max-width: 46ch;
    margin-bottom: 20px;
}
.ask-intro .ask-hint { font-size: 14px; opacity: .55; }

.ask-card {
    background: #fff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(33,34,33,.12), 0 0 0 1px var(--color-border);
}
.chat-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 22px;
    background: var(--color-light);
    border-bottom: 1px solid var(--color-border);
}
.chat-avatar {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    display: grid;
    place-items: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 16px;
}
.chat-head .ch-name { font-family: var(--font-display); font-weight: 700; font-size: 14px; }
.chat-head .ch-sub  { font-size: 12px; color: var(--color-green-md); }
.chat-head .badge {
    margin-left: auto;
    background: var(--color-accent);
    color: var(--color-green-dk);
    font-weight: 600;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
}
.chat-body {
    min-height: 240px;
    padding: 26px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: #fff;
}
.bubble {
    max-width: 84%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 15px;
    line-height: 1.5;
}
.bubble.ai   { background: var(--color-mist); color: var(--color-text); border-bottom-left-radius: 4px; }
.bubble.user { background: var(--color-primary); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.chat-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 22px 16px;
    background: #fff;
}
.chip {
    padding: 8px 14px;
    border-radius: var(--radius-pill);
    background: var(--color-light);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    font-family: var(--font-sans);
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
}
.chip:hover { border-color: var(--color-primary); color: var(--color-primary); }
.chat-input {
    display: flex;
    gap: 10px;
    padding: 16px 18px;
    background: var(--color-light);
    border-top: 1px solid var(--color-border);
}
.chat-input input {
    flex: 1;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    padding: 12px 18px;
    font-family: var(--font-sans);
    font-size: 15px;
    color: var(--color-text);
    background: #fff;
}
.chat-input input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(167,201,184,.25);
}
.chat-send {
    width: 46px; height: 46px;
    border-radius: 50%;
    border: 0;
    background: var(--color-primary);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition);
}
.chat-send:hover { background: var(--color-green-dk); }

/* ============ VALUES — sfondo verde ============ */
.values {
    padding: 130px 0;
    background: var(--color-primary);
    color: #fff;
    position: relative;
    overflow: hidden;
}
.values::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='80' viewBox='0 0 240 80'><path d='M0 40 Q 30 10, 60 40 T 120 40 T 180 40 T 240 40' stroke='white' stroke-width='1.2' fill='none' opacity='0.18'/><path d='M0 60 Q 30 30, 60 60 T 120 60 T 180 60 T 240 60' stroke='white' stroke-width='1.2' fill='none' opacity='0.12'/></svg>");
    background-size: 240px 80px;
    background-repeat: repeat;
    pointer-events: none;
}
.values-glow {
    position: absolute;
    top: -100px; right: -100px;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(167,201,184,.3), transparent 65%);
    filter: blur(40px);
    pointer-events: none;
}
.values-head { position: relative; z-index: 1; margin-bottom: 56px; max-width: 60ch; }
.values-head .sec-eyebrow { color: var(--color-accent); }
.values-head h2 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--t-h2);
    line-height: 1.02;
    letter-spacing: -.03em;
    color: #fff;
}
.values-head h2 em { font-style: italic; color: var(--color-accent); font-weight: 500; }
.values-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}
.value {
    padding: 32px 26px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 18px;
    backdrop-filter: blur(8px);
    transition: transform .25s ease, background .25s ease;
}
.value:hover { transform: translateY(-4px); background: rgba(255,255,255,.10); }
.value .ico {
    width: 44px; height: 44px;
    border-radius: 11px;
    background: var(--color-accent);
    color: var(--color-green-dk);
    display: grid;
    place-items: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 20px;
    margin-bottom: 22px;
}
.value h4 { font-family: var(--font-display); font-size: 18px; margin-bottom: 8px; color: #fff; }
.value p  { font-size: 14px; color: rgba(255,255,255,.7); line-height: 1.5; }

/* ============ HOW — sfondo Cambridge ============ */
.how {
    padding: 130px 0;
    background: var(--color-mist);
    position: relative;
    overflow: hidden;
}
.how::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='40' viewBox='0 0 160 40'><path d='M0 20 Q 20 5, 40 20 T 80 20 T 120 20 T 160 20' stroke='%232A5D50' stroke-width='1' fill='none' opacity='0.18'/></svg>");
    background-size: 160px 40px;
    background-repeat: repeat;
    opacity: .45;
    pointer-events: none;
}
.how-head { position: relative; z-index: 1; margin-bottom: 64px; max-width: 60ch; }
.how-head .sec-eyebrow { color: var(--color-primary); }
.how-head h2 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--t-h2);
    line-height: 1.02;
    letter-spacing: -.03em;
    color: var(--color-green-dk);
}
.how-head h2 em { font-style: italic; color: var(--color-petroleum); font-weight: 500; }
.how-steps {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.how-step {
    padding: 36px 32px;
    background: #fff;
    border-radius: 20px;
    border: 1px solid rgba(42,93,80,.08);
    transition: transform .25s ease, box-shadow .25s ease;
}
.how-step:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.how-step .n {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 500;
    font-size: 64px;
    color: var(--color-primary);
    line-height: 1;
    margin-bottom: 20px;
}
.how-step h4 {
    font-family: var(--font-display);
    font-size: 21px;
    color: var(--color-text);
    margin-bottom: 12px;
}
.how-step p { color: var(--color-text); opacity: .72; font-size: 15.5px; line-height: 1.55; }

/* ============ SWITCH — privato vs partner ============ */
.switch { padding: 130px 0; background: var(--color-light); }
.switch-head { text-align: center; margin-bottom: 56px; }
.switch-head .sec-eyebrow { color: var(--color-petroleum); justify-content: center; }
.switch-head h2 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--t-h2);
    line-height: 1.04;
    letter-spacing: -.03em;
    color: var(--color-text);
}
.switch-head h2 em { font-style: italic; color: var(--color-primary); font-weight: 500; }
.switch-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.switch-card {
    border-radius: var(--radius-lg);
    padding: 48px 44px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: transform .25s ease, box-shadow .25s ease;
}
.switch-card:hover { transform: translateY(-5px); box-shadow: 0 30px 70px rgba(33,34,33,.18); }
.switch-card.priv { background: #fff; border: 1px solid var(--color-border); }
.switch-card.pro  { background: var(--color-petroleum); color: #fff; }
.switch-card.pro::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='60' viewBox='0 0 200 60'><path d='M0 30 Q 25 10, 50 30 T 100 30 T 150 30 T 200 30' stroke='white' stroke-width='1.5' fill='none' opacity='0.12'/></svg>");
    background-size: 200px 60px;
    background-repeat: repeat;
    pointer-events: none;
}
.switch-card > * { position: relative; z-index: 1; }
.switch-card .ico-block {
    width: 56px; height: 56px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 24px;
    margin-bottom: 26px;
}
.switch-card.priv .ico-block { background: var(--color-mist); color: var(--color-primary); }
.switch-card.pro  .ico-block { background: rgba(255,255,255,.15); color: #fff; }
.switch-card h3 {
    font-family: var(--font-display);
    font-size: 30px;
    line-height: 1.05;
    letter-spacing: -.025em;
    margin-bottom: 12px;
}
.switch-card h3 em { font-style: italic; font-weight: 500; }
.switch-card.priv h3 em { color: var(--color-primary); }
.switch-card.pro  h3 em { color: var(--color-accent); }
.switch-card .desc { font-size: 16px; margin-bottom: 26px; max-width: 38ch; line-height: 1.55; }
.switch-card.priv .desc { color: var(--color-text); opacity: .72; }
.switch-card.pro  .desc { color: rgba(255,255,255,.78); }
.switch-card ul { list-style: none; display: grid; gap: 12px; margin-bottom: 34px; }
.switch-card ul li {
    display: grid;
    grid-template-columns: 18px 1fr;
    gap: 12px;
    align-items: start;
    font-size: 15px;
}
.switch-card.priv ul li::before { content: "✓"; color: var(--color-primary); font-weight: 700; }
.switch-card.pro  ul li::before { content: "✓"; color: var(--color-accent); font-weight: 700; }
.switch-card .actions { margin-top: auto; display: flex; gap: 12px; flex-wrap: wrap; }
.switch-card.pro .actions .btn-primary { background: var(--color-accent); color: var(--color-green-dk); }
.switch-card.pro .actions .btn-primary:hover { background: #fff; }
.switch-card.pro .actions .btn-outline { border-color: rgba(255,255,255,.4); color: #fff; }
.switch-card.pro .actions .btn-outline:hover { background: #fff; color: var(--color-petroleum); }

/* ============ TEAM ============ */
.team {
    padding: 130px 0;
    background: var(--color-light);
    border-top: 1px solid var(--color-border);
}
.team-head .sec-eyebrow { color: var(--color-primary); }
.team-head h2 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--t-h2);
    line-height: 1.05;
    letter-spacing: -.025em;
    color: var(--color-text);
    max-width: 20ch;
}
.team-head h2 em { font-style: italic; color: var(--color-petroleum); font-weight: 500; }
.team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 48px;
}
.team-card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 22px;
    overflow: hidden;
    transition: transform .25s ease, box-shadow .25s ease;
}
.team-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.team-photo {
    aspect-ratio: 4 / 5;
    background: var(--color-mist);
    overflow: hidden;
}
.team-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.team-card .info { padding: 22px 24px 24px; }
.team-card h4 { font-family: var(--font-display); font-size: 18px; margin-bottom: 4px; }
.team-card .role { font-size: 14px; color: var(--color-green-md); }
.team-card .li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    font-size: 13px;
    color: var(--color-primary);
    font-weight: 600;
    text-decoration: none;
}
.team-card .li:hover { color: var(--color-green-dk); }

/* ============ DEFINIZIONE — accordion ============ */
.definition {
    padding: 110px 0;
    background: #fff;
    border-top: 1px solid var(--color-border);
}
.definition-head { margin-bottom: 40px; max-width: 60ch; }
.definition-head .sec-eyebrow { color: var(--color-primary); }
.definition-head h2 { font-family: var(--font-display); font-size: var(--t-h3); color: var(--color-text); }
.lid-acc { max-width: 760px; }
.lid-acc__item { border-bottom: 1px solid var(--color-border); }
.lid-acc__q {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 24px 4px;
    background: transparent;
    border: 0;
    cursor: pointer;
    text-align: left;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 19px;
    color: var(--color-primary);
}
.lid-acc__q .ico {
    flex-shrink: 0;
    width: 26px; height: 26px;
    display: grid;
    place-items: center;
    font-size: 22px;
    color: var(--color-primary);
    transition: transform .25s ease;
}
.lid-acc__item.is-open .lid-acc__q .ico { transform: rotate(45deg); }
.lid-acc__a {
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
}
.lid-acc__item.is-open .lid-acc__a { max-height: 600px; }
.lid-acc__a-inner { padding: 0 4px 26px; }
.lid-acc__a-inner p { color: var(--color-text); opacity: .8; font-size: 16px; line-height: 1.7; margin-bottom: 12px; }
.lid-acc__a-inner p:last-child { margin-bottom: 0; }
.lid-acc__a-inner strong { color: var(--color-primary); opacity: 1; }

/* ============ FINAL CTA ============ */
.final-q {
    padding: 150px 0;
    background: var(--color-light);
    text-align: center;
    position: relative;
    overflow: hidden;
    border-top: 1px solid var(--color-border);
}
.final-q::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='80' viewBox='0 0 240 80'><path d='M0 40 Q 30 10, 60 40 T 120 40 T 180 40 T 240 40' stroke='%232A5D50' stroke-width='1.2' fill='none' opacity='0.15'/></svg>");
    background-size: 240px 80px;
    background-repeat: repeat;
    opacity: .5;
    pointer-events: none;
}
.final-q h2 {
    position: relative;
    z-index: 1;
    font-family: var(--font-display);
    font-weight: 500;
    font-style: italic;
    font-size: clamp(44px, 6.5vw, 100px);
    line-height: .99;
    letter-spacing: -.02em;
    color: var(--color-green-dk);
    max-width: 18ch;
    margin: 0 auto 36px;
}
.final-q h2 em { color: var(--color-petroleum); }
.final-q .btn { position: relative; z-index: 1; }

/* ============ responsive ============ */
@media (max-width: 1000px) {
    .ask-grid     { grid-template-columns: 1fr; gap: 44px; }
    .values-grid  { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
    .how-steps    { grid-template-columns: 1fr; }
    .switch-grid  { grid-template-columns: 1fr; }
    .team-grid    { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .home-section, .ask, .values, .how, .switch, .team { padding: 84px 0; }
    .final-q { padding: 110px 0; }
    .values-grid { grid-template-columns: 1fr; }
    .switch-card { padding: 38px 28px; }
}

/* ============ accessibilità ============ */
@media (prefers-reduced-motion: reduce) {
    .q-slide { transition: opacity .2s ease; transform: none; }
    .value:hover, .how-step:hover, .switch-card:hover, .team-card:hover { transform: none; }
}
