/* Guitalele.org theme. Load AFTER Bootstrap. Keep this file unminified. */

/* Interactive six-string fretboard. Keep touch targets large on narrow screens. */
.fretboard-scroll {
    overflow-x: auto;
    overscroll-behavior-x: contain;
}

.fretboard-neck {
    display: block;
    width: 100%;
    min-width: 960px;
    height: auto;
    font-family: var(--bs-font-sans-serif);
    font-size: 16px;
}

.fretboard-cell {
    cursor: pointer;
    outline: none;
}

.fretboard-hit {
    fill: transparent;
    stroke: transparent;
    stroke-width: 2;
}

.fretboard-cell:hover .fretboard-hit {
    fill: rgba(21, 63, 52, 0.08);
}

.fretboard-cell:focus-visible .fretboard-hit {
    stroke: #153f34;
    fill: rgba(21, 63, 52, 0.08);
}

/* Keep the horizontal instrument fully visible, including its headstock. */
.hero-instrument-photo {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    max-height: 340px;
    margin-inline: auto;
    object-fit: contain;
}

/* Optional project support, shown after each tool. */
.tool-support {
    margin-top: 1.25rem;
    padding-top: 0.875rem;
    border-top: 1px solid #deded2;
    text-align: center;
}

.tool-support-link {
    display: inline-block;
    padding: 0.375rem 0.25rem;
    color: #626744;
    font-size: 0.875rem;
    line-height: 1.5;
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.tool-support-link:hover {
    color: #153f34;
}

.tool-support-link:focus-visible {
    outline: 2px solid #153f34;
    outline-offset: 3px;
    border-radius: 0.25rem;
}

/* 1. Brand tokens and Bootstrap defaults */
:root {
    --bs-body-bg: #faf8f2;
    --bs-body-color: #37453e;
    --bs-body-line-height: 1.65;
    --bs-heading-color: #153f34;
    --bs-primary: #153f34;
    --bs-primary-rgb: 21, 63, 52;
    --bs-link-color: #153f34;
    --bs-link-color-rgb: 21, 63, 52;
    --bs-link-hover-color: #245442;
    --bs-link-hover-color-rgb: 36, 84, 66;
    --bs-border-color: #dedfd3;
    --bs-secondary-color: #657067;
    --site-serif: Georgia, "Times New Roman", serif;
}

h1, h2, h3 {
    font-family: var(--site-serif);
    letter-spacing: -0.025em;
}

[id] {
    scroll-margin-top: 1.5rem;
}

/* 2. Bootstrap component overrides */
.btn {
    --bs-btn-padding-x: 1.4rem;
    --bs-btn-padding-y: 0.8rem;
    --bs-btn-font-weight: 600;
}

.btn-primary {
    --bs-btn-bg: #153f34;
    --bs-btn-border-color: #153f34;
    --bs-btn-hover-bg: #245442;
    --bs-btn-hover-border-color: #245442;
    --bs-btn-active-bg: #103027;
    --bs-btn-active-border-color: #103027;
    --bs-btn-disabled-bg: #153f34;
    --bs-btn-disabled-border-color: #153f34;
    --bs-btn-focus-shadow-rgb: 21, 63, 52;
}

.btn-outline-primary {
    --bs-btn-color: #153f34;
    --bs-btn-border-color: #153f34;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #153f34;
    --bs-btn-hover-border-color: #153f34;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #103027;
    --bs-btn-active-border-color: #103027;
    --bs-btn-disabled-color: #153f34;
    --bs-btn-disabled-border-color: #153f34;
    --bs-btn-focus-shadow-rgb: 21, 63, 52;
}

.card {
    --bs-card-bg: #fdfcf8;
    --bs-card-border-color: var(--bs-border-color);
    --bs-card-border-radius: 0.65rem;
}

.navbar {
    --bs-navbar-color: #37453e;
    --bs-navbar-hover-color: #153f34;
}

/* 3. Approved brand artwork */
.site-logo {
    display: block;
    width: 220px;
    max-width: 100%;
    height: auto;
}

.site-logo-footer {
    width: 180px;
}

.site-brand {
    color: var(--bs-heading-color);
    font-family: var(--site-serif);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.06em;
}

.site-brand span {
    color: #647444;
}

.eyebrow {
    margin-bottom: 0.75rem;
    color: #63724c;
    font-size: 0.75rem;
    font-weight: 650;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

/* 4. Hero image placeholder */
.hero-title {
    font-size: clamp(2.4rem, 4.5vw, 3.75rem);
    line-height: 1.08;
    letter-spacing: -0.045em;
}

.hero-photo-placeholder {
    background-color: #e8e5d8;
    border-radius: 7rem 7rem 0.5rem 0.5rem;
}

.hero-photo-frame {
    border: 1px solid #bdc0ab;
    border-radius: 5rem 5rem 0.25rem 0.25rem;
}

.hero-photo-frame p {
    margin-block: 2rem;
    color: var(--bs-heading-color);
    font-family: var(--site-serif);
    font-size: clamp(1.7rem, 3vw, 2.2rem);
    line-height: 1.25;
}

.hero-photo-placeholder figcaption {
    margin-top: 1.25rem;
    color: var(--bs-secondary-color);
    font-family: var(--site-serif);
    font-style: italic;
}

/* 5. Module placeholders: no musical generation or microphone access */
.module-placeholder {
    min-height: 16rem;
    background-color: #f3f3eb;
    border: 1px dashed #b5bda7;
}

.module-placeholder p,
.module-placeholder h3 {
    margin-bottom: 0;
}

.tuning-strings li {
    text-align: center;
}

.tuning-strings b {
    display: block;
    width: 2.6rem;
    padding-block: 0.35rem;
    border: 1px solid var(--bs-border-color);
    border-radius: 50%;
    color: var(--bs-heading-color);
    font-family: var(--site-serif);
    font-size: 1.35rem;
    font-weight: 400;
}

.tuning-strings span {
    color: var(--bs-secondary-color);
    font-size: 0.75rem;
}

.chord-preview span {
    flex: 1;
    padding: 0.7rem 0;
    border: 1px solid var(--bs-border-color);
    border-radius: 0.3rem;
    color: var(--bs-heading-color);
    font-family: var(--site-serif);
    font-size: 1.5rem;
    text-align: center;
}

/* 6. Editorial and advertisement placeholders */
.advertisement {
    background-color: #eeece4;
    color: #687063;
}

.article-placeholder {
    min-height: 7rem;
    background-color: #e2e6d7;
    color: #536346;
}

.article-placeholder span {
    display: block;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
}

.article-placeholder span:first-child {
    margin-bottom: 0.75rem;
    font-family: var(--site-serif);
    font-size: 2.5rem;
}

.article-placeholder-sand {
    background-color: #e8e0d2;
    color: #715b40;
}

.article-placeholder-forest {
    background-color: #dae3db;
    color: #45634e;
}

/* Bootstrap owns the responsive grid, spacing, cards and navbar behavior. */
@media (max-width: 575.98px) {
    .site-brand {
        font-size: 1.75rem;
    }

    .hero-photo-placeholder {
        border-radius: 4rem 4rem 0.5rem 0.5rem;
    }
}

@media print {
    header,
    .advertisement,
    .btn {
        display: none !important;
    }

    .card {
        break-inside: avoid;
    }
}
