/* Advice Songs — shared styles
   Palette (from Emma's cover art):
   --green  #C3E766  primary — wordmark, links, active states
   --brown  #291E0D  deep background
   --tan    #8B6A4B  secondary surfaces, borders, muted text
   --red    #D21117  rare accent — used once per view, for emphasis only
*/

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600&family=Cutive&family=Work+Sans:wght@400;500&display=swap');

:root {
  --green: #C3E766;
  --brown: #31220D;
  --brown-light: #3a2c17;
  --tan: #8B6A4B;
  --tan-soft: #b39d81;
  --red: #D21117;
  --cream: #f2ede2;

  --font-display: 'Fraunces', serif;
  --font-body: 'Work Sans', sans-serif;
  --font-typewriter: 'Cutive', serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--brown);
  color: var(--cream);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img, video {
  max-width: 100%;
  display: block;
}

::selection {
  background: var(--green);
  color: var(--brown);
}

/* Focus visibility */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

/* ---------- Site header / nav ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 6vw;
  border-bottom: 1px solid rgba(139, 106, 75, 0.35);
}

.site-header .wordmark {
  display: flex;
  align-items: center;
}

.site-header .wordmark-img {
  height: 3rem;
  width: auto;
  display: block;
}

.site-header nav {
  display: flex;
  gap: 2rem;
  font-size: 0.95rem;
  color: var(--tan-soft);
}

.site-header nav a {
  transition: color 0.15s ease;
}

.site-header nav a:hover,
.site-header nav a.active {
  color: var(--green);
}

/* ---------- Landing page ---------- */
.landing {
  min-height: 100vh;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: var(--brown);
}

.landing .title {
  font-family: var(--font-typewriter);
  font-weight: 400;
  color: var(--green);
  font-size: clamp(2.7rem, 9vw, 6.3rem);
  letter-spacing: 0;
  text-align: center;
  padding: 0 1rem;
}

/* ---------- Pay-what-you-want interstitial ---------- */
.support-page {
  min-height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  background: var(--brown);
  padding: 2rem 1.25rem;
}

.pay-box {
  background: var(--brown-light);
  border: 1px solid rgba(139, 106, 75, 0.5);
  border-radius: 10px;
  padding: 2.25rem 1.75rem;
  max-width: 420px;
  width: 100%;
  text-align: center;
}

.pay-box-heading {
  font-family: var(--font-typewriter);
  color: var(--green);
  font-size: clamp(1.3rem, 3.4vw, 1.6rem);
  line-height: 1.45;
  margin: 0 0 1.5rem;
}

.kofi-embed {
  margin-top: 1rem;
}

.kofi-embed iframe {
  width: 100%;
  height: 660px;
  border: none;
  border-radius: 6px;
  background: transparent;
  display: block;
}

.kofi-embed-fallback {
  margin-top: 0.85rem;
  font-size: 0.8rem;
  color: var(--tan-soft);
}

.kofi-embed-fallback a {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.skip-btn {
  display: inline-block;
  background: var(--green);
  color: var(--brown);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  padding: 0.65rem 2.25rem;
  border-radius: 4px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.skip-btn:hover {
  opacity: 0.85;
}

/* ---------- Homepage grid ---------- */
.grid-wrap {
  padding: 3rem 6vw 6rem;
  max-width: 1400px;
  margin: 0 auto;
}

.grid-intro {
  max-width: 110ch;
  margin: 0 0 3rem;
  color: var(--tan-soft);
  font-size: 1.05rem;
  line-height: 1.6;
}

.landing-banner {
  max-width: min(85vw, 900px);
  width: 100%;
  height: auto;
}

.song-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem 1.25rem;
}

.song-tile {
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: 4px;
  overflow: hidden;
  background: var(--brown-light);
  border: 1px solid rgba(139, 106, 75, 0.4);
}

.song-tile.available {
  cursor: pointer;
}

.song-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.song-tile.available:hover img {
  transform: scale(1.04);
}

.tile-label {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 0.6rem 0.65rem 0.5rem;
  background: linear-gradient(to top, rgba(41,30,13,0.92), rgba(41,30,13,0));
  font-size: 0.8rem;
  line-height: 1.3;
}

.tile-label .num {
  display: block;
  color: var(--tan-soft);
  font-size: 0.7rem;
  margin-bottom: 0.15rem;
}

.tile-label .name {
  color: var(--cream);
}

.song-tile.locked .tile-label .name {
  color: var(--tan-soft);
  font-style: italic;
}

.song-tile.locked {
  display: flex;
  align-items: flex-end;
}

.song-tile.locked::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(135deg, rgba(139,106,75,0.08) 0 2px, transparent 2px 14px);
}

/* ---------- Song page ---------- */
.song-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 6vw 6rem;
  display: grid;
  grid-template-columns: minmax(240px, 340px) 1fr;
  gap: 4rem;
}

@media (max-width: 780px) {
  .song-page { grid-template-columns: 1fr; gap: 2.5rem; }
}

.song-video-col video,
.song-video-col img {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid rgba(139, 106, 75, 0.4);
}

.song-eyebrow {
  color: var(--tan-soft);
  font-size: 0.85rem;
  margin: 0 0 0.35rem;
}

.song-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.9rem, 3.4vw, 2.75rem);
  color: var(--green);
  margin: 0 0 2rem;
  line-height: 1.15;
}

.song-content h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.15rem;
  color: var(--tan-soft);
  margin: 2.25rem 0 0.9rem;
}

.song-content h2:first-child {
  margin-top: 0;
}

.lyrics {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--cream);
  white-space: pre-line;
  max-width: 46ch;
}

.essay {
  font-size: 1.02rem;
  line-height: 1.75;
  color: var(--cream);
  max-width: 62ch;
}

.essay p {
  margin: 0 0 1.15em;
}

.essay-lyric {
  font-style: italic;
  margin: 0 0 1.15em;
  padding-left: 1.5rem;
}

/* ---------- About page ---------- */
.about-wrap {
  max-width: 68ch;
  margin: 0 auto;
  padding: 3rem 6vw 6rem;
}

.about-section {
  margin-bottom: 3.5rem;
}

.about-section h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  color: var(--green);
  margin: 0 0 1rem;
}

.about-section p {
  font-size: 1.02rem;
  line-height: 1.75;
  margin: 0 0 1.15em;
}

.about-section p a {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.about-section p a:hover {
  text-decoration-thickness: 2px;
}

.about-link .footer-link-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.about-link .footer-link-btn:hover {
  text-decoration-thickness: 2px;
}

.placeholder-note {
  color: var(--tan-soft);
  font-size: 0.85rem;
  border-left: 2px solid var(--red);
  padding-left: 0.85rem;
  margin-top: 1.25rem;
}

/* ---------- Footer ---------- */
.site-footer {
  text-align: center;
  padding: 2rem 1rem 3rem;
  color: var(--tan);
  font-size: 0.8rem;
}

/* About page cover image, between the two sections */
.about-cover {
  width: 100%;
  max-width: 420px;
  height: auto;
  border-radius: 6px;
  margin: 0 0 3.5rem;
}

/* Inline link on the About page */
.about-link a {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.about-link a:hover {
  text-decoration-thickness: 2px;
}

/* Footer link */
.site-footer a,
.site-footer .footer-link-btn {
  color: var(--tan-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer a:hover,
.site-footer .footer-link-btn:hover {
  color: var(--green);
}

.site-footer .footer-link-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

/* ---------- Ko-fi support modal ---------- */
.kofi-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(19, 13, 5, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 1000;
}

.kofi-modal-overlay[hidden] {
  display: none;
}

.kofi-modal {
  position: relative;
  background: var(--brown-light);
  border: 1px solid rgba(139, 106, 75, 0.5);
  border-radius: 10px;
  padding: 2rem 1.5rem 1.75rem;
  max-width: 420px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  text-align: center;
}

.kofi-modal-close {
  position: absolute;
  top: 0.65rem;
  right: 0.75rem;
  background: none;
  border: none;
  color: var(--tan-soft);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.35rem;
}

.kofi-modal-close:hover {
  color: var(--green);
}

.kofi-modal-heading {
  font-family: var(--font-typewriter);
  color: var(--green);
  font-size: 1.2rem;
  margin: 0 0 1.25rem;
}

.kofi-modal iframe {
  width: 100%;
  height: 600px;
  border: none;
  border-radius: 6px;
  background: transparent;
  display: block;
}

.kofi-modal-fallback {
  margin-top: 0.85rem;
  font-size: 0.8rem;
  color: var(--tan-soft);
}

.kofi-modal-fallback a {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Support box on the homepage, between the description and the gallery */
.support-box {
  display: inline-block;
  border: 1px solid rgba(139, 106, 75, 0.6);
  border-radius: 4px;
  padding: 0.85rem 1.15rem;
  margin: 0 0 3rem;
}

.support-box p {
  margin: 0;
  color: var(--tan-soft);
  font-size: 0.95rem;
  line-height: 1.5;
}

.support-box a {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.support-box a:hover {
  text-decoration-thickness: 2px;
}

/* Expandable Ko-fi donation panel */
.support-toggle {
  margin-top: 0.75rem;
  background: transparent;
  color: var(--green);
  border: 1px solid var(--green);
  border-radius: 4px;
  padding: 0.45rem 0.9rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.support-toggle:hover {
  background: var(--green);
  color: var(--brown);
}

.support-box.open {
  display: block;
  max-width: 440px;
}

.kofi-panel {
  margin-top: 1rem;
}

.kofi-panel iframe {
  width: 100%;
  border: none;
  border-radius: 4px;
  background: transparent;
  display: block;
}

.kofi-fallback {
  margin-top: 0.75rem !important;
  font-size: 0.8rem !important;
}
