/* =========================================================
   Layout — Topbar, Nav, Footer
   ========================================================= */

/* ---------- Topbar ---------- */
.topbar {
  position: relative;
  z-index: 60;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--text-mute);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.625rem 0;
}

.topbar-tagline {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  letter-spacing: 0.04em;
}

.topbar-tagline .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  animation: pulse 2.4s var(--ease-in-out) infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.4; transform: scale(0.85); }
}

.topbar-meta {
  display: inline-flex;
  align-items: center;
  gap: 1.5rem;
}

.topbar-meta a {
  color: var(--text-mute);
  transition: color var(--dur-1) var(--ease-out);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.topbar-meta a:hover { color: var(--text); }
.topbar-meta svg { width: 14px; height: 14px; }

@media (max-width: 720px) {
  .topbar-tagline span:first-child { display: none; }
  .topbar-meta { gap: 1rem; }
  .topbar-meta a span { display: none; }
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 11, 12, 0.6);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: background var(--dur-2) var(--ease-out),
              border-color var(--dur-2) var(--ease-out),
              padding var(--dur-2) var(--ease-out);
}

.site-header.is-scrolled {
  background: rgba(11, 11, 12, 0.88);
  border-bottom-color: var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.1rem 0;
  transition: padding var(--dur-2) var(--ease-out);
}

.site-header.is-scrolled .nav { padding: 0.75rem 0; }

.nav-brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.04em;
  color: var(--text);
  position: relative;
}

.nav-brand-mark {
  font-weight: 800;
  font-size: 2.4rem;
  letter-spacing: -0.04em;
  line-height: 1;
  position: relative;
}

.site-header.is-scrolled .nav-brand-mark {
  font-size: 2.05rem;
}

.nav-brand-mark::after {
  content: '';
  position: absolute;
  right: -11px;
  bottom: 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.nav-brand-tag {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.8125rem;
  color: var(--text-mute);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

@media (max-width: 720px) {
  .nav-brand-tag { display: none; }
}

.nav-list {
  display: none;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 1024px) {
  .nav-list { display: inline-flex; }
}

.nav-list a {
  position: relative;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text-mute);
  padding: 0.5rem 0;
  transition: color var(--dur-1) var(--ease-out);
}

.nav-list a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-2) var(--ease-out);
}

.nav-list a:hover,
.nav-list a.is-active {
  color: var(--text);
}

.nav-list a:hover::after,
.nav-list a.is-active::after {
  transform: scaleX(1);
}

/* ---------- Nav dropdown (Services) ---------- */
.nav-list .has-dropdown {
  position: relative;
}

.nav-list .has-dropdown > .nav-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
}

.nav-list .has-dropdown > .nav-trigger svg {
  width: 11px;
  height: 11px;
  color: var(--text-mute);
  transition: transform var(--dur-2) var(--ease-out),
              color var(--dur-1) var(--ease-out);
}

.nav-list .has-dropdown:hover > .nav-trigger svg,
.nav-list .has-dropdown:focus-within > .nav-trigger svg {
  transform: rotate(180deg);
  color: var(--accent);
}

.nav-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 50%;
  transform: translate(-50%, 6px);
  min-width: 260px;
  padding: 0.5rem;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 24px 48px -16px rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--dur-2) var(--ease-out),
              transform var(--dur-2) var(--ease-out),
              visibility 0s linear var(--dur-2);
  display: grid;
  gap: 0.125rem;
  z-index: 50;
}

.nav-dropdown::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 0;
  right: 0;
  height: 8px;
}

.nav-list .has-dropdown:hover .nav-dropdown,
.nav-list .has-dropdown:focus-within .nav-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0);
  transition: opacity var(--dur-2) var(--ease-out),
              transform var(--dur-2) var(--ease-out),
              visibility 0s;
}

.nav-dropdown a {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: -0.005em;
  color: var(--text);
  transition: background var(--dur-1) var(--ease-out),
              color var(--dur-1) var(--ease-out);
}

.nav-dropdown a::after { display: none; }

.nav-dropdown a .sub {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.75rem;
  color: var(--text-mute);
  letter-spacing: 0;
  line-height: 1.4;
}

.nav-dropdown a:hover,
.nav-dropdown a:focus-visible {
  background: var(--surface);
  color: var(--accent);
}

.nav-dropdown a:hover .sub,
.nav-dropdown a:focus-visible .sub {
  color: var(--text-mute);
}

/* Mobile drawer: nested services group */
.mobile-menu .has-submenu-label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 1.25rem 0 0.5rem;
}

.mobile-menu .submenu {
  margin: 0 0 0.5rem 0.75rem;
  padding-left: 0.75rem;
  border-left: 1px solid var(--border);
  display: grid;
  gap: 0.25rem;
}

.mobile-menu .submenu a {
  font-size: 0.95rem;
  color: var(--text-mute);
}

.mobile-menu .submenu a:hover { color: var(--accent); }

.nav-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.nav-actions .btn {
  padding: 0.7rem 1.2rem;
  font-size: 0.875rem;
}

.btn-whatsapp {
  background: var(--success);
  color: #052e16;
}

.btn-whatsapp:hover {
  background: #16a34a;
  box-shadow: 0 16px 32px -16px rgba(34, 197, 94, 0.6);
}

.btn-whatsapp svg { width: 16px; height: 16px; }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  color: var(--text);
  transition: border-color var(--dur-1) var(--ease-out),
              background var(--dur-1) var(--ease-out);
}

.nav-toggle:hover {
  border-color: var(--text);
  background: var(--surface-2);
}

@media (min-width: 1024px) {
  .nav-toggle { display: none; }
}

@media (max-width: 1023px) {
  .nav-actions .btn-whatsapp span,
  .nav-actions .btn:not(.btn-whatsapp) { display: none; }
  .nav-actions .btn-whatsapp {
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: var(--radius-pill);
  }
}

/* Mobile menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(11, 11, 12, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  padding: 5rem 1.5rem 2rem;
  transform: translateY(-100%);
  visibility: hidden;
  transition: transform var(--dur-3) var(--ease-out),
              visibility 0s linear var(--dur-3);
}

.mobile-menu.is-open {
  transform: translateY(0);
  visibility: visible;
  transition: transform var(--dur-3) var(--ease-out),
              visibility 0s linear 0s;
}

.mobile-menu-close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  color: var(--text);
}

.mobile-menu ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mobile-menu a {
  display: block;
  padding: 1rem 0;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  transition: color var(--dur-1) var(--ease-out),
              padding var(--dur-1) var(--ease-out);
}

.mobile-menu a:hover {
  color: var(--accent);
  padding-left: 0.5rem;
}

.mobile-menu .btn {
  margin-top: 2rem;
  width: 100%;
}

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  padding-top: 5rem;
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  overflow: hidden;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  padding-bottom: 4rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 2.5rem;
  }
}

.footer-brand .nav-brand {
  margin-bottom: 1.25rem;
}

.footer-brand .nav-brand-mark {
  font-size: 2.6rem;
}

.footer-brand p {
  max-width: 38ch;
  margin-bottom: 1.5rem;
}

.footer-socials {
  display: inline-flex;
  gap: 0.5rem;
}

.footer-socials a {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--text-mute);
  transition: border-color var(--dur-1) var(--ease-out),
              color var(--dur-1) var(--ease-out),
              background var(--dur-1) var(--ease-out);
}

.footer-socials a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.footer-socials svg { width: 16px; height: 16px; }

.footer-col h6 {
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 1.25rem;
}

.footer-col ul li {
  margin-bottom: 0.7rem;
}

.footer-col ul a {
  color: var(--text-mute);
  font-size: 0.9375rem;
  transition: color var(--dur-1) var(--ease-out);
}

.footer-col ul a:hover { color: var(--accent); }

.footer-contact li {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin-bottom: 0.85rem;
  color: var(--text-mute);
  font-size: 0.9375rem;
}

.footer-contact svg {
  width: 16px;
  height: 16px;
  margin-top: 4px;
  color: var(--accent);
  flex-shrink: 0;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 0 2rem;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--text-dim);
}

.footer-bottom-links {
  display: inline-flex;
  gap: 1.25rem;
}

.footer-bottom-links a {
  color: var(--text-dim);
  transition: color var(--dur-1) var(--ease-out);
}

.footer-bottom-links a:hover { color: var(--text); }

.footer-watermark {
  position: absolute;
  bottom: -3rem;
  left: 0;
  right: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(8rem, 26vw, 22rem);
  line-height: 0.85;
  letter-spacing: -0.06em;
  text-align: center;
  color: transparent;
  -webkit-text-stroke: 1px var(--border-2);
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}

/* =========================================================
   WhatsApp Floating Action Button (sticky bottom-right, circular)
   ========================================================= */
.wa-fab,
a.wa-fab {
  position: fixed;
  right: clamp(1rem, 2.5vw, 1.5rem);
  bottom: clamp(1rem, 2.5vw, 1.5rem);
  z-index: 200;
  width: 48px !important;
  height: 48px !important;
  min-width: 0;
  max-width: 48px;
  padding: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  background: #25D366;
  color: #fff;
  border-radius: 50% !important;
  font-size: 0;
  line-height: 0;
  box-shadow: 0 10px 28px -8px rgba(37, 211, 102, 0.55),
              0 3px 10px rgba(0, 0, 0, 0.22),
              inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  transition: transform var(--dur-2) var(--ease-out),
              box-shadow var(--dur-2) var(--ease-out),
              background var(--dur-2) var(--ease-out);
  text-decoration: none;
  isolation: isolate;
  overflow: visible;
}

.wa-fab:hover {
  background: #1eb858;
  transform: translateY(-2px) scale(1.06);
  box-shadow: 0 14px 36px -8px rgba(37, 211, 102, 0.7),
              0 4px 14px rgba(0, 0, 0, 0.28),
              inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.wa-fab:active { transform: translateY(-1px) scale(0.98); }

.wa-fab-icon {
  position: relative;
  width: 100%;
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.wa-fab-icon svg { width: 22px; height: 22px; fill: #fff; display: block; }

.wa-fab-icon::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: rgba(37, 211, 102, 0.32);
  z-index: -1;
  animation: waPulse 2.4s var(--ease-out) infinite;
}

/* Hide the original label entirely (kept in HTML for a11y only) */
.wa-fab-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes waPulse {
  0%   { transform: scale(0.9);  opacity: 0.7; }
  70%  { transform: scale(1.55); opacity: 0; }
  100% { transform: scale(1.55); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .wa-fab-icon::before { animation: none; }
}
