/* ==========================================================================
   JJ Fabián Music — site.css
   Classical, editorial aesthetic. Dark field, warm gold type.
   ========================================================================== */

:root {
  --bg:        #0a0714;
  --bg-2:      #120c22;
  --bg-3:      #1a1330;
  --ink:       #f5ebd8;
  --ink-dim:   #d4c9ae;
  --ink-mute:  #8f8468;
  --gold:      #d4b77c;
  --gold-lt:   #e8d4a0;
  --gold-dk:   #b89a65;
  --rule:      rgba(212,183,124,0.22);
  --rule-soft: rgba(212,183,124,0.12);

  --f-serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --f-sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --container: 1180px;
  --gutter: 1.5rem;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--f-sans);
  font-weight: 300;
  background: var(--bg);
  color: var(--ink-dim);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
}
img, video, iframe { max-width: 100%; display: block; }

/* Layout -------------------------------------------------------------- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Type ---------------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--f-serif);
  font-weight: 400;
  color: var(--ink);
  margin: 0 0 1rem;
  line-height: 1.15;
  letter-spacing: 0.01em;
}
h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); font-style: italic; color: var(--gold); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); font-style: italic; color: var(--gold); }
h3 { font-size: 1.35rem; color: var(--ink); }
h4 { font-size: 1.05rem; color: var(--gold); letter-spacing: 0.1em; text-transform: uppercase; font-family: var(--f-sans); font-weight: 500; }

p { margin: 0 0 1.1rem; }
a { color: var(--gold); text-decoration: none; transition: color .2s; }
a:hover { color: var(--gold-lt); }

.eyebrow {
  display: inline-block;
  font-family: var(--f-sans);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-dk);
  margin-bottom: 1.1rem;
}
.ornament {
  display: flex; align-items: center; justify-content: center; gap: 1rem;
  margin: 1.5rem auto 2rem; max-width: 360px;
}
.ornament::before, .ornament::after {
  content: ""; flex: 1; height: 1px; background: var(--rule);
}
.ornament-diamond {
  width: 8px; height: 8px; background: var(--gold); transform: rotate(45deg);
}

/* Header / nav -------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 7, 20, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule-soft);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem var(--gutter);
}
.brand {
  display: flex; align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}
.brand-logo img {
  height: 56px;
  width: auto;
  display: block;
  object-fit: contain;
  transition: opacity .25s ease;
}
.brand-logo:hover img {
  opacity: 0.85;
}
@media (max-width: 800px) {
  .brand-logo img { height: 44px; }
}
@media (max-width: 480px) {
  .brand-logo img { height: 36px; }
}
.site-nav { display: flex; gap: 2rem; }
.site-nav a {
  font-size: 0.88rem; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--ink-dim); font-weight: 400;
  padding: 4px 0; border-bottom: 1px solid transparent;
  transition: all .2s;
}
.site-nav a:hover, .site-nav a.on { color: var(--gold); border-bottom-color: var(--gold); }

/* About-page logo accent --------------------------------------------- */
.about-logo {
  display: block;
  height: 80px;
  width: auto;
  max-width: 100%;
  margin: 0 auto 1.5rem;
  object-fit: contain;
  opacity: 0.95;
}
@media (max-width: 600px) {
  .about-logo { height: 60px; }
}

.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer;
  width: 32px; height: 26px; padding: 0; position: relative;
}
.nav-toggle span {
  display: block; position: absolute; left: 0; width: 100%; height: 2px;
  background: var(--gold); transition: transform .25s, top .25s, opacity .25s;
}
.nav-toggle span:nth-child(1) { top: 2px; }
.nav-toggle span:nth-child(2) { top: 12px; }
.nav-toggle span:nth-child(3) { top: 22px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { top: 12px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { top: 12px; transform: rotate(-45deg); }

@media (max-width: 800px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute; inset: 100% 0 auto 0;
    flex-direction: column; gap: 0;
    background: var(--bg-2); border-bottom: 1px solid var(--rule-soft);
    padding: 1rem var(--gutter);
    transform: translateY(-10px); opacity: 0; pointer-events: none;
    transition: opacity .2s, transform .2s;
  }
  .site-nav.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .site-nav a { padding: 0.9rem 0; border-bottom: 1px solid var(--rule-soft); }
}

/* Hero --------------------------------------------------------------- */
.hero {
  padding: 5rem var(--gutter) 4rem;
  text-align: center;
  background:
    radial-gradient(ellipse at 50% 20%, rgba(212,183,124,0.08), transparent 60%),
    var(--bg);
  border-bottom: 1px solid var(--rule-soft);
}
.hero h1 { margin-bottom: 0.6rem; }
.hero .lead {
  font-family: var(--f-serif); font-style: italic;
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: var(--gold-lt);
  max-width: 640px; margin: 0 auto 2rem;
}
.cta-row { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* Hero with orchestra illustration ----------------------------------- */
.hero-with-image {
  padding: 2rem 0 4rem;
  text-align: center;
  background: var(--bg);
  border-bottom: 1px solid var(--rule-soft);
}
.hero-image {
  position: relative;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto 1.5rem;
  padding: 0 var(--gutter);
  box-sizing: border-box;
}
.hero-image img {
  width: 100%; height: auto;
  display: block;
}
.hero-text {
  padding: 0 var(--gutter);
}
.hero-text h1 {
  margin-bottom: 0.6rem;
}
.hero-text .lead {
  font-family: var(--f-serif); font-style: italic;
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: var(--gold-lt);
  max-width: 640px; margin: 0 auto 2rem;
}
@media (max-width: 700px) {
  .hero-with-image { padding: 1rem 0 3rem; }
  .hero-image { margin-bottom: 1rem; }
}

/* Hero featured-track player ----------------------------------------- */
.hero-player {
  max-width: 620px;
  margin: 0 auto 2.5rem;
  padding: 1.25rem 1.5rem;
  background: rgba(18, 12, 34, 0.75);
  border: 1px solid var(--rule-soft);
  border-radius: 2px;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  text-align: left;
}
.hp-label {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  flex-wrap: wrap;
}
.hp-eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold-dk);
  flex-shrink: 0;
}
.hp-title {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--gold-lt);
  text-decoration: none;
  line-height: 1.3;
}
.hp-title:hover { color: var(--gold); }

.hp-count {
  margin-left: auto;
  font-family: var(--f-sans);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  color: var(--ink-mute);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.hero-player [hidden] {
  display: none !important;
}

.hp-control {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.hp-play {
  flex-shrink: 0;
  width: 44px; height: 44px;
  border: 1px solid var(--gold);
  background: transparent;
  color: var(--gold);
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color .2s, color .2s, transform .15s;
  padding: 0;
}
.hp-play:hover, .hp-play:focus-visible {
  background: var(--gold);
  color: var(--bg);
  outline: none;
  transform: scale(1.05);
}
.hp-play svg { width: 18px; height: 18px; }
.hp-play .hp-icon-pause { display: none; }
.hp-play.playing .hp-icon-play { display: none; }
.hp-play.playing .hp-icon-pause { display: block; }

.hp-track {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.hp-progress {
  height: 3px;
  background: var(--rule-soft);
  cursor: pointer;
  position: relative;
  border-radius: 2px;
  overflow: hidden;
}
.hp-progress-fill {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 0%;
  background: var(--gold);
  transition: width 0.1s linear;
}
.hp-time {
  font-size: 0.72rem;
  color: var(--ink-mute);
  font-variant-numeric: tabular-nums;
}

.hp-next {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--gold-lt);
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color .2s, border-color .2s, transform .15s;
  padding: 0;
}
.hp-next:hover, .hp-next:focus-visible {
  color: var(--gold);
  border-color: var(--gold);
  outline: none;
  transform: scale(1.08);
}
.hp-next svg { width: 14px; height: 14px; }

.hp-next-embed {
  position: absolute;
  top: 10px; right: 10px;
  background: rgba(10, 7, 20, 0.85);
}
.hp-embed { position: relative; }

.hp-embed {
  width: 100%;
  min-height: 80px;
}
.hp-embed iframe {
  width: 100%;
  height: 80px;
  border: 0;
  border-radius: 2px;
  display: block;
}
.hp-embed iframe[src*="spotify"] {
  height: 152px;
}

@media (max-width: 600px) {
  .hero-player {
    margin: 0 var(--gutter) 2rem;
    padding: 1rem 1.1rem;
  }
  .hp-title { font-size: 1.1rem; }
}

/* Buttons ------------------------------------------------------------ */
.btn {
  display: inline-block;
  padding: 0.85rem 1.8rem;
  font-family: var(--f-sans); font-size: 0.82rem; font-weight: 500;
  letter-spacing: 0.2em; text-transform: uppercase;
  border: 1px solid var(--gold); color: var(--gold);
  background: transparent; cursor: pointer; border-radius: 0;
  transition: all .2s; text-decoration: none;
}
.btn:hover { background: var(--gold); color: var(--bg); }
.btn-solid { background: var(--gold); color: var(--bg); }
.btn-solid:hover { background: var(--gold-lt); color: var(--bg); }

/* Sections ----------------------------------------------------------- */
section { padding: 5rem 0; }
.section-head { text-align: center; margin-bottom: 3rem; }
.section-head p { max-width: 620px; margin: 0 auto; color: var(--ink-dim); }

.alt-bg { background: var(--bg-2); border-top: 1px solid var(--rule-soft); border-bottom: 1px solid var(--rule-soft); }

/* Services grid ------------------------------------------------------ */
.services-grid {
  display: grid; gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.service-card {
  padding: 2.2rem 1.8rem;
  background: var(--bg-2);
  border: 1px solid var(--rule-soft);
  text-align: center;
  transition: border-color .25s, transform .25s;
}
.service-card:hover { border-color: var(--gold); transform: translateY(-3px); }
.service-icon {
  width: 56px; height: 56px; margin: 0 auto 1.2rem;
  color: var(--gold);
}
.service-card h3 {
  font-family: var(--f-serif); font-style: italic; font-size: 1.5rem;
  color: var(--gold); font-weight: 500;
}
.service-card p { font-size: 0.95rem; color: var(--ink-dim); }

/* Portfolio grid ----------------------------------------------------- */
.portfolio-filters {
  display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: center;
  margin-bottom: 2.5rem;
}
.portfolio-filters a {
  padding: 0.4rem 1.1rem; font-size: 0.78rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--ink-mute);
  border: 1px solid var(--rule-soft);
}
.portfolio-filters a.on, .portfolio-filters a:hover {
  color: var(--gold); border-color: var(--gold);
}
.portfolio-grid {
  display: grid; gap: 1.8rem;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.pf-card {
  background: var(--bg-2);
  border: 1px solid var(--rule-soft);
  overflow: hidden;
  transition: transform .25s, border-color .25s;
}
.pf-card:hover { border-color: var(--gold); transform: translateY(-3px); }
.pf-thumb {
  aspect-ratio: 16 / 9;
  background: var(--bg-3); position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.pf-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pf-thumb-placeholder {
  color: var(--gold-dk); font-family: var(--f-serif); font-style: italic; font-size: 3rem;
}
.pf-play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: var(--gold); opacity: 0.85;
  transition: opacity .2s, transform .2s;
}
.pf-card:hover .pf-play { opacity: 1; transform: scale(1.1); }
.pf-body { padding: 1.3rem 1.5rem; }
.pf-cat {
  font-size: 0.7rem; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--gold-dk); margin-bottom: 0.4rem;
}
.pf-title {
  font-family: var(--f-serif); font-style: italic; font-size: 1.25rem;
  color: var(--ink); margin: 0 0 0.5rem; line-height: 1.25;
}
.pf-desc { color: var(--ink-dim); font-size: 0.92rem; margin: 0; }

/* Forms -------------------------------------------------------------- */
.form-grid {
  display: grid; gap: 1.1rem;
  grid-template-columns: 1fr 1fr;
  max-width: 720px; margin: 0 auto;
}
.form-grid .full { grid-column: 1 / -1; }
.field label {
  display: block; margin-bottom: 0.4rem;
  font-size: 0.75rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold-dk);
}
.field input, .field select, .field textarea {
  width: 100%; padding: 0.8rem 1rem;
  background: var(--bg-2); border: 1px solid var(--rule);
  color: var(--ink); font-family: var(--f-sans); font-size: 1rem;
  border-radius: 0; transition: border-color .2s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--gold);
}
.field textarea { min-height: 160px; resize: vertical; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }

/* Flash -------------------------------------------------------------- */
.flash { padding: 0.85rem 0; font-size: 0.95rem; text-align: center; }
.flash-success { background: rgba(109, 169, 118, 0.15); color: #a8d7b0; border-bottom: 1px solid #3a7a43; }
.flash-error   { background: rgba(200, 80, 80, 0.15); color: #e9a4a4; border-bottom: 1px solid #7a3a3a; }
.flash-info    { background: rgba(212, 183, 124, 0.12); color: var(--gold-lt); border-bottom: 1px solid var(--gold-dk); }

/* Embed container --------------------------------------------------- */
.embed-wrap {
  position: relative; width: 100%; aspect-ratio: 16/9;
  background: var(--bg-3); margin: 2rem 0;
}
.embed-wrap iframe, .embed-wrap video, .embed-wrap audio {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}
.embed-wrap.audio { aspect-ratio: auto; height: 180px; }

/* Footer ------------------------------------------------------------- */
.site-footer {
  background: var(--bg-2);
  padding: 3.5rem 0 1.5rem;
  border-top: 1px solid var(--rule-soft);
  margin-top: 4rem;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--rule-soft);
}
@media (max-width: 700px) { .footer-inner { grid-template-columns: 1fr; } }
.foot-col h4 { font-size: 0.78rem; letter-spacing: 0.22em; }
.foot-col a {
  display: block; color: var(--ink-dim); font-size: 0.92rem;
  padding: 0.2rem 0;
}
.foot-col a:hover { color: var(--gold); }
.foot-brand {
  font-family: var(--f-serif); font-style: italic; font-weight: 500;
  font-size: 2rem; color: var(--gold); margin-bottom: 0.4rem;
}
.foot-tag { color: var(--ink-mute); font-family: var(--f-serif); font-style: italic; font-size: 1.05rem; }
.foot-meta { color: var(--ink-mute); font-size: 0.85rem; margin-top: 0.5rem; }
.foot-base {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 1.5rem; font-size: 0.8rem; color: var(--ink-mute);
  flex-wrap: wrap; gap: 1rem;
}

/* Tables (admin crossover) ------------------------------------------ */
.prose { max-width: 740px; margin: 0 auto; }
.prose p { font-size: 1.05rem; }

/* Socials ------------------------------------------------------------- */
.socials {
  display: flex; flex-wrap: wrap;
  gap: 1rem; align-items: center;
}
.socials a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px;
  color: var(--gold-lt);
  background: transparent;
  border-radius: 50%;
  transition: color .25s, background-color .25s, transform .25s, box-shadow .25s;
}
.socials a:hover,
.socials a:focus-visible {
  color: var(--brand-color, var(--gold));
  transform: translateY(-3px) scale(1.05);
  outline: none;
}
.socials svg {
  width: 32px; height: 32px;
  display: block;
}
.socials-hero {
  justify-content: center;
  margin-top: 2.5rem;
}
.socials-hero a {
  width: 56px; height: 56px;
}
.socials-hero svg {
  width: 34px; height: 34px;
}
.socials-contact {
  justify-content: center;
  margin: 1.5rem 0 0;
}

/* Screen-reader only ------------------------------------------------ */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0;
}
