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

/* VARIABILI */
:root {
    --bg:        #0e1320;
    --bg2:       #131825;
    --bg3:       #1a1f2e;
    --border:    #2a3044;
    --accent:    #4a9eff;
    --accent2:   #1e2d4a;
    --text:      #e0e4ee;
    --text2:     #c8cdd8;
    --muted:     #8a90a0;
    --hint:      #4a5060;
    --green:     #3dba7e;
    --orange:    #e8a44a;
    --font-t:    'Exo 2', sans-serif;
    --font-b:    'DM Sans', sans-serif;
    --radius:    10px;
    --radius-lg: 16px;
}

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-b);
    font-size: 16px;
    line-height: 1.7;
    min-height: 100vh;
    overflow-x: hidden;
}

/* NAV */
nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 48px;
    height: 64px;
    background: rgba(14, 19, 32, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav-logo {
    display: flex;
    align-items: center;
    font-family: var(--font-t);
    font-size: 20px;
    font-weight: 700;
    text-decoration: none;
}

.nav-logo img { width: 32px; height: 32px; object-fit: contain; }
.nav-logo .logo-carrer { color: var(--text); }
.nav-logo .logo-mode   { color: var(--accent); }

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

/* Link di navigazione semplice (senza stile bottone) */
.nav-link {
    font-size: 14px;
    color: var(--text2);
    text-decoration: none;
    padding: 6px 10px;
    border-radius: var(--radius);
    transition: color 0.2s;
}

.nav-link:hover { color: var(--accent); }
.nav-link.active { color: var(--accent); font-weight: 500; }

/* BOTTONI */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 20px;
    border-radius: var(--radius);
    font-family: var(--font-b);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.btn-outline { background: transparent; border-color: var(--border); color: var(--text2); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: #3a8ee8; border-color: #3a8ee8; transform: translateY(-1px); }
.btn-lg { padding: 13px 32px; font-size: 15px; border-radius: var(--radius-lg); }

/* SEZIONI */
section { padding: 96px 24px; }
.container { max-width: 1100px; margin: 0 auto; }

.section-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
}

.section-title {
    font-family: var(--font-t);
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
}

.section-desc {
    font-size: 17px;
    color: var(--text2);
    max-width: 540px;
    margin-bottom: 56px;
}

/* DIVIDER */
.divider { height: 1px; background: var(--border); max-width: 1100px; margin: 0 auto; }

/* DOTS (barra stile macOS) */
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot-r { background: #ff5f57; }
.dot-y { background: #febc2e; }
.dot-g { background: #28c840; }

/* SCREENSHOT BAR */
.screenshot-bar {
    background: var(--bg3);
    border-bottom: 1px solid var(--border);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* FEATURES */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.feature-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: border-color 0.2s, transform 0.2s;
}

.feature-card:hover { border-color: var(--accent); transform: translateY(-3px); }

.feature-icon {
    width: 44px; height: 44px;
    background: var(--accent2);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.feature-card h3 { font-family: var(--font-t); font-size: 17px; font-weight: 600; margin-bottom: 8px; }
.feature-card p  { font-size: 14px; color: var(--muted); line-height: 1.6; }

/* STEPS */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0;
    position: relative;
}

.steps::before {
    content: '';
    position: absolute;
    top: 28px; left: 10%; right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border) 20%, var(--border) 80%, transparent);
}

.step { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 24px; position: relative; }

.step-num {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: var(--bg2);
    border: 1px solid var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-t);
    font-size: 20px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.step h3 { font-family: var(--font-t); font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.step p  { font-size: 14px; color: var(--muted); }

/* SCREENSHOTS GRID */
.screenshots-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.screenshot-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.screenshot-card .screenshot-bar { padding: 10px 14px; }
.screenshot-card-label { padding: 12px 16px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); }

/* STACK PILLS */
.stack-grid { display: flex; flex-wrap: wrap; gap: 12px; }

.stack-pill {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 100px;
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text2);
    display: flex;
    align-items: center;
    gap: 8px;
}

.stack-pill span { width: 8px; height: 8px; border-radius: 50%; }
.pill-php     span { background: #8892be; }
.pill-laravel span { background: #ff2d20; }
.pill-react   span { background: #61dafb; }
.pill-mysql   span { background: #00758f; }
.pill-vite    span { background: #646cff; }
.pill-gemini  span { background: var(--green); }
.pill-sanctum span { background: var(--orange); }

/* CTA SECTION */
.cta-section { text-align: center; padding: 96px 24px; position: relative; overflow: hidden; }

.cta-section::before {
    content: '';
    position: absolute;
    width: 500px; height: 500px;
    background: var(--accent);
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.06;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.cta-section h2 { font-family: var(--font-t); font-size: clamp(28px, 4vw, 44px); font-weight: 700; margin-bottom: 16px; position: relative; }
.cta-section p  { font-size: 17px; color: var(--text2); margin-bottom: 36px; position: relative; }
.cta-buttons    { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; position: relative; }

/* FOOTER */
footer {
    border-top: 1px solid var(--border);
    padding: 32px 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-logo { font-family: var(--font-t); font-size: 15px; font-weight: 600; text-decoration: none; }
.footer-logo .logo-carrer { color: var(--text2); }
.footer-logo .logo-mode   { color: var(--accent); }
.footer-links { display: flex; align-items: center; gap: 20px; }
.footer-links a { font-size: 13px; color: var(--muted); text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: var(--accent); }
.footer-copy { font-size: 13px; color: var(--hint); }

/* COOKIE BANNER */
.cookie-banner {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 999;
    background: var(--bg2);
    border-top: 1px solid var(--border);
    padding: 16px 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

.cookie-banner p {
    font-size: 13px;
    color: var(--muted);
    margin: 0;
    max-width: 700px;
}

.cookie-banner p a { color: var(--accent); text-decoration: none; }

.cookie-banner-buttons { display: flex; gap: 10px; flex-shrink: 0; }

.cookie-btn-accept {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.cookie-btn-accept:hover { background: #3a8ee8; }

.cookie-btn-reject {
    background: transparent;
    color: var(--muted);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

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

/* SKELETON LOADING */
.skeleton {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.skeleton-cover {
    width: 100%;
    height: 200px;
    background: linear-gradient(90deg, var(--bg3) 25%, var(--bg2) 50%, var(--bg3) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.skeleton-body { padding: 24px; }

.skeleton-line {
    height: 14px;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--bg3) 25%, var(--bg2) 50%, var(--bg3) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    margin-bottom: 12px;
}

.skeleton-line.short { width: 60%; }
.skeleton-line.long  { width: 90%; }

@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* PAGINAZIONE */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 48px;
    flex-wrap: wrap;
}

.page-btn {
    width: 36px; height: 36px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text2);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-b);
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-btn:hover { border-color: var(--accent); color: var(--accent); }
.page-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.page-btn:disabled { opacity: 0.3; cursor: not-allowed; }

/* POST CARD (blog) */
.post-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color 0.2s, transform 0.2s;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.post-card:hover { border-color: var(--accent); transform: translateY(-3px); }

.post-card-cover {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    background: var(--bg3);
}

.post-card-cover-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--bg3) 0%, var(--accent2) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.post-card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }

.post-tag {
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 600;
    background: var(--accent2);
    color: var(--accent);
    letter-spacing: 0.04em;
}

.post-card-title {
    font-family: var(--font-t);
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 8px;
    color: var(--text);
}

.post-card-subtitle {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.5;
    flex: 1;
}

.post-card-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.post-card-date { font-size: 12px; color: var(--hint); }
.post-card-read { font-size: 12px; color: var(--accent); font-weight: 500; }

/* ANIMAZIONI */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes float1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%       { transform: translate(40px, 30px) scale(1.05); }
}

@keyframes float2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%       { transform: translate(-30px, -20px) scale(1.08); }
}

/* RESPONSIVE */
@media (max-width: 768px) {
    nav { padding: 0 20px; }
    .steps::before { display: none; }
    .steps { gap: 32px; }
    .screenshots-grid { grid-template-columns: 1fr; }
    footer { flex-direction: column; align-items: flex-start; padding: 24px 20px; }
    .cookie-banner { padding: 16px 20px; }
    .cookie-banner p { font-size: 12px; }
}

@media (max-width: 480px) {
    .nav-links .btn { padding: 6px 12px; font-size: 12px; }
    .nav-logo { font-size: 16px; }
    .nav-logo img { width: 24px; height: 24px; }
    .nav-link { display: none; }
}