/* ==========================================================================
   Five Minutes on the Low Road — main.css
   Design language derived from Luke O'Leary's illustrations (see source/design-guide.md).
   Mobile-first, plain CSS, no framework.
   Register: literary, ethereal, intellectually serious — chapbook meets memoir.
   ========================================================================== */

:root {
  /* ----- Color system (from Luke's paintings) ----------------------------- */
  --bg:        #F5F2EE;   /* warm near-white, paper-like */
  --ink:       #1C2340;   /* deep blue-black body text */
  --primary:   #4b46b3;   /* indigo — links, CTAs, active states */
  --glow:      #D4AA60;   /* warm gold — show title, hover, dividers */
  --lavender:  #9B88BC;   /* violet midtone — illustrative accent, not UI */
  --copper:    #C47860;   /* warm earth — detail accent, sparing */
  --white:     #FFFFFF;

  --ink-70:    rgba(28, 35, 64, 0.7);
  --ink-45:    rgba(28, 35, 64, 0.45);
  --rule:      #e5ddd0;   /* hairline on paper */

  /* ----- Type ------------------------------------------------------------- */
  --font-title:   'Cinzel', 'Trajan Pro', serif;
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'EB Garamond', Georgia, 'Times New Roman', serif;
  --font-sans:    'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;

  --measure:   42.5rem;    /* ~680px comfortable reading width */
  --tap:       44px;       /* minimum touch target */
}

/* ----- Reset-ish ---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;                 /* mobile base */
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  transition: color 0.15s ease;
}
a:hover, a:focus { color: var(--glow); }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ----- Typography hierarchy ---------------------------------------------- */

/* Show title — used ONLY for "Five Minutes on the Low Road" */
.show-title {
  font-family: var(--font-title);
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--glow);
  line-height: 1.25;
  margin: 0;
}

/* Display headings */
h1, h2, .display {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 0.4em;
}
h1 { font-size: 2.4rem; font-weight: 300; }
h2 { font-size: 1.9rem; font-weight: 300; font-style: italic; }
.display { font-weight: 300; }

/* Small headings + body share EB Garamond */
h3, h4 {
  font-family: var(--font-body);
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 0.4em;
}
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }

p { margin: 0 0 1.1em; }

/* Navigation / labels / captions */
.label, .caption {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  color: var(--ink-70);
}

/* Team headshots */
.team-photo {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 1rem 0 1.25rem;
  box-shadow: 0 2px 14px rgba(28, 35, 64, 0.18);
}

/* Pull quote / emphasis block */
.pullquote {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: 1.5rem;
  line-height: 1.35;
  color: var(--primary);
  border: 0;
  margin: 2rem 0;
  padding: 0;
}

/* Drop-lead: first-paragraph lead-in */
.lead { font-size: 1.2rem; color: var(--ink); }

/* ----- Layout scaffold ---------------------------------------------------- */
.site-main { min-height: 60vh; }

.page, .listen-content {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 3rem;
}
.listen-content { max-width: 46rem; }

.page-header { margin-bottom: 1.75rem; }
.page-title { font-size: 2.1rem; }
.page-subtitle {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--ink-70);
  margin-top: -0.2em;
}

.section { margin: 2.5rem 0; }
.section-heading {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: 1.6rem;
  color: var(--ink);
}

/* ----- Header / navigation (deep-indigo masthead, gold wordmark) --------- */
.site-header {
  background: var(--ink);
  border-bottom: 2px solid var(--glow);
}
.site-nav {
  max-width: 64rem;
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.site-title {
  font-family: var(--font-title);
  font-size: 0.98rem;
  font-weight: 400;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--glow);
  text-decoration: none;
  max-width: 74%;
  line-height: 1.3;
}
.site-title:hover, .site-title:focus { color: var(--white); }

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: var(--tap);
  height: var(--tap);
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.nav-toggle-bar {
  display: block;
  width: 24px;
  height: 2px;
  margin: 0 auto;
  background: var(--bg);
}

.site-nav-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  display: none;                    /* hidden on mobile until toggled */
}
.site-nav-menu.is-open { display: block; }
.site-nav-menu li { border-top: 1px solid rgba(245,242,238,0.12); }
.site-nav-menu a {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--bg);
  padding: 0.85rem 0.25rem;
  min-height: var(--tap);
}
.site-nav-menu a:hover, .site-nav-menu a:focus { color: var(--glow); }

/* ----- Hero (full-bleed illustration) ------------------------------------ */
.hero {
  /* Hero image: tanya-light-square.png from Luke O'Leary */
  background-color: #D0D8E8;        /* fallback until image loads */
  background-image:
    radial-gradient(115% 78% at 100% 100%,
      rgba(28,35,64,0.72) 0%,
      rgba(28,35,64,0.3) 30%,
      rgba(28,35,64,0) 56%),
    linear-gradient(to bottom,
      rgba(28,35,64,0.85) 0%,
      rgba(28,35,64,0.45) 20%,
      rgba(28,35,64,0) 40%,
      rgba(28,35,64,0) 54%,
      rgba(28,35,64,0.6) 80%,
      rgba(28,35,64,0.93) 100%),
    url('/assets/images/hero.jpg');
  background-size: cover, cover, cover;
  background-position: center, center, center 42%;
  min-height: 78vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 3rem 1.5rem 2.5rem;
}
.hero-top,
.hero-bottom { max-width: 40rem; margin: 0 auto; width: 100%; min-width: 0; }
.hero-title {
  font-size: clamp(1.4rem, 5.6vw, 3.2rem);
  letter-spacing: 0.08em;
  line-height: 1.22;
  text-shadow: 0 2px 20px rgba(0,0,0,0.6), 0 1px 3px rgba(0,0,0,0.7);
  overflow-wrap: break-word;
}
.hero-subtitle {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: 1.4rem;
  color: var(--white);
  margin: 0.6rem 0 0.3rem;
  text-shadow: 0 1px 12px rgba(0,0,0,0.4);
}
.hero-credit {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.9);
  margin: 0;
  text-shadow: 0 1px 8px rgba(0,0,0,0.45);
}

/* ----- Buttons / CTAs ----------------------------------------------------- */
.cta-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1.75rem 0;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: 0.7rem 1.5rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 2px;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-primary {
  background: var(--primary);
  color: var(--white);
  border: 1.5px solid var(--primary);
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--glow); border-color: var(--glow); color: var(--ink);
}
.btn-secondary {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-secondary:hover, .btn-secondary:focus {
  border-color: var(--glow); color: var(--glow); background: transparent;
}
/* On the hero's dark scrim: secondary buttons stay readable but sit a clear
   step below the filled "Listen" primary — a light frosted ghost treatment. */
.hero .btn-secondary {
  background: rgba(255,255,255,0.1);
  color: var(--white);
  border-color: rgba(255,255,255,0.5);
}
.hero .btn-secondary:hover, .hero .btn-secondary:focus {
  background: rgba(255,255,255,0.18);
  color: var(--glow);
  border-color: var(--glow);
}

/* ----- Content blocks ----------------------------------------------------- */
.logline {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 300;
  font-style: italic;
  line-height: 1.4;
  text-align: center;
  color: var(--ink);
  margin: 1.75rem auto;
  max-width: var(--measure);
}

/* ----- Dividers ----------------------------------------------------------- */
hr, .divider {
  border: none;
  border-top: 1px solid var(--glow);
  opacity: 0.4;
  margin: 3rem 0;
}
.section-divider { text-align: center; margin: 3rem 0; line-height: 0; }
.section-divider svg { display: inline-block; }

/* ----- Video embeds (YouTube, click-to-load facade) ----------------------- */
.yt-embed {
  position: relative;
  aspect-ratio: 16 / 9;
  margin: 1rem 0 0;
  border-radius: 3px;
  overflow: hidden;
  background: var(--ink);
}
.yt-facade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  display: block;
  cursor: pointer;
  background: var(--ink);
}
.yt-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.2s ease;
}
.yt-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 68px;
  height: 48px;
  border-radius: 12px;
  background: rgba(28, 35, 64, 0.8);
  border: 2px solid rgba(255, 255, 255, 0.9);
  transition: background 0.15s ease, border-color 0.15s ease;
}
.yt-play::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 53%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 9px 0 9px 15px;
  border-color: transparent transparent transparent #fff;
}
.yt-facade:hover .yt-thumb,
.yt-facade:focus-visible .yt-thumb { opacity: 0.85; }
.yt-facade:hover .yt-play,
.yt-facade:focus-visible .yt-play { background: var(--glow); border-color: var(--glow); }
.yt-iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.song-card-comingsoon {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--ink-45);
  margin: 0.75rem 0 0;
}

/* ----- Song cards --------------------------------------------------------- */
.song-card {
  border: 1px solid var(--rule);
  border-left: 3px solid var(--glow);
  border-radius: 3px;
  background: #fffdf9;
  padding: 1.25rem 1.4rem;
  margin: 1.1rem 0;
}
.song-card-title { font-size: 1.25rem; margin-bottom: 0.2rem; color: var(--primary); }
.song-card-description { margin-top: 0; color: var(--ink-70); font-style: italic; }

/* ----- Gallery ------------------------------------------------------------ */
.gallery-intro {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-style: italic;
  letter-spacing: 0.04em;
  color: var(--lavender);
  text-align: center;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}
.gallery-item { margin: 0; }
.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid rgba(212, 170, 96, 0.35);   /* faint gold border */
  background: var(--white);
}
.gallery-caption {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--lavender);
  margin-top: 0.5rem;
  font-style: italic;
}
.gallery-attribution {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  color: var(--ink-45);
  text-align: center;
  font-style: italic;
  margin-top: 2rem;
}

/* Duotone treatment for the B&W ink pieces (indigo wash) */
.duotone {
  position: relative;
  background: var(--primary);
  overflow: hidden;
}
.duotone img {
  mix-blend-mode: luminosity;
  opacity: 0.92;
}

/* Inline illustration accent within prose */
.illus {
  margin: 2rem 0;
  border: 1px solid rgba(212,170,96,0.3);
}
.illus-caption {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  color: var(--lavender);
  font-style: italic;
  margin-top: 0.4rem;
  text-align: center;
}

/* ----- Research page: stat list ------------------------------------------ */
.stat-list {
  list-style: none;
  margin: 1.5rem 0;
  padding: 0;
}
.stat-list li {
  padding: 0.6rem 0 0.6rem 1.5rem;
  border-bottom: 1px solid var(--rule);
  position: relative;
}
.stat-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 1.1rem;
  width: 8px; height: 8px;
  background: var(--glow);
  border-radius: 50%;
}

/* ----- Forms (subscribe / contact) --------------------------------------- */
.kit-form, .contact-form, .signup-fallback {
  max-width: 30rem;
  margin: 1.75rem auto;
}
.signup-fallback {
  background: var(--white);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--glow);
  border-radius: 3px;
  padding: 1.5rem;
  text-align: center;
}
.form-field { margin-bottom: 1rem; }
.form-field label {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  margin-bottom: 0.3rem;
  color: var(--ink-70);
}
.form-field input,
.form-field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid #c9c2b4;
  border-radius: 2px;
  background: var(--white);
  color: var(--ink);
}
.form-field input:focus,
.form-field textarea:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
.form-field textarea { min-height: 8rem; resize: vertical; }
.form-promise {
  text-align: center;
  font-size: 0.95rem;
  color: var(--ink-45);
  font-style: italic;
}

/* ----- Footer ------------------------------------------------------------- */
.site-footer {
  background: var(--ink);
  color: var(--bg);
  margin-top: 3.5rem;
  padding: 2.5rem 1.25rem;
  font-size: 0.95rem;
}
.footer-inner { max-width: 64rem; margin: 0 auto; }
.footer-signup { margin-bottom: 1.5rem; }
.footer-signup-label {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--glow);
  margin: 0 0 0.4rem;
}
.footer-signup a, .footer-nav a, .footer-meta a { color: var(--bg); }
.footer-signup a:hover, .footer-nav a:hover, .footer-meta a:hover { color: var(--glow); }

.footer-nav {
  list-style: none;
  margin: 1.25rem 0;
  padding: 1.25rem 0;
  border-top: 1px solid rgba(245,242,238,0.15);
  border-bottom: 1px solid rgba(245,242,238,0.15);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
}
.footer-nav a {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
}
.footer-meta p { margin: 0.2rem 0; color: rgba(245,242,238,0.7); }

/* ==========================================================================
   Desktop / larger screens
   ========================================================================== */
@media (min-width: 40em) {
  body { font-size: 18px; }         /* 18px / 1.75 on desktop */

  h1 { font-size: 3rem; }
  h2 { font-size: 2.2rem; }
  .page-title { font-size: 2.6rem; }
  .hero-subtitle { font-size: 1.7rem; }
  .hero { min-height: 82vh; padding: 4rem 2rem 3rem; }

  /* Nav becomes a horizontal bar; hide the toggle */
  .nav-toggle { display: none; }
  .site-nav-menu {
    display: flex;
    width: auto;
    gap: 1.6rem;
  }
  .site-nav-menu li { border-top: 0; }
  .site-nav-menu a { padding: 0.25rem 0; }

  .cta-row { flex-direction: row; justify-content: center; flex-wrap: wrap; }
  .hero .cta-row { justify-content: flex-end; }
  /* Nudge the title + subtitle block up ~0.4in on the hero. */
  .hero-top { transform: translateY(-0.4in); }
  /* Right-justify the lower hero block and shift it right ~2in, clamped so it
     never overflows or comes within 2rem of the right edge on smaller desktops. */
  .hero-bottom {
    text-align: right;
    transform: translateX(max(0px, min(2in, calc(50vw - 22rem))));
  }
  .btn { min-width: 11rem; }
}
