@import url("https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600&family=Montserrat:wght@400;500;600;700&display=swap");

:root {
  --bg: #f8f4ec;
  --nav-bg: #00042e;
  --text: #333333;
  --muted: #777;
  --accent: #ff3b57;
  --accent-line: #a32850;
  --header-line: #ff2850;
  --paper: #ffffff;
  --container: 1100px;
  --radius: 12px;
  --img-radius: 10px;
  --shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
  --nav-h: 72px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Montserrat, system-ui, Segoe UI, Roboto, Arial, sans-serif;
  line-height: 1.65;
}

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

img {
  max-width: 100%;
  display: block;
  border-radius: var(--img-radius);
}

a { color: inherit; }

main {
  flex: 1 0 auto;
  padding: 32px 0 72px;
}

.container {
  width: min(var(--container), calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  overflow: visible;
  background: var(--nav-bg);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  border-bottom: 2px solid var(--header-line);
}

.navbar {
  position: relative;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  min-height: var(--nav-h);
  gap: 16px;
  overflow: visible;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35em;
  width: auto;
  height: auto;
  background: none;
  filter: none;
  font-family: Cinzel, Georgia, serif;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1;
}

.brand .fn,
.brand .ln {
  transition: color 0.35s ease;
}

.brand .fn { color: #ffffff; }
.brand .ln { color: var(--accent); }
.brand:hover .fn,
.brand:hover .ln { color: var(--accent); }

.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
}

.nav-acc,
.nav-acc-inner {
  display: flex;
  align-items: center;
  gap: 18px;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  flex-shrink: 0;
  margin-left: 14px;
}

.nav ul {
  display: flex;
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav a {
  color: #e9eef6;
  text-decoration: none;
  padding: 10px 6px;
  border-radius: 8px;
  letter-spacing: 0.4px;
  position: relative;
}

.nav a.active { color: var(--accent); font-weight: 600; }

.nav ul a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: #f8f4ec;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease-out;
}

.nav ul a:hover::after,
.nav ul a.active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav a:hover { color: var(--accent); }

.lang-switch-wrap {
  display: block;
  box-sizing: border-box;
  width: 84px;
  min-width: 84px;
  max-width: 84px;
  flex: 0 0 84px;
  align-self: center;
}

.lang-switch {
  display: grid;
  grid-template-columns: 42px 42px;
  grid-template-rows: 32px;
  width: 84px;
  min-width: 84px;
  max-width: 84px;
  border: 1px solid rgba(248, 244, 236, 0.18);
  border-radius: 999px;
  overflow: hidden;
}

.lang-switch button {
  appearance: none;
  display: grid;
  place-items: center;
  border: 0;
  margin: 0;
  background: transparent;
  color: #e9eef6;
  font: 700 11px/1 Montserrat, sans-serif;
  letter-spacing: 0.12em;
  width: 42px;
  min-width: 42px;
  max-width: 42px;
  height: 32px;
  padding: 0;
  flex: none;
  cursor: pointer;
  transition: background 0.28s ease, color 0.28s ease;
}

.lang-switch button[aria-pressed="true"] {
  background: var(--accent);
  color: #fff;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  margin-left: 0;
  flex: 0 0 42px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #fff;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  margin: 0 auto;
  position: relative;
  transition:
    transform 0.36s cubic-bezier(0.22, 1, 0.36, 1),
    top 0.36s cubic-bezier(0.22, 1, 0.36, 1),
    background-color 0.2s ease;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }

.thin_h1 {
  font-family: Cinzel, Georgia, serif;
  font-weight: 400;
  font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2.1rem);
  color: #555;
  margin: 0 0 12px;
}

hr {
  border: 0;
  height: 1px;
  background: #e3d9c8;
  margin: 0 0 28px;
}

.kicker {
  margin: 0 0 8px;
  color: var(--accent);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 12px;
}

.featured {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 28px;
  align-items: center;
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 40px;
}

.featured img {
  width: 100%;
  border-radius: var(--img-radius);
  box-shadow: var(--shadow);
  cursor: zoom-in;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.featured img:hover,
.gallery img:hover,
.grid-gallery img:hover,
.obra-item .thumb img:hover,
.lead-image img:hover {
  filter: saturate(0.92) contrast(0.96);
  transform: scale(1.015);
}

.ny-chip {
  margin: 16px 0;
  padding: 14px 16px;
  background: #fff7f8;
  border: 1px solid #f3d0d6;
  border-radius: var(--radius);
}

.ny-chip strong { display: block; color: var(--accent-line); }
.ny-chip span { color: var(--muted); font-size: 14px; }
.ny-chip .obra-actions { margin-top: 14px; }

.elegant-paragraph {
  position: relative;
  margin: 22px 0 28px;
}

.elegant-paragraph::after {
  content: "";
  display: block;
  height: 1px;
  width: min(50vw, 520px);
  margin: 18px auto 0;
  background: var(--accent-line);
  border-radius: 1px;
}

.lead-image {
  margin: 0 0 22px;
}

.lead-image img {
  width: min(420px, 100%);
  border-radius: var(--img-radius);
  box-shadow: var(--shadow);
  cursor: zoom-in;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.quote {
  font-family: Cinzel, Georgia, serif;
  font-size: 1.15rem;
  color: var(--accent-line);
}

.gallery,
.grid-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  max-width: 960px;
  margin: 26px auto;
}

.gallery img,
.grid-gallery img {
  width: 100%;
  cursor: zoom-in;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: filter 0.3s ease, transform 0.2s ease;
}

.obra-list { display: grid; gap: 28px; }

.obra-item {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 20px;
  align-items: start;
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}

.obra-item .thumb {
  border-radius: var(--img-radius);
  overflow: hidden;
}

.obra-item h3 {
  margin: 4px 0 8px;
  color: var(--accent);
  font-weight: 500;
}

.obra-item h5,
.publisher {
  margin: 10px 0 0;
  color: var(--muted);
  font-weight: 500;
}

.obra-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.btn,
.btn-outline,
.btn-back,
.btn-next {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  border-radius: 10px;
  transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease;
}

.btn {
  background: var(--nav-bg);
  color: #fff;
  padding: 8px 14px;
  border: 1px solid transparent;
}

.btn:hover { background: #143456; transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  color: var(--nav-bg);
  border: 1px solid var(--nav-bg);
  padding: 8px 14px;
}

.btn-outline:hover {
  background: #143456;
  color: #fff;
  transform: translateY(-1px);
}

.btn-back,
.btn-next {
  font-weight: 600;
  color: var(--nav-bg);
  margin: 18px 0;
}

.btn-back:hover,
.btn-next:hover { color: #143456; text-decoration: underline; }

.btn .icon svg,
.btn-outline .icon svg,
.btn-back .icon svg,
.btn-next .icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.video-embed {
  width: 100%;
  max-width: 960px;
  margin: 28px auto;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #111;
}

.video-frame.is-tall {
  aspect-ratio: 9 / 16;
  max-width: 420px;
  margin: 0 auto;
}

.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.contact-wrap {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 24px;
}

.contact-card {
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

.contact-card img { cursor: zoom-in; }

.contact-list { display: flex; flex-direction: column; gap: 10px; }

.socials {
  display: flex;
  gap: 14px;
  margin: 8px 0 10px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f3f7;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.2s ease;
}

.icon-btn:hover { background: #e7ecf3; transform: translateY(-1px); }

.icon-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--nav-bg);
  stroke-width: 1.6;
}

.icon-btn:hover svg { stroke: var(--accent); }

.imagen_ace img {
  display: block;
  margin-top: 36px;
  border: 1px solid #777;
  max-width: 70%;
  border-radius: var(--img-radius);
}

.site-footer {
  margin-top: auto;
  padding: 28px 0 36px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.site-footer .legal a { text-decoration: none; margin: 0 4px; }
.site-footer .legal a:hover { color: var(--accent); }

.footer-credits { margin-top: 8px; }

.reveal {
  opacity: 0;
  transform: translateY(18px);
  animation: rise 0.7s ease forwards;
}

.reveal-wait {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-wait.is-in {
  opacity: 1;
  transform: none;
}

@keyframes rise {
  to { opacity: 1; transform: none; }
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 999;
}

.lightbox.open { display: flex; }

.lightbox img {
  max-width: 92vw;
  max-height: 88vh;
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.lightbox .close,
.lightbox .navbtn {
  position: absolute;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(6px);
}

.lightbox .close { top: 14px; right: 14px; }
.lightbox .prev { left: 14px; }
.lightbox .next { right: 14px; }
.lightbox .close:hover,
.lightbox .navbtn:hover { background: rgba(255, 255, 255, 0.25); }

.cc-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 80;
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  padding: 16px 18px;
}

.cc-inner {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.cc-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.cc-btn {
  border: 0;
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
  background: var(--nav-bg);
  color: #fff;
}

.cc-btn.cc-reject,
.cc-btn.cc-config { background: #e7ecf3; color: var(--nav-bg); }

body.has-cc-banner { padding-bottom: 96px; }

@media (max-width: 1100px) {
  .container { width: min(var(--container), calc(100% - 32px)); }
}

@media (max-width: 900px) {
  .nav-toggle { display: grid; place-items: center; }
  .header-tools { margin-left: auto; }
  .brand { flex: 1 1 auto; min-width: 0; }
  .site-header { padding-top: env(safe-area-inset-top, 0); }
  .navbar { position: static; }
  .nav {
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    background: var(--nav-bg);
    border-top: 1px solid rgba(248, 244, 236, 0.08);
    border-bottom: 2px solid transparent;
    max-height: 0;
    overflow: hidden;
    transition:
      max-height 0.72s cubic-bezier(0.22, 1, 0.36, 1),
      border-color 0.72s ease;
  }
  .nav.is-open {
    border-bottom-color: var(--header-line);
  }
  .nav-acc,
  .nav-acc-inner {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
  }
  .nav-acc-inner {
    padding: 10px 20px 22px;
  }
  .nav ul { flex-direction: column; gap: 2px; width: 100%; }
  .nav a { display: block; padding: 14px 8px; min-height: 48px; }
  .header-tools .lang-switch-wrap {
    width: 84px !important;
    min-width: 84px !important;
    max-width: 84px !important;
    flex: 0 0 84px !important;
  }
  .featured,
  .obra-item,
  .contact-wrap { grid-template-columns: 1fr; }
  .featured img,
  .lead-image img { width: min(380px, 100%); margin-inline: auto; }
  .obra-actions .btn,
  .obra-actions .btn-outline { min-height: 44px; }
}

@media (max-width: 720px) {
  .brand { font-size: 0.92rem; letter-spacing: 0.07em; }
  main { padding: 22px 0 56px; }
  .cc-inner { flex-direction: column; align-items: stretch; }
  .lang-switch-wrap {
    width: 84px !important;
    max-width: 84px !important;
  }
}

@media (max-width: 560px) {
  .container { width: calc(100% - 24px); }
  .brand { font-size: 0.8rem; letter-spacing: 0.05em; }
  .gallery,
  .grid-gallery { grid-template-columns: 1fr; }
  .ny-chip .obra-actions { flex-direction: column; }
  .ny-chip .obra-actions .btn,
  .ny-chip .obra-actions .btn-outline { width: 100%; justify-content: center; }
  .lightbox { padding: 12px; }
  .lightbox .prev { left: 8px; }
  .lightbox .next { right: 8px; }
  .imagen_ace img { max-width: 100%; }
  .lang-switch-wrap,
  .lang-switch {
    width: 84px !important;
    min-width: 84px !important;
    max-width: 84px !important;
  }
  .lang-switch button {
    width: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav,
  .nav ul li,
  .nav-toggle span,
  .nav-toggle span::before,
  .nav-toggle span::after {
    transition: none !important;
  }
}
