/* Marajalan Vitrales
   Colores del medallón: cielo turquesa, sol dorado, colibrí magenta, Apus morados y la banda crema. */
:root {
  --lead: #1F1B26;        /* plomo */
  --ink-soft: #5D5568;
  --cream: #FBF5E6;       /* banda del nombre */
  --cream-2: #F4EBD3;
  --turquoise: #17A9B8;
  --teal: #0E6E7A;
  --teal-deep: #0A4F59;
  --sky: #2E8FD6;
  --sun: #F5B416;
  --sun-deep: #D99A06;
  --magenta: #C8236F;
  --purple: #5E2B96;
  --purple-deep: #2A1745;
  --green: #4DAF3C;

  --display: "Marcellus", "Trajan Pro", Georgia, serif;
  --body: "Commissioner", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 72rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
body {
  margin: 0;
  font-family: var(--body);
  font-weight: 350;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--lead);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--teal); text-underline-offset: .2em; }
a:hover { color: var(--magenta); }
:focus-visible { outline: 3px solid var(--magenta); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.12; margin: 0; letter-spacing: .005em; }
h2 { font-size: clamp(2rem, 4.2vw, 3rem); margin-bottom: 1rem; }
h3 { font-size: 1.375rem; margin-bottom: .5rem; }
p { margin: 0 0 1rem; max-width: 62ch; }

/* ---------- Idiomas ---------- */
html[data-lang="es"] .en,
html[data-lang="en"] .es { display: none !important; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.section-intro { color: var(--ink-soft); font-size: 1.125rem; margin-bottom: 2.5rem; }

.skip { position: absolute; left: -999px; top: 0; background: var(--lead); color: #fff; padding: .75rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; top: 1rem; }

/* ---------- Encabezado ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 2rem;
  padding: .6rem var(--gutter);
  background: rgba(251, 245, 230, .94);
  backdrop-filter: blur(8px);
  border-bottom: 3px solid var(--lead);
}
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--lead); font-family: var(--display); font-size: 1.3rem; letter-spacing: .04em; white-space: nowrap; }
.brand:hover { color: var(--lead); }
.brand-mark { width: 2.5rem; height: 2.5rem; }
.nav { display: flex; gap: 1.5rem; margin-left: auto; }
.nav a { color: var(--lead); text-decoration: none; font-size: .9375rem; font-weight: 450; }
.nav a:hover { color: var(--magenta); text-decoration: underline; }
.lang-toggle {
  font: inherit; font-size: .875rem; font-weight: 500;
  background: none; color: var(--lead);
  border: 1.5px solid var(--lead); border-radius: 999px;
  padding: .3rem .9rem; cursor: pointer;
}
.lang-toggle:hover { background: var(--lead); color: var(--cream); }

/* ---------- Botones ---------- */
.btn {
  display: inline-block; font: inherit; font-weight: 500; font-size: 1rem;
  padding: .85rem 1.5rem; border-radius: 999px; text-decoration: none;
  cursor: pointer; border: 2px solid var(--lead); transition: background-color .15s, color .15s;
}
.btn-primary { background: var(--magenta); color: #fff; }
.btn-primary:hover { background: #A51A5A; color: #fff; }
.btn-quiet { color: var(--lead); background: transparent; }
.btn-quiet:hover { background: var(--lead); color: var(--cream); }

/* ---------- Portada: cielo de vitral ---------- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, var(--turquoise), var(--sky));
  border-bottom: 6px solid var(--lead);
}
.hero-glass { position: absolute; inset: 0; }
.hero-glass svg { width: 100%; height: 100%; }
.hero-glass .pane { animation: light-up 1s ease-out both; animation-delay: calc(var(--d) * 140ms + 150ms); }
@keyframes light-up {
  from { opacity: .15; }
  to   { opacity: 1; }
}
.hero-inner {
  position: relative;
  max-width: var(--wrap); margin: 0 auto;
  padding: clamp(3rem, 8vw, 6rem) var(--gutter) clamp(9rem, 16vw, 13rem);
  display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 5vw, 4rem); align-items: center;
}
.hero-banner {
  background: var(--cream);
  border: 4px solid var(--lead);
  border-radius: 6px;
  padding: clamp(1.75rem, 4vw, 3rem);
  box-shadow: 0 24px 50px -24px rgba(31, 27, 38, .55);
}
.hero h1 { font-size: clamp(2.2rem, 4.4vw, 3.6rem); line-height: 1.06; margin-bottom: 1.25rem; max-width: 17ch; }
.lede { font-size: 1.1875rem; color: var(--ink-soft); max-width: 46ch; margin-bottom: 1.75rem; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero-logo { justify-self: center; width: 100%; max-width: 440px; }
.hero-logo img {
  width: 100%; height: auto; border-radius: 50%;
  box-shadow: 0 0 0 6px var(--lead), 0 0 80px 20px rgba(255, 214, 102, .55);
}

/* ---------- Obras ---------- */
.obras { background: var(--purple-deep); color: var(--cream); padding: clamp(4rem, 9vw, 7rem) 0; }
.obras .section-intro { color: #CFC3E0; }
.gallery { columns: 3 16rem; column-gap: 1.75rem; }
.obra { margin: 0 0 2.25rem; break-inside: avoid; }
.obra img {
  width: 100%; height: auto; cursor: zoom-in;
  border-radius: 4px; border: 4px solid #120B1F;
  transition: transform .2s ease;
}
.obra img:hover { transform: translateY(-3px); }
.obra figcaption { margin-top: .75rem; font-size: .9375rem; color: #CFC3E0; line-height: 1.45; }
.obra figcaption strong { display: block; font-family: var(--display); font-weight: 400; font-size: 1.1875rem; color: var(--cream); margin-bottom: .1rem; }

/* ---------- El artista ---------- */
.artista { padding: clamp(4rem, 9vw, 7rem) 0; }
.artista-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.artista-text p { font-size: 1.125rem; }
.artista-side { display: grid; gap: 2rem; padding-top: 4.25rem; }
.artist-photo { margin: 0; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 50% 50% 4px 4px / 24% 24% 4px 4px; border: 5px solid var(--lead); }
.artist-photo img { width: 100%; height: 100%; object-fit: cover; }
.quote { margin: 0; padding: 1.75rem 0 0; border-top: 6px solid var(--magenta); }
.quote p { font-family: var(--display); font-size: clamp(1.4rem, 2.4vw, 1.75rem); line-height: 1.3; margin-bottom: 1rem; }
.quote footer { color: var(--ink-soft); font-size: .9375rem; }

/* ---------- Historia del nombre ---------- */
.taller { padding: clamp(4rem, 9vw, 7rem) 0; background: var(--teal-deep); color: var(--cream); }
.taller-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.couple { margin: 0; }
.couple img { width: 100%; height: auto; border-radius: 48% 48% 6px 6px / 30% 30% 6px 6px; border: 5px solid var(--lead); box-shadow: 0 0 0 4px var(--sun); }
.couple figcaption { margin-top: .9rem; font-family: var(--display); font-size: 1.125rem; color: #B9E3E6; text-align: center; }
.taller .name-story { margin-bottom: 2.25rem; }
.name-story { font-family: var(--display); }
.ns-row { display: flex; align-items: baseline; gap: 1rem; }
.ns-indent { padding-left: 3.4em; }
.ns-word { font-size: clamp(2.25rem, 4.5vw, 3.25rem); line-height: 1.05; }
.ns-gloss { font-family: var(--body); font-size: 1rem; color: #B9E3E6; font-style: italic; }
.ns-a { color: var(--sun); }
.ns-b { color: #FF7DB5; }
.ns-join {
  margin-top: 1.25rem; padding-top: 1.25rem;
  border-top: 5px solid var(--cream);
  font-size: clamp(2rem, 4vw, 2.75rem); letter-spacing: .02em; line-height: 1;
  max-width: 22rem;
}
.taller-text p { font-size: 1.125rem; color: #E3F1F0; }

/* ---------- Servicios ---------- */
.servicios { padding: clamp(4rem, 9vw, 7rem) 0; }
.serv-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2.75rem 4rem; margin-top: 2.5rem; }
.serv { padding-top: 1.25rem; border-top: 6px solid var(--c); }
.serv p { color: var(--ink-soft); margin: 0; }

/* ---------- Proceso ---------- */
.proceso { background: var(--cream-2); padding: clamp(4rem, 9vw, 7rem) 0; border-block: 3px solid var(--lead); }
.steps { list-style: none; margin: 2.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 2rem; counter-reset: paso; }
.steps li { counter-increment: paso; }
.steps li::before {
  content: counter(paso);
  display: grid; place-items: center;
  width: 3.25rem; height: 3.25rem; border-radius: 50%;
  border: 3px solid var(--lead); background: var(--sun);
  font-family: var(--display); font-size: 1.6rem; line-height: 1;
  margin-bottom: 1rem;
}
.steps p { color: var(--ink-soft); margin: 0; font-size: 1rem; }
.sketch { margin: 3.5rem 0 0; display: grid; grid-template-columns: minmax(0, 26rem) 1fr; gap: 2rem; align-items: center; }
.sketch img { width: 100%; height: auto; border-radius: 4px; border: 3px solid var(--lead); }
.sketch figcaption { font-family: var(--display); font-size: 1.375rem; line-height: 1.3; max-width: 22ch; }
.note { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid rgba(31, 27, 38, .2); color: var(--ink-soft); font-size: .9375rem; }

/* ---------- Contacto ---------- */
.contacto { background: var(--teal); color: var(--cream); padding: clamp(4rem, 9vw, 7rem) 0; }
.contacto .section-intro { color: #D2EEF0; }
.contacto-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(2.5rem, 6vw, 5rem); align-items: start; }
.wa-form { display: grid; gap: .45rem; max-width: 34rem; }
.wa-form label { font-weight: 500; font-size: .9375rem; margin-top: .75rem; }
.wa-form input, .wa-form select, .wa-form textarea {
  font: inherit; color: var(--lead); background: var(--cream);
  border: 3px solid var(--lead); border-radius: 6px; padding: .7rem .9rem; width: 100%;
}
.wa-form input:focus, .wa-form select:focus, .wa-form textarea:focus { outline: none; border-color: var(--sun); }
.wa-form textarea { resize: vertical; }
.wa-form .btn { justify-self: start; margin-top: 1.25rem; }
.form-error { color: #FFE08A; margin: .5rem 0 0; font-weight: 500; }
.contacto .btn-primary { background: var(--sun); color: var(--lead); }
.contacto .btn-primary:hover { background: #FFC93C; color: var(--lead); }
.contact-details { padding-top: .5rem; }
.contact-details dl { margin: 0; display: grid; gap: .2rem; }
.contact-details dt { font-family: var(--display); font-size: 1.125rem; color: #B9E3E6; margin-top: 1.1rem; }
.contact-details dt:first-child { margin-top: 0; }
.contact-details dd { margin: 0; font-size: 1.125rem; }
.contact-details a { color: var(--cream); }
.contact-details a:hover { color: var(--sun); }

/* ---------- Pie ---------- */
.site-footer { background: var(--lead); color: #B7AFC2; font-size: .875rem; padding: 1.5rem 0; }
.footer-row { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* ---------- Visor de fotos ---------- */
.lightbox { padding: 0; border: 0; background: transparent; max-width: 92vw; max-height: 92vh; }
.lightbox::backdrop { background: rgba(20, 12, 32, .92); }
.lightbox img { max-width: 92vw; max-height: 88vh; object-fit: contain; }
.lightbox-close {
  position: fixed; top: 1rem; right: 1rem; width: 2.75rem; height: 2.75rem;
  border-radius: 50%; border: 0; background: var(--cream); color: var(--lead);
  font-size: 1.75rem; line-height: 1; cursor: pointer;
}

/* ---------- Pantallas pequeñas ---------- */
@media (min-width: 901px) and (max-width: 1100px) { .steps { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px) {
  .nav { display: none; }
  .lang-toggle { margin-left: auto; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .gallery { columns: 2; column-gap: 1rem; }
}
@media (max-width: 760px) {
  .hero-inner { grid-template-columns: 1fr; padding-top: 2.5rem; }
  .hero-logo { max-width: 260px; order: -1; }
  .couple { max-width: 340px; margin: 0 auto; }
  .serv-list, .taller-grid, .contacto-grid, .artista-grid { grid-template-columns: 1fr; }
  .serv-list { gap: 2.25rem; }
  .artista-side { padding-top: 0; }
  .sketch { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .steps { grid-template-columns: 1fr; }
  .brand span { font-size: 1.1rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-glass .pane { animation: none; }
  .obra img { transition: none; }
}

/* ---------- Galería: ver todas ---------- */
.js .obra.is-extra { display: none; }
.js .gallery.show-all .obra.is-extra { display: block; }
.gallery-more { text-align: center; margin-top: 1rem; }
.btn-light { background: var(--cream); color: var(--lead); border-color: var(--cream); }
.btn-light:hover { background: var(--sun); border-color: var(--sun); color: var(--lead); }
#gallery-toggle .when-open,
#gallery-toggle.gallery-toggle-open .when-closed { display: none; }
#gallery-toggle.gallery-toggle-open .when-open { display: inline; }
html:not(.js) .gallery-more { display: none; }
