/* =========================================================
   COMPONENTS — nav, buttons, cards, forms, chrome.
   ========================================================= */

/* ---------- Scroll progress ---------- */
.scroll-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 2px;
  z-index: calc(var(--z-nav) + 1);
  background: var(--gold-sheen);
  transform: scaleX(var(--progress, 0));
  transform-origin: 0 50%;
  will-change: transform;
}

/* ---------- Navigation ---------- */
.site-nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: var(--z-nav);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  height: var(--nav-h);
  padding-inline: var(--gutter);
  border-bottom: 1px solid transparent;
  transition:
    height var(--dur) var(--ease-out),
    background-color var(--dur) var(--ease-out),
    border-color var(--dur) var(--ease-out),
    backdrop-filter var(--dur) var(--ease-out);
}

/* Glass only after the page scrolls — the hero stays clean. */
.site-nav.is-stuck {
  height: 62px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom-color: var(--line);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: var(--text);
  transition: color var(--dur-fast) var(--ease-out);
}
.nav-logo em {
  font-style: normal;
  color: var(--gold);
}
.nav-logo:hover {
  color: var(--gold);
}

.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.2vw, 2.25rem);
  list-style: none;
}

.nav-link {
  position: relative;
  padding-block: 0.35rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color var(--dur-fast) var(--ease-out);
}

/* Underline grows from the centre; also marks the section in view. */
.nav-link::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform var(--dur) var(--ease-out);
}
.nav-link:hover,
.nav-link[aria-current="true"] {
  color: var(--gold);
}
.nav-link:hover::after,
.nav-link[aria-current="true"]::after {
  transform: scaleX(1);
}

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.95rem 1.9rem;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  overflow: hidden;
  transition:
    transform var(--dur) var(--ease-out),
    box-shadow var(--dur) var(--ease-out),
    border-color var(--dur) var(--ease-out),
    color var(--dur) var(--ease-out),
    background-color var(--dur) var(--ease-out);
}

.btn--primary {
  background: var(--gold-sheen);
  color: var(--accent-contrast);
  box-shadow: var(--shadow-sm);
}
/* Sheen sweep on hover. */
.btn--primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.4) 50%, transparent 80%);
  transform: translateX(-120%);
  transition: transform var(--dur-slow) var(--ease-out);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}
.btn--primary:hover::after {
  transform: translateX(120%);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}
.btn--ghost:hover {
  transform: translateY(-2px);
  color: var(--gold);
  border-color: var(--gold);
  background: var(--accent-wash);
}

.btn--sm {
  padding: 0.6rem 1.15rem;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
}

.btn:active {
  transform: translateY(0);
}

/* ---------- Section header ---------- */
.section-head {
  max-width: var(--container);
  margin-inline: auto;
  margin-bottom: clamp(1.75rem, 3.5vw, 2.75rem);
}
.section-head--center {
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: var(--space-md);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--gold);
}
.section-head--center .eyebrow::after {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--gold);
}

.section-title {
  font-size: var(--step-4);
  margin-bottom: var(--space-md);
}
.section-title em {
  font-style: italic;
  font-weight: 400;
  background: var(--gold-sheen);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-sub {
  max-width: var(--measure);
  color: var(--text-muted);
  font-size: var(--step-1);
  line-height: 1.75;
}
.section-head--center .section-sub {
  margin-inline: auto;
}

/* ---------- Media card (results, leads, videos, reviews) ---------- */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  overflow: hidden;
  text-align: left;
  width: 100%;
  transition:
    transform var(--dur) var(--ease-out),
    border-color var(--dur) var(--ease-out),
    box-shadow var(--dur) var(--ease-out);
}

/* Cursor-tracked spotlight; --mx/--my are set in pointer-fx.js. */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    380px circle at var(--mx, 50%) var(--my, 50%),
    var(--spotlight),
    transparent 65%
  );
  transition: opacity var(--dur) var(--ease-out);
}

.card:hover,
.card:focus-visible {
  transform: translateY(-6px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-lg);
}
.card:hover::before {
  opacity: 1;
}

.card--interactive {
  cursor: zoom-in;
}

.card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.75rem;
  transition: transform var(--dur-slow) var(--ease-out);
}
.card:hover .card-media img {
  transform: scale(1.018);
}
.card-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

/* Zoom affordance on image cards. */
.card-zoom {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  backdrop-filter: blur(6px);
  color: var(--gold);
  font-size: 0.75rem;
  opacity: 0;
  transform: scale(0.8);
  transition:
    opacity var(--dur) var(--ease-out),
    transform var(--dur) var(--ease-out);
}
.card:hover .card-zoom,
.card:focus-visible .card-zoom {
  opacity: 1;
  transform: scale(1);
}

.card-body {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1.1rem 1.25rem 1.35rem;
}

.card-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}

.card-title {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0;
  color: var(--text);
}

.card-meta {
  font-size: 0.8rem;
  color: var(--text-subtle);
}
.card-meta:empty {
  display: none;
}

/* ---------- Grids ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: clamp(1rem, 2vw, 1.6rem);
  max-width: var(--container);
  margin-inline: auto;
}
.card-grid--wide {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 400px), 1fr));
}

/* ---------- Chips ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--accent-wash);
  font-size: 0.8rem;
  color: var(--text-muted);
  transition:
    transform var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out);
}
.chip i {
  color: var(--gold);
  font-size: 0.85rem;
}
.chip:hover {
  transform: translateY(-2px);
  border-color: var(--gold);
  color: var(--text);
}

/* ---------- Forms ---------- */
.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.field-label .req {
  color: var(--gold);
}

.input {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 0.92rem;
  outline: none;
  transition:
    border-color var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out),
    background-color var(--dur-fast) var(--ease-out);
}
.input::placeholder {
  color: var(--text-subtle);
}
.input:hover {
  border-color: var(--line-strong);
}
.input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--accent-wash);
}
.input[aria-invalid="true"] {
  border-color: #e0664f;
  box-shadow: 0 0 0 3px rgba(224, 102, 79, 0.12);
}
textarea.input {
  min-height: 120px;
  resize: vertical;
}
select.input {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%),
    linear-gradient(135deg, var(--gold) 50%, transparent 50%);
  background-position:
    calc(100% - 20px) calc(50% + 2px),
    calc(100% - 14px) calc(50% + 2px);
  background-size: 6px 6px;
  background-repeat: no-repeat;
  padding-right: 2.75rem;
}
select.input option {
  background: var(--surface);
  color: var(--text);
}

.field-error {
  display: none;
  font-size: 0.75rem;
  color: #e0664f;
}
.field-error.is-shown {
  display: block;
}

.form-note {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-subtle);
}
.form-note i {
  color: var(--whatsapp);
}

.form-status {
  min-height: 1.2rem;
  font-size: 0.82rem;
  color: var(--gold);
}

/* ---------- Floating actions ---------- */
.float-stack {
  position: fixed;
  right: clamp(1rem, 2vw, 1.4rem);
  bottom: clamp(1rem, 2vw, 1.4rem);
  z-index: var(--z-float);
  display: flex;
  flex-direction: column-reverse;
  gap: 0.6rem;
}

.float-btn {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(10px);
  color: var(--gold);
  font-size: 1rem;
  box-shadow: var(--shadow-md);
  transition:
    transform var(--dur) var(--ease-out),
    background-color var(--dur) var(--ease-out),
    color var(--dur) var(--ease-out),
    opacity var(--dur) var(--ease-out);
}
.float-btn:hover {
  transform: translateY(-3px);
  background: var(--gold);
  color: var(--accent-contrast);
  border-color: var(--gold);
}

.float-btn--whatsapp {
  background: var(--whatsapp);
  border-color: var(--whatsapp);
  color: #fff;
  font-size: 1.3rem;
}
.float-btn--whatsapp:hover {
  background: var(--whatsapp-dark);
  border-color: var(--whatsapp-dark);
  color: #fff;
}

/* Back-to-top only exists once you've scrolled. */
.float-btn--top {
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
}
.float-btn--top.is-shown {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

/* ---------- Lightbox ----------
   Layout: the <dialog> fills the viewport and centres a single stage row —
   [prev] [image panel] [next]. The panel is a FIXED box and the image is
   `contain`ed inside it, so every screenshot is shown whole (never cropped)
   while the modal keeps one stable size as you page through. */
.lightbox {
  position: fixed;
  inset: 0;
  /* Override the UA defaults (width:fit-content + margin:auto) that otherwise
     shrink the dialog to its content and drag the controls onto the image. */
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  z-index: var(--z-lightbox);
  display: none;
  background: transparent;
  overflow: hidden;
}
.lightbox[open] {
  display: grid;
  place-items: center;
  padding: clamp(0.75rem, 3vw, 2rem);
}
.lightbox::backdrop {
  background: rgba(4, 3, 2, 0.92);
  backdrop-filter: blur(14px);
}

/* The centred row: arrows flank the panel and never overlap it. */
.lightbox-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.5rem, 2vw, 1.5rem);
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
}

.lightbox-figure {
  /* The fixed viewing box. */
  display: block;
  width: min(76vw, 1080px);
  height: min(86dvh, 780px);
  max-width: calc(100vw - 8.5rem);
  max-height: calc(100dvh - 4rem);
  margin: 0;
  padding: clamp(0.5rem, 1.5vw, 1rem);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--r-lg);
  background: #0d0b09;
  box-shadow: var(--shadow-lg);
  animation: lightbox-in var(--dur-slow) var(--ease-out) both;
}
.lightbox-figure img {
  /* Whole image, never cropped, inside the fixed box. */
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: contain;
  object-position: center;
  padding: clamp(0.45rem, 1.4vw, 0.9rem);
  border-radius: var(--r-sm);
}

@keyframes lightbox-in {
  from {
    opacity: 0;
    transform: scale(0.97);
  }
}

.lightbox-btn {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--r-pill);
  background: rgba(20, 18, 14, 0.78);
  backdrop-filter: blur(6px);
  color: #f2ede3;
  font-size: 1.05rem;
  cursor: pointer;
  z-index: 2;
  transition:
    background-color var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out);
}
.lightbox-btn:hover {
  background: var(--gold);
  color: #0a0907;
  border-color: var(--gold);
  transform: scale(1.08);
}
.lightbox-btn:active {
  transform: scale(0.96);
}
.lightbox-btn[hidden] {
  display: none;
}

.lightbox-close {
  position: absolute;
  top: clamp(0.75rem, 2.5vw, 1.5rem);
  right: clamp(0.75rem, 2.5vw, 1.5rem);
}

/* Phones: no room for side gutters — float the arrows over the lower corners,
   clear of the image's centre, and let the panel use the full width. */
@media (max-width: 700px) {
  .lightbox[open] {
    padding: 0.75rem 0.75rem 5.25rem;
  }
  .lightbox-figure {
    width: 100%;
    height: calc(100dvh - 7rem);
    max-width: none;
    max-height: none;
  }
  .lightbox-btn {
    width: 44px;
    height: 44px;
  }
  .lightbox-prev,
  .lightbox-next {
    position: absolute;
    bottom: clamp(1rem, 5vw, 2rem);
  }
  .lightbox-prev {
    left: clamp(1rem, 8vw, 3rem);
  }
  .lightbox-next {
    right: clamp(1rem, 8vw, 3rem);
  }
}

.card.media-wide .testimonial-media {
  aspect-ratio: 16 / 10;
}

.card.media-portrait .testimonial-media {
  aspect-ratio: 4 / 5;
}

.card.media-tall .testimonial-media {
  aspect-ratio: 9 / 13;
}

/* ---------- Empty state (when a CMS collection is empty) ---------- */
.empty-state {
  grid-column: 1 / -1;
  padding: var(--space-2xl);
  border: 1px dashed var(--line);
  border-radius: var(--r-md);
  text-align: center;
  color: var(--text-subtle);
  font-size: 0.9rem;
}
