/* ========================================
   M'Gilvry Allen - Manuscript Style
   ======================================== */

/* ---- Custom Font ---- */

@font-face {
    font-family: 'Rug Pull';
    src: url('fonts/TAYRugPull.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Lumios Typewriter';
    src: url('fonts/LumiosTypewriter-Old.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* ---- Base & Typography ---- */

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

body {
    font-family: 'Lumios Typewriter', Georgia, 'Times New Roman', serif;
    font-size: 18px;
    line-height: 1.7;
    color: #2c2416;
    background-color: #f7f3e9;
    background-attachment: scroll;
    /* Subtle paper texture */
    background-image:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(139, 119, 89, 0.02) 2px,
            rgba(139, 119, 89, 0.02) 4px
        );
    padding: 20px;
}

/* ---- Navigation ---- */

nav {
    text-align: center;
    padding: 30px 0 50px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    letter-spacing: 0.5px;
}

nav a {
    color: #2c2416;
    text-decoration: none;
    margin: 0 15px;
    padding-bottom: 2px;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

nav a:hover {
    border-bottom: 1px solid #2c2416;
}

/* ---- Main Container ---- */

main {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---- Header ---- */

.site-header {
    text-align: center;
    margin-bottom: 60px;
    padding-bottom: 40px;
    border-bottom: 2px solid #8b7759;
}

.header-image {
    width: 100%;
    max-width: 500px;
    height: auto;
    margin: 0 auto 30px;
    border: 2px solid #8b7759;
    display: block;
}

h1 {
    font-family: 'Rug Pull', Georgia, serif;
    font-size: 48px;
    font-weight: normal;
    letter-spacing: 1px;
    margin-bottom: 15px;
    color: #4a3f2f;
    text-align: center !important;
}

/* Rug Pull for name on homepage only */
h1.site-name {
    font-family: 'Rug Pull', Georgia, serif;
}

.tagline {
    font-style: italic;
    color: #6b5d4f;
    font-size: 20px;
}

/* ---- Sections ---- */

section {
    margin-bottom: 70px;
}

h2 {
    font-size: 28px;
    font-weight: normal;
    margin-bottom: 20px;
    color: #4a3f2f;
    letter-spacing: 0.5px;
}

h3 {
    font-weight: normal;
}

/* Rug Pull font only for specific elements */
.card h3 {
    font-family: 'Rug Pull', Georgia, serif;
}

p {
    margin-bottom: 15px;
}

/* ---- Links ---- */

a {
    color: #3d5a42;
    text-decoration: underline;
    text-decoration-color: rgba(61, 90, 66, 0.3);
    text-underline-offset: 3px;
}

a:hover {
    text-decoration-color: rgba(61, 90, 66, 1);
}

/* ---- Lists ---- */

ul {
    list-style: none;
    padding-left: 0;
}

ul li {
    margin-bottom: 12px;
    padding-left: 20px;
    position: relative;
}

ul li:before {
    content: "·";
    position: absolute;
    left: 0;
    color: #8b7759;
    font-size: 24px;
    line-height: 1;
}

/* ---- Services Grid ---- */

.services-grid {
    list-style: none;
    padding-left: 0;
    display: grid;
    grid-template-columns: auto auto 1fr;
    gap: 8px 0;
    align-items: baseline;
}

.services-grid li {
    display: contents;
    line-height: 1.6;
}

.services-grid li:before {
    content: none;
}

.service-name {
    text-align: right;
    color: #2c2416;
    font-weight: bold;
    white-space: nowrap;
}

.service-dash {
    text-align: center;
    padding: 0 8px;
    color: #2c2416;
}

.service-desc {
    text-align: left;
    color: #6b5d4f;
    font-size: 16px;
}

/* ---- Forms ---- */

.newsletter {
    margin: 25px 0;
}

/* Override Mailchimp styling */
#mc_embed_signup {
    background: transparent !important;
    clear: none !important;
    font-family: inherit !important;
    width: 100% !important;
}

#mc_embed_signup form {
    padding: 0 !important;
    text-align: left !important;
}

#mc_embed_signup input[type="email"],
input[type="email"] {
    font-family: Georgia, serif;
    font-size: 16px;
    padding: 10px 15px;
    border: 1px solid #c9bda5;
    background: #fff;
    color: #2c2416;
    width: 300px;
    max-width: 100%;
}

#mc_embed_signup input[type="email"]:focus,
input[type="email"]:focus {
    outline: none;
    border-color: #8b7759;
}

#mc_embed_signup button,
#mc-embedded-subscribe,
button {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    padding: 10px 20px;
    background: #4a3f2f;
    color: #f7f3e9;
    border: none;
    cursor: pointer;
    margin-left: 10px;
}

#mc_embed_signup button:hover,
#mc-embedded-subscribe:hover,
button:hover {
    background: #3d5a42;
}

/* ---- Connect Links ---- */

.links {
    font-size: 16px;
    margin-top: 30px;
}

/* ---- Footer ---- */

footer {
    text-align: center;
    margin-top: 100px;
    padding-top: 40px;
    border-top: 1px solid #c9bda5;
    font-size: 14px;
    color: #6b5d4f;
}

/* ---- Responsive ---- */

@media (max-width: 600px) {
    h1 {
        font-size: 30px;
    }

    /* --- Mobile Nav: Hamburger Menu --- */
    nav {
        position: relative;
    }

    .nav-toggle {
        display: block;
        background: none;
        border: none;
        font-size: 24px;
        cursor: pointer;
        padding: 10px;
        margin: 0 auto;
        color: #2c2416;
    }

    .nav-toggle:hover {
        background: none;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        gap: 10px;
        margin-top: 15px;
    }

    .nav-links.active {
        display: flex;
    }

    nav a {
        display: block;
        margin: 5px 0;
    }

    /* --- Tagline: prevent awkward single-word wrap --- */
    .tagline {
        font-size: 16px;
    }

    /* --- Projects teaser: stack description below on mobile --- */
    .projects ul li {
        padding-left: 0;
        margin-bottom: 16px;
    }

    .projects ul li:before {
        display: none;
    }

    .projects ul li .project-desc {
        display: block;
        color: #6b5d4f;
        font-size: 14px;
        margin-top: 2px;
    }

    /* --- Email signup: full width matching --- */
    #mc_embed_signup input[type="email"],
    input[type="email"] {
        width: 100%;
        display: block;
        margin: 10px 0;
        box-sizing: border-box;
    }

    #mc_embed_signup button,
    #mc-embedded-subscribe,
    button {
        width: 100%;
        display: block;
        margin: 10px 0;
        margin-left: 0;
        box-sizing: border-box;
    }

    /* --- Projects page: stack category buttons vertically --- */
    .card-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .card {
        padding: 18px 20px;
    }

    .card-grid-2 {
        grid-template-columns: 1fr;
    }

    /* --- Past gigs: tighter date column --- */
    .past-shows {
        grid-template-columns: auto auto 1fr;
    }

    .past-shows .show-date {
        font-size: 14px;
        min-width: unset;
    }

    .past-shows .show-dash {
        padding: 0 5px;
    }

    .past-shows .tour-show .show-date {
        padding-left: 6px;
    }

    /* --- Merch image: keep square aspect ratio --- */
    .merch-thumbnail {
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
        object-fit: cover;
        max-height: none;
    }

    /* --- Services: stack on mobile --- */
    .services-grid {
        display: block;
    }

    .services-grid li {
        display: block;
        margin-bottom: 20px;
        padding-bottom: 20px;
        border-bottom: 1px dotted #c9bda5;
    }

    .services-grid li:last-child {
        border-bottom: none;
    }

    .service-name {
        display: block;
        text-align: left;
        margin-bottom: 6px;
    }

    .service-dash {
        display: none;
    }

    .service-desc {
        display: block;
    }
}

/* Hide hamburger on desktop, show nav links */
@media (min-width: 601px) {
    .nav-toggle {
        display: none;
    }

    .nav-links {
        display: block;
    }
}

/* Project separator hidden on mobile */
@media (max-width: 600px) {
    .project-sep {
        display: none;
    }
}

/* ---- Show Listings ---- */

.show {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px dotted #c9bda5;
}

.show:last-of-type {
    border-bottom: none;
}

/* Past shows - grid layout */
.past-shows {
    list-style: none;
    padding-left: 0;
    display: grid;
    grid-template-columns: auto auto 1fr;
    gap: 4px 0;
    align-items: baseline;
}

.past-shows li {
    display: contents;
    line-height: 1.6;
}

.past-shows li:before {
    content: none;
}

.past-shows .show-date {
    text-align: right;
    color: #2c2416;
    white-space: nowrap;
}

.past-shows .show-dash {
    text-align: center;
    padding: 0 8px;
    color: #2c2416;
}

.past-shows .show-info {
    text-align: left;
}

/* Year headers in past shows section */
.past-shows + h3 {
    font-size: 26px;
    margin-top: 40px;
    margin-bottom: 16px;
    text-align: left;
}

/* First year after Past heading - less top margin */
h2 + .past-shows + h3 {
    margin-top: 40px;
}

section h3 {
    font-size: 22px;
    margin-top: 30px;
    margin-bottom: 12px;
}

/* Tour groupings */
.past-shows .tour-header {
    display: block;
    grid-column: 1 / -1;
    margin-top: 16px;
    margin-bottom: 4px;
    font-style: italic;
}

/* No extra space when tour follows another tour or starts a year */
.past-shows .tour-end + .tour-header,
.past-shows li:first-child.tour-header {
    margin-top: 0;
}

.past-shows .tour-show .show-date {
    padding-left: 12px;
    border-left: 1px solid #c9bda5;
}

.past-shows .tour-show .show-dash,
.past-shows .tour-show .show-info {
    border-left: none;
}

/* Space after tour ends */
.past-shows .tour-end {
    display: block;
    grid-column: 1 / -1;
    height: 12px;
}

/* ---- Decorative Elements ---- */

/* Drop cap removed per request */

/* ---- Card Grid ---- */

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 30px 0;
}

.card {
    background: #fff;
    border: 1px solid #c9bda5;
    padding: 25px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.card:hover {
    border-color: #8b7759;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.card h3 {
    font-size: 20px;
    font-weight: normal;
    color: #4a3f2f;
    margin-bottom: 10px;
}

.card p {
    font-size: 14px;
    color: #6b5d4f;
    margin-bottom: 0;
}

/* Card content (expanded view) */
.card-content {
    display: none;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #c9bda5;
}

.card-content.active {
    display: block;
}

/* 2-card grid for shop - equal width buttons */
.card-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.card-grid-2 .card {
    min-width: 0;
}

/* Social links toggle */
.social-toggle {
    margin-top: 30px;
    text-align: center;
}

.social-button {
    font-family: 'Rug Pull', Georgia, serif;
    font-size: 16px;
    padding: 12px 24px;
    background: #fff;
    color: #4a3f2f;
    border: 1px solid #c9bda5;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.social-button:hover {
    border-color: #8b7759;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    background: #fff;
}

.social-links {
    margin-top: 20px;
    line-height: 2.2;
}

.social-links a {
    display: inline-block;
    margin: 0 10px;
}

/* ---- Discography ---- */

.discography {
    margin-bottom: 30px;
}

.release-item {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px dotted #c9bda5;
}

.release-item:last-child {
    border-bottom: none;
}

.release-info {
    flex: 1;
    min-width: 200px;
}

.release-info a {
    text-decoration: none;
}

.release-info a:hover {
    text-decoration: underline;
}

.release-date {
    color: #6b5d4f;
    font-size: 14px;
    margin-left: 10px;
}

.release-artist {
    display: block;
    color: #6b5d4f;
    font-size: 16px;
    margin-top: 2px;
}

.release-blurb {
    flex-basis: 100%;
    font-size: 14px;
    color: #6b5d4f;
    font-style: italic;
    margin: 4px 0 0 0;
}

/* Streaming toggle */
.streaming-toggle {
    text-align: center;
    margin-bottom: 40px;
}

/* Mailing list inline form */
.mailing-form-inline {
    margin-top: 15px;
}

/* Toggle past shows button */
.toggle-past-shows {
    font-family: 'Rug Pull', Georgia, serif;
    font-size: 16px;
    padding: 12px 24px;
    background: #fff;
    color: #4a3f2f;
    border: 1px solid #c9bda5;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    margin-bottom: 20px;
}

.toggle-past-shows:hover {
    border-color: #8b7759;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    background: #fff;
}

/* Desktop: blurb on right side */
@media (min-width: 601px) {
    .release-blurb {
        flex-basis: auto;
        flex: 0 0 auto;
        max-width: 45%;
        text-align: right;
        margin: 0;
    }

    .release-item {
        flex-wrap: nowrap;
        justify-content: space-between;
    }
}

/* ========================================
   Secret Preview Page
   ======================================== */

/* Password Screen */
.password-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #f7f3e9;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.password-box {
    text-align: center;
    max-width: 400px;
    padding: 40px;
}

.password-box h1 {
    font-family: 'Rug Pull', Georgia, serif;
    margin-bottom: 20px;
}

.password-box form {
    margin-top: 30px;
}

.password-box input[type="password"] {
    font-family: Georgia, serif;
    font-size: 16px;
    padding: 10px 15px;
    border: 1px solid #c9bda5;
    background: #fff;
    color: #2c2416;
    width: 200px;
    max-width: 100%;
    text-align: center;
}

.password-box input[type="password"]:focus {
    outline: none;
    border-color: #8b7759;
}

.password-error {
    color: #8b4049;
    font-size: 14px;
    margin-top: 15px;
}

/* Preview Nav */
.preview-nav {
    text-align: center;
    padding: 30px 0 50px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    letter-spacing: 0.5px;
}

.preview-nav a {
    color: #2c2416;
    text-decoration: none;
    padding-bottom: 2px;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.preview-nav a:hover {
    border-bottom: 1px solid #2c2416;
}

/* Preview Header */
.preview-header {
    text-align: center;
    margin-bottom: 60px;
}

.preview-cover {
    width: 100%;
    max-width: 400px;
    height: auto;
    margin: 0 auto 30px;
    border: 2px solid #8b7759;
    display: block;
}

/* Audio Player */
.preview-player-section {
    margin-bottom: 70px;
}

.audio-player {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #fff;
    border: 1px solid #c9bda5;
    padding: 20px;
    max-width: 500px;
    margin: 0 auto;
}

.play-pause-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #4a3f2f;
    color: #f7f3e9;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    transition: background 0.2s;
    margin-left: 0;
}

.play-pause-btn:hover {
    background: #3d5a42;
}

.play-icon {
    margin-left: 3px;
}

.pause-icon {
    letter-spacing: 2px;
}

.player-track {
    flex: 1;
    padding: 0 5px;
}

.progress-bar {
    position: relative;
    height: 6px;
    background: #e8e2d6;
    border-radius: 3px;
    cursor: pointer;
}

.progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: #8b7759;
    border-radius: 3px;
    width: 0%;
    pointer-events: none;
}

.progress-handle {
    position: absolute;
    top: 50%;
    left: 0%;
    width: 14px;
    height: 14px;
    background: #4a3f2f;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
    transition: transform 0.1s;
}

.progress-handle:hover {
    transform: translate(-50%, -50%) scale(1.2);
}

.time-display {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 13px;
    color: #6b5d4f;
    white-space: nowrap;
    flex-shrink: 0;
}

.time-separator {
    margin: 0 3px;
    color: #c9bda5;
}

/* Preview About Section */
.preview-about {
    margin-bottom: 70px;
}

/* Feedback Form */
.preview-feedback {
    margin-bottom: 70px;
}

.feedback-form {
    max-width: 500px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 16px;
    color: #4a3f2f;
}

.form-group .optional {
    color: #6b5d4f;
    font-size: 14px;
}

.feedback-form input[type="text"],
.feedback-form input[type="email"] {
    font-family: Georgia, serif;
    font-size: 16px;
    padding: 10px 15px;
    border: 1px solid #c9bda5;
    background: #fff;
    color: #2c2416;
    width: 100%;
    max-width: 300px;
}

.feedback-form input[type="text"]:focus,
.feedback-form input[type="email"]:focus,
.feedback-form textarea:focus {
    outline: none;
    border-color: #8b7759;
}

.feedback-form textarea {
    font-family: Georgia, serif;
    font-size: 16px;
    padding: 12px 15px;
    border: 1px solid #c9bda5;
    background: #fff;
    color: #2c2416;
    width: 100%;
    resize: vertical;
    line-height: 1.6;
}

.feedback-form button[type="submit"] {
    margin-left: 0;
}

.feedback-form button[type="submit"]:disabled {
    background: #8b7759;
    cursor: not-allowed;
}

.feedback-status {
    margin-top: 15px;
    font-size: 14px;
}

.feedback-status.success {
    color: #3d5a42;
}

.feedback-status.error {
    color: #8b4049;
}

/* Mobile adjustments for audio player */
@media (max-width: 600px) {
    .audio-player {
        flex-wrap: wrap;
        gap: 10px;
    }

    .play-pause-btn {
        width: 50px;
        height: 50px;
    }

    .player-track {
        order: 3;
        flex-basis: 100%;
        padding: 0;
    }

    .time-display {
        margin-left: auto;
    }

    .preview-nav a {
        display: inline;
    }
}

/* ========================================
   Project Image Gallery
   ======================================== */

.project-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 15px;
}

.project-gallery img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border: 1px solid #c9bda5;
    cursor: pointer;
    transition: border-color 0.2s, opacity 0.2s;
}

.project-gallery img:hover {
    border-color: #8b7759;
    opacity: 0.9;
}

/* Mobile: slightly taller thumbnails */
@media (max-width: 600px) {
    .project-gallery img {
        height: 80px;
    }
}

/* ========================================
   Lightbox
   ======================================== */

.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border: none;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: #fff;
    cursor: pointer;
    font-weight: normal;
    line-height: 1;
    transition: opacity 0.2s;
}

.lightbox-close:hover {
    opacity: 0.7;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #fff;
    cursor: pointer;
    transition: opacity 0.2s, background 0.2s;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    user-select: none;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.25);
}

@media (max-width: 600px) {
    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 22px;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    /* Mobile card grid - must be at end to override base styles */
    .card-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .card-grid-2 {
        grid-template-columns: 1fr;
    }
}
