/* ==========================================================================
   PRIVATE VINTAGE COLLECTIONS - Luxury Editorial Design System & Styling
   Crafted for Authentic Vintage Petrol Pumps, Enamel Signs & Memorabilia
   ========================================================================== */

/* --------------------------------------------------------------------------
   SELF-HOSTED FONTS (latin subset, woff2, font-display: swap)
   Bebas Neue, Inter, Manrope, Oswald: SIL Open Font License 1.1.
   Inter/Manrope/Oswald are variable fonts limited to the weights used
   (Inter 300-400, Manrope 400, Oswald 400-600).
   -------------------------------------------------------------------------- */
@font-face {
  font-family: 'Bebas Neue';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/bebas-neue-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 400;
  font-display: swap;
  src: url('../assets/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/manrope-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Oswald';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../assets/fonts/oswald-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --------------------------------------------------------------------------
   FONT AWESOME FREE 6.4.0 - subset with only the icons used by the site
   Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT - https://fontawesome.com/license/free
   Add a new icon: add its :before rule below and its glyph to assets/fonts/fa-*-subset.woff2
   -------------------------------------------------------------------------- */
@font-face {
  font-family: 'Font Awesome 6 Free';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('../assets/fonts/fa-solid-subset.woff2') format('woff2');
}
@font-face {
  font-family: 'Font Awesome 6 Brands';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/fa-brands-subset.woff2') format('woff2');
}

.fas,
.fa-solid,
.fab,
.fa-brands {
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  display: var(--fa-display, inline-block);
  font-style: normal;
  font-variant: normal;
  line-height: 1;
  text-rendering: auto;
}

.fas,
.fa-solid {
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
}

.fab,
.fa-brands {
  font-family: 'Font Awesome 6 Brands';
  font-weight: 400;
}

.fa-gas-pump::before { content: "\f52f"; }
.fa-paper-plane::before { content: "\f1d8"; }
.fa-envelope::before { content: "\f0e0"; }
.fa-user-shield::before { content: "\f505"; }
.fa-tools::before { content: "\f7d9"; }
.fa-star::before { content: "\f005"; }
.fa-shield-alt::before { content: "\f3ed"; }
.fa-search-plus::before { content: "\f00e"; }
.fa-map-marker-alt::before { content: "\f3c5"; }
.fa-horse::before { content: "\f6f0"; }
.fa-fire::before { content: "\f06d"; }
.fa-dharmachakra::before { content: "\f655"; }
.fa-compass::before { content: "\f14e"; }
.fa-chevron-right::before { content: "\f054"; }
.fa-chevron-left::before { content: "\f053"; }
.fa-check-circle::before { content: "\f058"; }
.fa-bars::before { content: "\f0c9"; }
.fa-arrows-alt-h::before { content: "\f337"; }
.fa-whatsapp::before { content: "\f232"; }
.fa-instagram::before { content: "\f16d"; }
.fa-facebook-f::before { content: "\f39e"; }

:root {
  /* Color System */
  --bg-matte: #090A0C;
  --bg-dark: #0F1115;
  --bg-card: #16191E;
  --bg-card-hover: #1E2229;
  --border-muted: rgba(255, 255, 255, 0.08);
  --border-brass: rgba(197, 160, 89, 0.3);
  
  --color-brass: #C5A059;
  --color-brass-light: #E5C170;
  --color-brass-glow: rgba(197, 160, 89, 0.15);
  --color-copper: #B87333;
  --color-red: #A93226;
  --color-petrol: #1B4958;
  --color-rust: #D35400;
  
  --text-white: #F4F1EA;
  --text-cream: #EAE3D2;
  --text-muted: #9BA1AC;
  --text-dim: #656B77;
  
  /* Typography */
  --font-heading: 'Bebas Neue', 'Oswald', sans-serif;
  --font-subheading: 'Oswald', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'Manrope', sans-serif;
  
  /* Transitions & Shadows */
  --transition-fast: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-card: 0 20px 40px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 30px rgba(197, 160, 89, 0.15);
}

/* Reset & Base Setup */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-matte);
  color: var(--text-white);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
  line-height: 1.6;
}

/* Page scroll lock (see lockScroll() in js/main.js): body is fixed at the saved
   scroll position; --scrollbar-comp replaces the width of the vanished scrollbar */
html.no-scroll {
  overflow: hidden;
}

html.no-scroll body {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
  padding-right: var(--scrollbar-comp, 0px);
}

html.no-scroll .navbar {
  padding-right: calc(4vw + var(--scrollbar-comp, 0px));
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-matte);
}
::-webkit-scrollbar-thumb {
  background: #252932;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-brass);
}

/* Typography Utilities */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 400;
  line-height: 1.05;
}

p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

a {
  color: inherit;
  text-decoration: none;
}

.brass-text {
  color: var(--color-brass);
  background: linear-gradient(135deg, #E5C170 0%, #C5A059 50%, #9E7B3B 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-subheading);
  font-size: 0.85rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--color-brass);
  margin-bottom: 0.8rem;
}

.eyebrow::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--color-brass);
}

.section-padding {
  padding: 7rem 5vw;
}

/* --------------------------------------------------------------------------
   NAVBAR (Sticky Glassmorphic)
   -------------------------------------------------------------------------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: var(--transition-smooth);
  padding: calc(1.2rem - 2px) 4vw;
  background: rgba(9, 10, 12, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(197, 160, 89, 0.2);
}

.navbar.scrolled {
  padding: calc(0.85rem - 2px) 4vw;
  background: rgba(9, 10, 12, 0.96);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
  border-bottom: 1px solid var(--border-brass);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  gap: 1.5rem;
}

.nav-logo {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.nav-logo-header {
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
}

.nav-logo-icon {
  display: block;
  height: 48px;
  width: auto;
}

.nav-logo-text {
  display: flex;
  flex-direction: column;
}

.footer-logo-img {
  display: block;
  width: 100%;
  max-width: 280px;
  height: auto;
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 1.65rem;
  letter-spacing: 0.08em;
  color: var(--text-white);
  line-height: 1;
}

.brand-subtitle {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.22em;
  color: var(--color-brass);
  text-transform: uppercase;
  margin-top: 3px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  list-style: none;
}

.nav-link {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-white);
  opacity: 0.85;
  transition: var(--transition-fast);
  position: relative;
  white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
  opacity: 1;
  color: var(--color-brass);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-brass);
  transition: var(--transition-fast);
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.nav-actions .btn {
  padding: 0.65rem 1.1rem;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
}

/* Button Component System */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.8rem;
  font-family: var(--font-subheading);
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 2px;
  cursor: pointer;
  transition: var(--transition-fast);
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--color-brass);
  color: #090A0C;
  font-weight: 600;
  box-shadow: 0 4px 20px rgba(197, 160, 89, 0.25);
}

.btn-primary:hover {
  background: var(--color-brass-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(197, 160, 89, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--text-white);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-outline:hover {
  border-color: var(--color-brass);
  color: var(--color-brass);
  background: var(--color-brass-glow);
}

.btn-whatsapp {
  background: #25D366;
  color: #090A0C;
  font-weight: 600;
}

.btn-whatsapp:hover {
  background: #20BA5A;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.3);
}

.btn-instagram {
  display: flex;
  width: fit-content;
  max-width: 100%;
  background: transparent;
  color: var(--color-brass);
  border-color: var(--color-brass);
  text-transform: none;
  overflow-wrap: anywhere;
}

.btn-instagram:hover {
  background: var(--color-brass);
  color: #090A0C;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(197, 160, 89, 0.3);
}

.btn-instagram:focus-visible,
.contact-link:focus-visible {
  outline: 2px solid var(--color-brass-light);
  outline-offset: 3px;
}

/* Mobile Nav Toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-white);
  font-size: 1.8rem;
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   HERO SECTION (Cinematic Warehouse Atmosphere)
   -------------------------------------------------------------------------- */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 150px 5vw 80px;
  overflow: hidden;
  background: var(--bg-matte);
}

.hero-bg-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-bg-container picture {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: brightness(0.4) contrast(1.15);
  transform: scale(1.05);
  animation: heroZoom 25s infinite alternate ease-in-out;
}

@keyframes heroZoom {
  0% { transform: scale(1.02); }
  100% { transform: scale(1.1); }
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 60% 40%, rgba(197, 160, 89, 0.12) 0%, transparent 60%),
              linear-gradient(to bottom, rgba(9, 10, 12, 0.7) 0%, rgba(9, 10, 12, 0.5) 50%, #090A0C 100%);
  z-index: 2;
}

#dust-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  pointer-events: none;
  opacity: 0.7;
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 920px;
  margin-top: 0;
}

.hero-title {
  font-size: clamp(3.2rem, 7vw, 6rem);
  line-height: 0.95;
  margin-bottom: 1.5rem;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}

.hero-subtitle {
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
  color: var(--text-cream);
  max-width: 680px;
  margin-bottom: 2.8rem;
  font-weight: 300;
  line-height: 1.7;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  align-items: center;
}

.hero-badges {
  margin-top: 3rem;
  display: flex;
  flex-wrap: wrap;
  gap: 3.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.8rem;
}

.hero-badge-item {
  display: flex;
  flex-direction: column;
}

.badge-num-wrap {
  display: flex;
  align-items: baseline;
  gap: 2px;
}

.hero-badge-number {
  font-family: var(--font-heading);
  font-size: 2.6rem;
  color: var(--color-brass);
  line-height: 1;
}

.hero-badge-unit {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  color: var(--color-brass);
  line-height: 1;
}

.hero-badge-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 6px;
  white-space: nowrap;
}


/* --------------------------------------------------------------------------
   HERITAGE BRANDS SECTION (Gulf, Shell, Agip, Esso, Texaco, Mobil)
   -------------------------------------------------------------------------- */
.heritage-section {
  background: var(--bg-dark);
  border-top: 1px solid var(--border-muted);
  border-bottom: 1px solid var(--border-muted);
}

.brand-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.8rem;
  margin-top: 3.5rem;
}

.brand-card {
  background: var(--bg-card);
  border: 1px solid var(--border-muted);
  padding: 2.2rem;
  border-radius: 4px;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.brand-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 0;
  background: var(--color-brass);
  transition: var(--transition-smooth);
}

.brand-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-brass);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-card);
}

.brand-card:hover::before {
  height: 100%;
}

.brand-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.2rem;
}

.brand-icon-tag {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  color: var(--text-white);
}

.brand-badge-era {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 3px 8px;
  background: rgba(197, 160, 89, 0.1);
  color: var(--color-brass);
  border: 1px solid var(--border-brass);
  border-radius: 2px;
}

.brand-desc {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.brand-meta {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--color-brass);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* --------------------------------------------------------------------------
   SEO CATEGORY LANDING TABS & FEATURED COLLECTIONS
   -------------------------------------------------------------------------- */
.category-tabs-container {
  display: flex;
  gap: 0.8rem;
  overflow-x: auto;
  padding-bottom: 1rem;
  margin-top: 2rem;
  margin-bottom: 3rem;
  border-bottom: 1px solid var(--border-muted);
}

.cat-tab {
  padding: 0.75rem 1.6rem;
  font-family: var(--font-subheading);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--bg-card);
  border: 1px solid var(--border-muted);
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  border-radius: 2px;
  transition: var(--transition-fast);
}

.cat-tab:hover, .cat-tab.active {
  color: var(--color-brass);
  border-color: var(--color-brass);
  background: var(--color-brass-glow);
}

/* Artifact / Product Card Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr));
  gap: 2.2rem;
}

.artifact-card {
  background: var(--bg-card);
  border: 1px solid var(--border-muted);
  border-radius: 4px;
  overflow: hidden;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
}

.artifact-card:hover {
  transform: translateY(-8px);
  border-color: var(--border-brass);
  box-shadow: var(--shadow-card), var(--shadow-glow);
}

.artifact-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: #0D0E11;
}

.artifact-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
}

.artifact-card:hover .artifact-img {
  transform: scale(1.08);
}

.artifact-status-tag {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--color-red);
  color: #FFF;
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.artifact-info {
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.artifact-title {
  font-size: 1.6rem;
  color: var(--text-white);
  margin-bottom: 0.4rem;
}

.artifact-subtitle {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--color-brass);
  margin-bottom: 1rem;
}

.artifact-specs-mini {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  padding: 0.8rem 0;
  margin-bottom: 1.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.spec-mini-item {
  display: flex;
  flex-direction: column;
}

.spec-mini-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-dim);
  text-transform: uppercase;
}

.spec-mini-val {
  font-size: 0.85rem;
  color: var(--text-cream);
}

.artifact-card-footer {
  margin-top: auto;
  display: flex;
  gap: 0.8rem;
}

/* --------------------------------------------------------------------------
   INTERACTIVE RESTORATION SECTION (Before / After Slider)
   -------------------------------------------------------------------------- */
.restoration-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.before-after-wrapper {
  position: relative;
  --ba-pos: 50%;
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: 4px;
  border: 1px solid var(--border-brass);
  box-shadow: var(--shadow-card);
  -webkit-user-select: none;
  user-select: none;
  touch-action: pan-y;
  cursor: ew-resize;
}

/* Set on <body> while the slider is dragged (see initBeforeAfterSlider) */
body.is-dragging {
  -webkit-user-select: none;
  user-select: none;
  cursor: ew-resize;
}

.ba-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  max-width: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

/* The two layers have the same box and the same image crop, so the photos
   stay aligned to the pixel. Each layer holds its photo and its label and is
   clipped at the handle: "before" shows left of it, "after" right of it. */
.ba-layer {
  position: absolute;
  inset: 0;
}

.ba-before {
  z-index: 1;
  clip-path: inset(0 calc(100% - var(--ba-pos)) 0 0);
}

.ba-after {
  z-index: 2;
  clip-path: inset(0 0 0 var(--ba-pos));
}

.ba-handle {
  position: absolute;
  top: 0;
  left: var(--ba-pos);
  width: 44px;
  height: 100%;
  transform: translateX(-50%);
  z-index: 10;
  cursor: ew-resize;
  touch-action: pan-y;
  display: flex;
  align-items: center;
  justify-content: center;
  outline: none;
}

.ba-handle::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  background: var(--color-brass);
}

.ba-handle:focus-visible .ba-handle-circle {
  outline: 2px solid var(--text-white);
  outline-offset: 3px;
}

.ba-handle-circle {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-brass);
  color: #090A0C;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
}

.ba-badge-label {
  position: absolute;
  top: 1rem;
  padding: 4px 12px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(9, 10, 12, 0.85);
  color: var(--text-white);
  border: 1px solid var(--border-muted);
  z-index: 1;
  transition: opacity 150ms ease;
}

/* Hidden when its photo is narrower than the label (see initBeforeAfterSlider) */
.ba-badge-label.is-hidden {
  opacity: 0;
}

.ba-label-before { left: 1rem; }
.ba-label-after { right: 1rem; }

/* About ("La nostra storia") */
.about-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-photo-frame {
  border: 1px solid var(--border-brass);
  padding: 1.5rem;
  border-radius: 4px;
  background: var(--bg-card);
}

/* --------------------------------------------------------------------------
   EDITORIAL MASONRY GALLERY
   -------------------------------------------------------------------------- */
.gallery-filter-bar {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

/* Uniform 4:3 crop in the grid (the lightbox shows the whole photo) */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.8rem;
}

@media (max-width: 900px) {
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .gallery-grid { grid-template-columns: minmax(0, 1fr); }
}

.gallery-item {
  aspect-ratio: 4 / 3;
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  border: 1px solid var(--border-muted);
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}

.gallery-item:hover img {
  transform: scale(1.06);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(9, 10, 12, 0.9) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.35s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
}

.gallery-item:hover .gallery-overlay,
.gallery-item:focus-visible .gallery-overlay {
  opacity: 1;
}

.gallery-item:focus-visible {
  outline: 2px solid var(--color-brass);
  outline-offset: 2px;
}

.gallery-caption {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--text-white);
}

.gallery-category {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-brass);
  text-transform: uppercase;
}

.gallery-more {
  display: flex;
  justify-content: center;
  margin-top: 2.5rem;
}

.gallery-more .btn[hidden] {
  display: none;
}

/* --------------------------------------------------------------------------
   CONTACT FORM & MODALS
   -------------------------------------------------------------------------- */
.contact-section {
  background: var(--bg-matte);
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  margin-top: 3rem;
}

.contact-info-panel {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact-method {
  display: flex;
  gap: 1.2rem;
  align-items: flex-start;
}

.contact-icon-box {
  width: 50px;
  height: 50px;
  background: var(--bg-card);
  border: 1px solid var(--border-brass);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-brass);
  font-size: 1.4rem;
  border-radius: 2px;
  flex-shrink: 0;
}

a.contact-icon-box {
  transition: var(--transition-fast);
}

.contact-link {
  transition: var(--transition-fast);
}

.contact-method--link:hover .contact-icon-box {
  background: var(--color-brass-glow);
  border-color: var(--color-brass);
}

.contact-method--link:hover .contact-link {
  color: var(--color-brass);
}

a.contact-method--block {
  min-height: 44px;
}

a.contact-method--block:hover p {
  color: var(--color-brass);
}

a.contact-method--block p {
  transition: var(--transition-fast);
}

a.contact-method--block:focus-visible {
  outline: 2px solid var(--color-brass-light);
  outline-offset: 4px;
}

.form-group {
  margin-bottom: 1.4rem;
}

.form-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.form-control {
  width: 100%;
  padding: 0.9rem 1.2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-muted);
  color: var(--text-white);
  font-family: var(--font-body);
  font-size: 0.95rem;
  border-radius: 2px;
  transition: var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--color-brass);
  background: var(--bg-card-hover);
}

/* Contact form feedback (Netlify submit) */
.form-error {
  margin-bottom: 1rem;
  padding: 0.8rem 1rem;
  border-left: 3px solid var(--color-red);
  background: rgba(169, 50, 38, 0.12);
  color: var(--text-cream);
  font-size: 0.9rem;
  line-height: 1.5;
}

.form-error a {
  color: var(--color-brass);
  text-decoration: underline;
}

.form-success {
  background: var(--bg-card);
  border: 1px solid var(--border-brass);
  padding: 2.5rem;
  border-radius: 4px;
  text-align: center;
}

.form-success-icon {
  font-size: 3rem;
  color: var(--color-brass);
  margin-bottom: 1rem;
}

.form-success-title {
  font-size: 1.8rem;
  color: var(--text-white);
  margin-bottom: 0.8rem;
}

/* Modals (Product Drawer & Lightbox) */
.modal-backdrop {
  position: fixed;
  inset: 0;
  overscroll-behavior: contain;
  background: rgba(9, 10, 12, 0.88);
  backdrop-filter: blur(10px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  padding: 2rem;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-window {
  background: var(--bg-card);
  border: 1px solid var(--border-brass);
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 4px;
  position: relative;
  box-shadow: var(--shadow-card);
}

#modal-body-content {
  padding: 3rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  min-height: 0;
}

/* Artifact detail (dossier) */
.artifact-dossier {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

/* Dossier action buttons: stacked, full width, single-line text */
.artifact-dossier-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.artifact-dossier-actions .btn {
  width: 100%;
  min-height: 48px;
  padding: 14px 1rem;
  gap: 10px;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  line-height: 1.4;
  white-space: nowrap;
  text-align: center;
}

@media (max-width: 360px) {
  .artifact-dossier-actions .btn {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    font-size: 0.82rem;
    letter-spacing: 0.06em;
  }
}

.artifact-dossier .artifact-title {
  overflow-wrap: anywhere;
}

@media (max-width: 360px) {
  .artifact-dossier .artifact-title {
    font-size: 1.8rem !important;
  }
}

/* Two-column dossier: keep the spec labels on one line */
@media (min-width: 769px) {
  .artifact-spec-label {
    white-space: nowrap;
    padding-right: 1rem !important;
  }
}

.artifact-dossier-media {
  background: #0D0E11;
  border: 1px solid var(--border-brass);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.artifact-dossier-img {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(70vh, 640px);
  object-fit: contain;
}

/* Dossier with a photo gallery (ARTIFACTS[].gallery): fixed 3:4 stage so the
   layout does not jump between photos; the photo is shown whole (contain) */
.dossier-stage {
  position: relative;
  aspect-ratio: 3 / 4;
  max-height: min(70vh, 640px);
  width: 100%;
  margin-bottom: 0.75rem;
}

.dossier-zoom {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}

.dossier-zoom:focus-visible {
  outline: 2px solid var(--color-brass);
  outline-offset: -2px;
}

.dossier-stage .artifact-dossier-img {
  width: 100%;
  height: 100%;
  max-height: none;
  -webkit-user-drag: none;
}

.dossier-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  padding-bottom: 4px;
  margin-bottom: 1rem;
}

.dossier-thumb {
  position: relative;
  flex: 0 0 auto;
  width: 57px;
  height: 76px;
  padding: 0;
  border: 1px solid var(--border-muted);
  border-radius: 3px;
  background: #0D0E11;
  overflow: hidden;
  cursor: pointer;
  opacity: 0.7;
  transition: var(--transition-fast);
}

.dossier-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.dossier-thumb:hover,
.dossier-thumb:focus-visible {
  opacity: 1;
}

.dossier-thumb:focus-visible {
  outline: 2px solid var(--color-brass);
  outline-offset: 2px;
}

.dossier-thumb.active {
  opacity: 1;
  border: 2px solid var(--color-brass);
}

/* Label on a photo (e.g. PRIMA / DOPO): same type as .artifact-status-tag,
   dark translucent background and thin gold border to tell it apart */
.photo-label {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 1;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--color-brass);
  color: #FFF;
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  line-height: 1.6;
  text-transform: uppercase;
  pointer-events: none;
}

.photo-label[hidden] {
  display: none;
}

.dossier-thumb .photo-label {
  top: 3px;
  left: 3px;
  padding: 1px 4px;
  font-size: 0.5rem;
  letter-spacing: 0.06em;
  line-height: 1.4;
}

/* Gallery lightbox */
.lightbox {
  text-align: center;
}

.lightbox-stage {
  position: relative;
  display: inline-block;
  max-width: 100%;
  margin-bottom: 1rem;
}

.lightbox-img {
  display: block;
  max-width: 100%;
  max-height: 70vh;
  width: auto;
  height: auto;
  border-radius: 4px;
  border: 1px solid var(--border-brass);
  object-fit: contain;
  -webkit-user-drag: none;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-brass);
  background: rgba(9, 10, 12, 0.85);
  color: var(--text-white);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.lightbox-nav:hover,
.lightbox-nav:focus-visible {
  color: var(--color-brass);
  border-color: var(--color-brass);
}

.lightbox-prev { left: 0.75rem; }
.lightbox-next { right: 0.75rem; }

.lightbox-caption {
  font-size: 1.8rem;
  color: var(--text-white);
}

.lightbox-count {
  margin-top: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: var(--text-dim);
}

.modal-close-btn {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.8rem;
  cursor: pointer;
  transition: color 0.2s;
}

.modal-close-btn:hover {
  color: var(--color-brass);
}

/* --------------------------------------------------------------------------
   FOOTER
   -------------------------------------------------------------------------- */
.footer {
  background: #060708;
  border-top: 1px solid var(--border-muted);
  padding: 4rem 5vw 2rem;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
}

/* Responsive Adjustments */
@media (max-width: 1280px) {
  .nav-links { gap: 0.9rem; }
  .nav-link { font-size: 0.72rem; }
  .nav-actions .btn { padding: 0.55rem 0.85rem; font-size: 0.75rem; }
}

@media (max-width: 1100px) {
  .nav-links, .nav-actions { display: none; }
  .nav-toggle { display: block; }
  .nav-links.mobile-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(9, 10, 12, 0.98);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-brass);
    padding: 2.5rem 2rem;
    gap: 1.6rem;
    align-items: flex-start;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.9);
  }
  .nav-links.mobile-open .nav-link {
    font-size: 1rem;
    letter-spacing: 0.1em;
  }
}

@media (max-width: 1024px) {
  .restoration-container, .contact-layout { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .hero-section { padding-top: 130px; }
}

@media (max-width: 600px) {
  .nav-logo-header { gap: 0.6rem; }
  .nav-logo-header .brand-title { font-size: clamp(0.95rem, 5.6vw, 1.35rem); }
  .nav-logo-header .brand-subtitle { font-size: 0.52rem; letter-spacing: 0.18em; }
}

@media (max-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
  .artifact-dossier {
    grid-template-columns: minmax(0, 1fr);
  }
  .about-grid { gap: 2.5rem; }
  .about-photo-frame { padding: 0.5rem; }
  .artifact-dossier { gap: 1.5rem; }
  .modal-backdrop { padding: 1rem; }
  #modal-body-content { padding: 1.25rem; }
  .modal-close-btn {
    top: 0.75rem;
    right: 0.75rem;
    z-index: 5;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0 4px;
    border: 1px solid var(--border-brass);
    border-radius: 50%;
    background: rgba(9, 10, 12, 0.85);
    color: var(--text-white);
    font-size: 1.5rem;
    line-height: 1;
  }
  .lightbox-caption { font-size: 1.4rem; }
  .lightbox-nav { width: 40px; height: 40px; }
}

@media (max-width: 768px) {
  .footer-top { grid-template-columns: 1fr; }
  .hero-title { font-size: 2.8rem; }
  .hero-badges { gap: 1.5rem; }
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .hero-ctas .btn { width: 100%; }
}

/* Phones: labels take at most about a quarter of the photo width (they wrap
   onto two lines when needed) */
@media (max-width: 480px) {
  .ba-badge-label {
    top: 0.5rem;
    max-width: 25%;
    padding: 2px 5px;
    font-size: 0.55rem;
    letter-spacing: 0.04em;
    line-height: 1.3;
  }
  .ba-label-before { left: 0.5rem; text-align: left; }
  .ba-label-after { right: 0.5rem; text-align: right; }
}

/* --------------------------------------------------------------------------
   LEGAL PAGES (privacy.html) & FORM PRIVACY NOTE
   -------------------------------------------------------------------------- */
.form-privacy-note {
  margin-top: 1rem;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text-muted);
  text-align: center;
}

.form-privacy-note a {
  color: var(--color-brass);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.nav-back {
  flex-shrink: 0;
}

.nav-back .btn {
  padding: 0.65rem 1.1rem;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.legal-page {
  padding: 9rem 5vw 5rem;
}

.legal-content {
  max-width: 760px;
  margin: 0 auto;
}

.legal-content h1 {
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  margin-bottom: 0.8rem;
}

.legal-updated {
  margin-bottom: 2rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  color: var(--color-brass);
}

.legal-content h2 {
  margin: 2.6rem 0 1rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--border-muted);
  font-size: clamp(1.6rem, 3.4vw, 2rem);
  color: var(--text-white);
}

.legal-content p {
  margin-bottom: 1.1rem;
  font-size: 1.02rem;
  line-height: 1.8;
  color: var(--text-cream);
  overflow-wrap: break-word;
}

.legal-content strong {
  font-weight: 400;
  color: var(--color-brass);
}

.legal-content a {
  color: var(--color-brass);
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.legal-content a:hover {
  color: var(--color-brass-light);
}

.legal-content a:focus-visible,
.form-privacy-note a:focus-visible {
  outline: 2px solid var(--color-brass-light);
  outline-offset: 3px;
}

@media (max-width: 600px) {
  .legal-page { padding: 7.5rem 5vw 4rem; }
  .legal-content p { font-size: 1rem; }
}

@media (max-width: 480px) {
  .navbar--simple .nav-container { gap: 0.75rem; }
  .navbar--simple .nav-logo-header { min-width: 0; gap: 0.5rem; }
  .navbar--simple .nav-logo-header .brand-title { font-size: clamp(0.72rem, 3.9vw, 1.35rem); }
  .navbar--simple .nav-logo-header .brand-subtitle { font-size: 0.46rem; letter-spacing: 0.14em; }
  .nav-back .btn { padding: 0.5rem 0.7rem; font-size: 0.7rem; letter-spacing: 0.04em; gap: 0.4rem; white-space: nowrap; }
}

@media (max-width: 340px) {
  .navbar--simple .nav-logo-header .brand-title { font-size: 0.74rem; }
  .navbar--simple .nav-logo-header .brand-subtitle { font-size: 0.42rem; }
  .nav-back .btn { padding: 0.5rem 0.55rem; font-size: 0.66rem; letter-spacing: 0.02em; }
}

/* --------------------------------------------------------------------------
   LANGUAGE SWITCH (IT | EN) - text links, no flags
   Desktop: inside .nav-actions. Mobile: <li class="nav-lang-item"> at the end
   of the mobile menu. Privacy pages: inside .nav-back.
   -------------------------------------------------------------------------- */
.lang-switch {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.lang-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-white);
  opacity: 0.85;
  transition: var(--transition-fast);
}

.lang-link:hover,
.lang-link.is-active {
  opacity: 1;
  color: var(--color-brass);
}

.lang-link:focus-visible {
  outline: 2px solid var(--color-brass-light);
  outline-offset: -2px;
}

/* Decorative flag (SVG, self-hosted) before the IT / EN text */
.lang-link img {
  display: block;
  flex-shrink: 0;
  width: 20px;
  height: 14px;
  object-fit: cover;
  border: 1px solid rgba(197, 160, 89, 0.45);
  border-radius: 2px;
  transition: var(--transition-fast);
}

.lang-link:not(.is-active) img { opacity: 0.7; }
.lang-link:not(.is-active):hover img,
.lang-link:not(.is-active):focus-visible img { opacity: 1; }

.lang-sep {
  width: 1px;
  height: 16px;
  background: rgba(255, 255, 255, 0.28);
}

.nav-links .nav-lang-item { display: none; }

@media (max-width: 1100px) {
  .nav-links.mobile-open .nav-lang-item { display: block; }
  .nav-lang-item .lang-switch { margin: -0.6rem 0 -0.6rem -0.75rem; }
  .nav-lang-item .lang-link { font-size: 1rem; }
}

.nav-back {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Privacy pages on small screens: logo + "back" button stay on the first row,
   the language switch goes on a second row (the header would overflow). */
@media (max-width: 700px) {
  .navbar--simple .nav-container { flex-wrap: wrap; row-gap: 0; }
  .navbar--simple .nav-logo-header { order: 1; }
  .navbar--simple .nav-back { display: contents; }
  .navbar--simple .nav-back .btn { order: 2; }
  .navbar--simple .nav-back .lang-switch { order: 3; flex-basis: 100%; justify-content: flex-end; margin-right: -0.75rem; }
  .legal-page { padding-top: 9.5rem; }
}

/* English pages: longer button labels, so on very small screens the text is
   slightly smaller to keep every button on one line. */
@media (max-width: 360px) {
  html[lang="en"] .btn { font-size: 0.8rem; letter-spacing: 0.06em; }
}

.legal-content .legal-note {
  margin-bottom: 0.6rem;
  font-size: 0.92rem;
  font-style: italic;
  color: var(--text-muted);
}

/* Footer, 4-column layout on narrow desktops (1025-1160px): the "Contatto
   rapido" column is narrower than the Instagram / Facebook buttons, which
   wrapped onto two lines. Slightly smaller type keeps them on one line.
   !important is needed to beat the inline font-size / padding on the buttons. */
@media (min-width: 1025px) and (max-width: 1160px) {
  .footer .btn-instagram {
    white-space: nowrap;
    font-size: 0.78rem !important;
    letter-spacing: 0.04em;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
}
