/* ============================================================
   Fidu Viagens — Portfólios · Editorial cinematográfico (dark)
   Base: Fidu Design System · acento champagne (trocável p/ Fidu Blue)
   ============================================================ */

:root {
  /* Fidu */
  --navy:   #2d4373;
  --blue:   #3b5998;
  --soft:   #8b9dc3;
  --pale:   #c1cbdd;

  /* Tema dark cinematográfico */
  --ink-0:  #0a0f1a;   /* fundo base quase-preto navy */
  --ink-1:  #0e1525;   /* painéis */
  --ink-2:  #131c30;   /* painéis alt */
  --line:   rgba(255,255,255,.12);

  --fg:     #f4f6fb;   /* texto claro */
  --fg-dim: #aeb7c9;   /* texto secundário */
  --fg-mut: #7e8aa3;   /* labels */

  /* Acento — troque para #3b5998 p/ voltar ao azul Fidu */
  --accent: #c9a86a;
  --accent-2: #dcc08a;

  --maxw: 1280px;
  --font-sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: "Playfair Display", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--fg);
  background: var(--ink-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(22px, 5vw, 56px); }

/* media de fundo reutilizável (foto) */
.bgmedia { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.scrim { position: absolute; inset: 0; z-index: 1; }

/* fundos com parallax: foto maior que a seção p/ ter folga de deslize (sem buraco nas bordas).
   o container (.hero / .dest .media) já tem overflow:hidden → o excedente é cortado.
   transform inicial promove a própria camada na GPU (evita jank no 1º scroll). */
.bgmedia[data-parallax] {
  top: -15%; bottom: auto; height: 130%;
  transform: translate3d(0, 0, 0); will-change: transform; backface-visibility: hidden;
}

/* ---------------- Header ---------------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  transition: background .35s ease, border-color .35s ease, backdrop-filter .35s ease;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(10,15,26,.72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom-color: var(--line);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand img { height: 22px; width: auto; filter: brightness(0) invert(1); }  /* wordmark em branco no tema dark */
.brand .brand-tag {
  font-size: 11px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase;
  color: var(--fg-dim); padding-left: 14px; border-left: 1px solid var(--line);
}
.header-actions { display: flex; align-items: center; gap: 14px; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 12.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  border-radius: 999px; padding: 13px 24px; cursor: pointer; white-space: nowrap;
  transition: transform .18s ease, background .25s ease, box-shadow .25s ease, color .25s ease;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--accent); color: #1a1304; box-shadow: 0 10px 30px rgba(201,168,106,.28); }
.btn-primary:hover { background: var(--accent-2); transform: translateY(-1px); }
.btn-ghost { color: var(--fg); border: 1px solid var(--line); background: rgba(255,255,255,.04); }
.btn-ghost:hover { border-color: rgba(255,255,255,.45); }

/* link "CONHECER ROTEIRO →" */
.link-cta {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: var(--fg); padding-bottom: 8px; border-bottom: 1px solid var(--line); width: fit-content;
  transition: color .2s ease, border-color .2s ease;
}
.link-cta svg { width: 30px; height: 10px; transition: transform .25s ease; }
.link-cta:hover { color: var(--accent-2); border-color: var(--accent); }
.link-cta:hover svg { transform: translateX(6px); }

/* eyebrow */
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .28em; text-transform: uppercase; color: var(--fg-mut); }

/* ============================================================
   HERO
   ============================================================ */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; overflow: hidden; }
.hero .scrim {
  background:
    linear-gradient(90deg, rgba(8,12,21,.86) 0%, rgba(8,12,21,.55) 42%, rgba(8,12,21,.18) 100%),
    linear-gradient(0deg, rgba(8,12,21,.85) 0%, rgba(8,12,21,0) 38%);
}
.hero .container { position: relative; z-index: 2; padding-block: 140px 110px; }
.hero .eyebrow { margin-bottom: 26px; }
.hero h1 { margin: 0; max-width: 16ch; font-weight: 400; }
.hero h1 .line-strong {
  display: block; font-weight: 800; text-transform: uppercase;
  font-size: clamp(40px, 7vw, 78px); line-height: .98; letter-spacing: -.01em; color: #fff;
}
.hero h1 .line-serif {
  display: block; font-family: var(--font-serif); font-style: italic; font-weight: 500;
  font-size: clamp(30px, 5.2vw, 58px); line-height: 1.06; letter-spacing: .005em;
  color: var(--accent-2); margin-top: 14px;
}

/* máscara das linhas do título: o texto sobe "de dentro" da linha (padding+margem cancelam
   p/ dar folga ao clip dos descendentes do itálico sem mexer no espaçamento) */
.hero h1 .line-strong, .hero h1 .line-serif { overflow: hidden; padding-bottom: .14em; margin-bottom: -.14em; }
.hero h1 .line-strong > span, .hero h1 .line-serif > span { display: block; will-change: transform; }

/* entrada cinematográfica do hero (no carregamento) — estado oculto vive só no keyframe,
   então com prefers-reduced-motion (animation:none) tudo fica naturalmente visível */
@keyframes lineRise { from { transform: translateY(112%); } to { transform: translateY(0); } }
@keyframes fadeRise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
.hero .eyebrow               { animation: fadeRise .8s cubic-bezier(.2,.7,.2,1) both; animation-delay: .10s; }
.hero h1 .line-strong > span { animation: lineRise 1s cubic-bezier(.16,1,.3,1) both;  animation-delay: .22s; }
.hero h1 .line-serif  > span { animation: lineRise 1s cubic-bezier(.16,1,.3,1) both;  animation-delay: .40s; }
.hero .sub                   { animation: fadeRise .8s cubic-bezier(.2,.7,.2,1) both; animation-delay: .62s; }
.hero .cta-row               { animation: fadeRise .8s cubic-bezier(.2,.7,.2,1) both; animation-delay: .76s; }
.scroll-cue                  { animation: fadeRise .9s ease both; animation-delay: 1.05s; }
.hero .sub { margin: 26px 0 36px; max-width: 42ch; font-size: clamp(15px, 2vw, 18px); color: var(--fg-dim); }
.hero .cta-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* scroll cue */
.scroll-cue {
  position: absolute; right: clamp(22px, 5vw, 56px); bottom: 44px; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  font-size: 10px; font-weight: 700; letter-spacing: .26em; text-transform: uppercase; color: var(--fg-mut);
}
.scroll-cue .rail { width: 1px; height: 70px; background: var(--line); position: relative; overflow: hidden; }
.scroll-cue .rail::after { content:""; position:absolute; left:0; top:0; width:1px; height:30%; background: var(--accent); animation: railmove 2.4s ease-in-out infinite; }
@keyframes railmove { 0%{transform:translateY(-100%)} 60%,100%{transform:translateY(330%)} }
@media (max-width: 760px){ .scroll-cue{ display:none; } }

/* ============================================================
   DESTINOS — seções alternadas com vídeo de fundo
   ============================================================ */
.dest { position: relative; display: grid; grid-template-columns: 1fr 1fr; min-height: clamp(460px, 60vh, 700px); }
/* vídeo ocupa a seção inteira (imersivo) */
.dest .media { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
/* degradê direcional: escurece o lado do texto e deixa o vídeo vazar do outro lado */
.dest .media .scrim { background: linear-gradient(270deg, rgba(8,12,21,.94) 0%, rgba(8,12,21,.85) 40%, rgba(8,12,21,.42) 70%, rgba(8,12,21,.14) 100%); }
.dest.media-right .media .scrim { background: linear-gradient(90deg, rgba(8,12,21,.94) 0%, rgba(8,12,21,.85) 40%, rgba(8,12,21,.42) 70%, rgba(8,12,21,.14) 100%); }
.dest .panel {
  position: relative; z-index: 2; grid-column: 2; background: transparent;
  display: flex; flex-direction: column; justify-content: center; gap: 18px;
  padding: clamp(40px, 6vw, 84px) clamp(28px, 6vw, 92px);
}
.dest.media-right .panel { grid-column: 1; }

.dest .index { display: flex; align-items: center; gap: 16px; color: var(--accent); font-weight: 700; letter-spacing: .1em; }
.dest .index .num { font-size: 14px; }
.dest .index .dash { width: 42px; height: 1px; background: var(--accent); opacity: .6; }
.dest .name { margin: 0; font-weight: 800; text-transform: uppercase; font-size: clamp(30px, 4.4vw, 50px); line-height: 1; letter-spacing: -.01em; color: #fff; }
.dest .tagline { margin: 0; font-family: var(--font-serif); font-style: italic; font-weight: 500; font-size: clamp(20px, 2.6vw, 30px); line-height: 1.12; color: var(--soft); }
.dest .desc { margin: 0; max-width: 42ch; font-size: clamp(14.5px, 1.7vw, 16.5px); color: var(--fg-dim); }
.dest .link-cta { margin-top: 8px; }

/* destinos: as linhas do painel entram em cascata (mais vida no texto) — o painel em si
   fica visível; só os filhos deslizam/aparecem em sequência ao entrar na viewport (.in) */
.dest .panel.reveal { opacity: 1; transform: none; transition: none; }
.dest .panel.reveal > * { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .75s cubic-bezier(.16,1,.3,1); }
.dest .panel.reveal.in > * { opacity: 1; transform: none; }
.dest .panel.reveal.in .index    { transition-delay: .06s; }
.dest .panel.reveal.in .name     { transition-delay: .16s; }
.dest .panel.reveal.in .tagline  { transition-delay: .28s; }
.dest .panel.reveal.in .desc     { transition-delay: .40s; }
.dest .panel.reveal.in .link-cta { transition-delay: .52s; }

/* ============================================================
   TRUST BAR (diferenciais)
   ============================================================ */
.trust { position: relative; overflow: hidden; }
.trust .scrim { background: linear-gradient(0deg, rgba(8,12,21,.9), rgba(14,21,37,.92)); }
.trust .grid {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding-block: clamp(40px, 6vw, 64px);
}
.trust .item { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; padding: 10px 22px; position: relative; }
.trust .item + .item::before { content:""; position:absolute; left:0; top:50%; transform:translateY(-50%); width:1px; height:56px; background: var(--line); }
.trust .item svg { width: 30px; height: 30px; stroke: var(--accent); fill: none; stroke-width: 1.4; }
.trust .item span { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-dim); line-height: 1.5; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: var(--ink-0); border-top: 1px solid var(--line); }
.site-footer .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 22px; padding-block: 40px; }
.site-footer .f-brand { display: flex; align-items: center; gap: 14px; }
.site-footer .f-brand img { height: 22px; width: auto; filter: brightness(0) invert(1); }
.site-footer .copy { font-size: 13px; color: var(--fg-mut); }
.social { display: flex; gap: 12px; }
.social a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--line); color: var(--fg-dim); transition: background .2s, color .2s, border-color .2s, transform .15s; }
.social a:hover { background: var(--accent); color: #1a1304; border-color: var(--accent); transform: translateY(-1px); }
.social svg { width: 17px; height: 17px; fill: currentColor; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ============================================================
   RESPONSIVO
   ============================================================ */
@media (max-width: 900px) {
  /* mobile: MESMO efeito imersivo — foto full-bleed, texto sobre degradê no rodapé */
  .dest { grid-template-columns: 1fr; min-height: 88svh; }
  /* .media continua absolute/inset:0 (herdado do desktop) → foto cobre a seção inteira */
  .dest .media .scrim,
  .dest.media-right .media .scrim {
    background: linear-gradient(180deg,
      rgba(8,12,21,.34) 0%, rgba(8,12,21,.10) 24%,
      rgba(8,12,21,.62) 62%, rgba(8,12,21,.97) 100%);
  }
  .dest .panel {
    grid-column: 1; background: transparent;
    justify-content: flex-end; gap: 14px;
    padding: clamp(36px,9vw,64px) clamp(22px,6vw,40px) clamp(40px,11vw,68px);
  }
  /* art direction no mobile: centraliza a Gran Torre no recorte vertical da seção Santiago */
  .dest:nth-of-type(4) .bgmedia { object-position: 12% 50%; }
  .trust .grid { grid-template-columns: repeat(2, 1fr); gap: 10px 0; }
}
/* telas baixas: não força quase-tela-cheia */
@media (max-width: 900px) and (max-height: 680px) {
  .dest { min-height: 560px; }
}
@media (max-width: 520px) {
  .trust .grid { grid-template-columns: 1fr 1fr; }
  .trust .item { padding: 18px 14px; }
  .hero .cta-row { width: 100%; }
  .header-actions .btn .label { } /* mantém */
  .brand .brand-tag { display: none; }
}

/* ============================================================
   VISUALIZADOR DE PORTFÓLIO (flipbook em tela cheia)
   ============================================================ */
body.viewer { height: 100dvh; display: flex; flex-direction: column; overflow: hidden; background: var(--ink-0); }
.viewer-bar {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  height: 60px; padding-inline: clamp(14px, 4vw, 28px);
  background: rgba(10,15,26,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.viewer-bar .back { display: inline-flex; align-items: center; gap: 9px; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--fg); padding: 9px 14px; border-radius: 999px; transition: background .2s; }
.viewer-bar .back:hover { background: rgba(255,255,255,.06); }
.viewer-bar .back svg { width: 16px; height: 16px; }
.viewer-bar .v-title { font-size: 13px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--fg); flex: 1; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer-bar .btn { padding: 10px 18px; }
.flipbook { flex: 1 1 auto; width: 100%; border: 0; display: block; background: var(--ink-0); }

@media (max-width: 480px) {
  .viewer-bar .back span { display: none; }
  .viewer-bar .btn .label { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::after { animation: none !important; transition: none !important; }
  .reveal, .dest .panel.reveal > *, .hero .eyebrow, .hero .sub, .hero .cta-row, .scroll-cue,
  .hero h1 .line-strong > span, .hero h1 .line-serif > span { opacity: 1 !important; transform: none !important; }
}
