/*
======================
THE AI DISCLAIMER
======================
/ai-disclaimer on the main site's band vocabulary (bands.css). Purple
carries it, as it does everything the channel says in its own voice: the
shared .band-hero lit purple, then one light band holding the letter. The
letter is a parchment sheet (--parchment, the fantasy accent from the token
block) with the two purple corner marks it always had, and the showcase of
Gemma's work inside it is a strip that scrolls sideways, driven by the
page's own script.

Every colour is a styles.css token, apart from the grey the bands use for
secondary copy (#5a5670) and the two message tints for a carousel that
could not load.
*/

/*
======================
THE LETTER
======================
*/
.letter-container {
    position: relative;
    max-width: 860px;
    margin: 0 auto;
    padding: var(--spacing-md) var(--spacing-md) var(--spacing-md);
    background: var(--parchment);
    border: 1px solid rgba(127, 14, 189, 0.2);
    border-top: 4px solid var(--primary-purple);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.letter-header {
    text-align: center;
    margin-bottom: var(--spacing-md);
}

/* The letter's own title, and the showcase's. */
.letter-heading {
    display: block;
    margin: 0;
    padding-bottom: 0.6rem;
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: var(--primary-purple);
    text-align: center;
    position: relative;
}

.letter-heading::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 72px;
    height: 3px;
    border-radius: 2px;
    background: var(--gradient-purple);
    transform: translateX(-50%);
}

.letter-subheading {
    margin: 0 0 var(--spacing-sm);
    font-size: 1.4rem;
    color: var(--primary-purple-dark);
    text-align: center;
}

.letter-body {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin: 0 auto;
    font-family: var(--font-body);
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-dark);
}

.letter-body p {
    margin-bottom: 1.5rem;
}

.letter-signature {
    margin-top: 3rem;
    text-align: right;
    font-style: italic;
    font-size: 1.2rem;
}

.letter-signature p {
    margin-bottom: 0.25rem;
}

.signature-name {
    font-family: var(--font-headers);
    font-weight: bold;
    font-style: normal;
    margin-top: 0.5rem;
}

/* The two corner marks, purple at a fifth. A data URI cannot read a token,
   so the fill is the purple's hex. */
.corner-decoration {
    position: absolute;
    width: 80px;
    height: 80px;
    opacity: 0.2;
    pointer-events: none;
    background-size: contain;
    background-repeat: no-repeat;
}

.corner-decoration.top-left {
    top: 10px;
    left: 10px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath fill='%237F0EBD' d='M0 0L100 0L100 20C100 20 80 20 60 40C40 60 40 80 40 80L20 100L0 100L0 0Z'/%3E%3C/svg%3E");
}

.corner-decoration.bottom-right {
    bottom: 10px;
    right: 10px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath fill='%237F0EBD' d='M100 100L0 100L0 80C0 80 20 80 40 60C60 40 60 20 60 20L80 0L100 0L100 100Z'/%3E%3C/svg%3E");
}

/*
======================
THE SHOWCASE
======================
Gemma's work, in a strip that scrolls sideways. The page's script fills it
from /api/list-artist-images and drives the two buttons.
*/
.artist-showcase {
    margin: var(--spacing-md) 0;
    padding: var(--spacing-md) 0;
    border-top: 1px solid rgba(127, 14, 189, 0.15);
    border-bottom: 1px solid rgba(127, 14, 189, 0.15);
}

.artist-info {
    text-align: center;
    margin: 0 0 var(--spacing-sm);
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.1rem;
    border-radius: 999px;
    background: var(--gradient-purple);
    color: var(--text-light);
    font-family: var(--font-headers);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.social-link:hover,
.social-link:focus-visible {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: var(--text-light);
}

.artist-carousel {
    display: flex;
    overflow-x: auto;
    gap: 1rem;
    padding: 1rem 0;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
}

.carousel-item {
    flex: 0 0 auto;
    width: 300px;
    height: 250px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
    position: relative;
    scroll-snap-align: start;
    background: #fff;
}

.carousel-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.carousel-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 0.5rem;
}

.carousel-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: var(--gradient-purple);
    color: var(--text-light);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.carousel-btn:hover,
.carousel-btn:focus-visible {
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
}

/* While an image loads, and when the folder could not be read. */
.image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #5a5670;
    padding: 15px;
    text-align: center;
}

.image-placeholder i {
    font-size: 2rem;
    margin-bottom: 10px;
}

.artist-carousel .error-message,
.artist-carousel .info-message {
    flex: 1;
    padding: 15px;
    border-radius: var(--border-radius);
    text-align: center;
}

.artist-carousel .error-message {
    background: rgba(195, 10, 61, 0.08);
    border: 1px solid rgba(195, 10, 61, 0.3);
    color: var(--primary-red-dark);
}

.artist-carousel .info-message {
    background: rgba(11, 42, 169, 0.08);
    border: 1px solid rgba(11, 42, 169, 0.3);
    color: var(--primary-blue-dark);
}

.artist-carousel .loading-spinner {
    flex: 1;
}

/*
======================
RESPONSIVE
======================
*/
@media (max-width: 768px) {
    .letter-container {
        padding: var(--spacing-sm);
    }

    .letter-body {
        font-size: 1rem;
    }

    .corner-decoration {
        width: 48px;
        height: 48px;
    }

    .carousel-item {
        width: 240px;
        height: 200px;
    }
}
