/* ==========================================================================
   Brandd Studio — one page
   Dark editorial scheme: deep blue + black + grey, white/grey as support.
   Dark and light sections alternate for rhythm.
   ========================================================================== */

/* Fonts and typography live in global.css (single source of truth). */

/* ---------- Custom properties ---------- */
:root {
  --blue: #252e97;
  --blue-soft: #3a56c4;
  /* readable blue accent on dark */
  --ink: #14151b;
  /* dark base — same tone as --ink-2, site standard */
  --ink-2: #14151b;
  /* dark grey panel */
  --grey: #9a9ca6;
  /* support grey */
  --grey-light: #ececee;
  /* light section bg */
  --white: #ffffff;
  --black: #111111;

  /* fluid spacing / type */
  --space-section: clamp(6rem, 14vw, 12rem);
  --pad-x: clamp(1.25rem, 5vw, 6rem);

  --radius-btn: 8px;
  /* partial corner rounding, global */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  /* frosted glass recipe (reused on header, modal, floating chips) */
  --frost-bg: rgba(11, 12, 16, 0.55);
  --frost-blur: blur(16px);
}

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

html {
  scroll-behavior: smooth;
}

/* anchor targets clear the fixed header */
[id] {
  scroll-margin-top: 6.5rem;
}

body {
  color: var(--white);
  background: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

ul {
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

/* Reveal elements start hidden only when JS is running */
.js .reveal {
  opacity: 0;
}

/* White version of the logo for dark surfaces (header, footer) */
.logo-white {
  filter: brightness(0) invert(1);
}

/* ==========================================================================
   Header — frosted dark bar
   ========================================================================== */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem var(--pad-x);
  background: var(--frost-bg);
  -webkit-backdrop-filter: var(--frost-blur);
  backdrop-filter: var(--frost-blur);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header-logo img {
  width: 250px;
  min-width: 250px;
  height: auto;
  /* white logo over the dark frosted bar */
  filter: brightness(0) invert(1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Burger — two thin lines, rotates to X when open */
.burger {
  position: relative;
  width: 44px;
  height: 44px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-btn);
  transition: border-color 0.3s;
}

.burger:hover {
  border-color: var(--white);
}

.burger span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--white);
  transition: transform 0.4s var(--ease-out);
}

.burger.is-open span:nth-child(1) {
  transform: translateY(4.25px) rotate(45deg);
}

.burger.is-open span:nth-child(2) {
  transform: translateY(-4.25px) rotate(-45deg);
}

/* ---------- Buttons (global: partial rounding, never pill) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.25); /* same subtle hairline as the burger */
  color: var(--white);
  background: transparent;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius-btn);
  font-size: 0.95rem;
  white-space: nowrap;
  transition: background 0.35s var(--ease-out), color 0.35s var(--ease-out), border-color 0.35s var(--ease-out);
}

.btn:hover {
  background: var(--white);
  border-color: var(--white);
  color: var(--blue-soft);
}

/* ==========================================================================
   Menu modal — full-screen frosted overlay
   ========================================================================== */
.menu-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  /* below header so logo/burger stay usable */
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* solid blue — nothing from the page shows through */
  background: #254bb8;
  opacity: 0;
  visibility: hidden;
}

.menu-modal.is-open {
  visibility: visible;
}

.menu-nav {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin: auto 0; /* keeps the links centered, contato pinned below */
}

.menu-link {
  /* same scale as the h2 "Toda empresa deixa..." */
  font-size: clamp(3.5rem, 10vw, 7rem);
  line-height: 1.0;
  letter-spacing: -0.01em;
  color: var(--white);
  transition: color 0.3s;
  padding: clamp(1rem, 2.5vh, 1.8rem) var(--pad-x);
  /* thin separator, edge to edge of the screen */
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}

.menu-link:hover {
  color: var(--ink);
}

/* contact data pinned at the menu's footer */
.menu-contato {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2.5rem;
  padding: 1.5rem var(--pad-x) 2rem;
}

.menu-contato a {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--white);
  white-space: nowrap;
  transition: color 0.3s;
}

.menu-contato a:hover { color: var(--ink); }
.menu-contato i { font-size: 1.1rem; }

/* ==========================================================================
   Hero — dark, notebook lines
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 0 var(--pad-x);
  overflow: hidden;
  background: var(--ink);
}

/* Vetor background — 200%, shifted right, distorts under the cursor */
.hero-vetor {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.hero-vetor-svg {
  position: absolute;
  left: 22%; /* pushed to the left */
  top: 50%;
  width: 200%;
  max-width: none; /* escape the global img/svg max-width reset */
  aspect-ratio: 7943.98 / 4021.33;
  height: auto;
  transform: translate(-50%, -50%);
}
.hero-vetor-paths path {
  fill: none;
  stroke: #254bb8;
  /* viewBox units (7944 wide) — reads as a thin line at display scale */
  stroke-width: 3;
}

/* Headline: tight kerning + line-height (typewriter handled in JS) */
.hero-title {
  position: relative;
  z-index: 1;
  color: var(--white);
}

.hero-line {
  display: block;
}

.hero-line-inner {
  display: block;
  white-space: nowrap;
}

.hero-line-inner .ch {
  display: inline;
}

/* blinking caret following the typed headline — terminal rate: 530ms on / 530ms off */
.hero-caret {
  display: inline-block;
  width: 0.08em;
  height: 0.78em;
  margin-left: 0.06em;
  background: var(--blue-soft);
  vertical-align: baseline;
  animation: caret-blink 1060ms step-end infinite;
}

@keyframes caret-blink {

  0%,
  49.99% {
    opacity: 1;
  }

  50%,
  100% {
    opacity: 0;
  }
}

.hero-scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  font-size: 1.4rem;
  color: var(--blue-soft);
  opacity: 0.8;
}

/* ==========================================================================
   Seção 2 — Apoio (light) — edge-positioned texts
   ========================================================================== */
.apoio {
  padding: var(--space-section) var(--pad-x);
  background: var(--white);
  color: var(--black);
}

.apoio-lead {
  color: var(--blue);
  margin-bottom: clamp(2.5rem, 7vw, 5rem);
  max-width: 24ch;
  /* anchored to the left edge of the content area */
}

.apoio-body {
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  max-width: 42ch;
  color: var(--black);
  /* pushed to the right edge */
  margin-left: auto;
}

/* ==========================================================================
   Seção 3 — Serviços (dark grey) — expandable accordion
   ========================================================================== */
.entregas {
  padding: var(--space-section) var(--pad-x);
  background: var(--ink-2);
  color: var(--white);
}

.servicos-acordeao {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.servico {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

/* full row is the click target */
.servico-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: 100%;
  padding: clamp(1.4rem, 3vw, 2.2rem) 0;
  text-align: left;
  color: var(--blue-soft); /* inverted: blue at rest, white on hover */
  transition: color 0.3s var(--ease-out);
}

.servico-toggle:hover {
  color: var(--white);
}

.servico-chevron {
  flex: 0 0 auto;
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  color: var(--blue-soft);
  transition: transform 0.45s var(--ease-out);
}

.servico.is-open .servico-chevron {
  transform: rotate(180deg);
}

/* smooth expand/collapse (grid-rows 0fr -> 1fr) */
.servico-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.55s var(--ease-out);
}

.servico.is-open .servico-panel {
  grid-template-rows: 1fr;
}

.servico-panel-inner {
  overflow: hidden;
  min-height: 0;
}

/* open content: two columns — svg left, text right */
.servico-cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.5rem, 4vw, 4rem);
  padding: 0.5rem 0 clamp(2rem, 4vw, 3rem);
}

.servico-icone {
  display: flex;
  align-items: flex-start;
}

.servico-icone img {
  width: clamp(12rem, 24vw, 24rem);
  height: auto;
  opacity: 0.9;
}

.servico-descricao {
  color: var(--white);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  max-width: 52ch;
  margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
}

.servico-topicos {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.servico-topicos a {
  color: var(--blue);
  border-bottom: 1px solid transparent;
  transition: color 0.3s, border-color 0.3s;
}

.servico-topicos a:hover {
  color: var(--blue-soft);
  border-color: var(--blue-soft);
}

/* ==========================================================================
   Seção 4 — Ponte (light) — edge-positioned texts
   ========================================================================== */
.ponte {
  position: relative;
  padding: var(--space-section) 0;
  padding-bottom: 0;
  background: var(--grey-light);
  color: var(--black);
  overflow: hidden;
}

.ponte-vetor-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.35;
  pointer-events: none;
  user-select: none;
}

.ponte-text {
  position: relative;
  padding: 0 var(--pad-x);
  z-index: 1;
  font-size: clamp(1.1rem, 2.2vw, 1.5rem);
  max-width: 44ch;
}

.ponte-text-left {
  margin-right: auto;
}

/* ---------- Ticker marquee ---------- */
.ponte-ticker {
  position: relative;
  z-index: 1;
  width: 100%;
  overflow: hidden;
  margin-top: clamp(2rem, 5vw, 4rem);
}

@keyframes ticker-scroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

.ponte-ticker-track {
  display: flex;
  width: max-content;
  animation: ticker-scroll 45s linear infinite;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(5rem, 14vw, 12rem);
  text-transform: uppercase;
  letter-spacing: -0.03em;
  line-height: 1;
  color: #254bb8;
  white-space: nowrap;
}

/* ==========================================================================
   Seção 5 — Galeria (near-black, stacked drawer, pinned)
   ========================================================================== */
.galeria {
  position: relative;
  /* isolate the card z-indexes (set by GSAP) inside this section so they
     can never paint over adjacent sections */
  z-index: 0;
  isolation: isolate;
  background: var(--ink);
}

/* intro headline — same scale/face as .apoio-lead ("Toda empresa deixa...")
   sits ABOVE the pinned block: it scrolls away before the stack pins, so the
   exiting cards (clipped by the pin's overflow) never touch it */
.galeria-lead {
  color: var(--blue);
  padding: clamp(2rem, 4vw, 3.5rem) var(--pad-x) 0;
}

.galeria-pin {
  position: relative;
  height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  /* structural containment: clips cards sliding out of the drawer,
     so they can never reach the headline above this block */
  overflow: hidden;
}

.galeria-stack {
  position: relative;
  width: min(72vw, 52rem);
  aspect-ratio: 4 / 3;
  max-height: 64svh;
}

.card {
  position: absolute;
  inset: 0;
  border-radius: 0;
  /* sharp rectangular cards */
  overflow: hidden;
  background: var(--ink-2);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.8);
  will-change: transform;
}

/* whole card is the click target */
.card-link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  /* neutral fallback when the image is missing */
  background: linear-gradient(160deg, #1b1d26 0%, #14151b 100%);
}

.card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-nome {
  position: relative;
  z-index: 1;
  font-size: clamp(1.6rem, 4.5vw, 3.4rem);
  color: var(--white);
  letter-spacing: 0.02em;
  text-align: center;
  padding: 0 1rem;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.55);
}

/* floating counter — frosted chip */
.galeria-counter {
  position: absolute;
  bottom: 2rem;
  right: var(--pad-x);
  display: flex;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: var(--white);
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-btn);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

/* ==========================================================================
   Seção 6 — O Ofício (light, + B line-art) — edge-positioned text
   ========================================================================== */
.oficio {
  position: relative;
  padding: clamp(4rem, 9vw, 7rem) var(--pad-x) clamp(5rem, 12vw, 9rem);
  overflow: hidden;
  background: var(--white);
  color: var(--black);
}

.oficio-text {
  position: relative;
  z-index: 1;
  font-size: clamp(1.2rem, 2.6vw, 1.75rem);
  max-width: 40ch;
  line-height: 1.55;
}

/* Giant "B", centered in the section, behind the text */
.oficio-icone {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: clamp(41rem, 97vw, 94rem); /* +25% */
  z-index: 0;
  pointer-events: none;
}

.icone-b {
  width: 100%;
  height: auto;
}

.icone-b-path {
  fill: none;
  stroke: #254bb8;
  stroke-width: 0.5;
  opacity: 1;
}

/* ==========================================================================
   Seção 7 — Fundador (dark grey)
   ========================================================================== */
.fundador {
  padding: var(--space-section) var(--pad-x);
  background: var(--ink-2);
  color: var(--white);
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

.fundador-img {
  display: block;
  width: 100%;
  max-width: 26rem;
  height: auto;
}

.fundador-bio h2 {
  color: var(--white);
  margin-bottom: 1.5rem;
}

.fundador-bio p {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  max-width: 42ch;
  margin-bottom: 2rem;
  color: var(--grey);
}

.fundador-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--white);
  border-bottom: 1px solid var(--blue-soft);
  padding-bottom: 0.15rem;
}

/* ==========================================================================
   Seção 8 — Fechamento + CTA (deep blue)
   ========================================================================== */
.fechamento {
  padding: var(--space-section) var(--pad-x);
  min-height: 70svh;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 3rem;
  background: var(--blue);
  color: var(--white);
}

.fechamento-title {
  max-width: 18ch;
}

.btn-cta {
  font-size: clamp(1rem, 2vw, 1.2rem);
  padding: 1rem 2.4rem;
  border-color: rgba(255, 255, 255, 0.25); /* same subtle hairline as the burger */
}

.btn-cta:hover {
  background: var(--white);
  border-color: var(--white);
  color: var(--blue);
}

/* ==========================================================================
   Vídeo scroll-scrub (pinned, scrubbed via GSAP)
   ========================================================================== */
#video-scrub-section {
  position: relative;
  width: 100%;
  height: 100svh;
  background: var(--ink);
  overflow: hidden;
}
#hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;     /* fills the section, centered by default */
  object-position: center;
  display: block;
}

/* ==========================================================================
   Footer (near-black)
   ========================================================================== */
.site-footer {
  background: var(--ink);
  color: var(--white);
  padding: clamp(2.5rem, 6vw, 4rem) var(--pad-x) 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* top row: 3 colunas — logo | contato (centro) | redes (direita) */
.footer-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 2rem;
  padding-bottom: clamp(2rem, 5vw, 3.5rem);
}

.footer-logo {
  width: 140px;
  height: auto;
  justify-self: start;
}

.footer-contato {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  font-size: 1rem;
}

.footer-contato a {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--white);
  white-space: nowrap;
}

.footer-contato a:hover {
  color: var(--blue-soft);
}

.footer-contato i {
  font-size: 1.1rem;
  color: var(--blue-soft);
}

.footer-redes {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  color: var(--grey);
  justify-self: end;
  align-items: flex-end;
}

.footer-redes a {
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, color 0.3s;
}

.footer-redes a:hover {
  color: var(--white);
  border-color: var(--white);
}

/* bottom bar: thin line + legal text */
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.9rem 0;
}

.footer-legal {
  font-size: 0.7rem;
  color: var(--blue-soft);
  letter-spacing: 0.01em;
}

/* ==========================================================================
   Breakpoints — tablet (≥768px) and desktop (≥1024px)
   ========================================================================== */
@media (min-width: 768px) {

  /* accordion open content: svg column left, text column right */
  .servico-cols {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  }

  .fundador {
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    gap: clamp(3rem, 8vw, 7rem);
  }

}

@media (max-width: 480px) {

  /* accordion: hide the svg column when space is tight */
  .servico-icone {
    display: none;
  }

  /* keep logo legible but make room for the actions on very small screens */
  .site-header {
    padding: 0.75rem 1rem;
  }

  .header-logo img {
    width: 250px;
    min-width: 0;
    max-width: 44vw;
  }

  .btn-header {
    padding: 0.55rem 1rem;
    font-size: 0.85rem;
  }

  .burger {
    width: 40px;
    height: 40px;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .js .reveal {
    opacity: 1;
  }

  .hero-caret {
    display: none;
  }
}