/* ==========================================================================
   Justin Jones - justinjmusic.com
   Warm acoustic / bluegrass roots aesthetic. Self-contained, no framework.
   ========================================================================== */

:root {
  /* Palette - warm woods, amber, cream */
  --ink:        #1a120b;   /* near-black brown */
  --ink-2:      #241a10;
  --cream:      #f6efe3;   /* paper / cream */
  --cream-2:    #ece0cc;
  --amber:      #c8862b;   /* guitar amber / brass */
  --amber-2:    #e0a545;
  --rust:       #9a4a26;   /* warm accent */
  --muted:      #8a7a66;
  --line:       rgba(26, 18, 11, 0.12);

  --maxw: 1140px;
  --radius: 14px;
  --radius-sm: 8px;

  --shadow-sm: 0 2px 8px rgba(26, 18, 11, 0.10);
  --shadow-md: 0 12px 32px rgba(26, 18, 11, 0.16);
  --shadow-lg: 0 24px 60px rgba(26, 18, 11, 0.28);

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ------------------------------ Reset ----------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font: inherit; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 900; line-height: 1.05; letter-spacing: -0.02em; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }

.skip-link {
  position: absolute; left: 12px; top: -60px;
  background: var(--ink); color: var(--cream);
  padding: 10px 16px; border-radius: var(--radius-sm); z-index: 200;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 3px solid var(--amber-2); outline-offset: 3px; border-radius: 4px; }

/* ------------------------------ Buttons --------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5em; padding: 14px 30px; border-radius: 100px;
  font-weight: 600; letter-spacing: .01em; font-size: .98rem;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease), color .2s var(--ease);
  will-change: transform;
}
.btn-primary {
  background: linear-gradient(135deg, var(--amber-2), var(--amber));
  color: var(--ink);
  box-shadow: 0 8px 22px rgba(200, 134, 43, 0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(200, 134, 43, 0.45); }
.btn-ghost {
  border: 1.5px solid rgba(246, 239, 227, 0.6);
  color: var(--cream);
}
.btn-ghost:hover { background: rgba(246, 239, 227, 0.12); transform: translateY(-2px); }

/* ------------------------------ Header ---------------------------------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  padding: 18px 0;
  transition: background .3s var(--ease), padding .3s var(--ease), box-shadow .3s var(--ease);
}
.site-header.scrolled {
  background: rgba(26, 18, 11, 0.92);
  backdrop-filter: blur(10px);
  padding: 10px 0;
  box-shadow: var(--shadow-sm);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; }

.brand { display: flex; align-items: center; gap: 12px; color: var(--cream); }
.brand-mark {
  display: grid; place-items: center;
  width: 42px; height: 42px; border-radius: 12px;
  background: linear-gradient(135deg, var(--amber-2), var(--rust));
  color: var(--ink); font-family: var(--font-display); font-weight: 900; font-size: 1.1rem;
  box-shadow: var(--shadow-sm);
}
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; color: var(--cream); }

.nav-menu { list-style: none; display: flex; align-items: center; gap: 8px; padding: 0; }
.nav-menu a {
  color: var(--cream); padding: 10px 16px; border-radius: 100px;
  font-weight: 500; font-size: .96rem; transition: background .2s var(--ease), color .2s var(--ease);
}
.nav-menu a:hover { background: rgba(246, 239, 227, 0.14); }
.nav-cta {
  background: linear-gradient(135deg, var(--amber-2), var(--amber)) !important;
  color: var(--ink) !important; font-weight: 600;
}
.nav-cta:hover { transform: translateY(-1px); }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px; padding: 8px; z-index: 120;
}
.nav-toggle span {
  width: 26px; height: 2px; background: var(--cream); border-radius: 2px;
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}

/* ------------------------------ Hero ------------------------------------ */
.hero {
  position: relative; min-height: 100svh;
  display: flex; align-items: center;
  color: var(--cream); overflow: hidden;
}
/* Spotlight focus controls: move/resize the sharp area over the subject.
   --focus-x / --focus-y = center of the sharp region.
   --focus-size / --focus-feather = how big the sharp area is and how soft
   its edge fades into the blurred background. */
.hero {
  --focus-x: 38%;
  --focus-y: 42%;
  --focus-size: 34%;
  --focus-feather: 75%;
  --hero-blur: 2.5px;
}

/* SHARP layer: the .hero-bg element shows the image (from its inline
   background-image) at full sharpness, but a radial mask reveals it only in
   the focus region. Outside that region it is transparent, exposing the
   blurred ::before layer beneath. The element carries NO blur filter. */
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center 30%;
  transform: scale(1.05);
  animation: kenburns 18s ease-out infinite alternate;
  -webkit-mask-image: radial-gradient(
    ellipse var(--focus-size) calc(var(--focus-size) * 1.5) at var(--focus-x) var(--focus-y),
    #000 0%, #000 var(--focus-feather), transparent 100%);
  mask-image: radial-gradient(
    ellipse var(--focus-size) calc(var(--focus-size) * 1.5) at var(--focus-x) var(--focus-y),
    #000 0%, #000 var(--focus-feather), transparent 100%);
}
/* BLURRED base layer behind the sharp one: inherits the same image and blurs
   it. Sits underneath via negative z-index. */
.hero-bg::before {
  content: "";
  position: absolute; inset: 0;
  z-index: -1;
  background-image: inherit;
  background-size: cover; background-position: center 30%;
  filter: blur(var(--hero-blur));
  transform: scale(1.08);
}
@keyframes kenburns {
  from { transform: scale(1.05); }
  to   { transform: scale(1.18) translateY(-1.5%); }
}
.hero-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(26,18,11,0.55) 0%, rgba(26,18,11,0.35) 40%, rgba(26,18,11,0.85) 100%),
    radial-gradient(120% 80% at 70% 20%, rgba(200,134,43,0.18), transparent 60%);
}
.hero-content { position: relative; z-index: 2; padding-block: 120px; }
.hero-eyebrow {
  text-transform: uppercase; letter-spacing: .28em; font-size: .8rem; font-weight: 600;
  color: var(--amber-2); margin-bottom: 18px;
}
.hero-title { font-size: clamp(3.2rem, 12vw, 8rem); line-height: .92; margin-bottom: 14px; }
.hero-subtitle { font-size: clamp(1.05rem, 3vw, 1.5rem); color: var(--cream-2); font-weight: 400; margin-bottom: 36px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.scroll-cue {
  position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%);
  width: 26px; height: 42px; border: 2px solid rgba(246,239,227,0.5); border-radius: 100px;
  z-index: 2;
}
.scroll-cue span {
  position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; border-radius: 4px;
  background: var(--cream); transform: translateX(-50%);
  animation: scrollcue 1.8s var(--ease) infinite;
}
@keyframes scrollcue {
  0% { opacity: 0; transform: translate(-50%, 0); }
  40% { opacity: 1; }
  80%, 100% { opacity: 0; transform: translate(-50%, 14px); }
}

/* ------------------------------ Sections -------------------------------- */
.section { padding-block: clamp(64px, 10vw, 130px); position: relative; }
.eyebrow {
  text-transform: uppercase; letter-spacing: .24em; font-size: .78rem; font-weight: 700;
  color: var(--rust); margin-bottom: 14px;
}
.eyebrow.light { color: var(--amber-2); }
.section-title { font-size: clamp(2rem, 5vw, 3.4rem); margin-bottom: 18px; }
.section-title.light { color: var(--cream); }
.lead { font-size: 1.2rem; margin-bottom: 16px; }
.section-head.center { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.section-intro { color: var(--muted); font-size: 1.1rem; }
.section-intro.light { color: var(--cream-2); }

/* ------------------------------ About ----------------------------------- */
.about { background:
  linear-gradient(180deg, var(--cream) 0%, var(--cream-2) 100%); }
.about-grid {
  display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(32px, 6vw, 72px);
  align-items: center;
}
.about-media img {
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  aspect-ratio: 4/5; object-fit: cover; width: 100%;
}
.pill-list { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin-top: 26px; }
.pill-list li {
  background: rgba(154, 74, 38, 0.1); color: var(--rust);
  border: 1px solid rgba(154, 74, 38, 0.2);
  padding: 8px 18px; border-radius: 100px; font-weight: 600; font-size: .9rem;
}

/* ------------------------------ Music ----------------------------------- */
.music { background: var(--ink); color: var(--cream); }
.music .section-title { color: var(--cream); }
.music .eyebrow { color: var(--amber-2); }
.music .section-intro { color: var(--cream-2); }

.music-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 48px;
}
.music-card {
  background: linear-gradient(180deg, rgba(246,239,227,0.06), rgba(246,239,227,0.02));
  border: 1px solid rgba(246,239,227,0.12);
  padding: 34px 28px; border-radius: var(--radius);
  transition: transform .3s var(--ease), border-color .3s var(--ease), background .3s var(--ease);
}
.music-card:hover {
  transform: translateY(-6px);
  border-color: rgba(224,165,69,0.5);
  background: linear-gradient(180deg, rgba(246,239,227,0.1), rgba(246,239,227,0.03));
}
.music-icon {
  font-size: 1.9rem; color: var(--amber-2); margin-bottom: 14px; line-height: 1;
}
.music-card h3 { font-size: 1.4rem; margin-bottom: 10px; color: var(--cream); }
.music-card p { color: var(--cream-2); margin-bottom: 18px; }
.link-arrow { color: var(--amber-2); font-weight: 600; transition: gap .2s var(--ease); }
.link-arrow:hover { text-decoration: underline; }

.music-embed { max-width: 860px; margin: 0 auto; }
.embed-placeholder {
  border: 2px dashed rgba(246,239,227,0.25); border-radius: var(--radius);
  padding: 40px 28px; text-align: center; color: var(--cream-2);
}
.embed-placeholder code {
  background: rgba(246,239,227,0.12); padding: 2px 7px; border-radius: 5px; font-size: .9em;
}

/* ------------------------------ Gallery --------------------------------- */
.performances { background: var(--cream); }
.gallery {
  list-style: none; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 200px; gap: 16px;
}
.gallery-item {
  overflow: hidden; border-radius: var(--radius-sm); cursor: pointer;
  box-shadow: var(--shadow-sm); position: relative; background: var(--cream-2);
}
.gallery-item.wide { grid-column: span 2; }
.gallery-item.tall { grid-row: span 2; }
.gallery-item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s var(--ease), filter .3s var(--ease);
}
.gallery-item::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(26,18,11,0.35));
  opacity: 0; transition: opacity .3s var(--ease);
}
.gallery-item:hover img { transform: scale(1.08); }
.gallery-item:hover::after { opacity: 1; }

/* ------------------------------ Booking --------------------------------- */
.booking { position: relative; color: var(--cream); overflow: hidden; }
.booking-bg {
  position: absolute; inset: 0; background-size: cover; background-position: center;
}
.booking-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(26,18,11,0.9), rgba(26,18,11,0.82));
}
.booking-inner { position: relative; z-index: 2; }
.booking-form {
  max-width: 720px; margin: 0 auto;
  background: rgba(246,239,227,0.06); border: 1px solid rgba(246,239,227,0.14);
  padding: clamp(24px, 4vw, 40px); border-radius: var(--radius);
  backdrop-filter: blur(6px);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: block; margin-bottom: 18px; }
.field > span {
  display: block; font-size: .82rem; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; color: var(--cream-2); margin-bottom: 8px;
}
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 16px; border-radius: var(--radius-sm);
  background: rgba(246,239,227,0.95); color: var(--ink);
  border: 1.5px solid transparent; transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--amber-2); box-shadow: 0 0 0 3px rgba(224,165,69,0.3);
}
.booking-form .btn { width: 100%; margin-top: 6px; }
.booking-form .btn[disabled] { opacity: .7; cursor: default; }

/* Honeypot: keep it in the DOM but far off-screen and out of the tab order. */
.hp-field {
  position: absolute; left: -9999px; width: 1px; height: 1px;
  overflow: hidden; opacity: 0;
}

.form-status { margin-top: 16px; text-align: center; font-weight: 600; min-height: 1.2em; }
.form-status.success { color: var(--amber-2); }
.form-status.error { color: #ff9b7a; }

/* ------------------------------ Footer ---------------------------------- */
.site-footer { background: var(--ink-2); color: var(--cream); padding-top: 56px; }
.footer-inner {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: 28px; padding-bottom: 32px; border-bottom: 1px solid rgba(246,239,227,0.12);
}
.footer-brand { display: flex; align-items: center; gap: 16px; }
.footer-name { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; }
.footer-tag { color: var(--muted); font-size: .92rem; }
.footer-social { display: flex; flex-wrap: wrap; gap: 10px; }
.footer-social a {
  padding: 9px 18px; border-radius: 100px; font-size: .9rem; font-weight: 500;
  border: 1px solid rgba(246,239,227,0.2); transition: background .2s var(--ease), border-color .2s var(--ease);
}
.footer-social a:hover { background: rgba(246,239,227,0.1); border-color: var(--amber-2); }
.footer-bottom { padding-block: 24px; color: var(--muted); font-size: .88rem; }

/* ------------------------------ Subpage / Tour -------------------------- */
/* Subpages have a solid header from the start (no transparent hero behind it). */
body.subpage { padding-top: 0; }
body.subpage .site-header { background: rgba(26, 18, 11, 0.92); backdrop-filter: blur(10px); }

.page-hero {
  position: relative; color: var(--cream);
  padding: clamp(120px, 20vw, 200px) 0 clamp(48px, 8vw, 80px);
  display: flex; align-items: center; overflow: hidden;
}
.page-hero-bg {
  position: absolute; inset: 0; background-size: cover; background-position: center 35%;
}
.page-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(26,18,11,0.78) 0%, rgba(26,18,11,0.62) 50%, rgba(26,18,11,0.9) 100%);
}
.page-hero-content { position: relative; z-index: 2; }
.page-hero-title { font-size: clamp(2.4rem, 8vw, 5rem); margin-bottom: 14px; }
.page-hero-sub { font-size: clamp(1.05rem, 2.6vw, 1.3rem); color: var(--cream-2); max-width: 620px; }

.tour { background: var(--cream); }
.tour-embed {
  max-width: 900px; margin: 0 auto;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-md); padding: 12px; overflow: hidden;
}
.tour-embed iframe { display: block; width: 100%; border: 0; border-radius: var(--radius-sm); }
.tour-embed p a { color: var(--rust); font-weight: 600; }

.tour-cta { text-align: center; margin-top: 48px; }
.tour-cta p { font-family: var(--font-display); font-size: 1.4rem; font-weight: 600; margin-bottom: 18px; }

/* ------------------------------ Lightbox -------------------------------- */
.lightbox {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(15, 10, 6, 0.94);
  display: none; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .3s var(--ease);
}
.lightbox.open { display: flex; opacity: 1; }
.lightbox-img {
  max-width: 90vw; max-height: 85vh; border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
}
.lightbox-close, .lightbox-nav {
  position: absolute; color: var(--cream); font-size: 2.4rem; line-height: 1;
  width: 56px; height: 56px; display: grid; place-items: center;
  border-radius: 50%; transition: background .2s var(--ease);
}
.lightbox-close:hover, .lightbox-nav:hover { background: rgba(246,239,227,0.14); }
.lightbox-close { top: 18px; right: 18px; font-size: 2.6rem; }
.lightbox-nav { top: 50%; transform: translateY(-50%); font-size: 3.4rem; }
.lightbox-nav.prev { left: 12px; }
.lightbox-nav.next { right: 12px; }

/* ------------------------------ Reveal anim ----------------------------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ------------------------------ Responsive ------------------------------ */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-media { max-width: 420px; margin-inline: auto; }
  .music-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 170px; }
  .gallery-item.wide, .gallery-item.tall { grid-column: auto; grid-row: auto; }

  .nav-toggle { display: flex; }
  .nav-menu {
    position: fixed; inset: 0 0 0 auto; width: min(78vw, 320px);
    flex-direction: column; align-items: stretch; gap: 8px;
    background: rgba(26,18,11,0.98); backdrop-filter: blur(12px);
    padding: 96px 24px 32px; transform: translateX(100%);
    transition: transform .35s var(--ease); box-shadow: var(--shadow-lg);
  }
  .nav-menu.open { transform: translateX(0); }
  .nav-menu a { padding: 14px 18px; font-size: 1.05rem; }
  .nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  body.nav-open { overflow: hidden; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .form-row { grid-template-columns: 1fr; }
  .brand-name { display: none; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-bg { animation: none; }
  .scroll-cue span { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
