/* Quigley Discovery — ported from the original design mockup.
   Design tokens live in :root; everything else references them. */

@font-face { font-family: 'Adventure';  src: url('/assets/9167230e83ae24466f565fabf7c1d930.otf') format('opentype'); font-display: swap; }
@font-face { font-family: 'ArmyRust';   src: url('/assets/924a37efddfe4c3dac73fe7e70cf0ed0.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'Papernotes'; src: url('/assets/7513f410d59f84e3142de7ce592420e2.otf') format('opentype'); font-display: swap; }
@font-face { font-family: 'Vintage2';   src: url('/assets/1d1fd18bafb0ef484e8f29990dfd18a8.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'Sorean';     src: url('/assets/aaada8b12fd73dc00a2ff7e16de3a2cd.otf') format('opentype'); font-display: swap; }

:root {
  --accent: #2F5D3A;
  --bg: #F5EFDC;
  --ink: #2C3420;
  --card: #FFFBF1;
  --muted: #5B6246;
  --heading: #2F5D3A;
  --green-deep: #267D1D;
  --line: rgba(44,52,32,0.14);
  --max: 1200px;
  --pad: clamp(23px, 5vw, 74px);
}

* { box-sizing: border-box; }
html { overflow-x: clip; scroll-behavior: smooth; }
/* Keep anchor targets clear of the sticky nav. */
[id] { scroll-margin-top: 96px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Archivo', system-ui, sans-serif;
  color-scheme: light;
  overflow-x: clip;
}
a { color: inherit; text-decoration: none; }
a:hover { opacity: 0.8; }
::selection { background: #8FAE7C; color: var(--ink); }

.wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
.section { padding-top: 64px; padding-bottom: 64px; border-top: 1px solid var(--line); }
.heading { font-family: 'Sorean', serif; font-size: clamp(32px, 4vw, 46px); margin: 0 0 16px 0; color: var(--heading); }

/* Organic blurred blobs */
.blob { position: absolute; z-index: -1; pointer-events: none; }
.blob.b1 { top:-120px; right:-140px; width:460px; height:460px; background:#8FAE7C; opacity:.28; filter:blur(70px); border-radius:58% 42% 65% 35% / 45% 55% 45% 55%; }
.blob.b2 { top:560px; left:-160px; width:420px; height:420px; background:#D8C9A3; opacity:.3; filter:blur(65px); border-radius:42% 58% 35% 65% / 55% 45% 60% 40%; }
.blob.b3 { top:1500px; right:-130px; width:480px; height:480px; background:#4F9130; opacity:.2; filter:blur(75px); border-radius:60% 40% 55% 45% / 40% 60% 40% 60%; }
.blob.b4 { top:2350px; left:-150px; width:440px; height:440px; background:#8FAE7C; opacity:.26; filter:blur(70px); border-radius:48% 52% 62% 38% / 50% 48% 52% 50%; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 10; background: rgba(245,239,220,0.88); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 20px; padding-bottom: 20px; }
.brand { font-family: 'Archivo Black', sans-serif; font-size: 23px; letter-spacing: 0.02em; }
.brand .light { color: var(--ink); }
.brand .accent { color: var(--green-deep); }
.nav-links { display: flex; gap: 28px; flex-wrap: wrap; font-size: 17px; font-weight: 500; }

/* Hero */
.hero { position: relative; overflow: hidden; border-radius: 0; }
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-bg .overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,12,8,0.5), rgba(10,12,8,0.78)); }
.hero-inner { position: relative; z-index: 1; padding: 96px var(--pad) 88px; }
.hero h1 { font-family: 'Archivo Black', sans-serif; font-size: clamp(46px, 7vw, 87px); line-height: 1.02; letter-spacing: -0.01em; margin: 0 0 16px 0; text-wrap: balance; color: #FFFBF1; }
.hero .invest-q { font-size: 41px; line-height: 1.6; color: var(--green-deep); margin: 0 0 16px 0; max-width: 640px; font-family: 'Sorean', serif; }
.hero .lede { font-size: 23px; line-height: 1.7; color: #D8D2B8; margin: 0 0 28px 0; max-width: 640px; }
.hero .eyebrow { font-size: 17px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #8FAE7C; margin: 0 0 12px 0; }
.hero .sub { font-size: 22px; line-height: 1.6; color: #D8D2B8; margin: 0; max-width: 560px; }

/* Artists section header */
.week-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 16px; }
.week-date { font-family: 'Sorean', serif; font-size: 24px; margin: 0; color: var(--heading); }
.subcopy { font-size: 18px; color: var(--muted); margin: 0 0 20px 0; max-width: 560px; }

.btn-refresh {
  font-family: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
  color: #FFFBF1; background: var(--accent); border: none;
  padding: 10px 18px; border-radius: 999px; white-space: nowrap;
}
.btn-refresh[disabled] { opacity: 0.55; cursor: default; }
.refresh-note { font-size: 13px; color: var(--muted); margin: 6px 0 0 0; }

/* Cards */
.featured-card { position: relative; margin-bottom: 24px; border-radius: 20px; overflow: hidden; border: 2px solid var(--accent); }
.card-bg { position: absolute; inset: 0; z-index: 0; }
.card-bg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-bg .overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,12,8,0.55), rgba(10,12,8,0.82)); }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(400px, 100%), 1fr)); gap: 24px; }

.artist-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 28px; display: flex; flex-direction: column; gap: 12px; position: relative; overflow: hidden; }
.artist-card.photo { border: 1px solid var(--line); }
.artist-card .inner, .featured-card .inner { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 12px; }

.tag { align-self: flex-start; font-size: 14px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; }
.tag.featured-tag { color: #FFFBF1; background: var(--accent); }
/* Genre tags: solid fill + solid border so they read on dark photos and light cards alike. */
.tag.solid { color: #FFFBF1; border: 2px solid #8FAE7C; box-shadow: 0 2px 8px rgba(0,0,0,0.25); }

.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.artist-name { margin: 0; }
.featured-card .artist-name { font-size: 58px; color: #FFFBF1; }
.artist-card .artist-name { font-size: 32px; }
.full-profile { font-size: 14px; font-weight: 600; text-decoration: underline; }

.actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.trend { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: #2F5D3A; background: rgba(143,174,122,0.3); padding: 6px 10px; border-radius: 999px; white-space: nowrap; }
.trend.up { color: #2eb91f; }
.trend.down { color: #c0492f; }
.trend.flat { color: #5B6246; }
.trend svg.down { transform: rotate(180deg); }
.listen { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: #FFFBF1; background: var(--accent); padding: 8px 14px; border-radius: 999px; white-space: nowrap; }
.invest { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; color: var(--ink); background: #FFD54A; padding: 8px 16px; border-radius: 999px; white-space: nowrap; }
.bio { font-size: 17px; line-height: 1.6; margin: 0; }
.socials { display: flex; gap: 16px; margin-top: 4px; }
.socials a { font-size: 15px; font-weight: 700; }
.secondary-stats { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; margin-top: 2px; opacity: 0.9; }

/* Light vs dark (photo) card text colors */
.artist-card:not(.photo) { }
.artist-card:not(.photo) .artist-name { color: var(--ink); }
.artist-card:not(.photo) .full-profile { color: var(--accent); }
.artist-card:not(.photo) .bio { color: var(--muted); }
.artist-card:not(.photo) .socials a { color: var(--accent); }
.artist-card:not(.photo) .secondary-stats { color: var(--muted); }

.card-dark .artist-name { color: #FFFBF1; }
.card-dark .full-profile { color: #FFFBF1; }
.card-dark .bio { color: #E9E3CC; }
.card-dark .socials a { color: #FFFBF1; }
.card-dark .secondary-stats { color: #D8D2B8; }

/* ---- Reel-first cards (homepage experiment) ---- */
.reel-window { width: 340px; max-width: 100%; height: 470px; border-radius: 16px; overflow: hidden; background: #FFFBF1; border: 1px solid var(--line); flex: 0 0 auto; }
.reel-window iframe { display: block; width: 100%; height: 640px; border: 0; }
.reel-window.spotify { background: #121212; }
.reel-window.spotify iframe { height: 470px; }

.genre-label { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.genre-label i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; box-shadow: 0 0 0 2px rgba(143,174,122,0.55); }
.trend-text { font-size: 14px; font-weight: 800; }
.trend-text.up { color: #2eb91f; }
.trend-text.down { color: #c0492f; }
.text-links { display: flex; gap: 18px; flex-wrap: wrap; font-size: 15px; font-weight: 700; }

.feat { display: flex; gap: 40px; align-items: center; flex-wrap: wrap; background: #1F4024; color: #FFFBF1; border-radius: 24px; padding: 28px; margin-bottom: 36px; position: relative; overflow: hidden; }
.feat::after { content: ""; position: absolute; right: -120px; top: -120px; width: 360px; height: 360px; border-radius: 50%; background: #4F9130; opacity: 0.35; filter: blur(60px); pointer-events: none; }
.feat-reel { position: relative; z-index: 1; max-width: 100%; min-width: 0; }
.feat-reel .reel-window { box-shadow: 0 18px 40px rgba(0,0,0,0.35); border: none; }
.feat-info { position: relative; z-index: 1; flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.feat-eyebrow { font-size: 14px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: #FFD54A; }
.feat-name { margin: 0; font-size: clamp(56px, 8vw, 92px); line-height: 0.95; color: #FFFBF1; }
.feat .genre-label { color: #CFE3BF; font-size: 15px; }
.feat .play-hint { margin: 6px 0 4px 0; font-size: 15px; color: #D8D2B8; display: flex; align-items: center; gap: 8px; }
.feat .play-hint span { color: #FFD54A; animation: nudge 1.4s ease-in-out infinite; }
@keyframes nudge { 0%,100% { transform: translateX(0); } 50% { transform: translateX(-6px); } }
.feat .listen { background: #4F9130; font-size: 15px; padding: 11px 20px; }
.feat .invest { font-size: 15px; padding: 11px 20px; }
.feat .text-links a { color: #FFFBF1; }

.feat-bio { margin: 0; font-size: 17px; line-height: 1.6; color: #E9E3CC; max-width: 560px; }
.reel-bio { margin: 0; font-size: 15px; line-height: 1.55; color: var(--muted); }

.rail-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.rail-title { margin: 0; font-family: 'Sorean', serif; font-size: 26px; color: var(--heading); }
.rail-title span { display: block; font-family: 'Archivo', sans-serif; font-size: 14px; color: var(--muted); margin-top: 2px; }
.rail-arrows { display: flex; gap: 8px; }
.rail-btn { width: 42px; height: 42px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--accent); font-size: 22px; font-weight: 800; cursor: pointer; font-family: inherit; }
.rail-btn:hover { background: var(--accent); color: #FFFBF1; }
.reel-rail { display: flex; align-items: flex-start; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 4px 18px 4px; scrollbar-width: thin; }
.reel-card { flex: 0 0 340px; max-width: 86vw; scroll-snap-align: start; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 0 0 18px 0; display: flex; flex-direction: column; overflow: hidden; }
.reel-card .reel-window { width: 100%; border: none; border-radius: 0; border-bottom: 1px solid var(--line); }
.reel-info { padding: 16px 18px 0; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.reel-name { margin: 0; font-size: 34px; line-height: 1.05; color: var(--ink); }
.reel-card .genre-label { color: var(--muted); }
.reel-card .text-links a { color: var(--accent); font-size: 14px; }

/* Artist names link to their full profile. */
.name-link { color: inherit; text-decoration: none; background-image: linear-gradient(currentColor, currentColor); background-size: 0% 3px; background-position: 0 100%; background-repeat: no-repeat; transition: background-size .2s ease; }
.name-link:hover, .name-link:focus-visible { opacity: 1; background-size: 100% 3px; }

.see-prev { display: inline-flex; align-items: center; margin-top: 32px; font-size: 16px; font-weight: 700; color: var(--accent); }

/* Criteria */
.criteria-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 24px; }
.criteria { border: 1px solid var(--line); border-radius: 16px; padding: 28px; background: var(--card); }
.criteria .num { font-family: 'Archivo Black', sans-serif; font-size: 16px; color: var(--accent); margin: 0 0 16px 0; }
.criteria h3 { font-size: 22px; margin: 0 0 10px 0; color: var(--ink); }
.criteria p { font-size: 17px; line-height: 1.6; color: var(--muted); margin: 0; }

/* About */
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 48px; align-items: start; }
.about p { font-size: 20px; line-height: 1.7; color: var(--muted); margin: 0 0 16px 0; }
.stats-box { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 32px; display: flex; flex-direction: column; gap: 24px; }
.stats-box .big { font-family: 'Archivo Black', sans-serif; color: var(--accent); margin: 0; }
.stats-box .label { font-size: 16px; color: var(--muted); margin: 4px 0 0 0; }
.btn-pill { display: inline-flex; align-items: center; background: var(--accent); color: #FFFBF1; font-weight: 700; font-size: 18px; padding: 14px 28px; border-radius: 999px; margin-top: 24px; }

/* Contact */
.contact-card { background: var(--accent); border-radius: 24px; padding: 56px clamp(28px, 5vw, 55px); display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.contact-card h2 { font-family: 'Archivo Black', sans-serif; color: #FFFBF1; font-size: clamp(32px, 5vw, 51px); margin: 0; text-wrap: balance; }
.contact-card p { font-size: 20px; color: #E7E9D9; margin: 0; max-width: 480px; }
.contact-card .email { display: inline-flex; align-items: center; background: #FFFBF1; color: #3F5422; font-weight: 700; font-size: 18px; padding: 14px 28px; border-radius: 999px; }

/* Signup */
.signup-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 48px; align-items: start; }
.signup-box { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 32px; display: flex; flex-direction: column; gap: 16px; }
.signup-box label { font-size: 16px; font-weight: 600; color: var(--ink); }
.signup-box input { width: 100%; background: var(--bg); border: 1px solid rgba(44,52,32,0.2); border-radius: 8px; padding: 12px 14px; color: var(--ink); font-size: 17px; font-family: inherit; }
.signup-box button { background: var(--accent); color: #FFFBF1; font-weight: 700; font-size: 17px; padding: 12px 20px; border-radius: 999px; border: none; cursor: pointer; }
.signup-msg { font-size: 14px; margin: 0; min-height: 1.2em; }

/* Footer */
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 15px; color: #6B6354; padding-top: 32px; padding-bottom: 40px; }

.loading { color: var(--muted); font-size: 18px; padding: 24px 0; }

/* Discography modal */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(20,24,16,0.6); backdrop-filter: blur(4px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 48px 20px; overflow-y: auto;
}
.modal-backdrop.hidden { display: none; }
.modal {
  position: relative; background: var(--bg); color: var(--ink);
  border-radius: 20px; width: 100%; max-width: 860px;
  padding: 32px clamp(20px, 4vw, 40px); box-shadow: 0 24px 60px rgba(0,0,0,0.35);
}
.modal-close {
  position: absolute; top: 16px; right: 18px; background: none; border: none;
  font-size: 30px; line-height: 1; color: var(--muted); cursor: pointer;
}
.modal-close:hover { color: var(--ink); }
.modal-head { display: flex; align-items: center; gap: 20px; margin-bottom: 24px; padding-right: 28px; }
.modal-artist-img { width: 92px; height: 92px; border-radius: 50%; object-fit: cover; border: 2px solid var(--accent); flex: none; }
.modal-head h3 { font-family: 'Sorean', serif; font-size: 32px; margin: 0; color: var(--heading); }
.modal-sub { font-size: 15px; color: var(--muted); margin: 4px 0 6px 0; }
.modal-open-spotify { font-size: 14px; font-weight: 700; color: var(--accent); }

.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 20px; }
.album-card { display: flex; flex-direction: column; gap: 8px; color: inherit; }
.album-card:hover { opacity: 1; }
.album-card:hover .album-art img { transform: scale(1.03); }
.album-art { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: #e7e0cb; box-shadow: 0 4px 14px rgba(0,0,0,0.12); }
.album-art img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.2s ease; }
.album-art-fallback { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 36px; color: var(--muted); }
.album-name { font-size: 15px; font-weight: 600; line-height: 1.3; color: var(--ink); }
.album-meta { font-size: 13px; color: var(--muted); }

/* Phones: keep the featured reel and contact email inside the screen. */
@media (max-width: 560px) {
  .feat { padding: 16px; gap: 24px; border-radius: 20px; }
  .feat-reel { width: 100%; }
  .feat-reel .reel-window { width: 100%; }
  .contact-card .email { max-width: 100%; font-size: 15px; padding: 12px 18px; overflow-wrap: anywhere; }
  .nav-links { gap: 18px; font-size: 15px; }
}
