/* ==========================================================
   trading-opzioni.it — Stili condivisi tra le pagine del sito
   Variabili, reset/base, accessibilita', navigazione,
   bottoni generici e footer.
   ========================================================== */

:root {
    /* Dark premium fintech theme */
    --primary: #34d399;
    --primary-light: #6ee7b7;
    --primary-dark: #05080f;
    --accent: #10b981;
    --accent-light: #34d399;
    /* Varianti scure di --accent: contrasto WCAG AA con testo bianco */
    --accent-dark: #0b7a55;
    --accent-darker: #096648;
    --text: #e8edf5;
    --text-light: #93a1b5;
    --bg: #070b14;
    --bg-warm: #0a111c;
    --white: #ffffff;
    --dark: #0d1522;
    /* Superfici, bordi e accento oro */
    --surface: #0d1522;
    --surface-2: #111c2e;
    --border: rgba(148, 163, 184, 0.14);
    --gold: #d4af37;
    --gold-light: #e6c86a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html, body { overflow-x: hidden; max-width: 100%; }

body {
    font-family: 'Source Sans Pro', sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
    -webkit-text-size-adjust: 100%;
}

img, video { max-width: 100%; height: auto; }
input, textarea, select { font-size: 16px; }

h1, h2, h3 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
}

/* Skip link */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    background: var(--primary-dark);
    color: var(--white);
    padding: 0.75rem 1.25rem;
    border-radius: 0 0 8px 8px;
    border: 1px solid var(--accent);
    border-top: none;
    text-decoration: none;
    font-weight: 600;
    z-index: 2000;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 0;
    color: var(--white);
}

/* Focus visibile da tastiera */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--accent-light);
    outline-offset: 2px;
}

/* Testo destinato ai soli screen reader */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .book-container { animation: none; }
    .option-line { animation: none; }
    .fade-in { transition: none !important; transform: none !important; transition-delay: 0ms !important; }
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(7, 11, 20, 0.72);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    z-index: 1000;
    padding: 1rem 2rem;
    transition: all 0.3s ease;
}

.nav.scrolled {
    padding: 0.7rem 2rem;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--white);
    flex-shrink: 0;
    transition: opacity 0.2s ease;
}

.nav-logo:hover {
    opacity: 0.88;
    color: var(--white);
}

.nav-logo:hover .brand-icon {
    color: #D9BE70;
}

.brand-icon {
    width: 26px;
    height: 26px;
    color: #C9A84C;
    flex-shrink: 0;
    transition: color 0.25s ease;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.brand-name {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.015em;
    margin-bottom: 4px;
}

.brand-tag {
    font-family: 'Source Sans Pro', sans-serif;
    font-size: 0.6rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.42);
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--white);
    text-decoration: none;
    font-weight: 400;
    transition: color 0.3s ease;
    font-size: 0.95rem;
}

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

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--white);
    margin: 5px 0;
    transition: all 0.3s ease;
}

/* Bottoni generici */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--accent-dark);
    color: var(--white);
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid var(--accent-dark);
    box-shadow: 0 0 24px rgba(16, 185, 129, 0.25);
}

.btn-primary:hover {
    background: var(--accent-darker);
    border-color: var(--accent-darker);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
}

.btn-primary.disabled {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.7);
    cursor: not-allowed;
}

.btn-primary.disabled:hover {
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    color: var(--white);
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid rgba(148, 163, 184, 0.35);
}

.btn-secondary:hover {
    border-color: var(--accent-light);
    background: rgba(148, 163, 184, 0.08);
}

/* Footer */
.footer {
    background: var(--primary-dark);
    color: var(--white);
    padding: 4rem 2rem 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
}

.footer-brand h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.footer-brand h3 span {
    color: var(--accent-light);
}

.footer-brand p {
    opacity: 0.7;
    font-size: 0.95rem;
    line-height: 1.6;
}

.footer-links h4,
.footer-contact h4 {
    color: var(--accent-light);
    margin-bottom: 1rem;
    font-size: 1rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.footer-contact p {
    opacity: 0.7;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.footer-bottom {
    max-width: 1200px;
    margin: 3rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    opacity: 0.7;
}

.footer-bottom a {
    color: var(--accent-light);
    text-decoration: none;
}

.footer-bottom a:hover {
    text-decoration: underline;
}

/* Mobile Responsive — navigazione e footer */
@media (max-width: 1024px) {
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .nav { padding: 0.85rem 1rem; }
    .nav.scrolled { padding: 0.6rem 1rem; }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--primary-dark);
        flex-direction: column;
        padding: 1rem 1.2rem;
        gap: 1rem;
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: block;
        min-width: 44px;
        min-height: 44px;
    }
}

@media (max-width: 480px) {
    .nav { padding: 0.7rem 0.9rem; }
    .nav.scrolled { padding: 0.55rem 0.9rem; }
    .brand-name { font-size: 1.05rem; }
    .brand-icon { width: 24px; height: 24px; }

    .footer { padding: 2.5rem 1rem 1.5rem; }
    .footer-content { gap: 1.5rem; }

    a, button { min-height: 40px; }
}

@media (max-width: 360px) {
    .brand-name { font-size: 1rem; }
    .brand-tag { display: none; }
}
