/*
Theme Name: Clara Wren Folk
Theme URI: https://example.com
Author: Custom
Author URI: https://example.com
Description: Rustic folk musician theme with tan, off-white, and burnt sienna palette. One-page layout with ACF support for all content.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: clara-wren
Tags: music, one-page, dark, rustic, folk
*/

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Barlow Condensed', sans-serif; font-weight: 300; background: #e8ddd0; color: #3d2518; line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

/* ── Typography ── */
.cw-serif { font-family: 'Anton', 'Barlow Condensed', sans-serif; }
.cw-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: #c4521e;
  margin-bottom: 12px;
  display: block;
}
.cw-rule { width: 36px; height: 2px; background: #c4521e; margin-bottom: 20px; }
.cw-section-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 40px;
}
.cw-section-head h2 {
  font-family: 'Fraunces', 'Playfair Display', serif;
  font-weight: 900;
  font-size: 72px;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: #1e130a;
  line-height: 0.9;
  white-space: nowrap;
}
.cw-section-rule { flex: 1; height: 3px; background: #c9b89e; }

/* ── Buttons ── */
.cw-btn {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.15s, opacity 0.2s;
}
.cw-btn:hover { opacity: 0.88; transform: translateY(-2px); }
.cw-btn-rust { background: #c4521e; color: #f5ede0; border: none; }
.cw-btn-ghost-light { background: transparent; border: 2px solid #4a3020; color: #9a7d63; }
.cw-btn-ghost-dark  { background: transparent; border: 2px solid #c9b89e; color: #6b5040; }

/* ══════════════════════════════════
   TEXTURE HELPERS — grain + torn paper
══════════════════════════════════ */
.cw-grain { position: relative; isolation: isolate; }
.cw-grain::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  opacity: 0.5;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='140'%20height='140'%3E%3Cfilter%20id='n'%3E%3CfeTurbulence%20type='fractalNoise'%20baseFrequency='0.85'%20numOctaves='2'%20stitchTiles='stitch'/%3E%3CfeColorMatrix%20type='matrix'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200.45%200'/%3E%3C/filter%3E%3Crect%20width='100%25'%20height='100%25'%20filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 140px 140px;
}
.cw-torn-top { position: relative; }
.cw-torn-top::before {
  content: '';
  position: absolute;
  top: -1px; left: 0; right: 0;
  height: 26px;
  z-index: 4;
  background-color: var(--cw-torn-color, #1a0f08);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='64'%20height='26'%20viewBox='0%200%2064%2026'%20preserveAspectRatio='none'%3E%3Cpolygon%20points='0,26%205,8%2011,19%2017,4%2023,16%2029,2%2035,14%2041,6%2047,21%2053,3%2059,17%2064,26'%20fill='%23000'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='64'%20height='26'%20viewBox='0%200%2064%2026'%20preserveAspectRatio='none'%3E%3Cpolygon%20points='0,26%205,8%2011,19%2017,4%2023,16%2029,2%2035,14%2041,6%2047,21%2053,3%2059,17%2064,26'%20fill='%23000'/%3E%3C/svg%3E");
  -webkit-mask-repeat: repeat-x;
  mask-repeat: repeat-x;
  -webkit-mask-size: 64px 26px;
  mask-size: 64px 26px;
  transform: translateY(-1px);
}
#cw-about.cw-torn-top     { --cw-torn-color: var(--cw-tan); }
#cw-music.cw-torn-top     { --cw-torn-color: var(--cw-offwhite); }
#cw-shows.cw-torn-top     { --cw-torn-color: var(--cw-dark); }
#cw-setlist.cw-torn-top   { --cw-torn-color: var(--cw-tan); }
#cw-community.cw-torn-top { --cw-torn-color: var(--cw-tan); }
#cw-contact.cw-torn-top   { --cw-torn-color: var(--cw-tan); }
#cw-footer.cw-torn-top    { --cw-torn-color: var(--cw-dark); }

/* ══════════════════════════════════
   HERO
══════════════════════════════════ */
#cw-hero {
  position: relative;
  background: #1a0f08;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-top: 3px solid #c4521e;
}

/* -- full-bleed photo layer -- */
.cw-hero-media { position: absolute; inset: 0; z-index: 1; }
.cw-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  filter: grayscale(1) contrast(1.2) brightness(0.85);
}
.cw-hero-media-fallback {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 32% 28%, #2e1c10, #1a0f08 68%);
}
/* duotone color wash, matches the accent color instead of Teddy Swims' blue */
.cw-hero-duotone {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(200deg, rgba(196,82,30,0.4), rgba(26,15,8,0.15) 45%, rgba(26,15,8,0.55));
  mix-blend-mode: color;
  pointer-events: none;
}
/* legibility scrim under the headline */
.cw-hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: linear-gradient(100deg, rgba(26,15,8,0.85) 0%, rgba(26,15,8,0.5) 26%, rgba(26,15,8,0.15) 44%, rgba(26,15,8,0) 60%);
  pointer-events: none;
}

.cw-hero-content {
  position: relative;
  z-index: 4;
  padding: 120px 48px 96px;
  max-width: 620px;
}
.cw-hero-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #c4521e;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.cw-hero-eyebrow::after {
  content: '';
  width: 40px; height: 1px;
  background: #c4521e;
  opacity: 0.5;
}
.cw-hero-title {
  font-family: 'Fraunces', 'Playfair Display', serif;
  font-size: 96px;
  font-weight: 900;
  font-style: normal;
  text-transform: uppercase;
  line-height: 0.86;
  letter-spacing: 0;
  color: #f5ede0;
  margin-bottom: 22px;
  text-shadow: 4px 4px 0 rgba(196, 82, 30, 0.35);
}
.cw-hero-sub {
  font-size: 16px;
  font-weight: 300;
  color: #d8c5b0;
  letter-spacing: 0.03em;
  line-height: 1.65;
  margin-bottom: 32px;
  max-width: 420px;
}
.cw-hero-buttons { display: flex; gap: 12px; flex-wrap: wrap; }
.cw-hero-placeholder-note {
  margin-top: 20px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6b5040;
}

/* -- floating join badge, corner of the hero photo -- */
.cw-hero-badge {
  position: absolute;
  right: 32px;
  bottom: 32px;
  z-index: 5;
  background: #ddd0bc;
  color: #1e130a;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 15px 24px;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.35);
  transition: transform 0.15s, background 0.2s, color 0.2s;
}
.cw-hero-badge:hover { transform: translateY(-2px); background: #c4521e; color: #f5ede0; }

.cw-hero-scratch {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 5px;
  background: repeating-linear-gradient(90deg, #c4521e 0, #c4521e 5px, transparent 5px, transparent 12px);
  opacity: 0.4;
  z-index: 3;
}

/* ══════════════════════════════════
   TICKER STRIP
══════════════════════════════════ */
#cw-strip {
  background: #d4c5b0;
  padding: 11px 40px;
  display: flex;
  gap: 36px;
  border-top: 1px solid #c9b89e;
  border-bottom: 1px solid #c9b89e;
  overflow: hidden;
}
#cw-strip span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #9a7d63;
  white-space: nowrap;
}
#cw-strip .cw-dot { color: #c4521e; }

/* ══════════════════════════════════
   ABOUT
══════════════════════════════════ */
#cw-about {
  background: #ddd0bc;
  padding: 72px 40px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 0;
  align-items: stretch;
}
.cw-about-left {
  padding-right: 48px;
  border-right: 1px solid #c9b89e;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.cw-about-right { padding-left: 48px; display: flex; flex-direction: column; justify-content: center; }
.cw-about-title {
  font-family: 'Fraunces', 'Playfair Display', serif;
  font-size: 52px;
  font-weight: 900;
  font-style: normal;
  text-transform: uppercase;
  line-height: 0.95;
  color: #1e130a;
  margin-bottom: 18px;
}
.cw-about-body {
  font-size: 16px;
  font-weight: 300;
  line-height: 1.8;
  color: #6b5040;
  margin-bottom: 24px;
}
.cw-about-photo-wrap { position: relative; }
.cw-about-photo-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(196, 82, 30, 0.22);
  mix-blend-mode: color;
  pointer-events: none;
}
.cw-about-photo {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  filter: grayscale(1) contrast(1.15);
  border: none;
  box-shadow: 8px 8px 0 rgba(26,15,8,0.15);
}
.cw-about-photo-placeholder {
  background: #c9b89e;
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  border: 1px solid #b8a48a;
  color: #b8a48a;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ══════════════════════════════════
   MUSIC
══════════════════════════════════ */
#cw-music {
  background: #f0e8dc;
  padding: 72px 40px;
}
#cw-music .cw-section-head h2 { color: #1e130a; }
.cw-track-list { display: flex; flex-direction: column; }
.cw-track {
  display: grid;
  grid-template-columns: 28px 1fr auto auto;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid #d8ccbc;
}
.cw-track:first-child { border-top: 1px solid #d8ccbc; }
.cw-track-num { font-family: 'Anton', sans-serif; font-size: 18px; color: #c9b89e; text-align: center; }
.cw-track-name { font-size: 19px; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; color: #3d2518; }
.cw-track-time { font-size: 13px; color: #b8a48a; }
.cw-track-play {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1px solid #c9b89e;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: #c4521e;
  font-size: 13px;
  transition: border-color 0.2s, background 0.2s;
}
.cw-track-play:hover { background: #c4521e; color: #f5ede0; border-color: #c4521e; }
.cw-track.featured .cw-track-num { color: #c4521e; }
.cw-track.featured .cw-track-name { color: #1e130a; font-weight: 600; }
.cw-music-links {
  margin-top: 24px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #b8a48a;
}
.cw-music-links a { color: #c4521e; transition: opacity 0.2s; }
.cw-music-links a:hover { opacity: 0.7; }

/* ══════════════════════════════════
   SHOWS
══════════════════════════════════ */
#cw-shows {
  background: #1a0f08;
  padding: 72px 40px;
}
#cw-shows .cw-section-head h2 { color: #f0e8dc; }
#cw-shows .cw-section-rule { background: #2e1e12; }
.cw-show-row {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid #2a1a0e;
}
.cw-show-row:last-child { border-bottom: none; }
.cw-shows-past-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #4a3020;
  margin: 36px 0 8px;
}
.cw-show-row-past { opacity: 0.55; }
.cw-date-day {
  font-family: 'Fraunces', 'Playfair Display', serif;
  font-size: 38px;
  font-weight: 800;
  color: #c4521e;
  line-height: 1;
  text-align: center;
}
.cw-date-mon {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #4a3020;
  margin-top: 2px;
  text-align: center;
}
.cw-show-venue {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #e8ddd0;
  text-transform: uppercase;
}
.cw-show-meta {
  font-size: 13px;
  color: #6b5040;
  margin-top: 3px;
  letter-spacing: 0.06em;
}
.cw-tickets {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 9px 20px;
  border-radius: 8px;
  border: 1px solid #3d2518;
  color: #9a7d63;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  display: inline-block;
}
.cw-tickets:hover { background: #c4521e; color: #f5ede0; border-color: #c4521e; }
.cw-tickets.sold-out { color: #3d2518; border-color: #2a1a0e; pointer-events: none; }

/* ══════════════════════════════════
   SET LIST
══════════════════════════════════ */
#cw-setlist {
  background: #ddd0bc;
  padding: 72px 40px;
}
.cw-setlist-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 48px;
}
.cw-setlist-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: baseline;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid #c9b89e;
}
.cw-setlist-num { font-family: 'Fraunces', 'Playfair Display', serif; font-weight: 700; font-size: 15px; color: #b8a48a; }
.cw-setlist-song { font-size: 17px; font-weight: 600; letter-spacing: 0.01em; color: #1e130a; }
.cw-setlist-artist { font-size: 13px; color: #7a5e48; font-style: italic; white-space: nowrap; }

/* ══════════════════════════════════
   COMMUNITY / NEWSLETTER
══════════════════════════════════ */
#cw-community {
  background: #ddd0bc;
  padding: 80px 40px;
  text-align: center;
  position: relative;
  border-top: 3px solid #c4521e;
}
.cw-community-sub {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #c4521e;
  margin-bottom: 8px;
}
.cw-community-title {
  font-family: 'Fraunces', 'Playfair Display', serif;
  font-size: 64px;
  font-weight: 900;
  font-style: normal;
  text-transform: uppercase;
  color: #1e130a;
  margin-bottom: 6px;
  line-height: 0.95;
}
.cw-community-body {
  font-size: 15px;
  color: #7a5e48;
  line-height: 1.75;
  max-width: 460px;
  margin: 16px auto 32px;
  font-weight: 300;
}
.cw-email-row {
  display: flex;
  max-width: 420px;
  margin: 0 auto;
}
.cw-email-row input[type="email"] {
  flex: 1;
  background: #f0e8dc;
  border: 1px solid #c9b89e;
  border-right: none;
  border-radius: 8px 0 0 8px;
  padding: 13px 16px;
  color: #3d2518;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 15px;
  letter-spacing: 0.06em;
  outline: none;
}
.cw-email-row input[type="email"]::placeholder { color: #b8a48a; }
.cw-email-row input[type="email"]:focus { border-color: #c4521e; }
.cw-email-row button {
  background: #c4521e;
  border: none;
  border-radius: 0 8px 8px 0;
  color: #f5ede0;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 13px 24px;
  cursor: pointer;
  transition: opacity 0.2s;
}
.cw-email-row button:hover { opacity: 0.85; }
.cw-email-fine {
  font-size: 11px;
  color: #b8a48a;
  margin-top: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.cw-success-msg { display: none; color: #6b5040; font-size: 14px; letter-spacing: 0.1em; margin-top: 16px; }

/* ══════════════════════════════════
   CONTACT
══════════════════════════════════ */
#cw-contact {
  background: #ddd0bc;
  padding: 80px 40px;
  text-align: center;
  position: relative;
  border-top: 3px solid #c4521e;
}
.cw-contact-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #c4521e;
  margin-bottom: 8px;
}
.cw-contact-title {
  font-family: 'Fraunces', 'Playfair Display', serif;
  font-size: 64px;
  font-weight: 900;
  font-style: normal;
  text-transform: uppercase;
  color: #1e130a;
  margin-bottom: 6px;
  line-height: 0.95;
}
.cw-contact-body {
  font-size: 15px;
  color: #7a5e48;
  line-height: 1.75;
  max-width: 460px;
  margin: 16px auto 0;
  font-weight: 300;
}
.cw-contact-actions { margin-top: 32px; }
.cw-contact-socials {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 28px;
}
.cw-contact-socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid #c9b89e;
  color: #6b5040;
  font-size: 18px;
  transition: color 0.2s, border-color 0.2s, transform 0.15s;
}
.cw-contact-socials a:hover { border-color: #c4521e; transform: translateY(-2px); }
.cw-contact-note { color: #9a7d63; font-size: 13px; margin-top: 24px; font-style: italic; }

/* ══════════════════════════════════
   FOOTER
══════════════════════════════════ */
#cw-footer {
  background: #1a0f08;
  border-top: 1px solid #2a1a0e;
  padding: 28px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.cw-footer-left { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.cw-footer-name {
  font-family: 'Fraunces', 'Playfair Display', serif;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #f5ede0;
}
.cw-footer-socials { display: flex; gap: 20px; align-items: center; }
.cw-footer-socials a {
  color: #d8c5b0;
  font-size: 18px;
  transition: color 0.2s;
}
.cw-footer-socials a:hover { color: #c4521e; }
.cw-footer-copy {
  font-size: 11px;
  color: #d8c5b0;
  letter-spacing: 0.1em;
}
.cw-footer-copy a { color: #c4521e; }

/* ══════════════════════════════════
   RESPONSIVE
══════════════════════════════════ */
@media (max-width: 900px) {
  #cw-hero { min-height: 640px; }
  .cw-hero-content { width: 100%; padding: 96px 24px 120px; max-width: none; }
  .cw-hero-title { font-size: 52px; }
  .cw-hero-badge { left: 24px; right: 24px; bottom: 24px; text-align: center; }
  .cw-section-head h2 { font-size: 44px; }

  #cw-about { grid-template-columns: 1fr; gap: 40px; padding: 48px 24px; }
  .cw-about-left { padding-right: 0; border-right: none; border-bottom: 1px solid #c9b89e; padding-bottom: 40px; }
  .cw-about-right { padding-left: 0; }

  .cw-show-row { grid-template-columns: 50px 1fr; }
  .cw-show-row .cw-tickets { display: none; }

  #cw-setlist { padding: 48px 24px; }
  .cw-setlist-grid { grid-template-columns: 1fr; }

  #cw-community { padding: 56px 24px; }
  .cw-community-title { font-size: 38px; }
  .cw-email-row { flex-direction: column; }
  .cw-email-row input[type="email"] { border-right: 1px solid #c9b89e; border-bottom: none; border-radius: 8px 8px 0 0; }
  .cw-email-row button { border-radius: 0 0 8px 8px; }

  #cw-footer { flex-direction: column; align-items: flex-start; padding: 24px; }

  #cw-music, #cw-shows { padding: 48px 24px; }
  #cw-strip { padding: 11px 24px; }

  #cw-contact { padding: 56px 24px; }
  .cw-contact-title { font-size: 38px; }
}

@media (max-width: 480px) {
  .cw-hero-title { font-size: 40px; }
  .cw-hero-buttons { flex-direction: column; }
  .cw-hero-buttons .cw-btn { text-align: center; }
  .cw-about-title { font-size: 36px; }
  .cw-community-title { font-size: 36px; }
  .cw-contact-title { font-size: 36px; }
  .cw-section-head h2 { font-size: 34px; }
}

/* ── Currently playing track highlight ── */
.cw-track.cw-track-playing {
  background: rgba(196, 82, 30, 0.06);
  border-radius: 4px;
  padding-left: 8px;
  padding-right: 8px;
  margin-left: -8px;
  margin-right: -8px;
}
.cw-track.cw-track-playing .cw-track-num { color: #c4521e; }
.cw-track.cw-track-playing .cw-track-name { color: #1e130a; font-weight: 600; }
.cw-track.cw-track-playing .cw-track-play {
  background: #c4521e;
  color: #f5ede0;
  border-color: #c4521e;
}
