:root {
    --bg-deep: #f4f7fc;
    --bg-card: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.9);
    --bg-alt: #eef2f8;
    --bg-input: #ffffff;
    --border: rgba(56, 120, 200, 0.16);
    --text: #0f172a;
    --text-muted: #64748b;
    --accent: #0ea5e9;
    --accent-2: #8b5cf6;
    --accent-glow: rgba(14, 165, 233, 0.28);
    --gradient: linear-gradient(135deg, #0ea5e9 0%, #6366f1 50%, #a855f7 100%);
    --shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.1);
    --radius: 16px;
    --radius-sm: 10px;
    --header-h: 72px;
    --max-w: 1180px;
    --font: "Segoe UI", system-ui, -apple-system, sans-serif;
    --transition: 0.25s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg-deep);
    color: var(--text);
    line-height: 1.65;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 20% -10%, rgba(14, 165, 233, 0.1), transparent),
        radial-gradient(ellipse 60% 40% at 80% 0%, rgba(139, 92, 246, 0.08), transparent),
        radial-gradient(ellipse 50% 30% at 50% 100%, rgba(14, 165, 233, 0.05), transparent);
    pointer-events: none;
    z-index: -1;
}

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

a:hover {
    color: #0284c7;
}

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

.container {
    width: min(100% - 2rem, var(--max-w));
    margin-inline: auto;
}

/* Header */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-h);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    gap: 1rem;
}

.header-logo {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.nav-list a {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.nav-list a:hover {
    color: var(--text);
}

/* Breadcrumbs */
.breadcrumbs {
    padding: 0.75rem 0;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    gap: 0.35rem;
    align-items: center;
}

.breadcrumbs li + li::before {
    content: "/";
    margin-right: 0.35rem;
    opacity: 0.5;
}

.breadcrumbs a {
    color: var(--text-muted);
}

.breadcrumbs [aria-current="page"] {
    color: var(--accent);
}

/* Hero */
.hero {
    padding: 4rem 0 5rem;
    position: relative;
}

.hero-wrapper {
    display: grid;
    gap: 2rem;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-glass);
    font-size: 0.8rem;
    color: var(--accent);
    width: fit-content;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.25rem);
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.hero h1 span {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero > .container > .hero-wrapper > p,
.hero-wrapper > p {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 640px;
}

.hero-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: var(--gradient);
    color: #ffffff;
}

.btn-primary:hover {
    box-shadow: 0 0 24px var(--accent-glow);
    color: #ffffff;
}

.btn-ghost {
    border-color: var(--border);
    background: var(--bg-glass);
    color: var(--text);
}

.btn-ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.hero-visual {
    position: relative;
    aspect-ratio: 16/10;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background:
        linear-gradient(160deg, rgba(14, 165, 233, 0.08), rgba(139, 92, 246, 0.06)),
        var(--bg-card);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.hero-visual::after {
    content: "";
    position: absolute;
    inset: 10%;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-glow), transparent 70%);
    animation: pulse 4s ease-in-out infinite;
    z-index: 0;
    pointer-events: none;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}

.hero-grid-lines {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image:
        linear-gradient(rgba(14, 165, 233, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(14, 165, 233, 0.08) 1px, transparent 1px);
    background-size: 40px 40px;
}

.form-group {
    margin-bottom: 13px;
}

.hero-visual-svg {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    padding: 0.5rem;
}

.hero-visual-svg .hero-chart-line {
    stroke-dasharray: 680;
    stroke-dashoffset: 680;
    animation: hero-line-draw 2.4s ease forwards 0.2s;
}

.hero-visual-svg .hero-chart-area {
    opacity: 0;
    animation: hero-area-in 1s ease forwards 1.8s;
}

.hero-visual-svg .hero-chart-dot {
    opacity: 0;
    animation: hero-dot-in 0.45s ease forwards;
}

.hero-visual-svg .hero-chart-dot:nth-of-type(1) { animation-delay: 1.1s; }
.hero-visual-svg .hero-chart-dot:nth-of-type(2) { animation-delay: 1.35s; }
.hero-visual-svg .hero-chart-dot:nth-of-type(3) { animation-delay: 1.6s; }
.hero-visual-svg .hero-chart-dot:nth-of-type(4) { animation-delay: 1.85s; }
.hero-visual-svg .hero-chart-dot:nth-of-type(5) { animation-delay: 2.1s; }

@keyframes hero-line-draw {
    to { stroke-dashoffset: 0; }
}

@keyframes hero-area-in {
    to { opacity: 1; }
}

@keyframes hero-dot-in {
    to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .hero-visual-svg .hero-chart-line {
        stroke-dasharray: none;
        stroke-dashoffset: 0;
        animation: none;
    }

    .hero-visual-svg .hero-chart-area,
    .hero-visual-svg .hero-chart-dot {
        opacity: 1;
        animation: none;
    }
}

/* Sections */
section {
    padding: 4rem 0;
}

.section-title {
    font-size: clamp(1.6rem, 3.5vw, 2.25rem);
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.section-lead {
    color: var(--text-muted);
    max-width: 680px;
    margin-bottom: 2.5rem;
}

/* Site info */
.site-info-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.site-info-list > li {
    display: grid;
    gap: 2rem;
    align-items: center;
}

.site-info-text h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.site-info-text > p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.site-info-text-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.site-info-text-list-item {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-card);
    box-shadow: var(--shadow);
}

.site-info-text-list-item h4 {
    font-size: 0.95rem;
    margin-bottom: 0.35rem;
    color: var(--accent);
}

.site-info-text-list-item p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.site-info-img {
    border-radius: var(--radius);
    border: 1px solid var(--border);
    aspect-ratio: 4/3;
    background:
        linear-gradient(135deg, rgba(14, 165, 233, 0.1), rgba(99, 102, 241, 0.08)),
        var(--bg-card);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.site-info-img svg {
    width: 60%;
    opacity: 0.7;
}

/* How it works */
.how-its-work {
    background: var(--bg-alt);
    border-block: 1px solid var(--border);
}

.how-its-work-list {
    list-style: none;
    display: grid;
    gap: 1.5rem;
}

.how-its-work-list li {
    padding: 1.75rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-card);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.how-its-work-list li:hover {
    border-color: rgba(14, 165, 233, 0.35);
    box-shadow: var(--shadow-lg);
}

.how-its-work-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    color: var(--accent);
}

.how-its-work-list h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.how-its-work-list p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* About */
.about-wrapper {
    display: grid;
    gap: 2.5rem;
    align-items: center;
}

.about-text h2 {
    font-size: clamp(1.6rem, 3.5vw, 2.25rem);
    margin-bottom: 1rem;
}

.about-text p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.about-visual {
    border-radius: var(--radius);
    border: 1px solid var(--border);
    aspect-ratio: 16/9;
    background:
        radial-gradient(circle at 30% 40%, rgba(14, 165, 233, 0.1), transparent 50%),
        radial-gradient(circle at 70% 60%, rgba(139, 92, 246, 0.08), transparent 50%),
        var(--bg-card);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
    overflow: hidden;
}

.about-visual-svg {
    width: 100%;
    height: 100%;
    max-height: 100%;
    object-fit: contain;
}

.about-visual-svg .about-chart-line {
    stroke-dasharray: 520;
    stroke-dashoffset: 520;
    animation: about-line-draw 2.2s ease forwards 0.3s;
}

.about-visual-svg .about-chart-dot {
    opacity: 0;
    animation: about-dot-in 0.5s ease forwards;
}

.about-visual-svg .about-chart-dot:nth-of-type(1) { animation-delay: 1.2s; }
.about-visual-svg .about-chart-dot:nth-of-type(2) { animation-delay: 1.5s; }
.about-visual-svg .about-chart-dot:nth-of-type(3) { animation-delay: 1.8s; }
.about-visual-svg .about-chart-dot:nth-of-type(4) { animation-delay: 2.1s; }

@keyframes about-line-draw {
    to { stroke-dashoffset: 0; }
}

@keyframes about-dot-in {
    to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .about-visual-svg .about-chart-line {
        stroke-dasharray: none;
        stroke-dashoffset: 0;
        animation: none;
    }

    .about-visual-svg .about-chart-dot {
        opacity: 1;
        animation: none;
    }
}

/* Calculator */
.invest-calculate {
    background: var(--bg-alt);
}

.invest-calculate-wrapper {
    max-width: 560px;
    margin-inline: auto;
    padding: 2rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-card);
    box-shadow: var(--shadow-lg);
}

.invest-calculate h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.calc-field {
    margin-bottom: 1.25rem;
}

.calc-field label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

.calc-field input,
.calc-field select {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-input);
    color: var(--text);
    font-size: 1rem;
}

.calc-result {
    margin-top: 1.5rem;
    padding: 1.25rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(14, 165, 233, 0.25);
    background: rgba(14, 165, 233, 0.06);
    text-align: center;
}

.calc-result strong {
    display: block;
    font-size: 1.75rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-top: 0.25rem;
}

.calc-note {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 1rem;
    text-align: center;
}

/* Why we */
.why-we-list {
    list-style: none;
    display: grid;
    gap: 1.25rem;
}

.why-we-list li {
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-card);
    box-shadow: var(--shadow);
}

.why-we-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    color: var(--accent-2);
}

.why-we-list h3 {
    font-size: 1rem;
    margin-bottom: 0.35rem;
}

.why-we-list p {
    font-size: 0.88rem;
    color: var(--text-muted);
}

/* FAQ */
.faq {
    border-top: 1px solid var(--border);
}

.faq-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.faq-list li {
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-card);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.faq-list h3 {
    font-size: 0.95rem;
    padding: 1rem 1.25rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    user-select: none;
}

.faq-list h3::after {
    content: "+";
    font-size: 1.2rem;
    color: var(--accent);
    transition: var(--transition);
}

.faq-list li.open h3::after {
    transform: rotate(45deg);
}

.faq-list p {
    font-size: 0.88rem;
    color: var(--text-muted);
    padding: 0 1.25rem 1rem;
    display: none;
}

.faq-list li.open p {
    display: block;
}

/* Form */
.form-section {
    background: var(--bg-alt);
}

.form-card {
    max-width: 640px;
    margin-inline: auto;
    padding: clamp(1.5rem, 3vw, 2.5rem);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-card);
    box-shadow: var(--shadow-lg);
}

.form-card h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.form-card > p {
    color: var(--text-muted);
    margin-bottom: 1.75rem;
    font-size: 0.9rem;
    text-align: center;
}

/* Solo modulo statico HTML, non core/form.php */
.contact-form:not(.apx-lead-form) {
    max-width: 520px;
    margin-inline: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-form:not(.apx-lead-form) h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.contact-form:not(.apx-lead-form) .form-lead {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

form.apx-lead-form .form-preloader.hidden {
    display: none !important;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-input);
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.contact-form:not(.apx-lead-form) .btn {
    width: 100%;
    margin-top: 0.5rem;
}

/* CTA */
.cta {
    text-align: center;
    padding: 3rem 0;
}

.cta h2 {
    font-size: clamp(1.4rem, 3vw, 1.9rem);
    margin-bottom: 0.75rem;
}

.cta p {
    color: var(--text-muted);
    max-width: 560px;
    margin: 0 auto 1.5rem;
}

/* Disclaimer */
.disclaimer {
    padding: 2rem 0 3rem;
    border-top: 1px solid var(--border);
}

.disclaimer h3 {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.disclaimer p {
    font-size: 0.78rem;
    color: var(--text-muted);
    opacity: 0.85;
    line-height: 1.6;
}

/* Footer */
.footer {
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    background: var(--bg-card);
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.footer-logo {
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-list {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    gap: 1.25rem;
}

.footer-list a {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Cookie banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    padding: 1rem;
    transform: translateY(100%);
    transition: transform 0.4s ease;
}

.cookie-banner.visible {
    transform: translateY(0);
}

.cookie-banner-inner {
    max-width: var(--max-w);
    margin-inline: auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(16px);
    box-shadow: 0 -8px 32px rgba(15, 23, 42, 0.1);
}

.cookie-banner p {
    font-size: 0.85rem;
    color: var(--text-muted);
    flex: 1;
    min-width: 200px;
}

.cookie-banner p a {
    text-decoration: underline;
}

.cookie-actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

.cookie-actions .btn {
    padding: 0.55rem 1.1rem;
    font-size: 0.85rem;
}

.btn-reject {
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.btn-reject:hover {
    border-color: var(--text-muted);
    color: var(--text);
}

/* Tablet */
@media (min-width: 640px) {
    .how-its-work-list {
        grid-template-columns: repeat(2, 1fr);
    }

    .why-we-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .hero-wrapper {
        grid-template-columns: 1fr 1fr;
    }

    .site-info-list > li {
        grid-template-columns: 1fr 1fr;
    }

    .site-info-list > li:nth-child(even) .site-info-img {
        order: -1;
    }

    .about-wrapper {
        grid-template-columns: 1fr 1fr;
    }

    .how-its-work-list {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Mobile nav */
@media (max-width: 767px) {
    .nav-toggle {
        display: flex;
    }

    .header-simple .nav {
        position: static;
        transform: none;
        opacity: 1;
        pointer-events: auto;
        padding: 0;
        background: none;
        border: none;
    }

    .nav {
        position: fixed;
        top: var(--header-h);
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow);
        padding: 1rem;
        transform: translateY(-120%);
        opacity: 0;
        pointer-events: none;
        transition: var(--transition);
    }

    .nav.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .nav-list {
        flex-direction: column;
        gap: 0.75rem;
    }

    .hero {
        padding: 2.5rem 0 3rem;
    }

    section {
        padding: 3rem 0;
    }

    .cookie-banner-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .cookie-actions {
        justify-content: stretch;
    }

    .cookie-actions .btn,
    .cookie-actions .btn-reject {
        flex: 1;
    }
}
