/* =========================================================
   NICKCASEY — static site styles
   ========================================================= */

:root {
  --bg: #f0f0f0;
  --fg: #111;
  --muted: #666;
  --border: #ddd;
  --accent: #111;
  --header-h: 72px;
  --max-w: 1200px;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--fg); text-decoration: none; }
a:hover { text-decoration: underline; }

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 300;
  letter-spacing: 0.02em;
  margin: 0 0 0.5em;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.4rem; }

.wrap {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* -------- Header / Nav ---------------------------------- */

.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.5rem;
  letter-spacing: 0.15em;
  text-decoration: none;
}

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.75rem;
  align-items: center;
}

.main-nav a,
.main-nav .dropdown-toggle {
  color: var(--fg);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
}

.main-nav a.active { text-decoration: underline; text-underline-offset: 4px; }

/* Dropdown */
.has-dropdown { position: relative; }
.main-nav ul.dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg);
  border: 1px solid var(--border);
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
  min-width: 220px;
  display: none;
  flex-direction: column;
  gap: 0;
}
.main-nav ul.dropdown li { padding: 0; }
.main-nav ul.dropdown a {
  display: block;
  padding: 0.5rem 1.25rem;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.9rem;
  white-space: nowrap;
}
.main-nav ul.dropdown a:hover { background: rgba(0,0,0,0.05); text-decoration: none; }

/* Desktop-only hover/focus-within opens the dropdown.
   On mobile, JS controls it via .open on the parent <li>. */
@media (min-width: 769px) {
  .has-dropdown:hover ul.dropdown,
  .has-dropdown:focus-within ul.dropdown {
    display: flex;
  }
}

/* Hamburger */
.hamburger {
  display: none;
  background: none;
  border: 0;
  padding: 0.5rem;
  cursor: pointer;
  flex-direction: column;
  gap: 4px;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--fg);
  transition: transform 0.2s;
}

/* Mobile ------------------------------------------------- */

@media (max-width: 768px) {
  .hamburger { display: flex; }
  .main-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    display: none;
  }
  .main-nav.open { display: block; }
  .main-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 0;
  }
  .main-nav li { border-top: 1px solid var(--border); }
  .main-nav li:first-child { border-top: 0; }
  .main-nav a,
  .main-nav .dropdown-toggle {
    display: block;
    padding: 1rem 1.5rem;
    width: 100%;
    text-align: left;
  }
  .has-dropdown .dropdown-toggle::after {
    content: '▾';
    float: right;
    transition: transform 0.2s;
  }
  .has-dropdown.open .dropdown-toggle::after {
    transform: rotate(180deg);
  }
  /* Mobile accordion */
  .main-nav ul.dropdown {
    position: static;
    transform: none;
    border: 0;
    background: rgba(0,0,0,0.03);
    padding: 0;
    min-width: 0;
    display: none;
  }
  .has-dropdown.open ul.dropdown { display: flex; flex-direction: column; }
  .main-nav ul.dropdown a { padding-left: 2.5rem; }
}

/* -------- Home ------------------------------------------ */

.home-hero {
  max-width: 720px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}
.home-hero .hero-image {
  width: 100%;
  height: auto;
}

/* -------- Album pages ----------------------------------- */

.album-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}
.album-header {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
  align-items: start;
}
@media (max-width: 640px) {
  .album-header { grid-template-columns: 1fr; }
}
.album-cover img {
  width: 100%;
  height: auto;
  display: block;
}
.album-info h1 { margin-bottom: 0.75rem; }
.album-description { color: var(--muted); }
.album-description a { color: var(--muted); text-decoration: underline; }

.tracklist {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--border);
}
.tracklist .track {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border);
}
.track-info {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.track-number {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  min-width: 1.5em;
}
.track-title { flex: 1; font-weight: 500; }
.track-duration {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-size: 0.9rem;
}
.track audio {
  width: 100%;
  height: 34px;
}

/* -------- Photos ---------------------------------------- */

.photo-gallery {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.photo {
  margin: 0;
  background: #fff;
}
.photo img { width: 100%; height: auto; }
.photo figcaption {
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  color: var(--muted);
}

/* -------- Video ----------------------------------------- */

.video-gallery {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: grid;
  gap: 1.5rem;
}
.video-frame {
  position: relative;
  padding-top: 56.25%;
  background: #000;
}
.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* -------- Content pages (songs list, lyrics, etc) ------- */

.content-image {
  max-width: 100%;
  margin: 1rem auto;
}

/* Squarespace pages had all lyric lines wrapped in <h3>, so normalize them
   inside .wrap so lyrics/text pages read as normal-size copy. */
.wrap h3 {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  margin: 0.5rem 0;
}
.wrap h1 { margin-bottom: 1.5rem; }
.wrap p { margin: 0.5rem 0; }
.wrap p[style*="white-space"] { font-size: 1rem; }
.wrap a { text-decoration: underline; text-underline-offset: 3px; }

.live-page { text-align: center; padding-top: 3rem; }
.live-page .live-secondary { color: var(--muted); font-size: 0.9rem; margin-top: 1.5rem; }

/* -------- Footer ---------------------------------------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 4rem;
}
.socials {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--fg);
  border-radius: 50%;
  font-size: 0;
  color: var(--fg);
  background-color: transparent;
  transition: background-color 0.15s, color 0.15s;
}
.social:hover { background-color: var(--fg); color: var(--bg); }

/* Icon glyphs — SVGs live in images/icons/ and use currentColor.
   We use CSS mask so the icon color follows the .social color property,
   giving us the black-on-transparent → transparent-on-black hover flip. */
.social::before {
  content: '';
  width: 24px;
  height: 24px;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}
.social-spotify::before     { -webkit-mask-image: url('../images/icons/spotify.svg');     mask-image: url('../images/icons/spotify.svg'); }
.social-apple::before       { -webkit-mask-image: url('../images/icons/apple.svg');       mask-image: url('../images/icons/apple.svg'); }
.social-instagram::before   { -webkit-mask-image: url('../images/icons/instagram.svg');   mask-image: url('../images/icons/instagram.svg'); }
.social-facebook::before    { -webkit-mask-image: url('../images/icons/facebook.svg');    mask-image: url('../images/icons/facebook.svg'); }
.social-youtube::before     { -webkit-mask-image: url('../images/icons/youtube.svg');     mask-image: url('../images/icons/youtube.svg'); }
.social-bandsintown::before { -webkit-mask-image: url('../images/icons/bandsintown.svg'); mask-image: url('../images/icons/bandsintown.svg'); }

/* Email stays as text @ per your preference */
.social-email::before {
  content: '@';
  width: auto;
  height: auto;
  background: none;
  font-size: 18px;
  font-weight: 500;
}

.newsletter {
  margin: 1rem 0;
}
.newsletter a {
  display: inline-block;
  padding: 0.6rem 1.25rem;
  border: 1px solid var(--fg);
  color: var(--fg);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.newsletter a:hover { background: var(--fg); color: var(--bg); text-decoration: none; }

.copyright {
  margin-top: 1rem;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}
