/* ==========================================================
   PsiAssist Landing — CSS condiviso (radice sito)
   Allineato alla palette dell'app (/psi/assets/css/style.css)
   ========================================================== */

:root {
    /* Palette app */
    --bg-main: #f5f7f8;
    --bg-card: #ffffff;
    --primary: #5b7c87;
    --primary-light: #7a9aa5;
    --primary-deep: #2c4a52;
    --primary-soft: #e6eff2;
    --text-main: #2f3a40;
    --text-muted: #6f7f87;
    --text-light: #8a98a0;
    --border-soft: #d9e1e5;
    --border-light: #e5e7eb;
    --success: #10b981;
    --calm: #6fa88f;
    --calm-soft: #e7f0eb;
    --accent-violet: #8b5cf6;
    --accent-violet-soft: #ede9fe;
    --accent-warm: #d97706;
    --accent-warm-soft: #fef3c7;

    /* Tipografia landing */
    --font-display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
    --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    /* Spaziature */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 28px;
    --space-xl: 48px;

    /* Bordi */
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 18px;

    /* Ombre */
    --shadow-soft: 0 2px 8px rgba(47, 58, 64, 0.04);
    --shadow-md: 0 4px 12px rgba(47, 58, 64, 0.06);
    --shadow-lg: 0 8px 24px rgba(47, 58, 64, 0.08);

    --container-max: 920px;

    /* Alias per stili pagina legacy */
    --ink: var(--text-main);
    --muted: var(--text-muted);
    --paper: var(--bg-main);
}

*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body.landing-site {
    margin: 0;
    background: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    font-size: 16px;
}

h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.25;
    color: var(--primary-deep);
    margin: 0 0 var(--space-sm);
}

p { margin: 0 0 var(--space-md); }

a { color: var(--primary); }

:focus-visible {
    outline: 3px solid var(--calm);
    outline-offset: 2px;
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

/* ── Header ─────────────────────────────────────────────── */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-soft);
    background: rgba(245, 247, 248, 0.92);
    backdrop-filter: blur(8px);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    padding-top: var(--space-md);
    padding-bottom: var(--space-md);
}

.logo {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--primary-deep);
    text-decoration: none;
    flex-shrink: 0;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.nav-links {
    display: none;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: var(--space-lg);
    font-size: 0.9rem;
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
}

.nav-links a:hover { color: var(--primary); }

.nav-cta {
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    background: var(--primary);
    padding: 8px 18px;
    border-radius: 999px;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s ease;
}

.nav-cta:hover { background: var(--primary-deep); }

.nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    cursor: pointer;
}

.nav-toggle__bar {
    display: block;
    width: 18px;
    height: 2px;
    margin: 0 auto;
    background: var(--primary-deep);
    border-radius: 1px;
}

@media (min-width: 768px) {
    .nav-toggle { display: none; }

    .nav-links {
        display: flex;
    }
}

@media (max-width: 767px) {
    .site-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-md);
        padding: var(--space-md);
        background: var(--bg-card);
        border-bottom: 1px solid var(--border-soft);
        box-shadow: var(--shadow-md);
        display: none;
    }

    .site-nav.is-open { display: flex; }

    .site-nav .nav-links {
        display: flex;
        flex-direction: column;
        gap: var(--space-sm);
    }

    .site-nav .nav-cta {
        text-align: center;
    }
}

/* ── Footer ───────────────────────────────────────────── */

.site-footer {
    border-top: 1px solid var(--border-soft);
    padding: var(--space-lg) 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    background: var(--bg-card);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    list-style: none;
    padding: 0;
    margin: 0 0 var(--space-sm);
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
}

.footer-links a:hover { color: var(--primary); }

.footer-copy { margin: 0; }

/* ── Bottoni ──────────────────────────────────────────── */

.btn-primary {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    font-weight: 600;
    padding: 13px 24px;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-size: 0.95rem;
    text-align: center;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-primary:hover { background: var(--primary-deep); }

.btn-outline {
    display: inline-block;
    border: 1.5px solid var(--calm);
    color: var(--primary-deep);
    font-weight: 600;
    padding: 11.5px 24px;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-size: 0.95rem;
    text-align: center;
    background: transparent;
    transition: background 0.2s ease;
}

.btn-outline:hover { background: var(--calm-soft); }

/* ── Sezioni generiche ────────────────────────────────── */

main article { padding-bottom: var(--space-xl); }

.landing-section {
    padding: var(--space-lg) 0;
    border-top: 1px solid var(--border-soft);
}

.landing-section h2 { font-size: 1.4rem; }

.eyebrow {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--calm);
    background: var(--calm-soft);
    padding: 5px 12px;
    border-radius: 999px;
    margin-bottom: var(--space-md);
}

/* ── Homepage hero ────────────────────────────────────── */

.hero {
    padding: var(--space-xl) 0 var(--space-lg);
    text-align: center;
}

.hero h1 {
    font-size: 1.7rem;
    max-width: 18ch;
    margin-left: auto;
    margin-right: auto;
}

.hero-lead {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 54ch;
    margin-left: auto;
    margin-right: auto;
}

.meeting-wrap {
    display: flex;
    justify-content: center;
    margin: var(--space-lg) 0;
}

.meeting { width: 240px; }
.meeting svg { width: 100%; height: auto; }

.meeting-overlap {
    transform-origin: 160px 90px;
    animation: pulse-soft 6s ease-in-out infinite;
}

@keyframes pulse-soft {
    0%, 100% { opacity: 0.55; transform: scale(1); }
    50% { opacity: 0.85; transform: scale(1.12); }
}

@media (prefers-reduced-motion: reduce) {
    .meeting-overlap { animation: none; opacity: 0.7; }
}

/* ── Audience cards ───────────────────────────────────── */

.audience-grid {
    display: grid;
    gap: var(--space-md);
    grid-template-columns: 1fr;
    margin: var(--space-lg) 0;
}

@media (min-width: 760px) {
    .audience-grid { grid-template-columns: 1fr 1fr; }
}

.audience-card {
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-soft);
}

.audience-card.for-pro { border-top: 4px solid var(--primary); }
.audience-card.for-users { border-top: 4px solid var(--calm); }

.audience-eyebrow {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: var(--space-xs);
}

.audience-card h2 { font-size: 1.3rem; }

.audience-list {
    list-style: none;
    padding: 0;
    margin: var(--space-sm) 0 var(--space-md);
    flex: 1;
}

.audience-list li {
    padding: 6px 0;
    font-size: 0.95rem;
}

.audience-list li::before {
    content: "✓ ";
    color: var(--calm);
    font-weight: 700;
}

/* ── Mission box ──────────────────────────────────────── */

.mission-box {
    background: var(--calm-soft);
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
}

/* ── Explore CTA grid ─────────────────────────────────── */

.explore-section {
    padding: var(--space-lg) 0;
    border-top: 1px solid var(--border-soft);
}

.explore-section__head { margin-bottom: var(--space-lg); }

.explore-section__lead {
    color: var(--text-muted);
    max-width: 52ch;
    margin-bottom: 0;
}

.explore-grid {
    display: grid;
    gap: var(--space-md);
    grid-template-columns: 1fr;
}

@media (min-width: 600px) {
    .explore-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 960px) {
    .explore-grid { grid-template-columns: repeat(3, 1fr); }
}

.explore-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    padding: var(--space-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-xl);
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.explore-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary);
}

.explore-card--calm::before { background: var(--calm); }
.explore-card--violet::before { background: var(--accent-violet); }
.explore-card--warm::before { background: var(--accent-warm); }
.explore-card--muted::before { background: var(--text-light); }

.explore-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.explore-card__icon {
    font-size: 1.75rem;
    line-height: 1;
}

.explore-card__title {
    font-size: 1.1rem;
    margin: 0;
}

.explore-card__desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    flex: 1;
    margin: 0;
}

.explore-card__cta {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
}

/* ── Articoli Xedit ───────────────────────────────────── */

.articles-section {
    padding: var(--space-lg) 0;
    border-top: 1px solid var(--border-soft);
}

.articles-section__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.articles-section__lead {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: var(--space-xs) 0 0;
}

.articles-section__all {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    white-space: nowrap;
}

.articles-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

@media (min-width: 600px) {
    .articles-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 960px) {
    .articles-grid { grid-template-columns: repeat(4, 1fr); }
}

.article-card {
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.article-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.article-card__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.article-card__thumb {
    width: 100%;
    height: 110px;
    overflow: hidden;
    background: var(--primary-soft);
}

.article-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.article-card__body {
    padding: 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-card__body h3 {
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 600;
    margin: 0 0 5px;
    line-height: 1.35;
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card__excerpt {
    font-size: 0.74rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

/* ── FAQ ──────────────────────────────────────────────── */

.faq-item {
    border-bottom: 1px solid var(--border-soft);
    padding: var(--space-sm) 0;
}

.faq-item summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-main);
    padding: var(--space-sm) 0;
    list-style: none;
    display: flex;
    justify-content: space-between;
    gap: var(--space-md);
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
    content: "+";
    color: var(--primary);
    font-size: 1.3rem;
    flex: 0 0 auto;
}

.faq-item[open] summary::after { content: "−"; }

.faq-item p {
    color: var(--text-muted);
    margin-top: var(--space-sm);
}

/* ── Page hero (landing interne) ──────────────────────── */

.page-hero {
    padding: var(--space-xl) 0 var(--space-lg);
    border-bottom: 1px solid var(--border-soft);
}

.page-hero h1 { font-size: 1.9rem; }

.page-hero .lead,
.hero-lead.answer-lead {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 54ch;
}

.last-reviewed {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: var(--space-md);
}

/* ── Responsive globale ───────────────────────────────── */

@media (min-width: 640px) {
    .hero h1 { font-size: 2.3rem; max-width: 22ch; }
    .container { padding: 0 var(--space-lg); }
    .page-hero h1 { font-size: 2.2rem; }
}
