/* Base & Resets */
:root {
    --bg-color: #05050A;
    --text-primary: #F0F4F8;
    --text-secondary: #8B9BB4;
    --accent-blue: #00F0FF;
    --accent-purple: #7000FF;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
}

/* Background Blobs */
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    opacity: 0.5;
}

.blob-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-purple), transparent 70%);
    top: -100px;
    left: -200px;
    animation: float 14s infinite alternate;
}

.blob-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent-blue), transparent 70%);
    bottom: -100px;
    right: -100px;
    animation: float 18s infinite alternate-reverse;
}

@keyframes float {
    0% {
        transform: translateY(0) scale(1);
    }

    100% {
        transform: translateY(40px) scale(1.05);
    }
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 0;
    background: rgba(5, 5, 10, 0.7);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    height: 32px;
    width: auto;
    border-radius: 4px;
    /* nel caso il logo avesse spigoli vivi */
}

.logo-text {
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
    background: linear-gradient(90deg, #FFF, var(--accent-blue));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

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

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

.nav-btn {
    padding: 0.6rem 1.2rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: #FFF !important;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
}

/* Language Switcher */
.lang-switch {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 1rem;
    padding-left: 1rem;
    border-left: 1px solid var(--glass-border);
}

.lang-switch button {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: inherit;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.lang-switch button:hover {
    color: #FFF;
}

.lang-switch button.active {
    color: var(--accent-blue);
    text-shadow: 0 0 8px rgba(0, 240, 255, 0.4);
}

.lang-switch span {
    color: var(--glass-border);
    font-size: 0.9rem;
}

/* Hamburger Button (hidden on desktop) */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
    opacity: 0;
}

.hamburger.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Hero Section */
.hero {
    max-width: 1200px;
    margin: 12rem auto 8rem;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.badge {
    background: rgba(0, 240, 255, 0.1);
    color: var(--accent-blue);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(0, 240, 255, 0.2);
}

.hero-title {
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -2px;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #FFF 0%, #A0B0D0 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.cta-group {
    display: flex;
    gap: 1rem;
}

.btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.75rem;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
    color: #FFF;
    border: none;
    box-shadow: 0 10px 30px rgba(112, 0, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(0, 240, 255, 0.4);
}

.btn-secondary {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* Base Code Window */
.code-showcase {
    background: #0D0D14;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    position: relative;
    backdrop-filter: blur(20px);
}

.window-header {
    background: #151520;
    padding: 0.8rem 1rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #222;
}

.dots {
    display: flex;
    gap: 6px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red {
    background: #FF5F56;
}

.dot.yellow {
    background: #FFBD2E;
}

.dot.green {
    background: #27C93F;
}

.title {
    margin: 0 auto;
    color: #666;
    font-size: 0.85rem;
    font-weight: 600;
    transform: translateX(-20px);
    /* Center offset compensation */
}

.window-body {
    padding: 1.5rem;
    padding-bottom: 2rem;
}

.window-body pre {
    margin: 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    color: #C9D1D9;
}

.keyword {
    color: #FF7B72;
    font-weight: 600;
}

.datatype {
    color: #79C0FF;
}

.function {
    color: #D2A8FF;
}

.number {
    color: #79C0FF;
}

.string {
    color: #A5D6FF;
}

.comment {
    color: #8B949E;
    font-style: italic;
}

/* Features Section */
.features-section {
    max-width: 1200px;
    margin: 0 auto 10rem;
    padding: 0 2rem;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(90deg, #FFF, #8B9BB4);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-title p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature-card {
    padding: 2.5rem 2rem;
    border-radius: 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(16px);
    transition: transform 0.3s ease, background 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: #FFF;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Progress & Roadmap Section */
.progress-section {
    max-width: 1200px;
    margin: 0 auto 10rem;
    padding: 0 2rem;
}

.roadmap-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.glass-panel {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(16px);
    border-radius: 16px;
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
}

.glass-panel h3 {
    font-size: 1.5rem;
    color: #FFF;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 1rem;
}

/* Progress Bars */
.progress-item {
    margin-bottom: 1.5rem;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.progress-header .pct {
    color: var(--accent-blue);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-purple), var(--accent-blue));
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
    transition: width 1s ease-in-out;
}

.fill-100 {
    width: 100%;
    background: #27C93F;
    box-shadow: 0 0 10px rgba(39, 201, 63, 0.4);
}

.fill-85 {
    width: 85%;
}

.fill-15 {
    width: 15%;
    background: linear-gradient(90deg, #FF5F56, var(--accent-purple));
}

/* Milestones List */
.milestone-list {
    list-style: none;
    padding: 0;
}

.milestone-list li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.milestone-list li strong {
    color: #FFF;
}

.milestone-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--text-secondary);
    background: var(--bg-color);
}

.milestone-list li::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 20px;
    width: 2px;
    height: calc(100% - 10px);
    background: var(--glass-border);
}

.milestone-list li:last-child::after {
    display: none;
}

.milestone-list li.done {
    color: #C9D1D9;
}

.milestone-list li.done::before {
    border-color: #27C93F;
    background: #27C93F;
    box-shadow: 0 0 10px rgba(39, 201, 63, 0.4);
}

.milestone-list li.active {
    color: #FFF;
}

.milestone-list li.active::before {
    border-color: var(--accent-blue);
    background: var(--accent-blue);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.6);
}

/* Expandable Milestone Details */
.expandable-item details {
    cursor: pointer;
}

.expandable-item summary {
    outline: none;
    list-style: none;
    position: relative;
    padding-right: 20px;
}

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

.expandable-item summary::after {
    content: '▼';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%) rotate(-90deg);
    transition: transform 0.2s ease;
    font-size: 0.8rem;
    color: var(--accent-blue);
}

.expandable-item details[open] summary::after {
    transform: translateY(-50%) rotate(0);
}

.milestone-sublist {
    margin-top: 14px;
    padding-left: 1rem;
    color: var(--text-secondary);
}

.milestone-sublist li {
    padding-left: 24px;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    list-style: none;
    /* Rimuove pallino interno */
    position: relative;
}

.milestone-list .milestone-sublist li::after {
    display: none;
}

.milestone-list .milestone-sublist li::before {
    content: '⏳';
    /* Icona WIP task di base */
    position: absolute;
    left: 0;
    top: 0;
    display: inline-block;
    width: auto;
    height: auto;
    border: none;
    background: transparent;
    box-shadow: none;
    font-size: 0.95rem;
}

.milestone-list .milestone-sublist li.sub-done::before {
    content: '✅';
    /* Override Icona Completed task */
}

.milestone-sublist li.sub-done {
    color: #C9D1D9;
}

/* Footer */
footer {
    border-top: 1px solid var(--glass-border);
    padding: 3rem 0;
    text-align: center;
    background: rgba(5, 5, 10, 0.8);
    margin-top: auto;
}

.footer-logo {
    font-weight: 800;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: #FFF;
}

footer p {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        margin-top: 8rem;
    }

    .hero-content {
        align-items: center;
    }

    .cta-group {
        justify-content: center;
        flex-direction: column;
        width: 100%;
    }

    .cta-group .btn {
        width: 100%;
        justify-content: center;
    }

    .hero-title {
        font-size: 3.5rem;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        width: 280px;
        height: 100dvh;
        background: rgba(5, 5, 10, 0.95);
        backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: flex-start;
        padding: 5rem 2rem 2rem;
        gap: 1.5rem;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        z-index: 999;
        border-left: 1px solid var(--glass-border);
        display: flex;
    }

    .nav-links.open {
        transform: translateX(0);
    }

    .nav-links a {
        font-size: 1.1rem;
        width: 100%;
    }

    .nav-links .nav-btn {
        text-align: center;
        width: 100%;
        justify-content: center;
    }

    .nav-links .lang-switch {
        margin-left: 0;
        padding-left: 0;
        border-left: none;
        padding-top: 0.5rem;
        border-top: 1px solid var(--glass-border);
        width: 100%;
    }

    .hamburger {
        display: flex;
    }

    .nav-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 998;
    }

    .nav-overlay.open {
        display: block;
    }

    .roadmap-grid {
        grid-template-columns: 1fr;
    }

    .logo-text {
        font-size: 1.2rem;
    }

    .section-title h2 {
        font-size: 1.8rem;
    }

    .section-title p {
        font-size: 0.95rem;
    }

    .glass-panel {
        padding: 1.5rem;
    }

    .glass-panel h3 {
        font-size: 1.25rem;
        margin-bottom: 1.5rem;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .feature-card {
        padding: 1.5rem;
    }

    .progress-header {
        font-size: 0.85rem;
        flex-wrap: wrap;
    }

    .milestone-list li {
        font-size: 0.88rem;
        padding-left: 1.6rem;
        margin-bottom: 1.2rem;
    }

    .milestone-sublist li {
        font-size: 0.82rem;
        padding-left: 22px;
    }

    .expandable-item summary {
        font-size: 0.88rem;
        padding-right: 18px;
    }
}

/* Small phones */
@media (max-width: 480px) {
    .hero {
        margin-top: 6.5rem;
        padding: 0 1rem;
    }

    .hero-title {
        font-size: 2.2rem;
        letter-spacing: -1px;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .badges-row {
        flex-wrap: wrap;
    }

    .badge {
        font-size: 0.75rem;
        padding: 0.3rem 0.8rem;
    }

    .code-showcase {
        border-radius: 8px;
    }

    .window-body {
        padding: 1rem;
    }

    .window-body pre {
        font-size: 0.75rem;
    }

    .features-section,
    .progress-section {
        padding: 0 1rem;
        margin-bottom: 5rem;
    }

    .section-title h2 {
        font-size: 1.5rem;
    }

    .glass-panel {
        padding: 1.25rem;
        border-radius: 12px;
    }

    .glass-panel h3 {
        font-size: 1.1rem;
        margin-bottom: 1.25rem;
        padding-bottom: 0.75rem;
    }

    .progress-header {
        font-size: 0.8rem;
    }

    .progress-item {
        margin-bottom: 1rem;
    }

    .milestone-list li {
        font-size: 0.82rem;
        padding-left: 1.4rem;
        margin-bottom: 1rem;
    }

    .milestone-list li::before {
        width: 8px;
        height: 8px;
        top: 5px;
    }

    .milestone-list li::after {
        left: 3px;
        top: 17px;
    }

    .milestone-sublist {
        padding-left: 0.5rem;
    }

    .milestone-sublist li {
        font-size: 0.78rem;
        padding-left: 20px;
    }

    footer {
        padding: 2rem 1rem;
    }

    .footer-logo {
        font-size: 1.1rem;
    }

    footer p {
        font-size: 0.8rem;
    }

    .cta-group .btn {
        padding: 0.8rem 1.2rem;
        font-size: 0.9rem;
    }
}