/* ==========================================================================
   Global — Reset, Typography, Nav, Footer, Page Wrapper
   ========================================================================== */

/* Reset */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: auto; /* Lenis handles smooth scroll */ }
body {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--gray-800);
  background: var(--off-white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; border: none; background: none; }
input, textarea { font: inherit; }
h1, h2, h3, h4, h5 { font-family: var(--font-serif); color: var(--gray-900); line-height: 1.1; font-weight: 400; }
::selection { background: var(--orange); color: var(--white); }

/* Container */
.container { width: 100%; max-width: 1320px; margin: 0 auto; padding: 0 var(--space-xl); }
.container-sm { width: 100%; max-width: 960px; margin: 0 auto; padding: 0 var(--space-xl); }

/* Page wrapper for Barba */
.page-wrapper { overflow: hidden; }

/* ── LOADER ── */
.loader {
  position: fixed;
  inset: 0;
  z-index: var(--z-loader);
  background: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: all;
}
.loader-inner {
  text-align: center;
}
.loader-logo {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  margin: 0 auto 20px;
}
.loader-text {
  font-family: var(--font-serif);
  font-size: var(--fs-xl);
  color: var(--orange);
  opacity: 0;
}
.loader-bar {
  width: 120px;
  height: 2px;
  background: rgba(255,255,255,0.1);
  margin: 16px auto 0;
  border-radius: 2px;
  overflow: hidden;
}
.loader-bar-fill {
  width: 0%;
  height: 100%;
  background: var(--orange);
  border-radius: 2px;
}

/* ── CUSTOM CURSOR (disabled) ── */
.cursor,
.cursor-dot {
  display: none;
}

/* ── NAVIGATION ── */
.nav-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: var(--z-nav);
  padding: 0 var(--space-xl);
  transition: all 0.5s var(--ease-out);
}

.nav-wrapper::before {
  content: '';
  position: absolute;
  inset: 0;
  background: transparent;
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  transition: all 0.5s var(--ease-out);
}

.nav-wrapper.scrolled::before {
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 1px 0 rgba(0,0,0,0.06);
}

.nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 88px;
  max-width: 1320px;
  margin: 0 auto;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 10002;
}
.logo img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
}
.logo-text {
  font-family: var(--font-serif);
  font-size: var(--fs-lg);
  color: var(--white);
  transition: color 0.5s var(--ease-out);
}
.nav-wrapper.scrolled .logo-text { color: var(--gray-900); }

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 40px;
}
.nav-link {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: rgba(255,255,255,0.75);
  letter-spacing: 0.5px;
  transition: color 0.3s var(--ease-out);
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--orange);
  transition: width 0.4s var(--ease-out);
}
.nav-link:hover::after,
.nav-link.active::after { width: 100%; }
.nav-link:hover { color: var(--white); }
.nav-wrapper.scrolled .nav-link { color: var(--gray-600); }
.nav-wrapper.scrolled .nav-link:hover { color: var(--gray-900); }

.nav-cta {
  font-size: var(--fs-sm);
  font-weight: 600;
  padding: 10px 24px;
  border-radius: var(--radius-full);
  background: var(--orange);
  color: var(--white);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s var(--ease-out);
}
.nav-cta:hover {
  background: var(--orange-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255,107,53,0.3);
}

/* Hamburger */
.hamburger {
  display: none;
  width: 28px;
  height: 20px;
  flex-direction: column;
  justify-content: space-between;
  z-index: 10002;
}
.hamburger span {
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all 0.4s var(--ease-out);
  transform-origin: center;
}
.nav-wrapper.scrolled .hamburger span { background: var(--gray-900); }
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(6px, 6px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(6px, -6px); }

/* Mobile overlay */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease-out);
}
.nav-overlay.open { opacity: 1; pointer-events: auto; }

/* ── FOOTER ── */
.footer {
  background: var(--black);
  color: rgba(255,255,255,0.5);
  padding: 80px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 32px;
}
.footer-brand { max-width: 320px; }
.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.footer-logo img { width: 40px; height: 40px; border-radius: 50%; }
.footer-logo span { font-family: var(--font-serif); font-size: var(--fs-lg); color: var(--orange); }
.footer-brand p { font-size: var(--fs-sm); line-height: 1.8; color: rgba(255,255,255,0.35); }
.footer-social { display: flex; gap: 10px; margin-top: 20px; }
.footer-social a {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.4);
  font-size: 1rem;
  transition: all 0.3s var(--ease-out);
}
.footer-social a:hover { background: var(--orange); color: var(--white); transform: translateY(-3px); }

.footer-heading {
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.8);
  margin-bottom: 20px;
}
.footer-links { display: flex; flex-direction: column; gap: 14px; }
.footer-links a { font-size: var(--fs-sm); color: rgba(255,255,255,0.35); transition: all 0.3s var(--ease-out); }
.footer-links a:hover { color: var(--orange); padding-left: 4px; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  font-size: var(--fs-xs);
  color: rgba(255,255,255,0.2);
}

/* Footer developer credit */
.footer-credit {
  text-align: center;
  padding-top: 20px;
  margin-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.04);
  font-size: var(--fs-xs);
  color: rgba(255,255,255,0.15);
}
.footer-credit a {
  color: var(--orange);
  font-weight: 500;
  transition: color 0.3s var(--ease-out);
}
.footer-credit a:hover {
  color: var(--orange-light);
}

/* ── WHATSAPP FAB ── */
.wa-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #25D366;
  color: var(--white);
  border-radius: 50%;
  font-size: 1.5rem;
  z-index: var(--z-fab);
  box-shadow: 0 4px 20px rgba(37,211,102,0.3);
  transition: all 0.35s var(--ease-out);
}
.wa-fab:hover { transform: scale(1.12); box-shadow: 0 8px 28px rgba(37,211,102,0.4); }

/* ── PAGE TRANSITION OVERLAY ── */
.transition-overlay {
  position: fixed;
  inset: 0;
  z-index: 9990;
  background: var(--black);
  transform: scaleY(0);
  transform-origin: bottom;
  pointer-events: none;
}

/* ── SECTION UTILITIES ── */
.section { padding: var(--space-5xl) 0; }
.section-dark { background: var(--black); color: var(--white); }
.section-cream { background: var(--cream); }
.section-gray { background: var(--gray-50); }

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--orange);
  margin-bottom: var(--space-md);
}
.section-title {
  font-size: clamp(var(--fs-3xl), 5vw, var(--fs-4xl));
  margin-bottom: var(--space-md);
}
.section-desc {
  font-size: var(--fs-md);
  color: var(--gray-500);
  max-width: 520px;
  line-height: 1.8;
}
.section-desc.centered { margin-left: auto; margin-right: auto; }
.text-center { text-align: center; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--gray-100); }
::-webkit-scrollbar-thumb { background: var(--gray-400); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--orange); }

/* ── RESPONSIVE: TABLET ── */
@media (max-width: 1024px) {
  .nav { height: 72px; }
  .nav-links { gap: 24px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-brand { grid-column: 1 / -1; max-width: 100%; }
}

/* ── RESPONSIVE: MOBILE ── */
@media (max-width: 768px) {
  /* Fix cursor for touch devices */
  body { cursor: auto; }
  a, button, input, textarea { cursor: auto; }

  /* Nav */
  .nav-wrapper { padding: 0 16px; }
  .nav { height: 64px; }
  .hamburger { display: flex; }
  .nav-overlay { display: block; }
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    height: 100dvh;
    background: var(--white);
    flex-direction: column;
    align-items: flex-start;
    padding: 100px 28px 32px;
    gap: 0;
    z-index: 10001;
    transition: right 0.5s var(--ease-out);
    box-shadow: -12px 0 40px rgba(0,0,0,0.1);
    overflow-y: auto;
  }
  .nav-links.open { right: 0; }
  .nav-links .nav-link {
    color: var(--gray-800);
    display: block;
    width: 100%;
    padding: 16px 0;
    border-bottom: 1px solid var(--gray-100);
    font-size: var(--fs-base);
    letter-spacing: 0;
  }
  .nav-links .nav-link::after { display: none; }
  .nav-links .nav-link.active { color: var(--orange); font-weight: 600; }
  .nav-cta {
    width: 100%;
    justify-content: center;
    margin-top: 20px;
    padding: 14px 24px;
  }

  /* Sections */
  .section { padding: var(--space-3xl) 0; }
  .container { padding: 0 20px; }

  /* Footer */
  .footer { padding: 48px 0 24px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-brand { max-width: 100%; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }

  /* WhatsApp */
  .wa-fab { bottom: 20px; right: 20px; width: 48px; height: 48px; font-size: 1.25rem; }

  /* Scrollbar */
  ::-webkit-scrollbar { width: 0; }

  /* Section text */
  .section-title { font-size: clamp(1.75rem, 6vw, 2.5rem); }
  .section-desc { font-size: var(--fs-sm); }
}

/* ── RESPONSIVE: SMALL PHONES ── */
@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .section { padding: var(--space-2xl) 0; }
  .footer { padding: 36px 0 20px; }
}
