/* ==========================================================================
   Components — pieces reused across the page
   Liquid glass, buttons, navigation, footer, WhatsApp button
   ========================================================================== */

/* ---------- Liquid glass ---------- */

.glass {
  position: relative;
  isolation: isolate;
  background: var(--glass);
  border: 1px solid var(--glass-edge);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow), inset 0 1px 0 rgba(255, 255, 255, .55), inset 0 -1px 0 rgba(255, 255, 255, .12);
}
.glass::after {  /* light catching the top-left and bottom-right edges */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
  opacity: .7;
  background: linear-gradient(135deg, rgba(255, 255, 255, .45) 0%, rgba(255, 255, 255, 0) 38%, rgba(255, 255, 255, 0) 70%, rgba(255, 255, 255, .18) 100%);
}
.glass--strong { background: var(--glass-strong); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  font: 700 15px/1 var(--font);
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn svg { width: 16px; height: 16px; }

.btn--primary { background: var(--red); color: var(--on-red); box-shadow: 0 8px 24px rgba(225, 8, 30, .28); }
.btn--primary:hover { background: var(--red-deep); }

.btn--outline { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn--outline:hover { box-shadow: inset 0 0 0 1.5px var(--muted); }

/* ---------- Logo ---------- */

.brand { display: flex; align-items: center; text-decoration: none; }
.logo { display: block; width: auto; height: 42px; transition: filter .35s ease; }

/* ---------- Navigation ----------
   Over the hero video (.is-over-hero): transparent bar, white logo and links, no CTA.
   Past the video: liquid-glass bar, brand colors, red CTA. */

.nav {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 14px);
  left: 0;
  right: 0;
  z-index: 50;
  pointer-events: none;
}
.nav .wrap { display: flex; justify-content: center; }

.nav::before {  /* soft dark fade behind the bar while it sits on the video */
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: calc(-14px - env(safe-area-inset-top, 0px));
  height: calc(160px + env(safe-area-inset-top, 0px));
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  transition: opacity .35s ease;
  background: linear-gradient(180deg, rgba(18, 12, 12, .42) 0%, rgba(18, 12, 12, .22) 45%, rgba(18, 12, 12, 0) 100%);
}

.nav-bar {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 1120px;
  height: 62px;
  padding: 0 10px 0 18px;
  border-radius: 999px;
  transition: background .35s ease, border-color .35s ease, box-shadow .35s ease, -webkit-backdrop-filter .35s ease, backdrop-filter .35s ease;
}
.nav-bar::after { transition: opacity .35s ease; }
.nav .brand { margin-right: auto; }

.nav-links { display: flex; gap: 2px; margin: 0; padding: 0; list-style: none; }
.nav-links a {
  display: block;
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-2);
  text-decoration: none;
  transition: background .2s;
}
.nav-links a:hover,
.nav-links a.is-active { background: rgba(130, 104, 106, .12); color: var(--ink); }

.nav-cta {
  height: 42px;
  padding: 0 18px;
  font-size: 14px;
  transition: opacity .3s ease, transform .35s ease, visibility 0s linear 0s, background .2s ease;
}

.menu-btn {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.menu-btn .icon-close,
.menu-btn[aria-expanded="true"] .icon-open { display: none; }
.menu-btn[aria-expanded="true"] .icon-close { display: inline; }

/* over the hero */
.nav.is-over-hero::before { opacity: 1; }
.nav.is-over-hero .nav-bar {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.nav.is-over-hero .nav-bar::after { opacity: 0; }
.nav.is-over-hero .logo { --logo-red: #FFFFFF; --logo-gray: #FFFFFF; filter: drop-shadow(0 1px 10px rgba(0, 0, 0, .35)); }
.nav.is-over-hero .menu-btn { color: #FFFFFF; filter: drop-shadow(0 1px 6px rgba(0, 0, 0, .4)); }
.nav.is-over-hero .nav-cta {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
}

@media (min-width: 901px) {
  .nav.is-over-hero .nav-links a { color: #FFFFFF; text-shadow: 0 1px 8px rgba(0, 0, 0, .35); }
  .nav.is-over-hero .nav-links a:hover,
  .nav.is-over-hero .nav-links a.is-active { background: rgba(255, 255, 255, .16); color: #FFFFFF; }
}

/* phone and tablet: links collapse into a drop-down panel */
@media (max-width: 900px) {
  .nav-bar { position: relative; }
  .nav-cta { display: none; }
  .menu-btn { display: grid; place-items: center; }
  .nav-links {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    padding: 10px;
    border: 1px solid var(--glass-edge);
    border-radius: 24px;
    background: var(--bg);
    box-shadow: var(--glass-shadow);
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { padding: 14px 16px; font-size: 17px; }
}

/* ---------- Footer ---------- */

.footer {
  padding-top: 72px;
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 104px);  /* clears the WhatsApp button */
  border-top: 1px solid var(--line);
}
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.footer .logo { height: 64px; }
.footer-tagline { max-width: 30ch; margin-top: 14px; font-size: 15px; color: var(--ink-2); }
.footer-heading {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.footer-links { display: grid; margin: 0; padding: 0; list-style: none; }
.footer-links a { display: inline-block; padding: 6px 0; font-size: 15px; color: var(--ink-2); text-decoration: none; }
.footer-links a:hover { color: var(--ink); }
.footer-legal {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}

@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

/* ---------- WhatsApp button ---------- */

.wa-fab {
  position: fixed;
  right: calc(env(safe-area-inset-right, 0px) + 20px);
  bottom: calc(env(safe-area-inset-bottom, 0px) + 20px);
  z-index: 55;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 56px;
  padding: 0 20px 0 14px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink);
  font-weight: 800;
  font-size: 15px;
  text-decoration: none;
  box-shadow: 0 6px 24px rgba(40, 39, 39, .18), 0 0 0 1px var(--line);
}
.wa-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #25D366;
  color: #FFFFFF;
}
.wa-icon svg { width: 20px; height: 20px; }

@media (max-width: 520px) {
  .wa-fab { padding: 0 11px; }
  .wa-label { display: none; }
}
