/* Visione1 Responsive Consistency Pass 00
 * Shared public visual language. This file deliberately follows the legacy
 * layers so it can consolidate presentation without replacing public flows. */

:root {
  --v1-color-background: var(--color-background, #080808);
  --v1-color-surface: var(--color-surface, #101111);
  --v1-color-surface-elevated: #171818;
  --v1-color-text: var(--color-text, #f3f1ec);
  --v1-color-muted: var(--color-muted, #aaa8a3);
  --v1-color-accent: var(--color-accent, #e01d26);
  --v1-color-border: var(--color-border, rgba(255, 255, 255, .12));
  --v1-color-success: #79bd92;
  --v1-color-error: #ef5d66;
  --v1-radius-sm: 10px;
  --v1-radius-md: var(--radius-card, 16px);
  --v1-radius-lg: 24px;
  --v1-space-xs: var(--space-xs, 8px);
  --v1-space-sm: var(--space-sm, 14px);
  --v1-space-md: var(--space-md, 22px);
  --v1-space-lg: var(--space-lg, 36px);
  --v1-space-xl: var(--space-xl, 58px);
  --v1-content-width: var(--content-width, var(--v3-max, 1440px));
  --v1-gutter: var(--global-gutter, var(--v3-gutter, clamp(20px, 5vw, 72px)));
  --v1-motion-duration: 180ms;
  --v1-motion-ease: cubic-bezier(.2, .75, .3, 1);
  --v3-bg: var(--v1-color-background);
  --v3-panel: var(--v1-color-surface);
  --v3-text: var(--v1-color-text);
  --v3-muted: var(--v1-color-muted);
  --v3-line: var(--v1-color-border);
  --v3-red: var(--v1-color-accent);
  --v4-bg: var(--v1-color-background);
  --v4-surface: var(--v1-color-surface);
  --v4-line: var(--v1-color-border);
  --v4-muted: var(--v1-color-muted);
}

html { background: var(--v1-color-background); }
body { min-width: 0; background: var(--v1-color-background); color: var(--v1-color-text); }
button, a, input { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 2px solid var(--v1-color-accent);
  outline-offset: 3px;
}

/* Shared header action treatment for Home and Galerías. */
.v3-header-actions, .gallery-header .header-actions {
  align-items: center;
  gap: 6px;
}
.v430-header-icon, .v1-header-icon, .gallery-menu-toggle, .menu-toggle {
  min-width: 44px;
  min-height: 44px;
}
.v430-header-icon, .v1-header-icon {
  position: relative;
  display: inline-grid;
  place-items: center;
  border-radius: var(--v1-radius-sm);
  color: var(--v1-color-text);
  transition: background var(--v1-motion-duration) var(--v1-motion-ease), transform var(--v1-motion-duration) var(--v1-motion-ease);
}
.v430-header-icon:hover, .v1-header-icon:hover { background: color-mix(in srgb, var(--v1-color-text) 9%, transparent); }
.v430-header-icon:active, .v1-header-icon:active { transform: scale(.96); }
.v430-header-icon svg, .v1-header-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.v430-header-icon > span, .v1-header-icon > span {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 17px;
  min-height: 17px;
  display: grid;
  place-items: center;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--v1-color-accent);
  color: #fff;
  font: 800 .56rem/1 var(--font-primary, Arial, sans-serif);
}
.menu-toggle, .gallery-menu-toggle {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 0;
  background: transparent;
  color: var(--v1-color-text);
}
.menu-toggle i, .gallery-menu-toggle i {
  display: block;
  width: 20px;
  height: 2px !important;
  flex: 0 0 2px !important;
  border-radius: 999px;
  background: currentColor;
}

/* The visual builder owns values; these rules only map the public shell to its tokens. */
.v3-header, .gallery-header {
  color: var(--v1-color-text);
  border-color: var(--v1-color-border);
}
.v3-primary-button, .button-red, .checkout-button, .lightbox-actions .primary {
  border-radius: var(--radius-button, var(--v1-radius-md));
}
.v3-primary-button { background: var(--v1-color-accent); color: #fff; }
.v3-primary-button:hover { background: color-mix(in srgb, var(--v1-color-accent) 88%, white); }
.v392-recent-grid .v3-recent-card, .collection-card, .v3-album-card { border-radius: var(--v1-radius-md); }
.toast { border-color: var(--v1-color-border); background: var(--v1-color-surface-elevated); color: var(--v1-color-text); }

/* The gallery cards are a Home block at every viewport. The compact list in
 * the desktop hero remains a complementary summary, not a mobile replacement. */
.v392-latest { display: block !important; }
@media (min-width: 1025px) {
  .v392-latest { max-width: var(--v1-content-width); padding-inline: var(--v1-gutter); }
  .v392-recent-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Tablet stays between the navigation-rich and compact layouts. */
@media (min-width: 721px) and (max-width: 1024px) {
  body { padding-bottom: 0 !important; }
  .v3-mobile-tabbar { display: none !important; }
  .site-header.v3-header {
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
  }
  .site-header .menu-toggle, .site-header .v3-header-actions { display: flex !important; }
  .hero.v3-hero, section.intro, section.moments--v2, section.statement { display: block !important; }
  .v392-latest { display: block !important; }
  .v3-header { width: calc(100% - 32px); }
  .v3-hero { min-height: 680px; }
  .v430-featured { display: none !important; }
  .v3-hero-inner { padding-inline: clamp(28px, 5vw, 56px); }
  .v430-trust {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px !important;
    max-width: 720px;
    margin-top: 28px !important;
    color: var(--v1-color-text) !important;
  }
  .v430-trust span {
    min-height: 64px;
    padding: 12px !important;
    border: 1px solid color-mix(in srgb, var(--v1-color-text) 15%, transparent) !important;
    border-radius: var(--v1-radius-sm);
    background: color-mix(in srgb, var(--v1-color-background) 70%, transparent);
    font-size: .72rem !important;
  }
  .v430-trust span:first-child { padding-left: 12px !important; border-left: 1px solid color-mix(in srgb, var(--v1-color-text) 15%, transparent) !important; }
  .v430-trust svg { width: 22px; height: 22px; flex: 0 0 auto; }
  .v392-latest { padding-inline: clamp(28px, 5vw, 56px); }
  .v392-recent-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v392-recent-grid .v3-recent-card { min-height: 280px; }
  .gallery-header { padding-inline: clamp(20px, 4vw, 42px); }
  .collection-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .album-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 721px) {
  .gallery-menu-toggle { display: none !important; }
}

@media (min-width: 1025px) {
  .menu-toggle { display: none !important; }
}

/* Mobile adapts the same header, hero, links and data. No public section is removed. */
@media (max-width: 720px) {
  body { padding-bottom: 0 !important; }
  .v3-mobile-tabbar { display: none !important; }

  .site-header.v3-header {
    position: fixed !important;
    z-index: 90;
    top: 8px !important;
    left: 8px !important;
    right: 8px !important;
    width: auto !important;
    transform: none !important;
    height: 58px !important;
    display: flex !important;
    padding: 0 8px 0 14px !important;
    border: 1px solid var(--v1-color-border) !important;
    border-radius: 14px !important;
    background: color-mix(in srgb, var(--v1-color-background) 90%, transparent) !important;
    backdrop-filter: blur(18px) saturate(1.15);
  }
  .site-header.v3-header .brand { font-size: 1rem !important; }
  .site-header .menu-toggle, .site-header .v3-header-actions { display: flex !important; }
  .site-header .v3-header-actions { margin-left: auto; margin-right: 2px; }
  .site-header .v430-search-link { display: none !important; }
  .site-header .menu-toggle {
    display: grid !important;
    place-items: center;
    order: 4;
    border-radius: var(--v1-radius-sm);
  }
  .site-header .navigation {
    position: fixed !important;
    z-index: 91;
    top: 74px !important;
    left: 8px !important;
    right: 8px !important;
    display: none !important;
    flex-direction: column;
    align-items: stretch;
    gap: 2px !important;
    margin: 0 !important;
    padding: 10px !important;
    border: 1px solid var(--v1-color-border);
    border-radius: 14px;
    background: color-mix(in srgb, var(--v1-color-background) 97%, transparent);
    box-shadow: 0 20px 42px rgba(0, 0, 0, .38);
  }
  .site-header .navigation.is-open { display: flex !important; }
  .site-header .navigation a {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    border-radius: 9px;
  }
  .site-header .navigation a.is-active::after { display: none !important; }
  .site-header .navigation a.is-active { background: color-mix(in srgb, var(--v1-color-accent) 16%, transparent); color: var(--v1-color-text) !important; }
  body.menu-open { overflow: hidden; }

  .hero.v3-hero {
    display: block !important;
    height: max(620px, 100svh) !important;
    min-height: 620px !important;
    margin: 0 !important;
  }
  .v3-hero .hero-image { object-position: 60% center !important; }
  .v3-hero-inner { display: block !important; padding: 0 !important; }
  .v3-hero-copy {
    position: absolute !important;
    left: 20px !important;
    right: 20px !important;
    bottom: 34px !important;
    max-width: none !important;
  }
  .v3-hero-copy h1 { max-width: 10ch !important; font-size: clamp(3rem, 13vw, 4.35rem) !important; }
  .v3-hero-description { max-width: 33ch !important; }
  .v3-primary-button { width: min(100%, 340px) !important; }
  .v3-trust { gap: 9px 14px !important; margin-top: 18px !important; }
  .v3-trust span { min-height: 32px; }
  .v3-trust b { font-size: .61rem !important; }
  .v430-featured { display: none !important; }
  .v392-latest {
    display: block !important;
    padding: 42px 16px 46px !important;
    overflow: visible !important;
  }
  .v392-latest-head { margin-bottom: 18px !important; }
  .v392-latest-head h2 { font-size: clamp(1.9rem, 9vw, 2.35rem) !important; }
  .v392-recent-grid { grid-template-columns: 1fr !important; gap: 12px !important; }
  .v392-recent-grid .v3-recent-card { min-height: 225px !important; border-radius: var(--v1-radius-md) !important; }

  section.intro, section.moments--v2, section.statement { display: block !important; }
  .intro, .moments--v2, .statement, .contact { padding-inline: 20px !important; }
  .intro { padding-top: 52px !important; }
  .journey-grid { grid-template-columns: 1fr !important; }
  .statement { min-height: auto !important; }
  .site-footer, .gallery-footer {
    display: grid;
    gap: var(--v1-space-md);
    padding: 34px 20px calc(34px + env(safe-area-inset-bottom)) !important;
  }
  .site-footer .home-footer-nav, .gallery-footer .footer-navigation { flex-wrap: wrap; gap: 12px 18px; }

  .gallery-header {
    position: sticky;
    top: 0;
    z-index: 80;
    min-height: 58px;
    padding: 7px 12px;
    border-bottom: 1px solid var(--v1-color-border);
    background: color-mix(in srgb, var(--v1-color-background) 94%, transparent);
    backdrop-filter: blur(18px) saturate(1.15);
  }
  .gallery-header .header-label { display: none; }
  .gallery-header .header-actions { margin-left: auto; }
  .gallery-header .gallery-navigation {
    position: fixed;
    z-index: 81;
    top: 66px;
    left: 8px;
    right: 8px;
    display: none;
    flex-direction: column;
    gap: 2px;
    padding: 10px;
    border: 1px solid var(--v1-color-border);
    border-radius: 14px;
    background: var(--v1-color-background);
    box-shadow: 0 20px 42px rgba(0, 0, 0, .38);
  }
  .gallery-header .gallery-navigation.is-open { display: flex; }
  .gallery-header .gallery-navigation > a, .gallery-header .gallery-navigation > button {
    min-height: 44px;
    padding: 0 12px;
    text-align: left;
    border-radius: 9px;
  }
  .gallery-header .header-actions .selection-link { display: inline-grid !important; }

  .view { padding-inline: 16px !important; }
  .collection-grid, .album-list { grid-template-columns: 1fr !important; gap: 12px !important; }
  .v3-gallery-view { padding-inline: 0 !important; }
  .v3-photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .lightbox-top-actions button, .lightbox-top .lightbox-close { min-width: 44px !important; min-height: 44px !important; }
  .toast { left: 16px !important; right: 16px !important; bottom: 16px !important; width: auto !important; }
}

@media (max-width: 420px) {
  .v3-hero-copy h1 { font-size: clamp(2.7rem, 12.5vw, 3.35rem) !important; }
  .v3-trust { display: grid !important; grid-template-columns: 1fr 1fr; }
  .v3-trust span:last-child { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}

/* PUBLIC UX PASS 01 — one responsive gallery/card system for desktop, tablet
 * and mobile.  The controls are presentation only; gallery state remains in
 * the shared public controller. */
.photo-cart {
  position: absolute;
  z-index: 3;
  top: .55rem;
  right: 3rem;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 50%;
  background: rgba(0,0,0,.68);
  color: var(--v1-color-text);
  font: 700 1rem/1 system-ui, sans-serif;
  backdrop-filter: blur(8px);
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}
.photo-cart:hover { border-color: rgba(255,255,255,.52); transform: translateY(-1px); }
.photo-cart:active { transform: scale(.94); }
.photo-cart.is-selected { border-color: var(--v1-color-accent); background: var(--v1-color-accent); color: #fff; }
.global-favorites-actions { display: grid; justify-items: end; gap: .8rem; }
.favorites-add-all {
  min-height: 42px;
  padding: 0 1rem;
  border: 1px solid var(--v1-color-border);
  border-radius: var(--v1-radius-sm);
  background: var(--v1-color-surface);
  color: var(--v1-color-text);
  font: 650 .72rem/1 var(--v1-font-body, system-ui, sans-serif);
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}
.favorites-add-all:hover:not(:disabled) { border-color: var(--v1-color-accent); background: color-mix(in srgb, var(--v1-color-accent) 14%, var(--v1-color-surface)); }
.favorites-add-all:active:not(:disabled) { transform: scale(.98); }
.favorites-add-all:disabled { cursor: default; border-color: var(--v1-color-border); color: var(--v1-color-muted); opacity: .72; }

@media (max-width: 720px) {
  .v3-photo-grid .photo-cart { top: 5px; right: 41px; width: 32px; height: 32px; font-size: .92rem; }
  .global-favorites-actions { justify-items: stretch; margin-top: 1rem; }
  .favorites-add-all { width: 100%; min-height: 46px; }
}

@media (prefers-reduced-motion: reduce) {
  .photo-cart, .favorites-add-all { transition: none; }
}
