@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');


/* =========================================================
   CSS Variables
   ========================================================= */

:root {
    --bg: #0b1020;
    --surface: rgba(255, 255, 255, 0.08);
    --surface-strong: rgba(255, 255, 255, 0.12);
    --text: #f8fafc;
    --muted: #aab4c8;
    --accent: #7c5cff;
    --accent-2: #25d0ab;
    --border: rgba(255, 255, 255, 0.12);
    --shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
}


/* =========================================================
   Base Styles
   ========================================================= */

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    font-family: 'Inter', system-ui, sans-serif;

    background:
        radial-gradient(
            circle at 15% 10%,
            rgba(124, 92, 255, 0.25),
            transparent 32rem
        ),
        radial-gradient(
            circle at 85% 35%,
            rgba(37, 208, 171, 0.15),
            transparent 28rem
        ),
        var(--bg);
}


/* =========================================================
   Navigation Bar
   ========================================================= */

.navbar {
    background: rgba(11, 16, 32, 0.72) !important;
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(18px);
    padding: 0.9rem 0;
}

.navbar .container-fluid {
    max-width: 1100px;
}

.navbar-brand {
    color: var(--text) !important;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.nav-link {
    color: var(--muted) !important;
    font-weight: 500;
    margin-left: 0.35rem;
    border-radius: 10px;
    padding: 0.55rem 0.8rem !important;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text) !important;
    background: var(--surface);
}

.navbar-toggler {
    border-color: var(--border);
}

.navbar-toggler-icon {
    filter: invert(1);
}


/* =========================================================
   App Name / Hero Section
   ========================================================= */

.appname {
    text-align: center;
}

h1.appname {
    /*margin: 2rem auto 1rem;*/
    font-size: clamp(2.7rem, 7vw, 5.5rem);
    font-weight: 800;
    letter-spacing: -0.06em;

    background: linear-gradient(
        135deg,
        #fff 25%,
        #b7a9ff 70%,
        #72e8cf
    );

    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

h2.appname {
    max-width: 700px;
    margin: 0 auto 1rem;
    padding: 0 1rem;

    color: var(--muted);
    font-size: clamp(1rem, 2vw, 1.35rem);
    font-weight: 500;
}

h3.appname {
    max-width: 700px;
    margin: 0 auto 3rem;
    padding: 0 rem;

    color: var(--muted);
    font-size: clamp(1rem, 2vw, 1.35rem);
    font-weight: 500;
}


/* =========================================================
   Instrument Cards
   ========================================================= */

span.phone_img {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 1.5rem;
    flex-wrap: wrap;

    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1.25rem 4rem;
}

.phone_img .card {
    width: min(100%, 220px);
    overflow: hidden;

    color: var(--text);
    background: var(--surface);

    border: 1px solid var(--border);
    border-radius: 22px;

    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);

    transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}

.phone_img .card:hover {
    transform: translateY(-8px);

    border-color: rgba(124, 92, 255, 0.55);

    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.38);
}


/* =========================================================
   Card Header
   ========================================================= */

.card-header {
    text-align: center;
    padding: 0.9rem 1rem;

    color: var(--text);
    background: var(--surface-strong);

    border-bottom: 1px solid var(--border);

    font-weight: 700;
}


/* =========================================================
   Instrument Images
   ========================================================= */

.phone_img .card img {
    display: block;
    width: 100%;
    height: 280px;

    object-fit: contain;

    padding: 1rem;

    background: rgba(255, 255, 255, 0.025);
}


/* =========================================================
   Features Page
   ========================================================= */

.features-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 5rem 1.25rem;
}

.features-page h1 {
    font-size: clamp(2.4rem, 6vw, 4.5rem);
    font-weight: 800;
    letter-spacing: -0.05em;
}

.features-page .lead {
    color: var(--muted);
}


/* =========================================================
   Mobile Styles
   ========================================================= */

@media (max-width: 576px) {

    h1.appname {
        margin-top: 3.5rem;
    }

    span.phone_img {
        gap: 1rem;
    }

    .phone_img .card {
        width: min(100%, 180px);
    }

    .phone_img .card img {
        height: 230px;
    }
}

/* Enable full-width layout for the instruction cards row */
.row-cols-xl-6 .card {
    width: 100% !important; /* Overrides min(100%, 220px) */
}

/* Adjust card icons inside instructions */
.card .instrument-icon {
    height: 100px;
    object-fit: contain;
    padding: 0.75rem;
}

/* Make card body text readable on tight layouts */
.card-body {
    padding: 0.75rem;
    font-size: 0.85rem;
    color: var(--muted);
}

/* =========================================================
   Instructions Page Layout (Single Row Scaling)
   ========================================================= */

.instructions-row {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 0.75rem;
    flex-wrap: nowrap;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem 4rem;
}

.instructions-row .card {
    flex: 1 1 0%;
    width: auto; /* Scales down card width to fit 6 in one row */
    overflow: hidden;

    color: var(--text);
    background: var(--surface); /* Keeps identical background color as index cards */

    border: 1px solid var(--border);
    border-radius: 22px;

    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);

    transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}

.instructions-row .card:hover {
    transform: translateY(-8px);
    border-color: rgba(124, 92, 255, 0.55);
    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.38);
}

.instructions-row .card img {
    display: block;
    width: 100%;
    height: 120px; /* Scaled down height so text fits neatly */
    object-fit: contain;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.025);
}

.instructions-row .card p {
    padding: 0.5rem 0.75rem 1rem;
    margin: 0;
    font-size: 0.8rem;
    color: var(--muted);
}

/* =========================================================
   Instructions Page Layout (Responsive Grid)
   ========================================================= */

.instructions-row {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 0.75rem;
    flex-wrap: nowrap;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem 4rem;
}

.instructions-row .card {
    flex: 1 1 0%;
    width: auto;
    overflow: hidden;

    color: var(--text);
    background: var(--surface);

    border: 1px solid var(--border);
    border-radius: 22px;

    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);

    transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}

.instructions-row .card:hover {
    transform: translateY(-8px);
    border-color: rgba(124, 92, 255, 0.55);
    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.38);
}

.instructions-row .card img {
    display: block;
    width: 100%;
    height: 120px;
    object-fit: contain;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.025);
}

.instructions-row .card p {
    padding: 0.5rem 0.75rem 1rem;
    margin: 0;
    font-size: 0.8rem;
    color: var(--muted);
}

/* Mobile Portrait Mode: 2 cards per row (half screen width each) */
@media (max-width: 576px) and (orientation: portrait) {
    .instructions-row {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .instructions-row .card {
        /* Accounting for gap space to hit exact 50% split */
        flex: 0 0 calc(50% - 0.25rem);
        max-width: calc(50% - 0.25rem);
    }
}