:root {
    --bg: #0b0b0d;
    --bg-muted: #131316;
    --fg: #f5f5f5;
    --fg-muted: #a8a8ad;
    --accent: #e63946;
    --accent-2: #ffcc00;
    --border: #232327;
    --panel: rgba(11, 11, 13, 0.55);
    --brick: #1c1416;
    --font-display: "Bungee", cursive;
    --font-tag: "Bungee", cursive;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--fg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.5;
    background-color: var(--brick);
    background-image:
        url("/assets/img/textures/grain.svg"),
        url("/assets/img/textures/graffiti.svg"),
        url("/assets/img/textures/brick.svg");
    background-size: 200px 200px, 600px 600px, 240px 120px;
    background-position: 0 0, 0 0, 0 0;
    background-repeat: repeat, repeat, repeat;
    background-blend-mode: overlay, normal, normal;
    background-attachment: fixed, fixed, fixed;
}

body.page--home {
    background-image:
        url("/assets/img/textures/grain.svg"),
        url("/assets/img/backgrounds/home-bg.jpg");
    background-size: 200px 200px, cover;
    background-position: 0 0, center top;
    background-repeat: repeat, no-repeat;
    background-blend-mode: overlay, normal;
    background-attachment: fixed, fixed;
}

@media (max-width: 640px) {
    body.page--home {
        background-size: 150px 150px, 220vw auto;
        background-attachment: fixed, fixed;
    }
}

body.page--music {
    background-image:
        url("/assets/img/textures/grain.svg"),
        url("/assets/img/backgrounds/music-bg.jpg");
    background-size: 200px 200px, cover;
    background-position: 0 0, center top;
    background-repeat: repeat, no-repeat;
    background-blend-mode: overlay, normal;
    background-attachment: fixed, fixed;
}

body.page--merch {
    background-image:
        url("/assets/img/textures/grain.svg"),
        url("/assets/img/backgrounds/merch-bg.jpg");
    background-size: 200px 200px, cover;
    background-position: 0 0, center top;
    background-repeat: repeat, no-repeat;
    background-blend-mode: overlay, normal;
    background-attachment: fixed, fixed;
}

body.page--videos,
body.page--tv {
    background-color: var(--bg);
    background-image:
        url("/assets/img/textures/grain.svg"),
        url("/assets/img/backgrounds/brail-tv-tile.png");
    background-size: 200px 200px, 480px auto;
    background-position: 0 0, 0 0;
    background-repeat: repeat, repeat;
    background-blend-mode: overlay, normal;
    background-attachment: fixed, fixed;
}

body.page--features {
    background-image:
        url("/assets/img/textures/grain.svg"),
        url("/assets/img/backgrounds/features-bg.jpg");
    background-size: 200px 200px, cover;
    background-position: 0 0, center top;
    background-repeat: repeat, no-repeat;
    background-blend-mode: overlay, normal;
    background-attachment: fixed, fixed;
}

body.page--ghostwriter {
    background-image:
        url("/assets/img/textures/grain.svg"),
        url("/assets/img/backgrounds/ghostwriter-bg.jpg");
    background-size: 200px 200px, cover;
    background-position: 0 0, center top;
    background-repeat: repeat, no-repeat;
    background-blend-mode: overlay, normal;
    background-attachment: fixed, fixed;
}

.wrap {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

a {
    color: inherit;
}

.site-header {
    background: var(--panel);
    backdrop-filter: blur(6px);
    border-bottom: 3px solid var(--accent);
    box-shadow: 0 2px 0 var(--accent-2);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.brand {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 1.75rem;
    letter-spacing: 0.03em;
    text-decoration: none;
    color: var(--accent);
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.6);
    transform: rotate(-2deg);
    display: inline-block;
}

.nav {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.nav__link {
    text-decoration: none;
    color: var(--fg-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.35rem 0.6rem;
    border-radius: 4px;
}

.nav__link:hover {
    color: var(--fg);
}

.nav__link--active {
    color: #fff;
    background: var(--accent);
}

.hero {
    padding: 5rem 0 4rem;
    text-align: center;
}

.hero .wrap {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 3rem 2rem;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.55);
}

.hero h1 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 3.75rem;
    margin: 0 0 0.75rem;
    letter-spacing: 0.02em;
    color: var(--fg);
    text-shadow: 3px 3px 0 var(--accent), -1px -1px 0 rgba(0, 0, 0, 0.5);
}

.hero__tagline {
    color: var(--fg-muted);
    margin-bottom: 2rem;
}

.section {
    padding: 3rem 0;
}

.section .wrap {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 2rem;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

.section--muted .wrap {
    background: rgba(19, 19, 22, 0.9);
}

.section h1,
.section h2,
.section h3 {
    margin-top: 0;
    font-family: var(--font-tag);
    font-weight: 400;
    letter-spacing: 0.02em;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 2px solid transparent;
    transform: rotate(-1deg);
}

.btn--primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 3px 3px 0 var(--accent-2);
}

.btn--primary:hover {
    transform: rotate(-1deg) translate(-1px, -1px);
    box-shadow: 4px 4px 0 var(--accent-2);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.card-grid--songs {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 860px) {
    .card-grid--songs {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 560px) {
    .card-grid--songs {
        grid-template-columns: 1fr;
    }
}

.card-grid--videos {
    grid-template-columns: repeat(2, 1fr);
}

.video-card--landscape {
    grid-column: 1 / -1;
}

@media (max-width: 640px) {
    .card-grid--videos {
        grid-template-columns: 1fr;
    }
}

.card {
    display: flex;
    flex-direction: column;
    padding: 1.25rem;
    background: var(--bg-muted);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: 6px;
    text-decoration: none;
}

.card h3 {
    margin: 0 0 0.5rem;
    font-family: var(--font-tag);
    font-weight: 400;
}

.card p {
    margin: 0;
    color: var(--fg-muted);
}

.subscribe-form {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.subscribe-form input[type="email"] {
    flex: 1;
    min-width: 220px;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-muted);
    color: var(--fg);
}

.alert {
    padding: 0.75rem 1rem;
    border-radius: 4px;
    margin-top: 1rem;
    font-family: var(--font-tag);
    letter-spacing: 0.02em;
    transform: rotate(-0.5deg);
}

.alert--success {
    background: rgba(56, 176, 0, 0.15);
    color: #7be07a;
    border: 1px dashed #7be07a;
}

.alert--error {
    background: rgba(230, 57, 70, 0.15);
    color: #f28b93;
    border: 1px dashed #f28b93;
}

.placeholder-note {
    color: var(--fg-muted);
    font-style: italic;
    margin-top: 1.5rem;
}

.album-card__toggle {
    background: none;
    border: none;
    color: var(--fg-muted);
    font-size: 0.85rem;
    font-family: inherit;
    cursor: pointer;
    padding: 0;
    margin-top: 0.75rem;
    text-align: left;
}

.album-card__toggle:hover,
.album-card__toggle[aria-expanded="true"] {
    color: var(--accent);
}

.album-expand {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--bg-muted);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.album-expand__header h2 {
    margin: 0 0 1rem;
}

.album-player {
    margin-top: 1.5rem;
}

.tracklist {
    list-style: none;
    margin: 1rem 0 0;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.tracklist__row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg-muted);
}

.tracklist__row:last-child {
    border-bottom: none;
}

.tracklist__row--active {
    background: rgba(230, 57, 70, 0.12);
}

.tracklist__play {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--fg);
    cursor: pointer;
    font-size: 0.85rem;
}

.tracklist__row--active .tracklist__play {
    border-color: var(--accent);
    color: var(--accent);
}

.tracklist__num {
    width: 1.5rem;
    color: var(--fg-muted);
    font-size: 0.9rem;
    text-align: right;
    flex-shrink: 0;
}

.tracklist__title {
    flex: 1;
    text-align: left;
}

.tracklist__title--buy {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    background: none;
    border: none;
    color: var(--fg);
    font-size: 1rem;
    font-family: inherit;
    cursor: pointer;
    padding: 0;
}

.tracklist__title--buy:hover {
    color: var(--accent);
}

.tracklist__buy-hint {
    font-size: 0.75rem;
    color: var(--fg-muted);
    white-space: nowrap;
}

.tracklist__title--buy:hover .tracklist__buy-hint {
    color: var(--accent);
}

.tracklist__title--buy[aria-expanded="true"] .tracklist__buy-hint::after {
    content: none;
}

.tracklist__buy-panel {
    border-bottom: 1px solid var(--border);
    background: var(--bg);
}

.tracklist__buy-mount {
    padding: 1rem;
    max-width: 420px;
}

.album-player__audio {
    width: 100%;
    margin-top: 1rem;
}

.album-buy {
    margin-top: 2rem;
}

.album-buy h3 {
    margin-top: 0;
}

.album-buy__form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 420px;
}

.album-buy__form label {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.85rem;
    color: var(--fg-muted);
}

.album-buy__form input {
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--fg);
    font-size: 1rem;
}

.album-buy__error {
    color: #f28b93;
    font-size: 0.85rem;
    margin: 0;
    min-height: 1em;
}

.song-card__payment-methods,
.album-buy__payment-methods,
.merch-form__payment-methods,
.novel-form__payment-methods {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.payment-btn-slot {
    min-height: 40px;
}

.payment-btn-slot:empty {
    display: none;
}

.payment-btn--apple-pay {
    display: inline-block;
    width: 100%;
    height: 40px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    -webkit-appearance: -apple-pay-button;
    -apple-pay-button-type: buy;
    -apple-pay-button-style: black;
}

@supports not (-webkit-appearance: -apple-pay-button) {
    .payment-btn--apple-pay {
        background: #000;
        color: #fff;
        font-weight: 600;
    }

    .payment-btn--apple-pay::after {
        content: "Pay with Apple Pay";
    }
}

.download-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.video-card__thumb-wrap {
    position: relative;
    margin-bottom: 1rem;
}

.video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
}

.video-play-btn:hover {
    background: var(--accent);
}

.video-card__thumb-wrap--landscape .video-card__thumb {
    aspect-ratio: 16 / 9;
}

.video-card__thumb {
    width: 100%;
    aspect-ratio: 9 / 16;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border);
    display: block;
}

.merch-card__image {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border);
    margin-bottom: 1rem;
    background: #fff;
}

.merch-card p {
    margin-top: 0.25rem;
}

.merch-intro {
    margin-top: 1.5rem;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: #000;
}

.merch-intro[hidden],
.card-grid[hidden] {
    display: none;
}

.merch-intro video {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: block;
}

.product {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 2.5rem;
    margin-top: 1.5rem;
}

@media (max-width: 720px) {
    .product {
        grid-template-columns: 1fr;
    }
}

.product__image img {
    width: 100%;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #fff;
}

.product__price {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0.25rem 0 1rem;
}

.product__thumbs {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.product__thumb {
    width: 72px;
    height: 90px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid var(--border);
    background: #fff;
    cursor: pointer;
}

.product__thumb--active {
    border-color: var(--accent);
}

#merch-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

#merch-form label {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.85rem;
    color: var(--fg-muted);
}

#merch-form input,
#merch-form select {
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--fg);
    font-size: 1rem;
}

#merch-form h3 {
    margin: 0.5rem 0 0;
}

.form-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 0.75rem;
}

@media (max-width: 480px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.merch-form__error,
.novel-form__error {
    color: #f28b93;
    font-size: 0.85rem;
    margin: 0;
    min-height: 1em;
}

.novel-card {
    display: grid;
    grid-template-columns: minmax(200px, 280px) 1fr;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 640px) {
    .novel-card {
        grid-template-columns: 1fr;
    }
}

.novel-card__cover {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border: 1px solid var(--border);
    border-radius: 6px;
    display: block;
}

.novel-card__cover-placeholder {
    width: 100%;
    aspect-ratio: 2 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem;
    background: var(--bg-muted);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: var(--font-tag);
    letter-spacing: 0.03em;
}

.novel-card__price {
    font-family: var(--font-tag);
    font-size: 1.5rem;
    color: var(--accent-2);
    margin: 0.5rem 0 1rem;
}

.novel-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 360px;
}

.novel-form label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.9rem;
    color: var(--fg-muted);
}

.novel-form input {
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--fg);
    font-size: 1rem;
}

#feature-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
    max-width: 480px;
}

#feature-form label {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.85rem;
    color: var(--fg-muted);
}

#feature-form input,
#feature-form textarea {
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--fg);
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
}

#feature-form h3 {
    margin: 0.5rem 0 0;
}

.form-hint {
    font-size: 0.85rem;
    color: var(--fg-muted);
    margin: 0.25rem 0 0.5rem;
}

#ghostwriter-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
    max-width: 480px;
}

#ghostwriter-form label {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.85rem;
    color: var(--fg-muted);
}

#ghostwriter-form input,
#ghostwriter-form textarea {
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--fg);
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
}

.song-card__cover {
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    border: 1px dashed var(--border);
    border-radius: 8px;
    margin-bottom: 1rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-align: center;
    padding: 0.5rem;
}

.song-card__cover--img {
    width: 100%;
    object-fit: cover;
    border: 1px solid var(--border);
    padding: 0;
}

.song-card__cover-wrap {
    position: relative;
}

.cover-play-btn {
    position: absolute;
    right: 0.75rem;
    bottom: 0.75rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--accent);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.cover-play-btn:hover {
    background: var(--accent-2);
    color: #1c1416;
}

.cover-play-btn--playing {
    background: var(--accent-2);
    color: #1c1416;
}

.coming-soon-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(11, 11, 13, 0.65);
    color: #fff;
    font-family: var(--font-tag);
    font-size: 1.25rem;
    letter-spacing: 0.04em;
    text-align: center;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.6);
    transform: rotate(-2deg);
}

.song-card__form {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.song-card__payment-methods,
.song-card__free-btn {
    margin-top: auto;
}

.song-card__form label {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.85rem;
    color: var(--fg-muted);
}

.song-card__form input {
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--fg);
    font-size: 1rem;
}

.song-card__square-container {
    min-height: 40px;
}

.song-card__error {
    color: #f28b93;
    font-size: 0.85rem;
    margin: 0;
    min-height: 1em;
}

.site-footer {
    background: var(--panel);
    backdrop-filter: blur(6px);
    border-top: 3px solid var(--accent);
    padding: 2rem 0;
    margin-top: 2rem;
}

.site-footer__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    color: var(--fg-muted);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    text-decoration: none;
    color: var(--fg-muted);
}
