/* =============================================================
   ZENITHA — Agência de Tecnologia
   Folha de estilo principal
   Estrutura: tokens → base → wrapper full-page → nav → hero
              → seções → carrossel → utilitários a11y
   Caminhos relativos a /css/  (ex.: ../img, ../Font)
   ============================================================= */

/* ── Fonte do logotipo (wordmark) ────────────────────────────── */
@font-face {
  font-family: 'Gotham';
  src: url('../Font/Gotham%20Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ── Tokens ──────────────────────────────────────────────────── */
:root {
  --ff: 'Montserrat Alternates', system-ui, sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-inout: cubic-bezier(0.76, 0, 0.24, 1);

  --ink: #f8f8f8;
  --bg: #000;
  --bg-soft: #0a0a0a;

  /* Escala de profundidade (z-index semântico) */
  --z-base: 1;
  --z-content: 2;
  --z-nav: 200;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--ff);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ── Foco visível (acessibilidade por teclado) ───────────────── */
:focus-visible {
  outline: 2px solid rgba(248, 248, 248, 0.85);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── Movimento reduzido ──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ── Animação de entrada (Hero) ──────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Reveal por scroll ───────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.85s var(--ease-out), transform 0.85s var(--ease-out);
}
.reveal--delay { transition-delay: 0.2s; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── Wrapper full-page ───────────────────────────────────────── */
.fp-wrapper {
  width: 100%;
  will-change: transform;
  transition: transform 1s var(--ease-inout);
}

/* ── Navegação por pontos ────────────────────────────────────── */
.fp-nav {
  position: fixed;
  right: clamp(12px, 2.5vw, 36px);
  top: 50%;
  transform: translateY(-50%);
  z-index: var(--z-nav);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.fp-nav__dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
  border: none;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.4s ease, transform 0.4s var(--ease-out),
              height 0.4s var(--ease-out);
}
/* Área de toque ampliada sem alterar o visual */
.fp-nav__dot::after {
  content: '';
  position: absolute;
  inset: -10px;
}
.fp-nav__dot:hover { background: rgba(255, 255, 255, 0.55); }
.fp-nav__dot.is-active {
  background: rgba(255, 255, 255, 0.92);
  height: 20px;
  border-radius: 4px;
  transform: scaleX(1.2);
}
.fp-nav__dot:focus-visible { outline-offset: 6px; }
@media (max-width: 480px) {
  .fp-nav { display: none; }
}

/* ── Altura robusta das seções (fix iOS Safari dvh) ──────────── */
.hero,
.section-placeholder,
.services-carousel {
  height: 100vh;
  height: 100dvh;
}

/* ── Hero ────────────────────────────────────────────────────── */
.hero {
  position: relative;
  width: 100%;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-bottom: 8vh;
  overflow: hidden;
}
.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  pointer-events: none;
  will-change: opacity;
  transition: opacity 0.48s ease;
}
.hero__bg.loaded { opacity: 0.72; }
.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  pointer-events: none;
  will-change: opacity;
  transition: opacity 1.2s ease;
}
.hero__video.ready { opacity: 0.72; }
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 80% at 50% 48%,
    transparent 30%, rgba(0, 0, 0, 0.20) 65%, rgba(0, 0, 0, 0.52) 100%);
  pointer-events: none;
  z-index: var(--z-base);
}

/* ── Logotipo ────────────────────────────────────────────────── */
.hero__logo {
  position: absolute;
  top: clamp(24px, 5.5vh, 120px);
  left: clamp(20px, 4.9vw, 96px);
  font-family: 'Gotham', var(--ff);
  font-weight: 700;
  font-style: italic;
  font-size: clamp(20px, 2.08vw, 40px);
  color: #fff;
  letter-spacing: 0.1em;
  white-space: nowrap;
  z-index: var(--z-content);
  text-decoration: none;
  animation: fadeUp 0.72s var(--ease-out) 0.08s both;
}

/* ── Conteúdo do Hero ────────────────────────────────────────── */
.hero__content {
  position: relative;
  z-index: var(--z-content);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(24px, 6vh, 80px);
  width: 100%;
  padding: 0 clamp(20px, 5vw, 96px);
}
.hero__text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(12px, 3.3vh, 48px);
  text-align: center;
  width: 100%;
}
.hero__heading {
  font-weight: 500;
  font-size: clamp(20px, 2.08vw, 40px);
  line-height: 1.24;
  letter-spacing: -0.02em;
  color: #fff;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.48);
  text-wrap: balance;
  max-width: min(612px, 92vw);
  animation: fadeUp 0.8s var(--ease-out) 0.24s both;
}
.hero__sub {
  font-weight: 300;
  font-size: clamp(12px, 1.46vw, 28px);
  line-height: 1.64;
  color: rgba(248, 248, 248, 0.68);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.4);
  text-wrap: pretty;
  max-width: min(772px, 88vw);
  animation: fadeUp 0.8s var(--ease-out) 0.40s both;
}
.hero__buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 2.5vw, 24px);
  max-width: min(1140px, 90vw);
  width: 100%;
  animation: fadeUp 0.8s var(--ease-out) 0.56s both;
}
@media (max-width: 560px) {
  .hero__buttons { flex-direction: column; gap: 12px; }
  .btn { width: 100%; max-width: 320px; }
}

/* ── Botões ──────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 0.94vw, 16px);
  height: clamp(44px, 3.96vw, 76px);
  padding: 0 clamp(16px, 1.56vw, 28px);
  border-radius: 72px;
  font-weight: 400;
  font-size: clamp(12px, 0.94vw, 16px);
  color: rgba(248, 248, 248, 0.9);
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.24s var(--ease-out), opacity 0.24s ease;
}
.btn:hover  { opacity: 0.88; transform: translateY(-2px); }
.btn:active { transform: translateY(0); opacity: 0.75; }
.btn--orcamento {
  background: rgba(52, 58, 64, 0.85);
  border: 1px solid rgba(248, 248, 248, 0.25);
}
.btn--servicos {
  background: rgba(17, 17, 17, 0.9);
  border: 1px solid rgba(248, 248, 248, 0.08);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.36);
}
.btn__icon { flex-shrink: 0; display: flex; align-items: center; }

/* ── Seções de afirmação ─────────────────────────────────────── */
.section-placeholder {
  width: 100%;
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0 clamp(24px, 6vw, 96px);
}
.section-placeholder__label {
  font-family: var(--ff);
  font-weight: 500;
  font-size: clamp(22px, 2.6vw, 44px);
  line-height: 1.4;
  color: var(--ink);
  letter-spacing: -0.02em;
  text-align: center;
  text-wrap: balance;
  max-width: min(820px, 90vw);
}

/* ── Carrossel de serviços (seção 4) ─────────────────────────── */
.services-carousel {
  position: relative;
  width: 100%;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.52) 0%, rgba(0, 0, 0, 0.30) 45%, rgba(0, 0, 0, 0.6) 100%),
    url('../img/Fundo_pag4.webp') center / cover no-repeat,
    var(--bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.carousel-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(24px, 5vh, 64px) clamp(20px, 5vw, 96px) 0;
  flex-shrink: 0;
}
.carousel-title {
  font-family: var(--ff);
  font-weight: 600;
  font-size: clamp(20px, 2vw, 32px);
  color: rgba(248, 248, 248, 0.85);
  letter-spacing: -0.01em;
  text-align: center;
}
.carousel-counter {
  position: absolute;
  right: clamp(20px, 5vw, 96px);
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--ff);
  font-weight: 300;
  font-size: clamp(13px, 1.25vw, 24px);
  color: rgba(248, 248, 248, 0.4);
  letter-spacing: 0.04em;
}
.carousel-counter strong {
  color: var(--ink);
  font-weight: 500;
}
.carousel-track-outer {
  flex: 1;
  overflow: hidden;
  padding: clamp(12px, 3vh, 32px) 0;
}
.carousel-track {
  display: flex;
  height: 100%;
  transition: transform 0.72s var(--ease-inout);
}
.carousel-card {
  flex: 0 0 100%;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 0 clamp(20px, 5vw, 96px) clamp(18px, 4vh, 48px);
}
.carousel-card__info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: clamp(12px, 1.5vw, 20px);
  /* Quadrado seguro: limitado por vw + altura da viewport para não estourar em 100%+ zoom */
  width: min(37vw, 55dvh, 500px);
  aspect-ratio: 1 / 1;
  background: rgba(10, 10, 10, 0.6);
  border: 1px solid rgba(248, 248, 248, 0.1);
  border-radius: 16px;
  padding: clamp(22px, 3vw, 40px);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow: hidden; /* proteção extra para que o conteúdo não fure o card */
}
@media (max-width: 640px) {
  .carousel-card__info {
    width: 100%;
    aspect-ratio: auto;
  }
}
.carousel-card__num { display: none; }
.carousel-card__name {
  font-family: var(--ff);
  font-weight: 600;
  font-size: clamp(24px, 2.5vw, 36px);
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.18;
  text-align: left;
  max-width: 100%;
}
.carousel-card__desc {
  font-family: var(--ff);
  font-weight: 300;
  font-size: clamp(17px, 1.7vw, 25px);
  color: rgba(248, 248, 248, 0.6);
  line-height: 1.5;
  max-width: min(38ch, 100%);
  text-align: left;
}
.carousel-footer {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 clamp(20px, 5vw, 96px) clamp(20px, 4vh, 40px);
}
.carousel-bar {
  flex: 1;
  max-width: 240px;
  height: 4px;
  background: rgba(248, 248, 248, 0.1);
  border-radius: 4px;
  overflow: hidden;
}
.carousel-bar__fill {
  height: 100%;
  background: var(--ink);
  border-radius: 4px;
  transition: width 0.72s var(--ease-inout);
  width: 20%;
}
.carousel-hint {
  font-family: var(--ff);
  font-weight: 300;
  font-size: clamp(13px, 1vw, 18px);
  color: rgba(248, 248, 248, 0.3);
  letter-spacing: 0.02em;
}
@media (max-width: 480px) {
  .carousel-hint { display: none; }
}

/* ── Utilitário: conteúdo só para leitores de tela ───────────── */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
