/* =========================================================
   Ken Ibáñez — Trompetista
   Concepto: "Luz cálida de escenario sobre el bronce"
   Paleta y tipografía fijadas por el brief.
   ========================================================= */

:root {
  --bg:        #17130F;
  --text:      #F3E9D6;
  --muted:     #B7A88F;
  --faint:     #8C7F68;
  --surface:   #241C16;
  --gold:      #E3A83D;
  --vermillion:#D6472E;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans:  "Archivo", system-ui, -apple-system, Segoe UI, sans-serif;

  --measure: 62ch;
  --edge: clamp(1.25rem, 5vw, 5rem);
  --section-gap: clamp(4.5rem, 10vw, 9rem);
  --hairline: rgba(227, 168, 61, 0.22);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: clamp(1rem, 0.5vw + 0.95rem, 1.125rem);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 0.2em; }

::selection { background: var(--gold); color: var(--bg); }

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

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--gold); color: var(--bg);
  padding: 0.6rem 1rem; z-index: 100; font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ---------- Layout helpers ---------- */
.wrap { max-width: 76rem; margin-inline: auto; padding-inline: var(--edge); }

.section { padding-block: var(--section-gap); }
.section + .section { border-top: 1px solid rgba(140, 127, 104, 0.14); }

.section-title {
  font-family: var(--serif);
  font-weight: 500;
  font-optical-sizing: auto;
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 clamp(1.5rem, 4vw, 2.75rem);
  color: var(--text);
}

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem var(--edge);
  background: rgba(23, 19, 15, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(140, 127, 104, 0.16);
}
.brand {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
  color: var(--text);
}
.brand:hover { text-decoration: none; }
.nav { display: flex; align-items: center; gap: clamp(1rem, 3vw, 2rem); }
.nav a { font-size: 0.98rem; }
.nav .nav-secondary { color: var(--muted); }
.nav .nav-secondary:hover { color: var(--text); }
.nav .nav-cta {
  color: var(--gold);
  font-weight: 600;
  border: 1px solid var(--gold);
  padding: 0.4rem 0.95rem;
  border-radius: 999px;
}
.nav .nav-cta:hover { background: var(--gold); color: var(--bg); text-decoration: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1rem;
  color: var(--bg);
  background: var(--gold);
  padding: 0.8rem 1.6rem;
  border-radius: 999px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover {
  text-decoration: none;
  box-shadow: 0 0 0 4px rgba(227, 168, 61, 0.18);
  transform: translateY(-1px);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: clip;
  padding-block: clamp(3rem, 8vw, 6rem) var(--section-gap);
}
.hero::before {
  /* warm stage light */
  content: "";
  position: absolute;
  inset: -20% 30% auto -10%;
  height: 70vmax;
  background: radial-gradient(50% 50% at 40% 30%, rgba(227, 168, 61, 0.16), transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.hero-name {
  font-family: var(--serif);
  font-weight: 600;
  font-optical-sizing: auto;
  font-size: clamp(3.6rem, 12vw, 8.5rem);
  line-height: 0.92;
  letter-spacing: -0.02em;
  margin: 0;
  text-shadow: 0 0 60px rgba(227, 168, 61, 0.25);
}
.hero-name span { display: block; }
.hero-tagline {
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(1.3rem, 2.4vw, 1.8rem);
  color: var(--gold);
  margin: 1.4rem 0 0;
}
.hero-sub {
  color: var(--muted);
  max-width: 40ch;
  margin: 1rem 0 2rem;
}
.services {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem 1.1rem;
  margin: 0 0 2.2rem;
  padding: 0;
  list-style: none;
  font-weight: 500;
  color: var(--text);
}
.services li { display: flex; align-items: center; }
/* filete vertical entre servicios (nunca puntos medios) */
.services li + li::before {
  content: "";
  width: 1px;
  height: 1.1em;
  background: var(--gold);
  opacity: 0.55;
  margin-right: 1.1rem;
}
.hero-figure { position: relative; }
.hero-figure img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 3px;
  border: 1px solid var(--hairline);
}
.hero-figure::after {
  /* spotlight falloff over portrait */
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(80% 60% at 60% 25%, transparent, rgba(23, 19, 15, 0.55));
  pointer-events: none;
  border-radius: 3px;
}

/* ---------- Sobre mí ---------- */
.about p {
  font-size: clamp(1.15rem, 1.6vw, 1.4rem);
  line-height: 1.7;
  max-width: var(--measure);
  color: var(--text);
  margin: 0;
}

/* ---------- Trayectoria (ledger) ---------- */
.ledger { border-top: 1px solid var(--hairline); }
.ledger-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.4rem 2rem;
  align-items: baseline;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--hairline);
}
.ledger-act {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  color: var(--text);
}
.ledger-detail {
  color: var(--muted);
  text-align: right;
  font-size: 0.98rem;
}

/* ---------- Videos ---------- */
.video-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 3.5rem);
}
.video-colhead {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.5rem;
  color: var(--gold);
  margin: 0 0 1.5rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--hairline);
}
.video-item { margin-bottom: 2.4rem; }
.video-item:last-child { margin-bottom: 0; }
.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--hairline);
  border-radius: 3px;
  overflow: hidden;
  background: var(--surface);
}
.video-frame img,
.video-frame iframe,
.video-frame video {
  width: 100%; height: 100%; object-fit: cover; border: 0; display: block;
}
.video-play {
  position: absolute; inset: 0; margin: auto;
  width: 62px; height: 62px;
  display: grid; place-items: center;
  border-radius: 999px;
  background: rgba(23, 19, 15, 0.55);
  border: 1px solid var(--gold);
  pointer-events: none;
}
.video-play svg { width: 22px; height: 22px; margin-left: 3px; fill: var(--gold); }
.video-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.12rem;
  margin: 1rem 0 0.25rem;
  color: var(--text);
}
.video-context { color: var(--faint); font-size: 0.95rem; margin: 0; }

/* ---------- Grabaciones (Spotify) ---------- */
.tracks { display: grid; gap: 1.1rem; max-width: 46rem; }
.track-embed { display: block; }
.track-embed iframe { width: 100%; border-radius: 12px; border: 0; }
/* placeholder mientras llegan los iframes reales */
.track-ph {
  display: flex; align-items: center; gap: 1rem;
  padding: 1.1rem 1.3rem;
  background: var(--surface);
  border: 1px dashed var(--hairline);
  border-radius: 12px;
}
.track-ph .sp-mark {
  flex: none; width: 34px; height: 34px; border-radius: 999px;
  display: grid; place-items: center;
  border: 1px solid var(--gold);
}
.track-ph .sp-mark svg { width: 20px; height: 20px; fill: var(--gold); }
.track-ph .track-name { font-weight: 600; color: var(--text); }
.track-ph .track-artist { color: var(--muted); }
.track-ph .track-hint { margin-left: auto; color: var(--faint); font-size: 0.85rem; }

/* ---------- Fotos ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(0.75rem, 2vw, 1.25rem);
}
.gallery img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 3px;
  border: 1px solid var(--hairline);
}

/* ---------- Clases (intencionalmente discreta) ---------- */
.clases { color: var(--muted); }
.clases .section-title {
  font-size: clamp(1.3rem, 2.4vw, 1.75rem);
  font-weight: 500;
  margin-bottom: 1rem;
}
.clases p { max-width: var(--measure); margin: 0; }

/* ---------- Contacto ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: start;
}
.contact-name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1;
  margin: 0 0 1rem;
}
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; }
.contact-list .label { color: var(--faint); font-size: 0.85rem; display: block; }
.contact-list a, .contact-list span { font-size: 1.1rem; color: var(--text); }
.contact-list a:hover { color: var(--gold); }
.socials { display: flex; gap: 0.9rem; margin-top: 1.5rem; }
.socials a {
  width: 44px; height: 44px; border-radius: 999px;
  display: grid; place-items: center;
  border: 1px solid var(--hairline);
  color: var(--muted);
}
.socials a:hover { border-color: var(--gold); color: var(--gold); text-decoration: none; }
.socials svg { width: 20px; height: 20px; fill: currentColor; }

/* ---------- Footer ---------- */
.foot {
  padding: 2.5rem var(--edge);
  color: var(--faint);
  font-size: 0.85rem;
  text-align: center;
  border-top: 1px solid rgba(140, 127, 104, 0.14);
}

/* ---------- Entrada del hero (un solo momento orquestado) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal > * {
    opacity: 0;
    transform: translateY(14px);
    animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
  }
  .reveal > *:nth-child(1) { animation-delay: 0.05s; }
  .reveal > *:nth-child(2) { animation-delay: 0.15s; }
  .reveal > *:nth-child(3) { animation-delay: 0.25s; }
  .reveal > *:nth-child(4) { animation-delay: 0.35s; }
  .reveal > *:nth-child(5) { animation-delay: 0.45s; }
  @keyframes rise { to { opacity: 1; transform: none; } }
}

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-figure { order: -1; max-width: 22rem; }
  .video-cols { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .ledger-row { grid-template-columns: 1fr; }
  .ledger-detail { text-align: left; }
  .track-ph .track-hint { display: none; }
}
