/* =========================================================
   cadorealves.com — Homepage
   Para customizar, comece pelas variáveis abaixo.
   ========================================================= */

:root {
  --bg: #1F1F1F;            /* fundo da tela */
  --fg: #F2F2F2;            /* texto principal */
  --fg-soft: #CFCFCF;       /* texto secundário */
  --panel: #FFFFFF;         /* bloco de apoio (texto) */
  --panel-fg: #1A1A1A;
  --tile: #CACACA;          /* fundo dos logos */
  --round: #DADADA;         /* botão redondo */
  --watermark: rgba(255, 255, 255, .035);

  --font: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --stretch: 112%;          /* largura da fonte (100% = normal) */

  --side-w: clamp(340px, 33.5vw, 680px);  /* largura da coluna da direita */
  --media-h: 65%;           /* altura do bloco de imagens dentro da coluna */
  --pad: clamp(24px, 5.5vw, 96px);

  --ease: cubic-bezier(.65, 0, .35, 1);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-stretch: var(--stretch);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;           /* a tela é fixa; o conteúdo é que se move */
  overscroll-behavior: none;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }

/* ---------- Palco ---------- */
.stage {
  position: relative;
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-columns: 1fr var(--side-w);
  grid-template-rows: auto 1fr;
  grid-template-areas: "top side" "content side";
  overflow: hidden;
}

.watermark {
  position: absolute; z-index: 0;
  left: calc(var(--pad) * 2.6); bottom: -0.2em;
  font-size: clamp(160px, 26vw, 460px);
  font-weight: 600; letter-spacing: -.04em; line-height: 1;
  color: var(--watermark);
  white-space: nowrap; pointer-events: none; user-select: none;
}

/* ---------- Topo ---------- */
.topbar {
  grid-area: top; position: relative; z-index: 30;
  display: flex; align-items: center; gap: 22px;
  padding: calc(var(--pad) * .75 + env(safe-area-inset-top)) var(--pad) 0;
}
.topbar-label { font-size: 18px; font-weight: 400; letter-spacing: .01em; }
.menu-btn { width: 28px; height: 28px; display: grid; align-content: center; gap: 6px; position: relative; z-index: 30; }
.menu-btn span { display: block; height: 1.5px; width: 100%; background: currentColor; transition: transform .45s var(--ease), opacity .3s; }
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- Conteúdo ---------- */
.content { grid-area: content; position: relative; z-index: 1; min-height: 0; }
.step {
  position: absolute; inset: 0;
  padding: 0 var(--pad) var(--pad);
  overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: none;
  visibility: hidden;
}
.step::-webkit-scrollbar { display: none; }
.step.is-active { visibility: visible; }

.hero { min-height: 100%; display: flex; flex-direction: column; justify-content: center; padding-top: 6vh; }
.hero-kicker { margin: 0; font-size: clamp(20px, 2vw, 32px); font-weight: 400; }
.hero-name {
  margin: .02em 0 .08em -0.04em;
  font-size: clamp(88px, 12vw, 210px);
  font-weight: 500; letter-spacing: -.045em; line-height: .95;
}
.hero-lead { margin: 0; max-width: 46ch; font-size: clamp(16px, 1.25vw, 20px); color: var(--fg-soft); line-height: 1.5; }

.about, .work { padding-top: clamp(16px, 6vh, 120px); max-width: 1040px; }
.about-statement { margin: 0 0 1.4em; font-size: clamp(22px, 2vw, 36px); line-height: 1.38; font-weight: 400; max-width: 36ch; }
.about-statement strong { font-weight: 600; display: block; }
.about-text { margin: 0 0 1.4em; font-size: clamp(16px, 1.3vw, 22px); line-height: 1.6; color: var(--fg-soft); max-width: 54ch; }

.trusted { margin-top: clamp(16px, 4vh, 64px); }
.trusted-title { margin: 0 0 18px; font-size: clamp(16px, 1.3vw, 22px); }
.trusted-title span { color: var(--fg-soft); }
.logos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 124px)); gap: 16px; }
.logos li {
  aspect-ratio: 142 / 162; background: var(--tile);
  display: grid; grid-template-rows: 1fr auto; justify-items: center; align-items: center;
  padding: 10px 8px 14px; text-align: center;
}
.logos img { width: 84%; height: auto; display: block; }
.logos span { font-size: 11px; line-height: 1.25; color: #333; font-stretch: 100%; }
.trusted-more { margin: 18px 0 0; font-size: 14px; color: var(--fg-soft); }

.work-kicker { margin: 0 0 16px; font-size: 14px; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-soft); }
.work-title { margin: 0 0 .7em; font-size: clamp(30px, 3.6vw, 60px); line-height: 1.12; font-weight: 500; letter-spacing: -.02em; max-width: 18ch; }

/* ---------- Coluna da direita ---------- */
.side {
  grid-area: side; position: relative; z-index: 2;
  display: grid; grid-template-rows: var(--media-h) 1fr;
  min-height: 0;
}
.media { position: relative; overflow: hidden; background: #2A2A2A; }
.slide { position: absolute; inset: 0; margin: 0; visibility: hidden; }
.slide.is-active { visibility: visible; }
.slide img { width: 100%; height: 100%; object-fit: cover; display: block; }

.caption { position: relative; overflow: hidden; background: var(--panel); color: var(--panel-fg); }
.cap {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  gap: clamp(32px, 6vh, 64px);
  padding: 24px 24px calc(clamp(24px, 4.5vh, 56px) + env(safe-area-inset-bottom));
  visibility: hidden;
}
.cap.is-active { visibility: visible; }
.cap-link {
  font-size: clamp(16px, 1.45vw, 24px); padding-bottom: 8px;
  border-bottom: 1.5px solid currentColor; color: inherit;
  transition: opacity .2s;
}
.cap-link:hover { opacity: .65; }
.cap-link.is-static { border-bottom-color: transparent; color: #6B6B6B; }
.round-btn {
  width: clamp(44px, 3.4vw, 52px); aspect-ratio: 1; border-radius: 50%;
  background: var(--round); color: #333;
  display: grid; place-items: center;
  box-shadow: 0 6px 14px rgba(0,0,0,.14);
  transition: transform .3s var(--ease), box-shadow .3s;
}
.round-btn:hover { transform: translateY(3px); box-shadow: 0 3px 8px rgba(0,0,0,.18); }
.round-btn svg { width: 46%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cap[data-cap="0"] .round-btn svg { animation: nudge 2.4s var(--ease) 1.6s infinite; }
@keyframes nudge { 0%, 60%, 100% { transform: none; } 30% { transform: translateY(3px); } }

/* ---------- Menu ---------- */
.menu {
  position: fixed; inset: 0; z-index: 20;
  background: #181818;
  display: grid; align-content: center;
  padding: var(--pad);
  opacity: 0; transition: opacity .45s var(--ease);
}
.menu[hidden] { display: none; }
.menu.is-open { opacity: 1; }
.menu ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.menu a {
  display: inline-flex; align-items: baseline; gap: 20px;
  color: var(--fg); text-decoration: none;
  font-size: clamp(40px, 7vw, 96px); font-weight: 500; letter-spacing: -.03em; line-height: 1.1;
  opacity: 0; transform: translateY(24px);
  transition: opacity .5s var(--ease), transform .6s var(--ease), color .2s;
}
.menu.is-open a { opacity: 1; transform: none; }
.menu.is-open li:nth-child(2) a { transition-delay: .06s; }
.menu.is-open li:nth-child(3) a { transition-delay: .12s; }
.menu a span { font-size: 14px; letter-spacing: .1em; color: var(--fg-soft); font-weight: 400; }
.menu a:hover, .menu a[aria-current="true"] { color: #fff; }
.menu a:not([aria-current="true"]) { color: #8A8A8A; }
.menu a:not([aria-current="true"]):hover { color: var(--fg); }

/* =========================================================
   Mobile e tablets em pé
   ========================================================= */
@media (max-width: 860px), (max-aspect-ratio: 4/5) {
  :root { --pad: 24px; }
  .stage {
    grid-template-columns: 1fr;
    grid-template-rows: auto clamp(170px, 30dvh, 340px) 1fr auto;
    grid-template-areas: "top" "media" "content" "caption";
  }
  .side { display: contents; }
  .media { grid-area: media; margin: 16px var(--pad) 0; border-radius: 4px; }
  .caption { grid-area: caption; height: calc(84px + env(safe-area-inset-bottom)); }
  .cap {
    flex-direction: row; justify-content: space-between; align-items: center;
    gap: 16px; padding: 0 var(--pad) env(safe-area-inset-bottom);
  }
  .cap-link { font-size: 16px; padding-bottom: 4px; text-align: left; }
  .round-btn { width: 44px; flex: none; }

  .topbar { padding-top: calc(20px + env(safe-area-inset-top)); }
  .topbar-label { font-size: 16px; }
  .step { padding: 0 var(--pad) 32px; }
  .hero { justify-content: center; padding-top: 0; }
  .hero-kicker { font-size: 18px; }
  .hero-name { font-size: clamp(72px, 23vw, 150px); }
  .hero-lead { font-size: 16px; }
  .about, .work { padding-top: 28px; }
  .about-statement { font-size: 19px; }
  .about-text { font-size: 15px; line-height: 1.55; }
  .step {
    padding-bottom: 56px;
    -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 calc(100% - 40px), transparent 100%);
            mask-image: linear-gradient(to bottom, #000 0, #000 calc(100% - 40px), transparent 100%);
  }
  .logos { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .logos span { font-size: 9px; }
  .watermark { left: 8px; font-size: 44vw; bottom: 64px; }
}

@media (max-height: 520px) and (orientation: landscape) {
  /* celular deitado: tudo cabe com rolagem interna */
  .hero-name { font-size: 18vh; }
  .side { grid-template-rows: 70% 1fr; }
  .cap { gap: 12px; padding-bottom: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .cap[data-cap="0"] .round-btn svg { animation: none; }
}
