/* ==========================================================================
   Destac Locadora de Equipamentos
   Design tokens: navy #0d2f5b + safety orange #f28c00 (brand-preserved)
   Theme: dark, locked (does not follow system light/dark preference)
   ========================================================================== */

@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/SpaceGrotesk-Variable.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* brand (locked, do not vary) */
  --navy: #0d2f5b;
  --navy-soft: #123a6e;
  --orange: #f28c00;
  --orange-dim: #c97400;

  /* dark theme (locked default, no light variant) */
  --bg: #0b0d11;
  --bg-elevated: #12151b;
  --surface: #151920;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text-primary: #f4f5f7;
  --text-secondary: #a6adb8;
  --text-muted: #7d8492;
  --shadow-color: 220deg 60% 2%;
  --skeleton-base: #1b2029;
  --skeleton-shine: #232935;
  --scrim: rgba(4, 5, 7, 0.65);

  /* system */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --nav-h: 72px;
  --container: 1240px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 0.22s;
  --dur-med: 0.5s;
  --dur-slow: 0.8s;

  --font-display: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

html { color-scheme: dark; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

html, body { max-width: 100%; overflow-x: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

@media (max-width: 640px) {
  .container { padding-inline: 20px; }
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.section-head {
  max-width: 640px;
  margin-bottom: 40px;
}
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
.section-head p {
  margin-top: 12px;
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 60ch;
}

.accent { color: var(--orange); }

/* ==========================================================================
   Progress bar (page-load + scroll)
   ========================================================================== */
.progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: var(--orange);
  z-index: 2000;
  transition: width 0.2s var(--ease), opacity 0.4s var(--ease);
  transform-origin: left;
}
.progress-bar.is-done { opacity: 0; }

.scroll-progress {
  position: sticky;
  top: var(--nav-h);
  left: 0;
  height: 2px;
  width: 100%;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left;
  z-index: 999;
  margin-top: -2px;
}

/* ==========================================================================
   Skeleton loading (shared by every lazy media element)
   ========================================================================== */
.media {
  position: relative;
  overflow: hidden;
  background: var(--skeleton-base);
  border-radius: var(--radius-md);
  isolation: isolate;
}
.media::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, var(--skeleton-base) 30%, var(--skeleton-shine) 50%, var(--skeleton-base) 70%);
  background-size: 200% 100%;
  animation: shimmer 1.6s ease-in-out infinite;
  z-index: 1;
}
.media img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity var(--dur-med) var(--ease);
}
.media.is-loaded::before { animation: none; opacity: 0; transition: opacity var(--dur-fast) linear; }
.media.is-loaded img { opacity: 1; }

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .media::before { animation: none; }
}

/* ==========================================================================
   Scroll-reveal (IntersectionObserver driven)
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ==========================================================================
   Header / Nav
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.site-header.is-scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 8px 24px -16px hsl(var(--shadow-color) / 0.4);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
}
.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.brand-logo {
  height: 42px;
  width: auto;
}
.brand-logo-footer { height: 34px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links a {
  font-size: 0.95rem;
  color: var(--text-secondary);
  position: relative;
  padding: 6px 0;
  transition: color var(--dur-fast) var(--ease);
}
.nav-links a:hover { color: var(--text-primary); }
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--dur-fast) var(--ease);
}
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }

.nav-actions { display: flex; align-items: center; gap: 16px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 22px;
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.btn:active { transform: scale(0.97); }
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

.btn-primary {
  background: var(--orange);
  color: #0d1420;
  box-shadow: 0 8px 20px -8px rgb(242 140 0 / 0.55);
}
.btn-primary:hover { background: #ffa524; box-shadow: 0 10px 26px -8px rgb(242 140 0 / 0.65); }

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
}
.btn-ghost:hover { background: var(--surface); border-color: var(--text-muted); }

.btn-sm { padding: 9px 16px; font-size: 0.88rem; }

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
}
.nav-toggle svg { width: 24px; height: 24px; }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-actions .btn-ghost { display: none; }
  .nav-toggle { display: flex; }
}

/* Narrow phones (e.g. Galaxy A21s at ~360-390px): collapse the WhatsApp
   pill to an icon-only circular button so the nav never forces horizontal
   scroll. Full label stays available via the mobile drawer and the FAB. */
@media (max-width: 480px) {
  .nav-inner { gap: 10px; }
  .nav-actions { gap: 8px; }
  .brand-logo { height: 34px; }
  .nav-actions .btn-primary {
    padding: 10px;
    width: 42px;
    height: 42px;
    gap: 0;
  }
  .nav-actions .btn-primary .btn-label { display: none; }
}

/* Mobile drawer */
.mobile-drawer {
  position: fixed;
  inset: var(--nav-h) 0 0 0;
  background: var(--bg);
  z-index: 999;
  display: flex;
  flex-direction: column;
  padding: 32px 24px;
  gap: 4px;
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.mobile-drawer.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.mobile-drawer a {
  padding: 16px 4px;
  font-size: 1.15rem;
  font-family: var(--font-display);
  border-bottom: 1px solid var(--border);
}
.mobile-drawer .btn { margin-top: 20px; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  padding-top: clamp(28px, 6vw, 64px);
  padding-bottom: 72px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.hero-copy h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  line-height: 1.08;
}
.hero-copy p {
  margin-top: 20px;
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 46ch;
}
.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 32px;
  flex-wrap: wrap;
}
.hero-media {
  aspect-ratio: 4 / 3.1;
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 60px -30px hsl(var(--shadow-color) / 0.5);
}
.hero-badge {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: color-mix(in srgb, var(--bg-elevated) 82%, transparent);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  font-weight: 600;
}
.hero-badge svg { width: 16px; height: 16px; color: var(--orange); }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-media { order: -1; aspect-ratio: 16/11; }
}

/* ==========================================================================
   Differentials strip (full width, hairline-divided, not cards)
   ========================================================================== */
.diffs {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}
.diffs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.diff-item {
  padding: 32px 28px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  border-left: 1px solid var(--border);
}
.diff-item:first-child { border-left: none; }
.diff-item svg {
  width: 22px; height: 22px;
  color: var(--orange);
  flex-shrink: 0;
  margin-top: 2px;
}
.diff-item p { font-size: 0.92rem; color: var(--text-secondary); line-height: 1.5; }

@media (max-width: 900px) {
  .diffs-grid { grid-template-columns: 1fr 1fr; }
  .diff-item:nth-child(3) { border-left: none; }
}
@media (max-width: 560px) {
  .diffs-grid { grid-template-columns: 1fr; }
  .diff-item { border-left: none !important; border-top: 1px solid var(--border); }
  .diff-item:first-child { border-top: none; }
}

/* ==========================================================================
   About (asymmetric: text left, stacked list right)
   ========================================================================== */
.about { padding-block: 96px; }
.about-grid {
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  gap: 64px;
}
.about-body p { color: var(--text-secondary); font-size: 1.05rem; margin-bottom: 18px; max-width: 54ch; }
.about-body p:last-child { margin-bottom: 0; }

.pillars { display: flex; flex-direction: column; }
.pillar {
  padding-block: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 18px;
}
.pillar:last-child { padding-bottom: 0; }
.pillar-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  background: var(--navy);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.pillar-icon svg { width: 20px; height: 20px; color: #fff; }
.pillar h3 { font-size: 1.05rem; margin-bottom: 6px; }
.pillar p { font-size: 0.94rem; color: var(--text-secondary); }

@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
}

/* ==========================================================================
   Services (three equal panels, same shape and color)
   ========================================================================== */
.services { padding-bottom: 96px; }
.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.bento-item {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.bento-panel {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 32px;
  min-height: 260px;
}
.bento-panel-surface {
  background: var(--surface);
  border: 1px solid var(--border);
}

.bento-icon {
  width: 32px; height: 32px;
  color: var(--orange);
  margin-bottom: 20px;
}

.bento-panel h3 { font-size: 1.2rem; margin-bottom: 8px; }
.bento-panel p { font-size: 0.95rem; color: var(--text-secondary); max-width: 34ch; }

@media (max-width: 900px) {
  .bento { grid-template-columns: 1fr; }
  .bento-panel { min-height: 0; }
}

/* ==========================================================================
   Gallery (masonry columns + lightbox)
   ========================================================================== */
.gallery-wrap { padding-bottom: 96px; }
.masonry {
  column-count: 4;
  column-gap: 16px;
}
.masonry .media {
  margin-bottom: 16px;
  break-inside: avoid;
  cursor: zoom-in;
}
.masonry .media img { transition: transform var(--dur-med) var(--ease); }
.masonry .media:hover img { transform: scale(1.035); }

@media (max-width: 1024px) { .masonry { column-count: 3; } }
@media (max-width: 700px) { .masonry { column-count: 2; column-gap: 10px; } .masonry .media { margin-bottom: 10px; } }

.masonry .media.gallery-extra { display: none; }
.masonry.is-expanded .media.gallery-extra { display: block; }

.gallery-toggle-wrap {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}
.gallery-toggle-icon {
  width: 16px; height: 16px;
  transition: transform var(--dur-fast) var(--ease);
}
#gallery-toggle[aria-expanded="true"] .gallery-toggle-icon { transform: rotate(180deg); }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--scrim);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-fast) var(--ease);
}
.lightbox.is-open { opacity: 1; pointer-events: auto; }
.lightbox-figure {
  position: relative;
  max-width: min(90vw, 1100px);
  max-height: 86vh;
  transform: scale(0.96);
  transition: transform var(--dur-fast) var(--ease);
}
.lightbox.is-open .lightbox-figure { transform: scale(1); }
.lightbox-figure img {
  max-width: 100%;
  max-height: 86vh;
  width: auto;
  border-radius: var(--radius-md);
  object-fit: contain;
}
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: fixed;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  transition: background var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,0.18); }
.lightbox-close:active, .lightbox-prev:active, .lightbox-next:active { transform: scale(0.94); }
.lightbox-close svg, .lightbox-prev svg, .lightbox-next svg { width: 22px; height: 22px; }
.lightbox-close { top: 24px; right: 24px; }
.lightbox-prev { left: 24px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 24px; top: 50%; transform: translateY(-50%); }
@media (max-width: 640px) {
  .lightbox-prev, .lightbox-next { width: 40px; height: 40px; }
  .lightbox-prev { left: 8px; } .lightbox-next { right: 8px; }
  .lightbox-close { top: 12px; right: 12px; }
}

/* ==========================================================================
   Contact (split)
   ========================================================================== */
.contact { padding-bottom: 96px; }
.contact-panel {
  background: var(--navy);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.contact-copy { padding: 56px; color: #fff; }
.contact-copy h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); color: #fff; }
.contact-copy p { margin-top: 14px; color: rgba(255,255,255,0.72); max-width: 42ch; }
.contact-list { margin-top: 32px; display: flex; flex-direction: column; gap: 18px; }
.contact-row { display: flex; align-items: center; gap: 14px; }
.contact-row .ic {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.contact-row .ic svg { width: 18px; height: 18px; color: var(--orange); }
.contact-row a, .contact-row span { color: #fff; font-weight: 500; }
.contact-actions { margin-top: 36px; display: flex; gap: 14px; flex-wrap: wrap; }

.contact-media { position: relative; min-height: 360px; }
.contact-media .media { position: absolute; inset: 0; border-radius: 0; }

@media (max-width: 900px) {
  .contact-panel { grid-template-columns: 1fr; }
  .contact-copy { padding: 40px 28px; }
  .contact-media { min-height: 240px; }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 40px;
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a { color: var(--text-secondary); font-size: 0.9rem; transition: color var(--dur-fast) var(--ease); }
.footer-links a:hover { color: var(--text-primary); }
.footer-meta { color: var(--text-muted); font-size: 0.85rem; }

/* ==========================================================================
   WhatsApp floating action
   ========================================================================== */
.fab-whatsapp {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 900;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: #25D366;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 28px -10px rgba(0,0,0,0.45);
  transition: transform var(--dur-fast) var(--ease);
}
.fab-whatsapp svg { width: 28px; height: 28px; color: #fff; }
.fab-whatsapp:hover { transform: translateY(-3px); }
.fab-whatsapp:active { transform: scale(0.93); }

/* ==========================================================================
   Utility
   ========================================================================== */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
