:root {
  --bg: #0b0810;
  --text: #f4f5f7;
  --muted: rgba(244, 245, 247, .75);
  --footer-h: 56px;
  --ease: cubic-bezier(.22, .8, .24, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

h2, .brand { font-family: 'Space Grotesk', system-ui, sans-serif; }

/* Top bar */
.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px clamp(16px, 4vw, 48px);
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.brand {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
}
.brand img { height: 34px; width: auto; display: block; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.topbar-cta {
  color: var(--text);
  text-decoration: none;
  font-size: .9rem;
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background .3s;
}
.topbar-cta:hover { background: rgba(255, 255, 255, .25); }

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text);
  font-size: .7rem;
  letter-spacing: -.05em;
  cursor: pointer;
  transition: background .3s;
}
.icon-btn:hover { background: rgba(255, 255, 255, .25); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Gallery */
main { flex: 1; min-height: 0; }

.gallery {
  display: flex;
  height: 100%;
  gap: 10px;
  padding: 72px clamp(10px, 2vw, 24px) 10px;
}

.panel {
  --hue: #fff;
  position: relative;
  flex: 1;
  min-width: 0;
  border-radius: 22px;
  overflow: hidden;
  cursor: pointer;
  background: #1a1d26 var(--img) center / cover no-repeat;
  transition: flex .7s var(--ease);
  outline: none;
  isolation: isolate;
}
.panel::before {           /* dark shade for legibility */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to top, rgba(0, 0, 0, .65), rgba(0, 0, 0, .15) 55%, rgba(0, 0, 0, .5));
  transition: opacity .5s;
}
.panel.is-active { flex: 5; cursor: default; }
.panel.is-disabled { cursor: default; }
.panel[data-link] { cursor: pointer; }
.panel:not(.is-active):hover::before { opacity: .6; }
.panel:focus-visible { box-shadow: 0 0 0 3px var(--hue); }

/* Hover / focus highlight: a slim accent bar with a slow, subtle glide */
.panel::after {
  content: "";
  position: absolute;
  top: 24px;
  left: 50%;
  width: 42px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--hue), transparent);
  background-size: 220% 100%;
  opacity: 0;
  transform: translateX(-50%) scaleX(.4);
  transform-origin: center;
  transition: opacity .35s var(--ease), transform .45s var(--ease);
  pointer-events: none;
  z-index: 2;
}
.panel:hover::after, .panel:focus-visible::after {
  opacity: .8;
  transform: translateX(-50%) scaleX(1);
  animation: barGlide 3.2s ease-in-out infinite;
}
@keyframes barGlide {
  0%, 100% { background-position: 0% 0; }
  50% { background-position: 100% 0; }
}

/* Collapsed vertical label */
.panel-vertical {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 28px 0;
  transition: opacity .35s;
}
.panel-vertical h2 {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: .08em;
  white-space: nowrap;
}
.num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: .85rem;
  letter-spacing: .15em;
  color: var(--hue);
  font-weight: 700;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .75);
}
.panel.is-active .panel-vertical { opacity: 0; pointer-events: none; }

/* Glass card (expanded) */
.glass {
  position: absolute;
  left: clamp(14px, 3vw, 36px);
  bottom: clamp(14px, 3vw, 36px);
  width: min(440px, calc(100% - 2 * clamp(14px, 3vw, 36px)));
  padding: 28px;
  border-radius: 20px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .28);
  box-shadow: 0 8px 40px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .25);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  opacity: 0;
  visibility: hidden;
  transform: translateY(24px);
  transition: opacity .4s, transform .6s var(--ease), visibility 0s linear .4s;
  pointer-events: none;
}
.panel.is-active .glass {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
  transition: opacity .4s .25s, transform .6s var(--ease) .25s, visibility 0s;
}
.glass h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.05;
  margin: 8px 0 12px;
}
.glass p { color: var(--muted); line-height: 1.55; margin-bottom: 22px; }

.btn {
  display: inline-block;
  padding: 11px 22px;
  border-radius: 999px;
  background: var(--hue);
  color: #1a0a20;
  font-weight: 500;
  font-size: .92rem;
  text-decoration: none;
  transition: transform .25s, filter .25s;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.08); }

/* Footer */
.footer {
  height: var(--footer-h);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 0 clamp(16px, 4vw, 48px);
  font-size: .82rem;
  color: var(--muted);
}
.footer a { color: var(--text); text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer-links { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--text); }
.footer-links span { color: var(--muted); }

/* Legal pages (Aviso de privacidad, Términos, Cookies) */
body.legal-page { overflow: auto; height: auto; min-height: 100%; }
body.legal-page .footer { height: auto; flex-wrap: wrap; padding: 18px clamp(16px, 4vw, 48px) 28px; gap: 8px 20px; }
main.legal { max-width: 760px; margin: 0 auto; padding: 118px 20px 60px; }
.legal-eyebrow {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .76rem;
  margin-bottom: 12px;
}
main.legal h1 {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: clamp(2rem, 5vw, 2.75rem);
  line-height: 1.1;
  margin-bottom: 12px;
}
.legal-meta {
  color: var(--muted);
  font-size: .84rem;
  line-height: 1.7;
  margin-bottom: 38px;
  padding-bottom: 26px;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.legal-summary {
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 16px;
  padding: 20px 22px;
  margin-bottom: 40px;
}
.legal-summary p { margin-bottom: 10px; }
.legal-summary p:last-child { margin-bottom: 0; }
.legal-toc { margin-bottom: 44px; }
.legal-toc p { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 12px; }
.legal-toc ol { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 20px; }
.legal-toc a { color: var(--muted); font-size: .9rem; text-decoration: none; }
.legal-toc a:hover { color: var(--text); }
.legal-body h2 {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 1.3rem;
  margin: 44px 0 14px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  scroll-margin-top: 90px;
}
.legal-body h2 .num { color: #e055c8; font-size: .82rem; font-weight: 700; font-family: 'Space Grotesk', sans-serif; }
.legal-body h3 { font-size: 1rem; margin: 24px 0 10px; color: var(--text); }
.legal-body p, .legal-body li { color: var(--muted); line-height: 1.7; margin-bottom: 14px; }
.legal-body ul, .legal-body ol { padding-left: 22px; margin-bottom: 18px; }
.legal-body strong { color: var(--text); font-weight: 600; }
.legal-body a { color: #ecb6e0; }
.legal-body table { width: 100%; border-collapse: collapse; margin: 8px 0 26px; font-size: .86rem; }
.legal-body th, .legal-body td { text-align: left; padding: 10px 14px 10px 0; border-bottom: 1px solid rgba(255, 255, 255, .1); color: var(--muted); vertical-align: top; }
.legal-body th { color: var(--text); font-weight: 600; }
.legal-back { display: inline-block; margin-top: 46px; color: var(--muted); font-size: .9rem; text-decoration: none; }
.legal-back:hover { color: var(--text); }

/* Cookie banner */
.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(var(--footer-h) + 14px);
  z-index: 50;
  max-width: 640px;
  margin: 0 auto;
  padding: 18px 22px;
  border-radius: 18px;
  background: rgba(20, 14, 28, .92);
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .4);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
  transform: translateY(160%);
  transition: transform .5s var(--ease);
}
.cookie-banner.is-visible { transform: none; }
.cookie-banner p { flex: 1; min-width: 220px; font-size: .85rem; line-height: 1.55; color: var(--muted); margin: 0; }
.cookie-banner a { color: #ecb6e0; }
.cookie-banner .cookie-actions { display: flex; gap: 10px; }
.cookie-banner .btn { white-space: nowrap; background: #e055c8; }
.cookie-banner .btn-ghost {
  white-space: nowrap;
  padding: 11px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .25);
  color: var(--text);
  background: transparent;
  font-size: .92rem;
  cursor: pointer;
}

/* Mobile: vertical accordion */
@media (max-width: 768px) {
  .gallery { flex-direction: column; padding-top: 64px; }
  .panel { flex: 1; }
  .panel.is-active { flex: 6; }
  .panel-vertical {
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 14px;
    padding: 0 20px;
  }
  .panel-vertical h2 { writing-mode: horizontal-tb; transform: none; font-size: 1.15rem; }
  .glass { padding: 20px; }
  .glass p { margin-bottom: 16px; font-size: .92rem; }
  .footer { flex-direction: column; justify-content: center; height: auto; padding-top: 12px; padding-bottom: 12px; gap: 6px; text-align: center; }
  main.legal { padding-top: 96px; }
  .legal-toc ol { grid-template-columns: 1fr; }
  .cookie-banner { flex-direction: column; align-items: stretch; text-align: center; }
  .cookie-banner .cookie-actions { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: .01ms !important; transition-delay: 0s !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
