/* ==========================================================================
   TOKENS — sistema de diseño
   ========================================================================== */
:root {
  --color-bg:          #FAFAF7;
  --color-bg-alt:      #F1EEE6;
  --color-surface:     #FFFFFF;
  --color-text:        #1B1B18;
  --color-text-muted:  #6B6A62;
  --color-accent:      #8C6A3F;
  --color-accent-soft: #C9A876;
  --color-border:      #E3DFD3;
  --overlay:           rgba(20, 18, 14, 0.55);

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --container-width: 1240px;
  --radius: 3px;
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.75rem;
  --space-4: 3rem;
  --space-5: 5rem;
  --space-6: 8rem;

  color-scheme: light;
}

[data-theme="dark"] {
  --color-bg:          #131210;
  --color-bg-alt:      #1B1A16;
  --color-surface:     #1E1D19;
  --color-text:        #F2F0E9;
  --color-text-muted:  #ACA99D;
  --color-accent:      #D3B482;
  --color-accent-soft: #8C6A3F;
  --color-border:      #322F28;
  --overlay:           rgba(0, 0, 0, 0.6);

  color-scheme: dark;
}

/* Si el usuario nunca ha elegido tema manualmente, el <script> del header
   ya fija data-theme según el sistema. Este bloque es un respaldo por si
   JS estuviera desactivado. */
@media (prefers-color-scheme: dark) {
  html:not([data-theme]) {
    --color-bg:          #131210;
    --color-bg-alt:      #1B1A16;
    --color-surface:     #1E1D19;
    --color-text:        #F2F0E9;
    --color-text-muted:  #ACA99D;
    --color-accent:      #D3B482;
    --color-accent-soft: #8C6A3F;
    --color-border:      #322F28;
  }
}

/* ==========================================================================
   RESET Y BASE
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color .25s ease, color .25s ease;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 var(--space-2);
  letter-spacing: -0.01em;
}
p { max-width: 68ch; margin: 0 0 var(--space-2); color: var(--color-text-muted); }
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--space-3);
}
.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--color-accent); color: #fff; padding: .6em 1em; z-index: 999;
}
.skip-link:focus { left: var(--space-2); top: var(--space-2); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ==========================================================================
   LAYOUT — sidebar fija (desktop) + contenido a pantalla completa
   ========================================================================== */
.site-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 280px; flex-shrink: 0;
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: var(--space-4) var(--space-3);
  border-right: 1px solid var(--color-border);
  background: var(--color-bg);
}
.sidebar-brand .logo { font-size: 1.35rem; display: block; margin-bottom: .15em; }
.sidebar-brand .tagline { font-size: .82rem; color: var(--color-text-muted); letter-spacing: .04em; }

.sidebar-nav { display: flex; flex-direction: column; gap: var(--space-1); margin-top: var(--space-5); }
.sidebar-nav a {
  font-family: var(--font-display); font-size: 1.15rem; color: var(--color-text-muted);
  padding: .35em 0; position: relative; width: fit-content;
}
.sidebar-nav a:hover, .sidebar-nav a.active { color: var(--color-text); }
.sidebar-nav a.active::before {
  content: ''; position: absolute; left: -14px; top: 50%; transform: translateY(-50%);
  width: 5px; height: 5px; border-radius: 50%; background: var(--color-accent);
}

.sidebar-bottom { display: flex; flex-direction: column; gap: var(--space-3); }
.sidebar-socials { display: flex; gap: var(--space-1); flex-wrap: wrap; }
.sidebar-socials .social-btn { width: 36px; height: 36px; }
.sidebar-theme {
  display: flex; align-items: center; gap: .6em; background: none; border: 1px solid var(--color-border);
  border-radius: 20px; padding: .5em .9em; color: var(--color-text-muted); cursor: pointer; width: fit-content;
  font-family: var(--font-body); font-size: .85rem;
}
.sidebar-theme:hover { color: var(--color-text); border-color: var(--color-accent); }
.sidebar-theme .icon-moon { display: none; }
[data-theme="dark"] .sidebar-theme .icon-sun { display: none; }
[data-theme="dark"] .sidebar-theme .icon-moon { display: inline-flex; }
.sidebar-copy { font-size: .78rem; color: var(--color-text-muted); }

.content { flex: 1; min-width: 0; }

/* Botón flotante — solo móvil */
.mobile-toggle {
  display: none; position: fixed; top: 16px; right: 16px; z-index: 210;
  width: 46px; height: 46px; border-radius: 50%;
  background: color-mix(in srgb, var(--color-bg) 82%, transparent);
  backdrop-filter: blur(10px); border: 1px solid var(--color-border);
  align-items: center; justify-content: center; cursor: pointer; color: var(--color-text);
}
.mobile-toggle span { display: block; width: 16px; height: 1.5px; background: currentColor; position: relative; }
.mobile-toggle span::before, .mobile-toggle span::after {
  content: ''; position: absolute; left: 0; width: 16px; height: 1.5px; background: currentColor; transition: transform .2s ease;
}
.mobile-toggle span::before { top: -5px; }
.mobile-toggle span::after { top: 5px; }
.mobile-toggle.open span { background: transparent; }
.mobile-toggle.open span::before { top: 0; transform: rotate(45deg); }
.mobile-toggle.open span::after { top: 0; transform: rotate(-45deg); }

/* Overlay de menú — solo móvil */
.mobile-nav-overlay {
  position: fixed; inset: 0; z-index: 205; background: var(--color-bg);
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  gap: var(--space-2); padding: var(--space-5) var(--space-4);
  transform: translateX(100%); transition: transform .35s ease;
}
.mobile-nav-overlay.open { transform: translateX(0); }
.mobile-nav-overlay a { font-family: var(--font-display); font-size: 1.7rem; color: var(--color-text); }
.mobile-nav-overlay .mobile-overlay-bottom { margin-top: var(--space-4); display: flex; flex-direction: column; gap: var(--space-3); }

@media (max-width: 860px) {
  .sidebar { display: none; }
  .mobile-toggle { display: flex; }
  .content { width: 100%; }
}

/* ==========================================================================
   COVER — portada de la home (splash minimalista, sin copy de venta)
   ========================================================================== */
.cover {
  min-height: calc(100svh - 65px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: var(--space-5) var(--space-3);
  opacity: 0; animation: rise .8s ease forwards .1s;
}
.cover-name { font-size: clamp(2.6rem, 7vw, 5.2rem); margin-bottom: .25em; }
.cover-tagline { font-size: 1.05rem; letter-spacing: .12em; color: var(--color-text-muted); margin-bottom: var(--space-4); }
.cover-scroll {
  margin-top: var(--space-5); width: 26px; height: 42px; border: 1px solid var(--color-border);
  border-radius: 20px; position: relative;
}
.cover-scroll::before {
  content: ''; position: absolute; top: 8px; left: 50%; width: 3px; height: 6px;
  background: var(--color-accent); border-radius: 2px; transform: translateX(-50%);
  animation: scrolldot 1.8s ease infinite;
}
@keyframes scrolldot { 0% { top: 8px; opacity: 1; } 70% { top: 22px; opacity: 0; } 100% { top: 22px; opacity: 0; } }
@keyframes rise { to { opacity: 1; transform: translateY(0); } }

/* ==========================================================================
   BLEED GRID — masonry de 2 columnas, proporciones naturales, gap pequeño
   ========================================================================== */
.bleed-grid {
  columns: 2 300px;
  column-gap: 10px;
  padding: 10px;
}
.bleed-item {
  display: block; break-inside: avoid; margin-bottom: 10px;
  overflow: hidden; background: var(--color-bg-alt);
}
.bleed-item img { width: 100%; height: auto; display: block; transition: transform .5s ease, filter .3s ease; }
.bleed-item:hover img { transform: scale(1.015); }

@media (max-width: 640px) {
  .bleed-grid { columns: 1; padding: 6px; column-gap: 6px; }
  .bleed-item { margin-bottom: 6px; }
}

/* ==========================================================================
   BOTONES
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  padding: .85em 1.6em; border-radius: var(--radius);
  font-size: .95rem; font-weight: 600; border: 1px solid transparent;
  cursor: pointer; transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn-primary { background: var(--color-text); color: var(--color-bg); }
[data-theme="dark"] .btn-primary { background: var(--color-accent); color: #14130F; }
.btn-primary:hover { background: var(--color-accent); color: #fff; }
.btn-outline { border-color: var(--color-border); color: var(--color-text); }
.btn-outline:hover { border-color: var(--color-accent); color: var(--color-accent); }

/* ==========================================================================
   SECCIONES GENÉRICAS
   ========================================================================== */
.section { padding: var(--space-5) 0; }
.section-tight { padding: var(--space-4) 0; }
.section-alt { background: var(--color-bg-alt); }
.section-head { max-width: 60ch; margin-bottom: var(--space-4); }
.section-head.centered { max-width: none; text-align: center; margin-left: auto; margin-right: auto; }
.section-head h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); }
.page-header { text-align: center; padding: var(--space-5) var(--space-3) var(--space-3); }
.page-header h1 { font-size: clamp(2rem, 4vw, 3rem); }
.page-header p { margin: 0 auto; }

/* ==========================================================================
   GRID MOSAICO — Portfolio / Galería
   ========================================================================== */
.mosaic {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--space-2);
}
.mosaic-item {
  position: relative; overflow: hidden; border-radius: var(--radius);
  grid-column: span 3;
  aspect-ratio: 4/5;
}
.mosaic-item.wide { grid-column: span 3; aspect-ratio: 4/5; }
.mosaic-item:nth-child(6n+1) { grid-column: span 4; aspect-ratio: 16/10; }
.mosaic-item:nth-child(6n+4) { grid-column: span 2; aspect-ratio: 3/4; }
.mosaic-item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s ease;
}
.mosaic-item:hover img { transform: scale(1.045); }
.mosaic-item .caption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: var(--space-2);
  background: linear-gradient(to top, var(--overlay), transparent);
  color: #fff; font-size: .9rem; opacity: 0; transition: opacity .25s ease;
}
.mosaic-item:hover .caption { opacity: 1; }

@media (max-width: 860px) {
  .mosaic { grid-template-columns: repeat(2, 1fr); }
  .mosaic-item, .mosaic-item.wide, .mosaic-item:nth-child(6n+1), .mosaic-item:nth-child(6n+4) {
    grid-column: span 1; aspect-ratio: 4/5;
  }
}

/* Buscador + barra de categorías de la Galería */
.gallery-toolbar {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: var(--space-2);
  margin: 0 auto var(--space-4);
}
.search-field {
  display: flex; align-items: center; gap: .6em;
  border: 1px solid var(--color-border); border-radius: 24px;
  padding: .7em 1.1em; width: 100%; max-width: 420px; margin: 0 auto;
  color: var(--color-text-muted); background: var(--color-surface);
}
.search-field svg { flex-shrink: 0; }
.search-field input {
  border: none; background: none; outline: none; width: 100%;
  font-family: var(--font-body); font-size: .95rem; color: var(--color-text);
}
.search-field input::placeholder { color: var(--color-text-muted); }

.category-bar {
  display: flex; flex-wrap: wrap; justify-content: center; gap: .6em;
}
.category-pill {
  border: 1px solid var(--color-border); background: none; color: var(--color-text-muted);
  border-radius: 20px; padding: .5em 1.3em;
  font-family: var(--font-body); font-size: .78rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em;
  cursor: pointer; transition: color .2s ease, border-color .2s ease, background-color .2s ease;
}
.category-pill:hover { border-color: var(--color-accent); color: var(--color-accent); }
.category-pill.active {
  border-color: var(--color-accent); color: var(--color-accent);
  background: color-mix(in srgb, var(--color-accent) 12%, transparent);
}

/* Álbumes de galería (tarjetas más grandes con título) */
.album-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3);
}
.album-card { display: block; }
.album-cover {
  aspect-ratio: 4/5; overflow: hidden; border-radius: var(--radius); margin-bottom: var(--space-1);
}
.album-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.album-card:hover .album-cover img { transform: scale(1.04); }
.album-title { font-family: var(--font-display); font-size: 1.15rem; margin-bottom: .1em; }
.album-meta { font-size: .85rem; color: var(--color-text-muted); }
@media (max-width: 860px) { .album-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .album-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   LIGHTBOX
   ========================================================================== */
.lightbox {
  position: fixed; inset: 0; background: var(--overlay);
  display: none; align-items: center; justify-content: center; z-index: 1000;
  padding: var(--space-3);
}
.lightbox.open { display: flex; }
.lightbox img { max-height: 88vh; max-width: 88vw; border-radius: var(--radius); }
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute; background: rgba(255,255,255,.12); color: #fff; border: none;
  width: 44px; height: 44px; border-radius: 50%; cursor: pointer; font-size: 1.2rem;
}
.lightbox-close { top: var(--space-3); right: var(--space-3); }
.lightbox-prev { left: var(--space-3); top: 50%; transform: translateY(-50%); }
.lightbox-next { right: var(--space-3); top: 50%; transform: translateY(-50%); }

/* ==========================================================================
   SOBRE MÍ
   ========================================================================== */
.about-grid {
  display: grid; grid-template-columns: 0.85fr 1.15fr; gap: var(--space-5); align-items: center;
}
.about-photo { border-radius: var(--radius); overflow: hidden; aspect-ratio: 3/4; }
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   PRESS / CLIENTES
   ========================================================================== */
.press-list { display: grid; gap: var(--space-3); margin-bottom: var(--space-5); }
.press-item {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: var(--space-2); padding: var(--space-2) 0; border-bottom: 1px solid var(--color-border);
}
.press-item .outlet { font-family: var(--font-display); font-size: 1.1rem; }
.press-item a { color: var(--color-accent); font-size: .9rem; white-space: nowrap; }

.logo-slider { overflow: hidden; position: relative; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.logo-track {
  display: flex; gap: var(--space-5); width: max-content; align-items: center;
  animation: scroll 28s linear infinite; animation-play-state: running;
}
.logo-item { display: flex; align-items: center; }
a.logo-item { cursor: pointer; }
.logo-item img {
  height: 34px; width: auto;
  filter: grayscale(1) opacity(.65);
  transition: filter .25s ease, opacity .25s ease, transform .25s ease;
}
.logo-item:hover img { filter: grayscale(0) opacity(1); transform: scale(1.05); }
[data-theme="dark"] .logo-item img { filter: grayscale(1) opacity(.55) invert(0.9); }
[data-theme="dark"] .logo-item:hover img { filter: grayscale(0) opacity(1) invert(0); transform: scale(1.05); }
@keyframes scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ==========================================================================
   BLOG
   ========================================================================== */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); }
.post-card-image { aspect-ratio: 4/3; overflow: hidden; border-radius: var(--radius); margin-bottom: var(--space-2); }
.post-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.post-card:hover .post-card-image img { transform: scale(1.04); }
.post-date { font-size: .85rem; color: var(--color-accent); margin-bottom: .3em; }
.post-card h3 { font-size: 1.25rem; }
@media (max-width: 860px) { .post-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .post-grid { grid-template-columns: 1fr; } }

.post-body { max-width: 68ch; margin: 0 auto; }
.post-body p, .post-body li { color: var(--color-text); }
.post-hero { aspect-ratio: 16/9; overflow: hidden; border-radius: var(--radius); margin-bottom: var(--space-4); }
.post-hero img { width: 100%; height: 100%; object-fit: cover; }

/* ==========================================================================
   CONTACTO
   ========================================================================== */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-5); }
.contact-info dt { color: var(--color-text-muted); font-size: .85rem; margin-top: var(--space-3); }
.contact-info dd { margin: .2em 0 0; font-size: 1.15rem; font-family: var(--font-display); }
.social-row { display: flex; gap: var(--space-2); margin-top: var(--space-4); flex-wrap: wrap; }

/* Botones sociales — fondo de color propio por red, icono blanco, con un
   pequeño "salto" y sombra de color al pasar el ratón (look más moderno
   y desenfadado que el contorno neutro de antes). */
.social-btn {
  width: 44px; height: 44px; border-radius: 50%; border: none;
  display: flex; align-items: center; justify-content: center; color: #fff;
  background: var(--social-color, var(--color-accent));
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.social-btn:hover {
  transform: translateY(-3px) scale(1.07);
  box-shadow: 0 8px 18px -4px color-mix(in srgb, var(--social-color, var(--color-accent)) 70%, transparent);
  filter: brightness(1.08);
}
.social-btn:active { transform: translateY(-1px) scale(1.02); }

.social-btn--instagram { --social-color: #E1306C; background: linear-gradient(135deg, #FEDA75 0%, #D62976 45%, #4F5BD5 100%); }
.social-btn--facebook  { --social-color: #1877F2; }
.social-btn--linkedin  { --social-color: #0A66C2; }
.social-btn--behance   { --social-color: #1769FF; }
.social-btn--vimeo     { --social-color: #19B7EA; }
.social-btn--tiktok    { --social-color: #25F4EE; background: #000; }
.social-btn--tiktok:hover { box-shadow: 0 8px 18px -4px rgba(255,0,80,.5); }

/* En la sidebar los queremos un poco más discretos (más pequeños) */
.sidebar-socials .social-btn:hover { transform: translateY(-2px) scale(1.1); }

.form-field { margin-bottom: var(--space-3); }
.form-field label { display: block; font-size: .85rem; color: var(--color-text-muted); margin-bottom: .4em; }
.form-field input, .form-field textarea {
  width: 100%; padding: .8em 1em; border: 1px solid var(--color-border); border-radius: var(--radius);
  background: var(--color-surface); color: var(--color-text); font-family: var(--font-body); font-size: 1rem;
}
.form-field textarea { min-height: 130px; resize: vertical; }
.form-field input:focus, .form-field textarea:focus,
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--color-accent); outline-offset: 2px;
}
.form-note { font-size: .85rem; }

@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer { border-top: 1px solid var(--color-border); padding-top: var(--space-4); margin-top: var(--space-5); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-3); padding-bottom: var(--space-3); }
.footer-name { font-family: var(--font-display); font-size: 1.2rem; margin: 0; }
.footer-tagline { color: var(--color-text-muted); margin: .2em 0 0; }
.footer-nav { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-3); align-self: center; }
.footer-nav a { font-size: .9rem; color: var(--color-text-muted); }
.footer-nav a:hover { color: var(--color-text); }
.footer-social { display: flex; gap: var(--space-2); align-self: center; }
.footer-bottom {
  border-top: 1px solid var(--color-border); padding: var(--space-2) 0;
  font-size: .82rem; color: var(--color-text-muted);
}

/* ==========================================================================
   COOKIES — banner y modal de configuración
   ========================================================================== */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 320;
  background: var(--color-surface); border-top: 1px solid var(--color-border);
  padding: var(--space-3); box-shadow: 0 -8px 24px rgba(0,0,0,.12);
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3);
  transform: translateY(100%); transition: transform .3s ease;
}
.cookie-banner.open { transform: translateY(0); }
.cookie-banner-text { flex: 1 1 320px; font-size: .88rem; margin: 0; color: var(--color-text-muted); }
.cookie-banner-text a { color: var(--color-accent); }
.cookie-banner-actions { display: flex; flex-wrap: wrap; gap: .6em; }
.cookie-banner-actions .btn { padding: .6em 1.1em; font-size: .85rem; white-space: nowrap; }

.cookie-modal {
  position: fixed; inset: 0; z-index: 330; background: var(--overlay);
  display: flex; align-items: center; justify-content: center; padding: var(--space-3);
  opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.cookie-modal.open { opacity: 1; pointer-events: auto; }
.cookie-modal-panel {
  background: var(--color-surface); border-radius: var(--radius);
  padding: var(--space-4); width: 100%; max-width: 480px;
  max-height: 85vh; overflow-y: auto;
  transform: translateY(12px); transition: transform .2s ease;
}
.cookie-modal.open .cookie-modal-panel { transform: translateY(0); }
.cookie-modal-panel h2 { font-size: 1.4rem; margin-bottom: var(--space-3); }
.cookie-category { padding: var(--space-2) 0; border-top: 1px solid var(--color-border); }
.cookie-category:first-of-type { border-top: none; }
.cookie-category-head { display: flex; justify-content: space-between; align-items: center; font-weight: 600; color: var(--color-text); margin-bottom: .3em; }
.cookie-category p { font-size: .85rem; margin: 0; }
.cookie-toggle-locked { font-size: .75rem; color: var(--color-text-muted); font-weight: 400; }

.cookie-switch { position: relative; display: inline-block; width: 40px; height: 22px; }
.cookie-switch input { opacity: 0; width: 0; height: 0; }
.cookie-switch-track {
  position: absolute; inset: 0; background: var(--color-border); border-radius: 22px; cursor: pointer; transition: background-color .2s ease;
}
.cookie-switch-track::before {
  content: ''; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px;
  background: #fff; border-radius: 50%; transition: transform .2s ease;
}
.cookie-switch input:checked + .cookie-switch-track { background: var(--color-accent); }
.cookie-switch input:checked + .cookie-switch-track::before { transform: translateX(18px); }

.cookie-modal-actions { display: flex; justify-content: flex-end; gap: .6em; margin-top: var(--space-3); }
.cookie-modal-actions .btn { padding: .6em 1.2em; font-size: .88rem; }

@media (max-width: 640px) {
  .cookie-banner { flex-direction: column; align-items: stretch; }
  .cookie-banner-actions { justify-content: stretch; }
  .cookie-banner-actions .btn { flex: 1; }
}

/* ==========================================================================
   ENLACES LEGALES — al pie de la sidebar (desktop) y del overlay móvil
   ========================================================================== */
.sidebar-legal {
  display: flex; flex-direction: column; gap: .4em;
  padding-top: var(--space-2); border-top: 1px solid var(--color-border);
  font-size: .64rem; color: #C3C3C3;
}
.sidebar-legal a, .sidebar-legal button {
  background: none; border: none; padding: 0; cursor: pointer; text-align: left;
  font-family: var(--font-body); font-size: .64rem; color: #C3C3C3;
}
.sidebar-legal a:hover, .sidebar-legal button:hover { color: var(--color-accent); }
.mobile-overlay-bottom .sidebar-legal { border-top-color: var(--color-border); }

/* ==========================================================================
   PWA — banner de instalación
   ========================================================================== */
.pwa-install-banner {
  position: fixed; left: 50%; bottom: 20px; z-index: 300;
  display: flex; align-items: center; gap: var(--space-2);
  width: min(92vw, 480px);
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius); padding: var(--space-2) var(--space-3);
  box-shadow: 0 12px 32px rgba(0,0,0,.18);
  transform: translate(-50%, 24px); opacity: 0;
  transition: transform .3s ease, opacity .3s ease;
}
.pwa-install-banner.open { transform: translate(-50%, 0); opacity: 1; }
.pwa-install-icon img { border-radius: 8px; display: block; }
.pwa-install-copy { flex: 1; min-width: 0; }
.pwa-install-title { font-family: var(--font-display); font-size: 1rem; color: var(--color-text); margin: 0; }
.pwa-install-text { font-size: .82rem; margin: .2em 0 0; color: var(--color-text-muted); }
.pwa-install-actions { display: flex; flex-direction: column; gap: .4em; }
.pwa-install-actions .btn { padding: .5em 1em; font-size: .82rem; white-space: nowrap; }

@media (max-width: 520px) {
  .pwa-install-banner { flex-wrap: wrap; bottom: 12px; }
  .pwa-install-actions { flex-direction: row; width: 100%; justify-content: flex-end; }
}

/* ==========================================================================
   PROTECCIÓN DE IMÁGENES — fricciones (ver aviso en assets/js/image-guard.js)
   ========================================================================== */
.bleed-item img,
.album-cover img,
.hero-media img,
.about-photo img,
.lightbox img,
.post-card-image img {
  -webkit-user-drag: none;
  user-select: none;
  -webkit-touch-callout: none; /* bloquea el menú de "Guardar imagen" al mantener pulsado en iOS */
}

.empty-state {
  border: 1px dashed var(--color-border); border-radius: var(--radius);
  padding: var(--space-4); text-align: center; color: var(--color-text-muted);
}
