/* =========================================================
   ALEJANDRO GUILLERMO — styles.css (ÚNICO)
   - Index: portada con tarjetas-enlace
   - Internas: header sticky + hero-mini + toc + cards + cta
   - Composiciones: grilla editorial con vídeos más contenidos
========================================================= */

/* =========================
   BASE
========================= */
:root{
  --bg: #f8fafc;
  --text: #1e293b;

  --nav-bg: #0f172a;
  --nav-text: #e2e8f0;
  --accent: #38bdf8;

  --maxw: 980px;
}

*{ box-sizing: border-box; }

html{ scroll-behavior: smooth; }

body{
  margin: 0;
  font-family: 'Lora', serif;
  color: var(--text);
  line-height: 1.6;

  background:
    radial-gradient(1200px 600px at 50% -100px, rgba(56,189,248,.14), transparent 60%),
    radial-gradient(900px 500px at 20% 20%, rgba(29,78,216,.10), transparent 55%),
    var(--bg);
}

a{ color: inherit; }

/* =========================
   HERO (INDEX)
========================= */
.hero{
  position: relative;
  height: 52vh;
  min-height: 360px;

  background-image: url("images/piano.jpg");
  background-position: center;
  background-repeat: no-repeat;

  background-size: contain;
  background-color: #000;

  display: flex;
  flex-direction: column;
  justify-content: center;
}

.overlay{
  background: rgba(0,0,0,0.55);
  color: #fff;
  text-align: center;
  padding: 40px 20px;
}

.hero h1{
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.1rem, 4vw, 2.8rem);
  margin: 0;
  letter-spacing: -0.02em;
}

.subtitle{
  font-size: 1.1rem;
  margin-top: 8px;
  opacity: 0.92;
}

@media (max-width: 700px){
  .hero{
    height: 50vh;
    min-height: 320px;
    background-size: cover;
  }
  .overlay{ padding: 34px 18px; }
}

/* =========================
   INDEX — TARJETAS ENLACE
========================= */
main{
  width: min(var(--maxw), 92%);
  margin: 0 auto;
  padding: 18px 0 10px;
}

/* En el index, .section será un <a class="section"> */
a.section{
  display: block;
  margin: 18px auto;
  padding: 26px 22px;
  text-align: center;

  background: rgba(255,255,255,.90);
  border: 1px solid rgba(15,23,42,.10);
  border-radius: 22px;
  box-shadow: 0 14px 34px rgba(2,6,23,.08);

  text-decoration: none;
  color: var(--text);
  cursor: pointer;

  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

a.section:hover{
  transform: translateY(-2px);
  box-shadow: 0 18px 44px rgba(2,6,23,.10);
  border-color: rgba(56,189,248,.35);
}

a.section:focus-visible{
  outline: 3px solid rgba(56,189,248,.45);
  outline-offset: 4px;
}

a.section h2{
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.7rem, 3vw, 2.1rem);
  margin: 0 0 10px 0;
  letter-spacing: -0.02em;
}

a.section h2::after{
  content:"";
  display:block;
  width: 80px;
  height: 3px;
  margin: 10px auto 0;
  border-radius: 999px;
  background: linear-gradient(to right, transparent, rgba(56,189,248,.9), transparent);
}

a.section p{
  max-width: 70ch;
  margin: 12px auto 0;
  color: rgba(30,41,59,.88);
}

/* =========================
   INTERNAS — LAYOUT
========================= */
.wrap{
  width: min(var(--maxw), 92%);
  margin: 0 auto;
}

/* Header interno sticky */
.page-header{
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--nav-bg);
  color: var(--nav-text);
  border-bottom: 1px solid rgba(226,232,240,0.08);
}

.page-header .wrap{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
}

.brand{
  color: var(--nav-text);
  text-decoration: none;
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  white-space: nowrap;
}

.brand:hover{ color: var(--accent); }

.nav{
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.nav a{
  color: var(--nav-text);
  text-decoration: none;
  font-size: 0.98rem;
  padding: 8px 10px;
  border-radius: 10px;
  transition: color .2s ease, background-color .2s ease;
}

.nav a:hover{
  color: var(--accent);
  background: rgba(226,232,240,0.06);
}

.nav a[aria-current="page"]{
  color: #fff;
  background: rgba(56,189,248,0.18);
}

.nav a:focus-visible{
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Hero mini interno */
.hero-mini{
  margin: 22px auto 18px;
  padding: 36px 18px 22px;
  border-radius: 22px;
  background:
    radial-gradient(700px 260px at 50% 0%, rgba(56,189,248,.22), transparent 60%),
    linear-gradient(135deg, rgba(11,18,32,.92), rgba(30,41,59,.78)),
    url("images/piano.jpg");
  background-size: cover;
  background-position: center;
  color: #fff;
  box-shadow: 0 22px 60px rgba(2,6,23,.18);
  text-align: center;
}

.hero-mini h1{
  margin: 0 0 10px 0;
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 3.2vw, 2.6rem);
  color: #fff;
  letter-spacing: -0.02em;
}

.lead{
  margin: 0 auto;
  max-width: 70ch;
  font-size: 1.08rem;
  color: rgba(255,255,255,.92);
}

/* TOC interno */
.toc{
  margin: 14px auto 0;
  display:flex;
  gap: 10px;
  justify-content:center;
  flex-wrap: wrap;
}

.toc a{
  display:inline-block;
  padding: 9px 14px;
  border-radius: 999px;
  text-decoration:none;
  color: #0b1220;
  background: rgba(255,255,255,.95);
  border: 1px solid rgba(255,255,255,.55);
  box-shadow: 0 10px 26px rgba(2,6,23,.22);
  transition: transform .2s ease, background-color .2s ease;
}

.toc a:hover{
  transform: translateY(-2px);
  background: #fff;
}

/* Cards internas */
main.wrap{
  padding: 18px 0 10px;
}

.card{
  margin: 18px auto;
  padding: 26px 22px;
  background: rgba(255,255,255,.90);
  border: 1px solid rgba(15,23,42,.10);
  border-radius: 22px;
  box-shadow: 0 14px 34px rgba(2,6,23,.08);
}

.card h2, .card h3{
  font-family: 'Playfair Display', serif;
  margin: 0 0 10px 0;
  letter-spacing: -0.02em;
}

.card p{
  max-width: 75ch;
  margin: 0 auto 14px;
}

/* CTA + botón */
.cta{
  position: relative;
  margin: 26px auto 0;
  padding: 34px 22px 30px;
  border-radius: 26px;
  text-align: center;
  color: #fff;

  background:
    radial-gradient(520px 220px at 50% 0%, rgba(56,189,248,.22), transparent 62%),
    radial-gradient(420px 220px at 70% 30%, rgba(96,165,250,.14), transparent 60%),
    linear-gradient(135deg, #0b1220, #1e293b);

  box-shadow: 0 25px 60px rgba(2,6,23,.25);
}

.cta h2{
  font-family: 'Playfair Display', serif;
  margin: 0 0 10px;
}

.cta p{
  margin: 0 auto 18px;
  max-width: 60ch;
  color: rgba(255,255,255,.92);
}

.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 26px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: .2px;

  background: linear-gradient(135deg, #38bdf8, #60a5fa);
  color: #031221;

  box-shadow: 0 18px 40px rgba(56,189,248,.55);
  transition: transform .18s ease, filter .18s ease;
}

.btn:hover{
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.btn:focus-visible{
  outline: 3px solid rgba(255,255,255,.9);
  outline-offset: 4px;
}

/* =========================
   COMPOSICIONES — GRID EDITORIAL (Opción B)
   Usa estas clases en composiciones.html:
   .works-grid, .work, .work-subtitle, .video, .meta
========================= */
.works-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

/* Tarjeta de obra: más “fina” */
.work{
  background: rgba(255,255,255,.62);
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 16px;
  padding: 12px;
  box-shadow: 0 8px 18px rgba(2,6,23,.05);
}

.work h3{
  margin: 0 0 4px 0;
  font-family: 'Playfair Display', serif;
  letter-spacing: -0.015em;
  font-size: 1.18rem;
  line-height: 1.2;
}

/* Ojo: NO usamos ".subtitle" para no chocar con el hero */
.work-subtitle{
  font-size: .93rem;
  opacity: .78;
  margin: 0 0 10px 0;
}

/* Vídeo más contenido en escritorio */
.video{
  position: relative;
  width: 88%;
  margin: 0 auto;
  padding-top: 50%;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 10px 20px rgba(2,6,23,.10);
}

.video iframe{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Link YouTube discreto */
.meta{
  margin-top: 10px;
  font-size: .92rem;
  opacity: .78;
}

.meta a{
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* En móvil: mejor grande y cómodo */
@media (max-width: 820px){
  .works-grid{ grid-template-columns: 1fr; }
  .video{ width: 100%; padding-top: 56.25%; }
}

/* =========================
   FOOTERS (footer y .site-footer)
========================= */
footer,
.site-footer{
  text-align: center;
  padding: 32px 16px;
  background: #0f172a;
  color: #e2e8f0;
  margin-top: 44px;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 720px){
  .page-header .wrap{
    flex-direction: column;
    padding: 12px 0;
  }
  .hero-mini{ border-radius: 18px; padding: 30px 14px 18px; }
  .card{ padding: 20px 16px; border-radius: 18px; }
  .cta{ padding: 30px 16px 26px; border-radius: 22px; }
  a.section{ padding: 22px 16px; border-radius: 18px; }
}/* =========================
   ENLACES — GRID Y TARJETAS (ÚNICO)
   - Para enlaces.html (y si algún día lo usas en home)
========================= */

.links-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 14px;
  justify-items: center;       /* centra los items dentro de cada columna */
}

.link-card{
  width: 100%;
  max-width: 320px;            /* todas con el mismo ancho visual */
  display: block;
  text-decoration: none;
  padding: 14px 16px;
  border-radius: 16px;

  /* Estilo coherente con tus cards (fondo claro) */
  background: rgba(255,255,255,.85);
  border: 1px solid rgba(15,23,42,.10);
  box-shadow: 0 10px 24px rgba(2,6,23,.06);

  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
  text-align: center;          /* centra el texto */
}

.link-card:hover{
  transform: translateY(-2px);
  border-color: rgba(56,189,248,.35);
  box-shadow: 0 14px 30px rgba(2,6,23,.08);
}

.link-title{
  display:block;
  font-weight: 700;
  letter-spacing: .2px;
}

/* Si un día vuelves a usar subtítulos, ya quedan listos */
.link-sub{
  display:block;
  margin-top: 6px;
  opacity: .8;
  font-size: .95rem;
}
