/* =========================================================================
   MusicTracker — site vitrine
   Thème sombre & teal, à l'image du logiciel (n-Track like).
   ========================================================================= */

:root {
    --teal:        #1FB6C3;
    --teal-bright: #3BCEDA;
    --teal-deep:   #178C97;

    --bg:        #141519;
    --bg-2:      #16171B;
    --surface:   #1E1F24;
    --surface-2: #232429;
    --surface-3: #2C2E35;
    --line:      #26272C;
    --line-soft: #202127;

    --text:      #E9EAED;
    --text-2:    #C9CDD3;
    --muted:     #9BA1AA;
    --muted-2:   #7A7F87;

    --radius:    14px;
    --radius-sm: 10px;
    --maxw:      1120px;
    --ease:      cubic-bezier(.22,.61,.36,1);
    --shadow:    0 20px 50px -20px rgba(0,0,0,.65);
    --shadow-teal: 0 10px 30px -8px rgba(31,182,195,.45);
    --font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
    margin: 0;
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -0.02em; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.skip-link {
    position: absolute; left: -999px; top: 0; z-index: 200;
    background: var(--teal); color: #051013; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ------------------------------- Buttons ------------------------------- */
.btn {
    display: inline-flex; align-items: center; gap: 9px;
    font-weight: 600; font-size: 15px; font-family: inherit;
    padding: 11px 20px; border-radius: 999px; border: 1px solid transparent;
    cursor: pointer; transition: transform .18s var(--ease), box-shadow .25s var(--ease), background .2s var(--ease), border-color .2s;
    white-space: nowrap;
}
.btn-lg { padding: 14px 26px; font-size: 16px; }
.btn-primary {
    background: linear-gradient(135deg, var(--teal-bright), var(--teal-deep));
    color: #051013;
    box-shadow: var(--shadow-teal);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -10px rgba(31,182,195,.6); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost {
    background: rgba(255,255,255,.04); color: var(--text);
    border-color: var(--line); backdrop-filter: blur(6px);
}
.btn-ghost:hover { border-color: var(--teal); color: #fff; transform: translateY(-2px); }

/* ------------------------------- Header ------------------------------- */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(20,21,25,.72);
    backdrop-filter: blur(14px) saturate(140%);
    border-bottom: 1px solid transparent;
    transition: border-color .3s, background .3s;
}
.site-header.scrolled { border-bottom-color: var(--line); background: rgba(18,19,23,.9); }
.header-inner { display: flex; align-items: center; gap: 20px; height: 64px; }

.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: -0.02em; }
.brand-mark { display: inline-flex; filter: drop-shadow(0 4px 10px rgba(31,182,195,.4)); }
.brand-accent { color: var(--teal-bright); }

.site-nav { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.site-nav > a {
    padding: 8px 12px; border-radius: 8px; color: var(--muted);
    font-weight: 500; font-size: 15px; transition: color .18s, background .18s;
}
.site-nav > a:hover { color: var(--text); background: rgba(255,255,255,.04); }
.site-nav > a.active { color: var(--teal-bright); }
.nav-ext { color: var(--muted); }

.lang-switch { display: inline-flex; align-items: center; gap: 2px; margin: 0 4px; padding: 3px; background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 999px; }
.lang-switch a { padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; color: var(--muted-2); letter-spacing: .04em; }
.lang-switch a:hover { color: var(--text); }
.lang-switch a.active { background: var(--teal); color: #051013; }

.btn-nav { padding: 8px 18px; font-size: 14px; }
/* Override .site-nav > a (grey) which otherwise wins on specificity over .btn-primary. */
.site-nav a.btn-nav, .site-nav a.btn-nav:hover { color: #fff; background: linear-gradient(135deg, var(--teal-bright), var(--teal-deep)); }

.nav-toggle { display: none; margin-left: auto; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .25s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ------------------------------- Hero ------------------------------- */
.hero { position: relative; overflow: hidden; padding: 72px 0 40px; }
.hero-glow {
    position: absolute; top: -260px; left: 50%; transform: translateX(-50%);
    width: 900px; height: 700px; pointer-events: none;
    background: radial-gradient(ellipse at center, rgba(31,182,195,.22), rgba(31,182,195,0) 62%);
    filter: blur(20px);
}
.hero-inner { position: relative; display: grid; grid-template-columns: 1.02fr 1.1fr; gap: 48px; align-items: center; }

.pill {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 600;
    color: var(--teal-bright); background: rgba(31,182,195,.1); border: 1px solid rgba(31,182,195,.28);
}
.pill-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal-bright); box-shadow: 0 0 0 0 rgba(59,206,218,.6); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(59,206,218,.5);} 70% { box-shadow: 0 0 0 8px rgba(59,206,218,0);} 100% { box-shadow: 0 0 0 0 rgba(59,206,218,0);} }

.hero-title {
    font-size: clamp(2.1rem, 5vw, 3.5rem); font-weight: 800; margin: 20px 0 16px;
    background: linear-gradient(180deg, #fff 30%, #b9c0c8); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-subtitle { font-size: clamp(1rem, 1.5vw, 1.18rem); color: var(--text-2); max-width: 560px; margin: 0 0 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 18px; }
.hero-meta { font-size: 13.5px; color: var(--muted-2); margin: 0; }

.hero-visual { position: relative; }

/* App mockup */
.mockup {
    border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow), 0 0 0 1px var(--line);
    transform: perspective(1600px) rotateY(-8deg) rotateX(3deg);
    transition: transform .5s var(--ease);
}
.hero-visual:hover .mockup { transform: perspective(1600px) rotateY(-3deg) rotateX(1deg) translateY(-4px); }
.mockup-svg { display: block; width: 100%; height: auto; }

/* ------------------------------- Stats ------------------------------- */
.stats { border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); background: var(--bg-2); }
.stats-inner { display: flex; justify-content: center; gap: clamp(30px, 8vw, 96px); padding: 34px 0; flex-wrap: wrap; text-align: center; }
.stat { display: flex; flex-direction: column; }
.stat-num { font-size: 2.4rem; font-weight: 800; color: var(--teal-bright); letter-spacing: -.03em; }
.stat-label { font-size: 13.5px; color: var(--muted); text-transform: lowercase; }

/* ------------------------------- Sections ------------------------------- */
.section { padding: 84px 0; }
.section-tight { padding: 56px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 52px; }
.section-head-left { text-align: left; margin-left: 0; }
.kicker { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--teal); margin-bottom: 12px; }
.section-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 800; }
.section-sub { color: var(--muted); font-size: 1.05rem; margin: 14px 0 0; }

/* Feature grid */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.feature-card {
    position: relative; padding: 26px; border-radius: var(--radius);
    background: linear-gradient(180deg, var(--surface), var(--surface-2));
    border: 1px solid var(--line); overflow: hidden;
    transition: transform .25s var(--ease), border-color .25s, box-shadow .25s;
}
.feature-card::before {
    content: ""; position: absolute; inset: 0 0 auto 0; height: 2px;
    background: linear-gradient(90deg, var(--teal), transparent);
    opacity: 0; transition: opacity .25s;
}
.feature-card:hover { transform: translateY(-4px); border-color: rgba(31,182,195,.4); box-shadow: var(--shadow); }
.feature-card:hover::before { opacity: 1; }
.feature-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 48px; height: 48px; border-radius: 12px; margin-bottom: 16px;
    color: var(--teal-bright); background: rgba(31,182,195,.1); border: 1px solid rgba(31,182,195,.22);
}
.feature-card h3 { font-size: 1.18rem; font-weight: 700; margin-bottom: 8px; }
.feature-card p { color: var(--muted); font-size: .96rem; margin: 0; }

/* ------------------------------- CTA ------------------------------- */
.cta { padding: 20px 0 96px; }
.cta-inner {
    text-align: center; max-width: 760px; margin: 0 auto; padding: 56px 32px;
    border-radius: 24px; border: 1px solid rgba(31,182,195,.28);
    background: radial-gradient(ellipse at top, rgba(31,182,195,.14), transparent 70%), var(--surface);
}
.cta-inner h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); font-weight: 800; margin-bottom: 12px; }
.cta-inner p { color: var(--muted); font-size: 1.08rem; margin: 0 0 28px; }

/* ------------------------------- Page hero ------------------------------- */
.page-hero { padding: 64px 0 8px; text-align: center; }
.page-hero h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; }
.page-hero .section-sub { max-width: 620px; margin: 16px auto 0; }

/* ------------------------------- Download ------------------------------- */
.download-card {
    display: grid; grid-template-columns: 1.3fr 1fr; gap: 0;
    border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line);
    background: linear-gradient(135deg, var(--surface), var(--surface-2));
    box-shadow: var(--shadow); margin-bottom: 40px;
}
.dl-main { padding: 40px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.dl-badge { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--teal); background: rgba(31,182,195,.1); border: 1px solid rgba(31,182,195,.25); padding: 4px 12px; border-radius: 999px; }
.dl-version { font-size: 1.8rem; font-weight: 800; }
.dl-date { color: var(--muted); margin: 0; }
.dl-main .btn { margin-top: 10px; }
.dl-all-link { color: var(--teal-bright); font-size: 14px; font-weight: 600; }
.dl-all-link:hover { text-decoration: underline; }

.dl-specs { padding: 40px; background: rgba(0,0,0,.18); border-left: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.spec-row { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line-soft); }
.spec-row:last-child { border-bottom: 0; padding-bottom: 0; }
.spec-key { color: var(--muted); font-size: 14px; }
.spec-val { color: var(--text); font-weight: 600; font-size: 14px; text-align: right; }

.howto { max-width: 760px; }
.howto h3 { font-size: 1.4rem; font-weight: 700; margin-bottom: 18px; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0 0 22px; display: flex; flex-direction: column; gap: 14px; }
.steps li { position: relative; padding-left: 46px; color: var(--text-2); }
.steps li::before {
    counter-increment: step; content: counter(step);
    position: absolute; left: 0; top: -2px; width: 30px; height: 30px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; font-weight: 700; font-size: 14px;
    color: var(--teal-bright); background: rgba(31,182,195,.12); border: 1px solid rgba(31,182,195,.3);
}
.note { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius-sm); background: rgba(31,182,195,.06); border: 1px solid rgba(31,182,195,.18); color: var(--text-2); font-size: .94rem; }
.note-center { max-width: 620px; margin: 24px auto 0; justify-content: center; text-align: left; }
.note-mark { color: var(--teal-bright); font-weight: 700; }

/* Changelog */
.changelog { display: flex; flex-direction: column; gap: 4px; position: relative; }
.release { position: relative; padding: 22px 24px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); margin-bottom: 14px; }
.release-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 12px; }
.release-head h3 { font-size: 1.3rem; font-weight: 800; color: var(--teal-bright); }
.release-date { color: var(--muted-2); font-size: 13px; }
.release ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 7px; }
.release li { color: var(--text-2); }
.release li::marker { color: var(--teal); }

/* ------------------------------- Screenshots ------------------------------- */
.shots-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 20px; }
.shot { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--surface); transition: transform .25s var(--ease), border-color .25s, box-shadow .25s; }
.shot:hover { transform: translateY(-4px); border-color: rgba(31,182,195,.4); box-shadow: var(--shadow); }
.shot img { width: 100%; height: auto; }
.shot-caption { display: block; padding: 12px 16px; font-size: 14px; color: var(--text-2); font-weight: 500; border-top: 1px solid var(--line); }
.shots-placeholder { max-width: 800px; margin: 0 auto; }

/* ------------------------------- Footer ------------------------------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-2); padding: 48px 0 28px; margin-top: 40px; }
.footer-inner { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; padding-bottom: 28px; border-bottom: 1px solid var(--line-soft); }
.footer-brand .brand-name { font-size: 20px; font-weight: 800; }
.footer-brand p { color: var(--muted); margin: 8px 0 0; font-size: 14px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; }
.footer-nav a { color: var(--muted); font-size: 14.5px; }
.footer-nav a:hover { color: var(--teal-bright); }
.footer-bottom { display: flex; justify-content: space-between; padding-top: 20px; color: var(--muted-2); font-size: 13px; flex-wrap: wrap; gap: 8px; }
.footer-bottom p { margin: 0; }

/* ------------------------------- Reveal animation ------------------------------- */
.feature-card, .release, .shot, .stat { opacity: 0; transform: translateY(18px); }
.is-visible { opacity: 1 !important; transform: none !important; transition: opacity .6s var(--ease), transform .6s var(--ease); }
@media (prefers-reduced-motion: reduce) {
    * { scroll-behavior: auto !important; }
    .feature-card, .release, .shot, .stat { opacity: 1; transform: none; }
    .pill-dot { animation: none; }
}

/* ------------------------------- Responsive ------------------------------- */
@media (max-width: 900px) {
    .hero-inner { grid-template-columns: 1fr; gap: 36px; }
    .hero-visual { order: -1; }
    .mockup { transform: none; }
    .download-card { grid-template-columns: 1fr; }
    .dl-specs { border-left: 0; border-top: 1px solid var(--line); }
}

@media (max-width: 760px) {
    .nav-toggle { display: flex; }
    .site-nav {
        position: fixed; inset: 64px 0 auto 0; flex-direction: column; align-items: stretch;
        gap: 4px; padding: 16px 24px 24px; margin: 0;
        background: rgba(18,19,23,.98); backdrop-filter: blur(14px);
        border-bottom: 1px solid var(--line);
        transform: translateY(-120%); transition: transform .3s var(--ease); pointer-events: none;
    }
    .site-nav.open { transform: translateY(0); pointer-events: auto; }
    .site-nav > a { padding: 12px 8px; font-size: 16px; }
    .lang-switch { align-self: flex-start; margin: 8px 0; }
    .btn-nav { margin-top: 8px; text-align: center; justify-content: center; }
}

@media (max-width: 480px) {
    .container { padding: 0 18px; }
    .section { padding: 60px 0; }
    .dl-main, .dl-specs { padding: 28px; }
    .stats-inner { gap: 28px; }
    .stat-num { font-size: 2rem; }
}

/* ------------------------------- Brand logo (app icon) ------------------------------- */
.brand-mark img { display: block; width: 30px; height: 30px; border-radius: 7px; }

/* Real screenshot inside the hero mockup frame */
.mockup-img { display: block; width: 100%; height: auto; }

/* ------------------------------- Lightbox (gallery) ------------------------------- */
.lb-open { overflow: hidden; }
#lightbox {
    position: fixed; inset: 0; z-index: 1000;
    display: flex; align-items: center; justify-content: center;
    background: rgba(8, 9, 11, .92); backdrop-filter: blur(6px);
    opacity: 0; visibility: hidden; transition: opacity .22s var(--ease), visibility .22s;
    padding: 3vh 2vw;
}
#lightbox.open { opacity: 1; visibility: visible; }
.lb-figure { margin: 0; max-width: 96vw; max-height: 94vh; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.lb-img {
    max-width: 96vw; max-height: 84vh; width: auto; height: auto;
    border-radius: 10px; border: 1px solid var(--line);
    box-shadow: 0 30px 80px -20px rgba(0,0,0,.8);
    background: var(--surface);
}
.lb-caption { color: var(--text-2); font-size: 14.5px; text-align: center; }
.lb-counter { color: var(--muted-2); font-size: 12.5px; }
.lb-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 52px; height: 52px; border-radius: 50%; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,.06); border: 1px solid var(--line); color: #fff;
    font-size: 22px; line-height: 1; transition: background .18s, border-color .18s, transform .18s;
    user-select: none;
}
.lb-btn:hover { background: rgba(31,182,195,.22); border-color: var(--teal); }
.lb-prev { left: max(16px, 2vw); }
.lb-next { right: max(16px, 2vw); }
.lb-close { position: absolute; top: 18px; right: max(16px, 2vw); width: 44px; height: 44px; font-size: 24px; }
.lb-btn:active { transform: translateY(-50%) scale(.92); }
.lb-close:active { transform: scale(.92); }
@media (max-width: 600px) {
    .lb-prev { left: 8px; } .lb-next { right: 8px; }
    .lb-btn { width: 44px; height: 44px; font-size: 18px; }
}
/* The gallery items are now buttons for the lightbox — keep the pointer affordance. */
.shot { cursor: zoom-in; }
