/*
 * A band's link page, moshradar.com/@handle (templates/views/bands/link/,
 * link_page.py). Class prefix `lp-`.
 *
 * The look is attributes on <body>, set from link_page.look():
 *   data-theme    blackout | poster | zine | photo | patch | paper
 *   data-face     system | anton | condensed | barlow | typewriter
 *   data-buttons  solid | outline | shadow | tape | patch | pill
 *   data-bg       plain | grain | halftone | photo | wash
 *   data-header   logo | photo | cover | name
 *   data-motion   '' | shine
 * and the band's colour as custom properties on the style attribute:
 * --lp-accent, --lp-accent-text (the colour moved until it reads as text on
 * the paper) and --lp-on-accent (black or white, whichever reads on it).
 *
 * Built to be light inside Instagram's and TikTok's browsers: one subset
 * face (static/fonts/link/), one cached icon sprite, no frameworks. Every
 * tap target is at least 44px, textures stay under 6% so text keeps 4.5:1,
 * and motion stops for prefers-reduced-motion.
 */

@font-face { font-family: 'LpAnton'; src: url('../fonts/link/Anton-Regular.woff') format('woff'); font-display: swap; }
@font-face { font-family: 'LpCondensed'; src: url('../fonts/link/BarlowCondensed-Bold.woff') format('woff'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'LpBarlow'; src: url('../fonts/link/Barlow-Bold.woff') format('woff'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'LpType'; src: url('../fonts/link/SpecialElite-Regular.woff') format('woff'); font-display: swap; }

/* --- themes ---------------------------------------------------------------- */

.lp-body {
    --lp-paper: #0a0a0a; --lp-ink: #f4f4f4; --lp-muted: #a3a3a3; --lp-card: #171717;
    --lp-line: rgba(255, 255, 255, .12);
    --lp-head: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --lp-body: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --lp-head-weight: 900; --lp-head-case: none; --lp-head-track: -.01em;
    --lp-radius: 12px;
    --lp-accent: #ff0000; --lp-accent-text: #ff4d4d; --lp-on-accent: #fff;
}
.lp-body[data-theme="poster"] { --lp-paper: #0b0b0b; --lp-ink: #fff; --lp-muted: #b0b0b0; --lp-card: #151515; --lp-radius: 0; }
.lp-body[data-theme="zine"] { --lp-paper: #f2efe6; --lp-ink: #111; --lp-muted: #4a4740; --lp-card: #e6e1d3; --lp-line: rgba(0, 0, 0, .16); --lp-radius: 2px; }
.lp-body[data-theme="photo"] { --lp-paper: #050505; --lp-ink: #fff; --lp-muted: #d6d6d6; --lp-card: rgba(12, 12, 12, .58); --lp-line: rgba(255, 255, 255, .2); --lp-radius: 14px; }
.lp-body[data-theme="patch"] { --lp-paper: #121212; --lp-ink: #f1ede4; --lp-muted: #b6b0a4; --lp-card: #1c1c1c; --lp-line: rgba(241, 237, 228, .14); --lp-radius: 14px; }
.lp-body[data-theme="paper"] { --lp-paper: #fff; --lp-ink: #111; --lp-muted: #555; --lp-card: #f2f2f2; --lp-line: rgba(0, 0, 0, .12); --lp-radius: 999px; }

.lp-body[data-face="anton"] { --lp-head: 'LpAnton', Impact, sans-serif; --lp-head-weight: 400; --lp-head-case: uppercase; --lp-head-track: .01em; }
.lp-body[data-face="condensed"] { --lp-head: 'LpCondensed', 'Arial Narrow', sans-serif; --lp-head-weight: 700; --lp-head-case: uppercase; --lp-head-track: .02em; }
.lp-body[data-face="barlow"] { --lp-head: 'LpBarlow', system-ui, sans-serif; --lp-head-weight: 700; }
.lp-body[data-face="typewriter"] { --lp-head: 'LpType', 'Courier New', monospace; --lp-head-weight: 400; --lp-head-track: 0; }

/* --- the page ------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
.lp-body {
    margin: 0; min-height: 100vh; min-height: 100svh;
    background: var(--lp-paper); color: var(--lp-ink);
    font: 16px/1.5 var(--lp-body);
    -webkit-font-smoothing: antialiased; position: relative; overflow-x: hidden;
}
.lp-body a { color: inherit; }
.lp-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.lp-i { width: 1.25em; height: 1.25em; flex: none; display: inline-block; vertical-align: -.2em; }

/* Backgrounds, laid behind everything. Textures are a few per cent at most. */
.lp-body::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; }
.lp-body[data-bg="grain"]::before {
    opacity: .06;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.lp-body[data-bg="halftone"]::before {
    opacity: .06; background-image: radial-gradient(currentColor 1px, transparent 1.4px); background-size: 7px 7px;
}
.lp-body[data-bg="wash"]::before {
    background: radial-gradient(120% 60% at 50% 0%, var(--lp-accent), transparent 70%); opacity: .28;
}
.lp-body[data-bg="photo"]::before {
    background: linear-gradient(rgba(0, 0, 0, .58), rgba(0, 0, 0, .82)), var(--lp-photo, none) center / cover no-repeat;
    filter: blur(22px) saturate(1.1); transform: scale(1.15);
}

.lp { max-width: 560px; margin: 0 auto; padding: max(18px, env(safe-area-inset-top)) 16px 28px; }

.lp-preview-bar {
    position: sticky; top: 0; z-index: 5; display: flex; gap: .75rem; justify-content: center; align-items: center;
    flex-wrap: wrap; padding: .55rem 1rem; background: #f2c14e; color: #111; font: 600 .85rem/1.3 system-ui, sans-serif;
}
.lp-preview-bar a { color: #111; font-weight: 800; }

/* --- the header --------------------------------------------------------------- */

.lp-head { text-align: center; padding: 10px 0 18px; }
.lp-avatar { width: 112px; height: 112px; border-radius: 50%; object-fit: cover; display: block; margin: 0 auto 14px; border: 3px solid var(--lp-accent); background: var(--lp-card); }
.lp-cover { margin: -18px -16px 16px; position: relative; aspect-ratio: 16 / 10; overflow: hidden; }
.lp-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lp-cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(transparent 45%, var(--lp-paper)); }
.lp-name {
    margin: 0; font-family: var(--lp-head); font-weight: var(--lp-head-weight); text-transform: var(--lp-head-case);
    letter-spacing: var(--lp-head-track); font-size: clamp(2.1rem, 10vw, 3.3rem); line-height: 1.02; overflow-wrap: anywhere;
}
.lp-body[data-header="cover"] .lp-name { margin-top: -54px; position: relative; text-shadow: 0 2px 18px rgba(0, 0, 0, .6); }
.lp-name--logo { line-height: 0; }
.lp-logo { max-width: min(92%, 420px); max-height: 150px; height: auto; display: inline-block; }
.lp-body[data-theme="zine"] .lp-logo, .lp-body[data-theme="paper"] .lp-logo { filter: invert(1); }
.lp-headline { margin: .5rem 0 0; font-size: 1.05rem; font-weight: 600; }
.lp-meta { margin: .35rem 0 0; color: var(--lp-muted); font-size: .9rem; }

/* --- blocks ------------------------------------------------------------------- */

.lp-block { margin: 0 0 22px; scroll-margin-top: 16px; }
.lp-block:target { animation: lp-target 1.6s ease-out 1; }
@keyframes lp-target { 0% { outline: 3px solid var(--lp-accent); outline-offset: 6px; } 100% { outline: 3px solid transparent; outline-offset: 6px; } }
.lp-h {
    margin: 0 0 10px; font-family: var(--lp-head); font-weight: var(--lp-head-weight); text-transform: var(--lp-head-case);
    letter-spacing: var(--lp-head-track); font-size: 1.15rem;
}
.lp-kicker { margin: 0 0 .25rem; color: var(--lp-accent-text); font-weight: 800; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; }

/* Buttons. Every style keeps a 52px row and the colour-safe text. */
.lp-buttons { display: grid; gap: 12px; }
.lp-block[data-variant="grid"] .lp-buttons { grid-template-columns: 1fr 1fr; }
.lp-btn {
    position: relative; display: flex; align-items: center; justify-content: center; gap: .6rem; min-height: 54px;
    padding: .75rem 1.1rem; text-decoration: none; text-align: center; font-weight: 700; font-size: 1rem; line-height: 1.2;
    background: var(--lp-accent); color: var(--lp-on-accent) !important; border: 2px solid var(--lp-accent);
    border-radius: var(--lp-radius); transition: transform .12s ease, filter .12s ease; overflow: hidden;
    font-family: inherit; cursor: pointer; width: 100%;
}
.lp-btn:hover { filter: brightness(1.08); }
.lp-btn:active { transform: scale(.985); }
.lp-btn:focus-visible, .lp-social:focus-visible, .lp-gig-btn:focus-visible, .lp-chip:focus-visible, .lp-facade:focus-visible {
    outline: 3px solid var(--lp-ink); outline-offset: 3px;
}
.lp-btn > span { overflow-wrap: anywhere; }
.lp-btn .lp-i { position: absolute; left: 1rem; }
.lp-block[data-variant="grid"] .lp-btn .lp-i { position: static; }
.lp-btn--small { min-height: 44px; width: auto; padding: .55rem 1rem; font-size: .92rem; }
.lp-btn--small .lp-i { position: static; }
.lp-btn--quiet { background: var(--lp-card); color: var(--lp-ink) !important; border-color: var(--lp-line); }

.lp-body[data-buttons="outline"] .lp-btn:not(.lp-btn--quiet) { background: transparent; color: var(--lp-ink) !important; border-color: var(--lp-accent); }
.lp-body[data-buttons="outline"] .lp-btn.is-pinned, .lp-body[data-buttons="outline"] .lp-btn--hero { background: var(--lp-accent); color: var(--lp-on-accent) !important; }
.lp-body[data-buttons="shadow"] .lp-btn { border-radius: 0; border-color: var(--lp-ink); box-shadow: 5px 5px 0 var(--lp-ink); }
.lp-body[data-buttons="shadow"] .lp-btn:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--lp-ink); }
.lp-body[data-buttons="tape"] .lp-btn {
    border-radius: 0; border: 0;
    clip-path: polygon(0 6%, 3% 0, 97% 4%, 100% 0, 99% 94%, 100% 100%, 2% 96%, 0 100%);
}
.lp-body[data-buttons="tape"] .lp-buttons .lp-btn:nth-child(odd) { transform: rotate(-.6deg); }
.lp-body[data-buttons="tape"] .lp-buttons .lp-btn:nth-child(even) { transform: rotate(.5deg); }
.lp-body[data-buttons="patch"] .lp-btn {
    background: var(--lp-card); color: var(--lp-ink) !important; border: 3px solid var(--lp-accent); border-radius: 16px;
    outline: 2px dashed var(--lp-accent); outline-offset: -9px;
}
.lp-body[data-buttons="patch"] .lp-btn.is-pinned, .lp-body[data-buttons="patch"] .lp-btn--hero { background: var(--lp-accent); color: var(--lp-on-accent) !important; outline-color: var(--lp-on-accent); }
.lp-body[data-buttons="pill"] .lp-btn { border-radius: 999px; }
.lp-body[data-buttons="pill"] .lp-btn--quiet { border-radius: 999px; }
.lp-body[data-theme="photo"] .lp-btn--quiet, .lp-body[data-theme="photo"][data-buttons="outline"] .lp-btn:not(.is-pinned):not(.lp-btn--hero) {
    background: rgba(12, 12, 12, .5); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}

/* One shine across the top button as the page opens (under 5 seconds, so no
   pause control is needed), never for reduced motion. */
.lp-body[data-motion="shine"] .lp-hero .lp-btn::after, .lp-body[data-motion="shine"] .lp-buttons .lp-btn:first-child::after {
    content: ''; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .45), transparent);
    animation: lp-shine 1.4s ease-out .6s 2 both;
}
@keyframes lp-shine { to { left: 130%; } }

/* The hero */
.lp-hero { background: var(--lp-card); border: 1px solid var(--lp-line); border-radius: min(var(--lp-radius), 18px); padding: 16px; }
.lp-hero--button { background: none; border: 0; padding: 0; }
.lp-hero--release { display: flex; gap: 14px; align-items: center; }
.lp-hero-art { width: 112px; height: 112px; object-fit: cover; border-radius: 6px; flex: none; }
.lp-hero-title { margin: 0; font-family: var(--lp-head); font-weight: var(--lp-head-weight); text-transform: var(--lp-head-case); font-size: 1.5rem; line-height: 1.1; }
.lp-hero-sub { margin: .25rem 0 .85rem; color: var(--lp-muted); font-size: .92rem; }
.lp-hero--release .lp-btn { margin-top: .7rem; min-height: 46px; }
.lp-btn--hero { min-height: 58px; font-size: 1.08rem; }

/* Gigs */
.lp-gigs { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.lp-gig {
    display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 12px; align-items: center;
    padding: 10px 10px 10px 12px; background: var(--lp-card); border: 1px solid var(--lp-line); border-radius: min(var(--lp-radius), 14px);
    scroll-margin-top: 16px;
}
.lp-gig:target { outline: 3px solid var(--lp-accent); }
.lp-gig-date { display: flex; flex-direction: column; align-items: center; line-height: 1; color: var(--lp-accent-text); }
.lp-gig-date strong { font-family: var(--lp-head); font-weight: var(--lp-head-weight); font-size: 1.6rem; }
.lp-gig-date span { font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; margin-top: 3px; }
.lp-gig-body { display: flex; flex-direction: column; min-width: 0; }
.lp-gig-place { font-weight: 800; overflow-wrap: anywhere; }
.lp-gig-venue { color: var(--lp-muted); font-size: .86rem; overflow-wrap: anywhere; }
.lp-gig-btn {
    display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-height: 44px; min-width: 76px;
    padding: .35rem .7rem; text-decoration: none; font-weight: 800; font-size: .9rem; line-height: 1.1;
    background: var(--lp-accent); color: var(--lp-on-accent) !important; border-radius: min(var(--lp-radius), 10px);
}
.lp-gig-btn small { font-weight: 600; font-size: .72rem; opacity: .9; margin-top: 2px; }
.lp-gig-btn--quiet { background: transparent; color: var(--lp-ink) !important; border: 1px solid var(--lp-line); }
.lp-tag { font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: .3rem .5rem; border: 1px solid currentColor; border-radius: 4px; color: var(--lp-muted); }
.lp-block[data-variant="cards"] .lp-gigs { gap: 12px; }
.lp-block[data-variant="cards"] .lp-gig { grid-template-columns: 1fr auto; padding: 14px; }
.lp-block[data-variant="cards"] .lp-gig-date { grid-column: 1 / -1; flex-direction: row; gap: .4rem; align-items: baseline; justify-content: flex-start; }
.lp-block[data-variant="compact"] .lp-gig { padding: 6px 8px; background: none; border-width: 0 0 1px; border-radius: 0; }
.lp-block[data-variant="compact"] .lp-gig-date strong { font-size: 1.2rem; }
.lp-festivals, .lp-more { margin: .7rem 0 0; color: var(--lp-muted); font-size: .88rem; }
.lp-festivals a, .lp-more a { color: var(--lp-accent-text); font-weight: 700; }

/* Release */
.lp-release { display: flex; gap: 14px; align-items: flex-start; background: var(--lp-card); border: 1px solid var(--lp-line); border-radius: min(var(--lp-radius), 14px); padding: 12px; }
.lp-release-art { width: 96px; height: 96px; object-fit: cover; border-radius: 6px; flex: none; }
.lp-release-name { margin: 0; font-weight: 800; font-size: 1.1rem; }
.lp-release-meta { margin: .15rem 0 .6rem; color: var(--lp-muted); font-size: .86rem; }
.lp-release-actions { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; }
.lp-block[data-variant="wide"] .lp-release { flex-direction: column; }
.lp-block[data-variant="wide"] .lp-release-art { width: 100%; height: auto; aspect-ratio: 1; }
.lp-text-link { color: var(--lp-accent-text) !important; font-weight: 700; font-size: .92rem; display: inline-flex; gap: .25rem; align-items: center; min-height: 44px; }
.lp-text-link .lp-i { width: 1em; height: 1em; }

/* Players, as a picture until tapped */
.lp-facade { display: block; position: relative; border-radius: min(var(--lp-radius), 14px); overflow: hidden; background: var(--lp-card); border: 1px solid var(--lp-line); text-decoration: none; }
.lp-facade img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.lp-facade-play {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: .5rem;
    background: rgba(0, 0, 0, .35); color: #fff; font-weight: 800;
}
.lp-facade-play .lp-i { width: 2.4rem; height: 2.4rem; padding: .55rem; border-radius: 50%; background: var(--lp-accent); color: var(--lp-on-accent); }
.lp-facade--bandcamp { min-height: 92px; }
.lp-facade--bandcamp .lp-facade-play { position: static; min-height: 92px; background: none; color: var(--lp-ink); }
.lp-facade iframe { display: block; width: 100%; border: 0; aspect-ratio: 16 / 9; }

/* Merch */
.lp-merch { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.lp-block[data-variant="row"] .lp-merch { grid-auto-flow: column; grid-auto-columns: 42%; grid-template-columns: none; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
.lp-merch-item { display: flex; flex-direction: column; gap: 4px; text-decoration: none; background: var(--lp-card); border: 1px solid var(--lp-line); border-radius: min(var(--lp-radius), 12px); padding: 8px; scroll-snap-align: start; }
.lp-merch-item img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 6px; background: #fff; }
.lp-merch-name { font-weight: 700; font-size: .9rem; line-height: 1.25; }
.lp-merch-price { color: var(--lp-accent-text); font-weight: 800; font-size: .9rem; }

/* Note */
.lp-note { margin: 0; padding: 14px 16px; border-left: 4px solid var(--lp-accent); background: var(--lp-card); border-radius: 0 10px 10px 0; }
.lp-note blockquote { margin: 0; font-size: 1.02rem; overflow-wrap: anywhere; }
.lp-note figcaption { margin-top: .4rem; color: var(--lp-muted); font-size: .82rem; }
.lp-note a { color: var(--lp-accent-text); font-weight: 700; }

/* Sign-up */
.lp-signup { background: var(--lp-card); border: 1px solid var(--lp-line); border-radius: min(var(--lp-radius), 16px); padding: 16px; }
.lp-signup-lede { margin: 0 0 12px; color: var(--lp-muted); font-size: .92rem; }
.lp-signup-fields { display: grid; gap: 8px; margin-bottom: 10px; }
.lp-signup input[type="email"], .lp-signup input[type="text"] {
    width: 100%; min-height: 48px; padding: .7rem .85rem; font: inherit; color: var(--lp-ink); background: var(--lp-paper);
    border: 1px solid var(--lp-line); border-radius: 10px;
}
.lp-signup input:focus { outline: 2px solid var(--lp-accent); outline-offset: 1px; }
.lp-check { display: flex; gap: .5rem; align-items: center; margin: 0 0 12px; font-size: .9rem; min-height: 44px; }
.lp-check input { width: 20px; height: 20px; accent-color: var(--lp-accent); }
.lp-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.lp-signup-said { margin: .6rem 0 0; font-weight: 700; min-height: 1.2em; }
.lp-signup-said.is-error { color: var(--lp-accent-text); }
.lp-fine { margin: .5rem 0 0; color: var(--lp-muted); font-size: .76rem; }
.lp-fine a { color: inherit; }

/* Socials */
.lp-socials { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.lp-social {
    width: 48px; height: 48px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%;
    background: var(--lp-card); border: 1px solid var(--lp-line); text-decoration: none; transition: transform .12s ease;
}
.lp-social:hover { transform: translateY(-2px); border-color: var(--lp-accent); }
.lp-social .lp-i { width: 22px; height: 22px; }
.lp-social-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.lp-block[data-variant="buttons"] .lp-socials { display: grid; }
.lp-block[data-variant="buttons"] .lp-social { width: auto; height: auto; min-height: 50px; border-radius: min(var(--lp-radius), 12px); gap: .6rem; font-weight: 700; }
.lp-block[data-variant="buttons"] .lp-social-label { position: static; width: auto; height: auto; overflow: visible; clip: auto; }

/* Book us, text */
.lp-book { display: grid; gap: 10px; }
.lp-text { padding: 2px 0; }
.lp-text p { margin: 0 0 .6rem; }
.lp-block[data-variant="boxed"] .lp-text { background: var(--lp-card); border: 1px solid var(--lp-line); border-radius: min(var(--lp-radius), 14px); padding: 14px 16px; }

/* --- the foot ----------------------------------------------------------------- */

.lp-foot { text-align: center; padding-top: 10px; border-top: 1px solid var(--lp-line); margin-top: 8px; }
.lp-followers { margin: .6rem 0; color: var(--lp-muted); font-size: .88rem; }
.lp-foot-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin: .6rem 0; }
.lp-inline-form { margin: 0; }
.lp-chip {
    display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; padding: .5rem 1rem; border-radius: 999px;
    background: var(--lp-card); color: var(--lp-ink); border: 1px solid var(--lp-line); font: inherit; font-weight: 700; font-size: .9rem; cursor: pointer;
}
.lp-chip.is-on { border-color: var(--lp-accent); }
.lp-chip[hidden] { display: none; }
.lp-credit { margin: 1rem 0 0; font-size: .82rem; color: var(--lp-muted); }
.lp-credit a { color: var(--lp-muted); text-decoration: underline; text-underline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
    .lp-btn, .lp-social { transition: none; }
    .lp-body[data-motion="shine"] .lp-btn::after { animation: none; display: none; }
    .lp-block:target { animation: none; }
    .lp-body[data-buttons="tape"] .lp-buttons .lp-btn { transform: none !important; }
}
@media (min-width: 720px) {
    .lp { padding-top: 40px; }
    .lp-cover { margin: -40px -16px 16px; border-radius: 0 0 18px 18px; }
}
