body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.home-title-logo {
    display: inline-block;
    width: min(80vw, 420px);
    aspect-ratio: 2033 / 514;
    background: linear-gradient(90deg, var(--nb-primary), #2eaa7e, #0d9488, var(--nb-primary));
    background-size: 300% 100%;
    animation: gradient-shift 10s ease infinite;
    opacity: 0;
    transition: opacity .3s ease;
    /* mask is set dynamically by JS after removing white background */
}

/* ── Settings button ── */
.settings-btn {
    transition: transform .2s ease, box-shadow .2s ease, background-color .15s ease;
}
.settings-btn:hover {
    background-color: #f0fdfa !important;
    box-shadow: 0 4px 16px rgba(13,148,136,.25) !important;
    transform: rotate(30deg) scale(1.12);
}
.settings-btn:active {
    transform: rotate(60deg) scale(.95);
    box-shadow: 0 2px 8px rgba(13,148,136,.15) !important;
}

/* ── Landing button ── */
.landing-btn {
    transition: transform .2s ease, box-shadow .2s ease, background-color .15s ease;
}
.landing-btn:hover {
    background-color: #f0fdfa !important;
    box-shadow: 0 4px 16px rgba(13,148,136,.25) !important;
    transform: scale(1.12);
}
.landing-btn:active {
    transform: scale(.95);
    box-shadow: 0 2px 8px rgba(13,148,136,.15) !important;
}


@keyframes gradient-shift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.module-card {
    --accent-color: transparent;
    /* A squircle flattens its corners, so it needs a bigger radius than a
       plain round corner to read as round as the dropdowns do. */
    border-radius: 56px;
    border: none;
    transition: transform .18s ease, box-shadow .18s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    background: rgba(255,255,255,0.50);
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 24px rgba(0,0,0,.10);
    min-height: 220px;
    /* Four cards in a row, each as tall as its own text: in Spanish they came
       out 284, 336, 314 and 306, which reads as four unrelated boxes. The
       column already stretches; the card inside it did not. */
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.5rem;
    position: relative;
    overflow: hidden;
    /* A squircle that keeps its corners whatever the card's size. The old
       mask was stretched to the box, so the corners grew with it into a
       blob, and it clipped the shadow away. */
    corner-shape: squircle;
}
.module-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--accent-color);
}
.module-card:hover:not(.disabled-card) {
    transform: translateY(-6px);
    box-shadow: 0 12px 36px rgba(0,0,0,.15);
    color: inherit;
}
.card-dictation:hover:not(.disabled-card) {
    background: linear-gradient(135deg, rgba(13,148,136,.12), rgba(46,170,126,.10), rgba(255,255,255,.72));
}
.card-editor:hover:not(.disabled-card) {
    background: linear-gradient(135deg, rgba(124,58,237,.12), rgba(168,85,247,.10), rgba(255,255,255,.72));
}
.module-card.disabled-card {
    cursor: default;
    opacity: .65;
    filter: grayscale(.35);
}
.module-card .module-icon {
    font-size: 2.8rem;
    margin-bottom: 1rem;
}
.module-card .module-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: .4rem;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.card-dictation .module-title {
    background-image: linear-gradient(90deg, #0d9488, #2eaa7e);
}
.card-editor .module-title {
    background-image: linear-gradient(90deg, #7c3aed, #a855f7);
}
.card-library .module-title {
    background-image: linear-gradient(90deg, #2563eb, #3692ff);
}
.module-card .module-desc {
    font-size: .9rem;
    color: #6c757d;
    text-align: center;
}
.badge-soon {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: .7rem;
    padding: .35em .65em;
}

.card-exercises .module-icon { color: #0d9488; }
.card-exercises .module-title { background-image: linear-gradient(90deg, #0d9488, #14b8a6); }
.card-exercises { --accent-color: #0d9488; }
.card-exercises:hover:not(.disabled-card) {
    background: linear-gradient(135deg, rgba(13,148,136,.12), rgba(20,184,166,.10), rgba(255,255,255,.72));
}

.card-editor    .module-icon { color: #7c3aed; }
.card-library   .module-icon { color: #2563eb; }

.card-editor    { --accent-color: #7c3aed; }
.card-library   { --accent-color: #2563eb; }

.card-library:hover:not(.disabled-card) {
    background: linear-gradient(135deg, rgba(37,99,235,.12), rgba(96,165,250,.10), rgba(255,255,255,.72));
}

.card-preferences .module-icon { color: #6b7280; }
.card-preferences { --accent-color: #6b7280; }
.card-preferences:hover:not(.disabled-card) {
    background: linear-gradient(135deg, rgba(107,114,128,.12), rgba(156,163,175,.10), rgba(255,255,255,.72));
}

.card-chords .module-icon { color: #8b5cf6; }
.card-chords .module-title { background-image: linear-gradient(90deg, #8b5cf6, #a78bfa); }
.card-chords { --accent-color: #8b5cf6; }
.card-chords:hover:not(.disabled-card) {
    background: linear-gradient(135deg, rgba(139,92,246,.12), rgba(167,139,250,.10), rgba(255,255,255,.72));
}

.card-degrees .module-icon { color: #0891b2; }
.card-degrees .module-title { background-image: linear-gradient(90deg, #0891b2, #22d3ee); }
.card-degrees { --accent-color: #0891b2; }
.card-degrees:hover:not(.disabled-card) {
    background: linear-gradient(135deg, rgba(8,145,178,.12), rgba(34,211,238,.10), rgba(255,255,255,.72));
}

.card-circle .module-icon { color: #e67e22; }
.card-circle .module-title { background-image: linear-gradient(90deg, #e67e22, #f39c12); }
.card-circle { --accent-color: #e67e22; }
.card-circle:hover:not(.disabled-card) {
    background: linear-gradient(135deg, rgba(230,126,34,.12), rgba(243,156,18,.10), rgba(255,255,255,.72));
}

/* Classes. A green of its own: the four cards beside it are the tools one
   person uses alone, and this is the one where other people are involved. */
.card-classes .module-icon { color: #15803d; }
.card-classes .module-title { background-image: linear-gradient(90deg, #15803d, #22a35a); }
.card-classes { --accent-color: #15803d; }
.card-classes:hover:not(.disabled-card) {
    background: linear-gradient(135deg, rgba(21,128,61,.12), rgba(34,163,90,.10), rgba(255,255,255,.72));
}

.card-learn .module-icon { color: #e67e22; }
.card-learn .module-title { background-image: linear-gradient(90deg, #e67e22, #f39c12); }
.card-learn { --accent-color: #e67e22; }
.card-learn:hover:not(.disabled-card) {
    background: linear-gradient(135deg, rgba(230,126,34,.12), rgba(243,156,18,.10), rgba(255,255,255,.72));
}

.card-method .module-icon { color: #059669; }
.card-method .module-title { background-image: linear-gradient(90deg, #059669, #10b981); }
.card-method { --accent-color: #059669; }
.card-method:hover:not(.disabled-card) {
    background: linear-gradient(135deg, rgba(5,150,105,.12), rgba(16,185,129,.10), rgba(255,255,255,.72));
}

.card-keys .module-icon { color: #db2777; }
.card-keys .module-title { background-image: linear-gradient(90deg, #db2777, #ec4899); }
.card-keys { --accent-color: #db2777; }
.card-keys:hover:not(.disabled-card) {
    background: linear-gradient(135deg, rgba(219,39,119,.12), rgba(236,72,153,.10), rgba(255,255,255,.72));
}

.card-accent .module-icon { color: #b45309; }
.card-accent .module-title { background-image: linear-gradient(90deg, #b45309, #f59e0b); }
.card-accent { --accent-color: #b45309; }
.card-accent:hover:not(.disabled-card) {
    background: linear-gradient(135deg, rgba(180,83,9,.12), rgba(245,158,11,.10), rgba(255,255,255,.72));
}

.card-intervals .module-icon { color: #6366f1; }
.card-intervals .module-title { background-image: linear-gradient(90deg, #6366f1, #818cf8); }
.card-intervals { --accent-color: #6366f1; }
.card-intervals:hover:not(.disabled-card) {
    background: linear-gradient(135deg, rgba(99,102,241,.12), rgba(129,140,248,.10), rgba(255,255,255,.72));
}

.card-key-exercise .module-icon { color: #a855f7; }
.card-key-exercise .module-title { background-image: linear-gradient(90deg, #a855f7, #c084fc); }
.card-key-exercise { --accent-color: #a855f7; }
.card-key-exercise:hover:not(.disabled-card) {
    background: linear-gradient(135deg, rgba(168,85,247,.12), rgba(192,132,252,.10), rgba(255,255,255,.72));
}

.card-relative-keys .module-icon { color: #f59e0b; }
.card-relative-keys .module-title { background-image: linear-gradient(90deg, #f59e0b, #fbbf24); }
.card-relative-keys { --accent-color: #f59e0b; }
.card-relative-keys:hover:not(.disabled-card) {
    background: linear-gradient(135deg, rgba(245,158,11,.12), rgba(251,191,36,.10), rgba(255,255,255,.72));
}

.card-armature .module-icon { color: #3b82f6; }
.card-armature .module-title { background-image: linear-gradient(90deg, #3b82f6, #60a5fa); }
.card-armature { --accent-color: #3b82f6; }
.card-armature:hover:not(.disabled-card) {
    background: linear-gradient(135deg, rgba(59,130,246,.12), rgba(96,165,250,.10), rgba(255,255,255,.72));
}

/* ── Mobile responsive ── */
@media (max-width: 575.98px) {
    .module-card {
        min-height: auto;
        padding: 1rem;
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        gap: .75rem;
        text-align: left;
        /* The phone card is a short row, so a smaller squircle than the
        desktop one: 56px would take half its height. */
        border-radius: 32px;
    }
    .module-card .module-icon {
        font-size: 1.5rem;
        margin-bottom: 0;
        flex-shrink: 0;
        width: 2.5rem;
        text-align: center;
    }
    .module-card .module-title {
        font-size: 1rem;
        margin-bottom: .15rem;
    }
    .module-card .module-desc {
        font-size: .78rem;
        text-align: left;
        margin-bottom: 0;
        line-height: 1.3;
    }
    .module-card .card-content {
        display: flex;
        flex-direction: column;
        min-width: 0;
    }
    /* Prevent horizontal overflow */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    .row {
        margin-left: -.5rem;
        margin-right: -.5rem;
    }
    .row > [class*="col-"] {
        padding-left: .5rem;
        padding-right: .5rem;
    }
}

.card-intervals-guide .module-icon { color: #4f46e5; }
.card-intervals-guide .module-title { background-image: linear-gradient(90deg, #4f46e5, #818cf8); }
.card-intervals-guide { --accent-color: #4f46e5; }
.card-intervals-guide:hover:not(.disabled-card) {
    background: linear-gradient(135deg, rgba(79,70,229,.12), rgba(129,140,248,.10), rgba(255,255,255,.72));
}

.card-scales .module-icon { color: #65a30d; }
.card-scales .module-title { background-image: linear-gradient(90deg, #65a30d, #84cc16); }
.card-scales { --accent-color: #65a30d; }
.card-scales:hover:not(.disabled-card) {
    background: linear-gradient(135deg, rgba(101,163,13,.12), rgba(132,204,22,.10), rgba(255,255,255,.72));
}

.card-roadmap .module-icon { color: #be123c; }
.card-roadmap .module-title { background-image: linear-gradient(90deg, #be123c, #f43f5e); }
.card-roadmap { --accent-color: #be123c; }
.card-roadmap:hover:not(.disabled-card) {
    background: linear-gradient(135deg, rgba(190,18,60,.12), rgba(244,63,94,.10), rgba(255,255,255,.72));
}
