/* BRM Asset — estilos compartilhados.
   Os valores de cada bloco vêm inline do design (tools/build_site.py);
   aqui ficam a base, os tokens e a adaptação a outras larguras de tela. */

@font-face {
  font-family: 'DM Sans';
  src: url(../assets/40ea351c1d5a4f58ed00dfacc27c9f12.woff2) format('woff2');
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
}

:root {
  --accent: #1D63FF;
  --navy: #001320;
  --blue: #00458C;
  --cyan: #1CA3E0;
  --ice: #EEF5FF;
  --white: #FFFFFF;
  /* contornos de botões secundários, conforme o fundo */
  --line-dark: #2B4A6E;   /* sobre fundo navy */
  --line-blue: #7FA3D6;   /* sobre fundo azul */
  --line-light: #C8D6EE;  /* sobre fundo claro */
  --gutter: 80px;
  --content: 1280px;
}

* { font-family: 'DM Sans', sans-serif; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; font-family: 'DM Sans', sans-serif; background: var(--navy); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
a:hover { opacity: .85; }
input, select, button, textarea { font-family: inherit; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

.page { width: 100%; min-height: 100vh; }

/* Larguras acima do artboard (1440): conteúdo centralizado em 1280 px */
@media (min-width: 1441px) {
  .page > section,
  .page > footer {
    padding-left: calc((100% - var(--content)) / 2) !important;
    padding-right: calc((100% - var(--content)) / 2) !important;
  }
}

/* Botão de menu: só aparece em telas estreitas */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid #2B4A6E;
  background: transparent;
  color: #FFFFFF;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Notebook e tablet */
@media (max-width: 1200px) {
  :root { --gutter: 40px; }
  .page > section,
  .page > footer {
    height: auto !important;
    padding-left: var(--gutter) !important;
    padding-right: var(--gutter) !important;
  }
  .page > section:not(.hero) { padding-top: 80px !important; padding-bottom: 80px !important; }
  .page > section.hero { padding-bottom: 64px !important; }
  .page > section.hero > div { padding-top: 56px; }

  header { position: relative; flex-wrap: nowrap !important; gap: 12px !important; }
  header > nav { display: none !important; }
  header > div { order: 2; margin-left: auto; flex-wrap: nowrap !important; }
  .nav-toggle { display: inline-flex; order: 3; flex-shrink: 0; }

  .page [style*="justify-content: space-between"] { flex-wrap: wrap; gap: 24px; }
  .page [style*="repeat(5, minmax(0, 1fr))"],
  .page [style*="repeat(4, minmax(0, 1fr))"] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; row-gap: 40px !important; }
  .page [style*="repeat(12, minmax(0, 1fr))"] > * { grid-column: span 12 !important; }
  .page [style*="width: "]:not(svg):not(img):not(span) { max-width: 100%; }
  .page p[style*="width: "] { width: auto !important; }
  /* cards de altura fixa crescem com o conteúdo quando a coluna estreita */
  .page a[style*="border-radius: 20px"][style*="height: "]:not(.photo-card) { height: auto !important; min-height: 220px; }
}

/* Tablet: o topo da Home empilha texto e carrossel */
@media (max-width: 1024px) {
  .page > section.hero [style*="repeat(2, minmax(0, 1fr))"] { grid-template-columns: minmax(0, 1fr) !important; row-gap: 48px !important; }
  .page > section.hero .hero-carousel.hero-carousel { min-height: 520px; }
  .page [style*="display: flex"]:not([style*="flex-direction: column"]):not(button):not(a) { flex-wrap: wrap; }
}

/* Celular */
@media (max-width: 760px) {
  :root { --gutter: 20px; }
  .page > section:not(.hero) { padding-top: 64px !important; padding-bottom: 64px !important; }
  .page > footer { padding-top: 56px !important; }
  .page header[style] { height: 76px !important; }
  .page header img { height: 30px !important; }
  .page header > div > span { display: none; }
  .page header > div > a[style] { height: 40px !important; padding: 0 16px !important; font-size: 13px !important; white-space: nowrap; }

  .page [style*="grid-template-columns"] { grid-template-columns: minmax(0, 1fr) !important; }
  .page [style*="grid-column"] { grid-column: auto !important; }
  .page [style*="border-left: 1px"] { border-left: none !important; padding-left: 0 !important; padding-right: 0 !important; }
  .page [style*="display: flex"]:not([style*="flex-direction: column"]):not(button):not(a) { flex-wrap: wrap; }
  .page [style*="height: "]:not(svg):not(img):not(button):not(input):not(select):not(span):not(header):not(header *) { height: auto !important; min-height: 0; }

  .page [style*="flex-shrink: 0"]:not(svg):not(img) { flex-shrink: 1 !important; min-width: 0; }
  .page p,
  .page [style*="flex-grow: 1"][style*="width: "] { width: auto !important; }
  .page a[style*="border-radius: 999px"]:not(header a) {
    max-width: 100%;
    box-sizing: border-box;
    height: auto !important;
    min-height: 52px;
    padding-top: 12px !important;
    padding-bottom: 12px !important;
    text-align: center;
  }

  .page h1 { font-size: 42px !important; letter-spacing: -1.2px !important; }
  .page h2 { font-size: 32px !important; letter-spacing: -0.8px !important; }
  .page p { font-size: 16px !important; }
  .page [style*="font-size: 60px"],
  .page [style*="font-size: 56px"] { font-size: 44px !important; }
  .page [style*="padding: 44px"],
  .page [style*="padding: 40px"],
  .page [style*="padding: 36px"] { padding: 24px !important; }
}

/* ---------- Movimento e microinterações ---------- */

:root {
  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

@keyframes rise { from { opacity: 0; transform: translateY(32px); } to { opacity: 1; transform: none; } }
@keyframes rise-card { from { opacity: 0; transform: translateY(24px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes header-in { from { transform: translateY(-100%); } to { transform: none; } }
@keyframes show { to { opacity: 1; } }

/* Página entra e sai com um fade curto */
.motion body { animation: fade-in .6s var(--ease) both; }
body.is-leaving { opacity: 0; transition: opacity .28s ease; }

/* Hero: elementos entram em sequência. Até o script preparar, ficam ocultos
   (com rede de segurança de 2 s caso o script não carregue). */
.motion .page > .hero:not(.hero-ready) > :not(header):not(.header-spacer) { opacity: 0; animation: show 0s 2s forwards; }
.motion .hero-item { animation: rise 1.1s var(--ease-out) both; }
.motion .hero-item[style*="border-radius: 24px"],
.motion .hero-item[style*="border-radius: 20px"] { animation-name: rise-card; animation-duration: 1.3s; }

/* Revelação ao rolar */
.motion .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.motion .reveal.in { opacity: 1; transform: none; }

/* Cabeçalho fixo e compacto ao rolar */
.header-spacer { display: none; }
.header-spacer:has(+ header.is-stuck) { display: block; }
.page header.is-stuck[style] {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: 72px !important;
  padding: 0 max(var(--gutter), calc((100% - var(--content)) / 2));
  background: rgba(0, 19, 32, .82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: rgba(255, 255, 255, .08) !important;
  box-shadow: 0 12px 32px -20px rgba(0, 0, 0, .6);
}
.motion .page header.is-stuck { animation: header-in .5s var(--ease-out) both; }
.page header img { transition: height .4s var(--ease); }
.page header.is-stuck img { height: 32px !important; }

/* Barra de progresso de leitura */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 60;
  background: linear-gradient(90deg, var(--cyan), var(--accent));
  transform: scaleX(0);
  transform-origin: 0 50%;
  pointer-events: none;
}

/* Menu: sublinhado que cresce da esquerda */
header nav a { position: relative; transition: color .3s var(--ease); }
header nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform .45s var(--ease);
}
header nav a:hover { color: #FFFFFF; opacity: 1; }
header nav a:hover::after,
header nav a[aria-current="page"]::after { transform: scaleX(1); }

/* Botões em pílula */
.page a[style*="border-radius: 999px"],
.page button[style*="border-radius: 999px"] {
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background-color .35s var(--ease), filter .35s var(--ease);
}
.page a[style*="border-radius: 999px"]:hover,
.page button[style*="border-radius: 999px"]:hover {
  opacity: 1;
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 14px 28px -16px rgba(29, 99, 255, .7);
}
.page a[style*="border-radius: 999px"]:active,
.page button[style*="border-radius: 999px"]:active { transform: translateY(0); }

/* Cartões clicáveis e cartões de conteúdo */
.page a[style*="border-radius: 20px"],
.page a[style*="border-radius: 24px"],
.page a[style*="border-radius: 16px"],
.page article[style*="border-radius: 20px"] {
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .5s var(--ease);
}
.page a[style*="border-radius: 20px"]:hover,
.page a[style*="border-radius: 24px"]:hover,
.page a[style*="border-radius: 16px"]:hover,
.page article[style*="border-radius: 20px"]:hover {
  opacity: 1;
  transform: translateY(-6px);
  border-color: #A9C1E8 !important;
  box-shadow: 0 28px 56px -32px rgba(0, 19, 32, .45);
}

/* Fotos com zoom lento dentro do cartão */
.page article img[style*="object-fit: cover"],
.page a img[style*="object-fit: cover"] { transition: transform 1.2s var(--ease); }
.page article:hover img[style*="object-fit: cover"],
.page a:hover img[style*="object-fit: cover"] { transform: scale(1.05); }

/* Setas avançam no hover */
.page a svg:has(path[d="M5 12h14M13 6l6 6-6 6"]) { transition: transform .35s var(--ease); }
.page a:hover svg:has(path[d="M5 12h14M13 6l6 6-6 6"]) { transform: translateX(4px); }

/* Campos do formulário */
.page input[style], .page select[style], .page textarea[style] { transition: border-color .3s var(--ease), box-shadow .3s var(--ease); }
.page input[style]:focus, .page select[style]:focus, .page textarea[style]:focus {
  outline: none;
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 4px rgba(29, 99, 255, .14);
}

/* ---------- Seletor de idioma (PT · EN) ---------- */

/* enquanto o inglês é aplicado no carregamento, a página não aparece em português */
html.i18n-pending body { opacity: 0; animation: show 0s 1.5s forwards; }

.lang-switch button {
  padding: 8px 2px;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  cursor: pointer;
  transition: color .3s var(--ease);
}
.lang-switch button:hover { color: var(--white); }
.lang-switch button[aria-pressed="true"] { color: var(--white); font-weight: 600; }
.lang-switch--menu { display: none; }

/* ---------- Menu do celular e tablet ---------- */

@keyframes menu-in { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }

@media (max-width: 1200px) {
  :root { --header-h: 72px; }
  html.menu-open, html.menu-open body { overflow: hidden; }
  .header-spacer:has(+ header.is-open) { display: block; }

  /* Cabeçalho fixo no topo, com altura própria, enquanto o menu está aberto */
  .page header.is-open[style] {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 70;
    height: var(--header-h) !important;
    padding: 0 var(--gutter);
    background: var(--navy);
    border-bottom: 1px solid rgba(255, 255, 255, .1) !important;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    animation: none;
  }
  .page header.is-open img { height: 30px !important; }

  /* Painel claro abaixo do cabeçalho: contraste nítido com o site */
  header.is-open > nav[style] {
    display: flex !important;
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: 0;
    flex-direction: column;
    align-items: stretch !important;
    gap: 0 !important;
    padding: 8px var(--gutter) 40px;
    background: var(--white);
    color: var(--navy) !important;
    overflow-y: auto;
    overscroll-behavior: contain;
    animation: menu-in .35s var(--ease-out) both;
  }
  header.is-open > nav a[href] {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #D6E0F0;
    color: var(--navy) !important;
    font-size: 20px;
    font-weight: 500 !important;
  }
  header.is-open > nav a[aria-current="page"] { color: var(--accent) !important; font-weight: 600 !important; }
  /* o sublinhado do desktop vira uma seta discreta */
  header.is-open > nav a::after {
    position: static;
    width: 8px;
    height: 8px;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
    background: none;
    opacity: .45;
    transform: rotate(45deg);
    transition: none;
  }
  header.is-open > nav a[aria-current="page"]::after { opacity: 1; transform: rotate(45deg); }
  header.is-open .nav-toggle { background: var(--white); color: var(--navy); border-color: var(--white); }
  header.is-open > nav .lang-switch--menu {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-top: 24px;
    color: #667482;
    font-size: 15px;
    letter-spacing: 1px;
  }
  header.is-open > nav .lang-switch--menu button { padding: 10px 8px; }
  header.is-open > nav .lang-switch--menu button:hover,
  header.is-open > nav .lang-switch--menu button[aria-pressed="true"] { color: var(--accent); }
}
@media (max-width: 760px) {
  :root { --header-h: 64px; }
  .page header.is-open img { height: 28px !important; }
  .page header.is-stuck[style] { height: 64px !important; }
  .page header.is-stuck img { height: 28px !important; }
}

/* ---------- Fotos dos empreendimentos ---------- */

.photo-card,
.photo-slot { position: relative; overflow: hidden; isolation: isolate; }
.photo-card > :not(.card-photo),
.photo-slot > :not(.card-photo) { position: relative; z-index: 2; }
.card-photo {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease);
}
.photo-card::after,
.photo-slot::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.photo-card::after { background: linear-gradient(180deg, rgba(0, 19, 32, .45) 0%, rgba(0, 19, 32, 0) 32%, rgba(0, 19, 32, .1) 55%, rgba(0, 19, 32, .88) 100%); }
.photo-slot::after { background: linear-gradient(180deg, rgba(0, 19, 32, .4) 0%, rgba(0, 19, 32, 0) 40%); }
a:hover .card-photo { transform: scale(1.05); }

/* ---------- Seção com foto de fundo ("Do Planalto Central a Nova York") ---------- */

.bg-section { position: relative; overflow: hidden; isolation: isolate; }
.bg-section > :not(.section-bg) { position: relative; z-index: 2; }
.section-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 62%;
}
/* camada no mesmo azul-escuro da seção (#001320): mais densa atrás do título */
.bg-section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0, 19, 32, .86) 0%, rgba(0, 19, 32, .7) 38%, rgba(0, 19, 32, .56) 100%),
    linear-gradient(0deg, rgba(0, 19, 32, .35) 0%, rgba(0, 19, 32, 0) 45%);
}
@media (max-width: 760px) {
  .bg-section::before { background: rgba(0, 19, 32, .8); }
}

/* ---------- Linha do tempo (Sobre) ---------- */
/* Uma linha contínua de 1981 até hoje. A faixa de cima é o Grupo Beiramar (toda a linha);
   a de baixo é a BRM Asset, que nasce dentro do grupo em 2021. A linha muda de cor em 2021. */

.tl { display: flex; flex-direction: column; gap: 36px; }
.tl-legend { display: flex; flex-wrap: wrap; gap: 12px 32px; margin-bottom: -12px; }
.tl-legend-item { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; color: #667482; }
.tl-legend-item strong { color: var(--navy); font-weight: 600; }
.tl-legend-item::before { content: ""; width: 28px; height: 4px; border-radius: 4px; }
.tl-legend-item--group::before { background: #D6E0F0; }
.tl-legend-item--brm::before { background: #BFD3FF; }
.tl-legend-item--brm strong { color: var(--accent); }
.tl-scroller {
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  cursor: grab;
  outline-offset: 6px;
  -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 96px), transparent);
  mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 96px), transparent);
}
.tl-scroller::-webkit-scrollbar { display: none; }
.tl-scroller.is-end { -webkit-mask-image: none; mask-image: none; }
.tl-scroller.is-dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.tl-track { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 300px; }
.tl-item { display: flex; flex-direction: column; scroll-snap-align: start; }
.tl-item > :not(.tl-band):not(.tl-axis) { padding-right: 40px; }

/* faixas: Grupo Beiramar (toda a linha) e BRM Asset (a partir de 2021) */
.tl-band {
  position: relative;
  height: 34px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #667482;
  white-space: nowrap;
}
.tl-band strong { color: var(--navy); font-weight: 600; }
.tl-band::after { content: ""; position: absolute; left: 0; right: 0; bottom: 10px; height: 4px; }
.tl-band--group::after { background: #D6E0F0; }
.tl-item:first-child .tl-band--group::after { border-radius: 4px 0 0 4px; }
.tl-item--brm .tl-band--brm::after { background: #BFD3FF; }
.tl-item--brm .tl-band--brm strong { color: var(--accent); }
.tl-item--brm-start .tl-band--brm::after { border-radius: 4px 0 0 4px; }
.tl-band-end { margin-left: auto; padding-right: 4px; color: var(--blue); font-weight: 600; }
.tl-band-end::after { content: " →"; }

.tl-year {
  margin-top: 14px;
  font-size: 34px;
  font-weight: 500;
  letter-spacing: -1px;
  color: var(--blue);
  transition: color .4s var(--ease), transform .4s var(--ease);
  transform-origin: 0 100%;
}
.tl-item.is-current .tl-year { color: var(--accent); }

/* eixo: trilho cinza + preenchimento que se desenha quando o marco entra na tela */
.tl-axis { position: relative; display: block; height: 14px; margin: 18px 0 22px; }
.tl-axis::before,
.tl-axis::after { content: ""; position: absolute; left: 0; right: 0; top: 6px; height: 2px; }
.tl-axis::before { background: #E3EAF5; }
.tl-axis::after {
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform .9s var(--ease);
}
.tl-item--brm .tl-axis::after { background: var(--accent); }
.tl-item--brm-start .tl-axis::after { background: linear-gradient(90deg, var(--blue), var(--accent) 60%); }
.tl-item.is-lit .tl-axis::after { transform: scaleX(1); }
.tl-arrow {
  position: absolute;
  right: 0;
  top: 2px;
  width: 0;
  height: 0;
  border-left: 9px solid #E3EAF5;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  transition: border-color .4s ease .8s;
}
.tl-item.is-lit .tl-arrow { border-left-color: var(--accent); }

.tl-dot {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #C8D6EE;
  box-shadow: 0 0 0 6px var(--white);
  transform: scale(.6);
  transition: transform .55s cubic-bezier(.34, 1.56, .64, 1), background-color .4s ease, box-shadow .4s ease;
}
.tl-item.is-lit .tl-dot { background: var(--blue); transform: scale(1); box-shadow: 0 0 0 6px #EEF5FF; }
.tl-item--brm.is-lit .tl-dot { background: var(--accent); box-shadow: 0 0 0 6px #E1EAFF; }
@keyframes tl-pulse { 0% { transform: scale(1); opacity: .5; } 100% { transform: scale(2.8); opacity: 0; } }
.tl-item.is-current.is-lit .tl-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--accent);
  animation: tl-pulse 2.2s ease-out .6s infinite;
}

.tl-title { font-size: 20px; font-weight: 600; line-height: 1.25; color: var(--navy); }
.tl-title a { display: inline-flex; align-items: center; gap: 6px; text-decoration: underline; text-decoration-color: #BFD3FF; text-underline-offset: 4px; text-decoration-thickness: 2px; transition: color .3s var(--ease), text-decoration-color .3s var(--ease); }
.tl-title a:hover { color: var(--accent); text-decoration-color: currentColor; opacity: 1; }
.tl-ext { flex-shrink: 0; }
.tl-text { margin-top: 12px; font-size: 14px; line-height: 1.6; color: #4A5866; }
.tl-text strong { color: var(--blue) !important; }

.tl-item:hover .tl-dot { transform: scale(1.4); }
.tl-item:hover .tl-year { color: var(--accent); transform: translateY(-2px); }

/* controles: setas e barra de progresso */
.tl-controls { display: flex; align-items: center; gap: 16px; }
.tl-controls button {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid #C8D6EE;
  background: var(--white);
  color: var(--navy);
  cursor: pointer;
  transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), opacity .3s;
}
.tl-controls button:hover:not(:disabled) { background: var(--navy); border-color: var(--navy); color: var(--white); }
.tl-controls button:disabled { opacity: .35; cursor: default; }
.tl-progress { position: relative; flex: 0 1 220px; height: 2px; background: #E3EAF5; border-radius: 2px; overflow: hidden; }
.tl-progress span { position: absolute; inset: 0; background: linear-gradient(90deg, var(--blue), var(--accent)); transform: scaleX(0); transform-origin: 0 50%; }

/* sem animação: tudo aceso desde o início */
html:not(.motion) .tl-item .tl-axis::after { transform: scaleX(1); }
html:not(.motion) .tl-item .tl-dot { transform: scale(1); background: var(--blue); }
html:not(.motion) .tl-item--brm .tl-dot { background: var(--accent); }

/* celular: linha vertical, faixas viram etiquetas */
@media (max-width: 760px) {
  .tl-scroller { overflow: visible; cursor: auto; -webkit-mask-image: none; mask-image: none; }
  .tl-track { grid-auto-flow: row; grid-auto-columns: auto; }
  .tl-item { position: relative; padding: 0 0 36px 40px; }
  .tl-item > :not(.tl-band):not(.tl-axis) { padding-right: 0; }
  .tl-band { height: auto; }
  .tl-band::after { display: none; }
  .tl-band:empty { display: none; }
  .tl-band:not(:empty) { margin-bottom: 10px; flex-wrap: wrap; white-space: normal; }
  .tl-band-end { display: none; }
  .tl-year { margin-top: 0; font-size: 30px; }
  .tl-axis { position: absolute; left: 0; top: 0; bottom: 0; height: auto; width: 14px; margin: 0; }
  .tl-axis::before, .tl-axis::after { left: 6px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; }
  .tl-axis::after { transform: scaleY(0); transform-origin: 50% 0; }
  .tl-item.is-lit .tl-axis::after, html:not(.motion) .tl-item .tl-axis::after { transform: scaleY(1); }
  .tl-item--brm-start .tl-axis::after { background: linear-gradient(180deg, var(--blue), var(--accent) 60%); }
  .tl-dot { top: 12px; }
  .tl-item:has(.tl-band:not(:empty)) .tl-dot { top: 44px; }
  .tl-arrow { display: none; }
  .tl-item:last-child { padding-bottom: 0; }
  .tl-controls { display: none; }
  .tl-legend { display: none; }
}

/* ---------- Páginas legais (Privacidade, Termos, Cookies) ---------- */

.legal-grid { display: grid; grid-template-columns: 280px minmax(0, 760px); gap: 80px; align-items: start; }
.legal-aside { position: sticky; top: 112px; display: flex; flex-direction: column; gap: 32px; }
.legal-toc-title { display: block; margin-bottom: 12px; font-size: 12px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: var(--blue); }
.legal-toc ol, .legal-docs ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.legal-toc a, .legal-docs a { display: block; padding: 6px 0 6px 14px; border-left: 2px solid #E3EAF5; font-size: 14px; line-height: 1.4; color: #4A5866; transition: color .3s var(--ease), border-color .3s var(--ease); }
.legal-toc a:hover, .legal-docs a:hover { color: var(--navy); border-color: var(--accent); opacity: 1; }
.legal-toc a.is-active, .legal-docs a[aria-current="page"] { color: var(--navy); font-weight: 600; border-color: var(--accent); }

.legal-body { color: #4A5866; font-size: 16px; line-height: 1.75; }
.legal-updated { margin: 0 0 8px; font-size: 13px; letter-spacing: 1px; text-transform: uppercase; color: #667482; }
.legal-body h2 { margin: 48px 0 12px; font-size: 24px; line-height: 1.3; font-weight: 600; letter-spacing: -.5px; color: var(--navy); scroll-margin-top: 110px; }
.legal-body h2:first-of-type { margin-top: 32px; }
.legal-body p { margin: 0 0 16px; }
.legal-body ul { margin: 0 0 16px; padding-left: 22px; }
.legal-body li { margin-bottom: 8px; padding-left: 4px; }
.legal-body li::marker { color: var(--accent); }
.legal-body a { color: var(--blue); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.legal-table { overflow-x: auto; margin: 8px 0 20px; border: 1px solid #D6E0F0; border-radius: 14px; }
.legal-table table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.5; }
.legal-table th, .legal-table td { padding: 14px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid #E3EAF5; }
.legal-table th { background: var(--ice); color: var(--navy); font-weight: 600; white-space: nowrap; }
.legal-table tr:last-child td { border-bottom: 0; }
.legal-table td:first-child { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; color: var(--navy); white-space: nowrap; }
.legal-button {
  height: 52px;
  padding: 0 26px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--white);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .35s var(--ease), filter .35s var(--ease);
}
.legal-button:hover { transform: translateY(-2px); filter: brightness(1.08); }

@media (max-width: 1024px) {
  .legal-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .legal-aside { position: static; }
  .legal-docs { display: none; }
}

/* ---------- Aviso e preferências de cookies ---------- */

.cookie-banner {
  position: fixed;
  left: 24px;
  right: 24px;
  bottom: 24px;
  z-index: 80;
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 24px 28px;
  border-radius: 20px;
  background: var(--navy);
  color: var(--white);
  border: 1px solid #1A3D63;
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .55);
}
.motion .cookie-banner:not([hidden]) { animation: cookie-in .6s var(--ease-out) both .4s; }
@keyframes cookie-in { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.cookie-banner__text { flex: 1 1 auto; min-width: 0; }
.cookie-banner__text strong { display: block; margin-bottom: 6px; font-size: 16px; }
.cookie-banner__text p { margin: 0; font-size: 14px; line-height: 1.6; color: #C9D5E8; }
.cookie-banner__text a { color: var(--white); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.cookie-banner__actions, .cookie-dialog__actions { display: flex; flex-wrap: wrap; gap: 10px; flex-shrink: 0; }
.cookie-btn {
  height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease);
}
.cookie-btn:hover { transform: translateY(-1px); }
.cookie-btn--solid { border: 1px solid var(--accent); background: var(--accent); color: var(--white); }
.cookie-btn--outline { border: 1px solid #7FA3D6; background: transparent; color: var(--white); }
.cookie-btn--outline:hover { border-color: var(--white); }
.cookie-btn--ghost { border: 1px solid transparent; background: transparent; color: #C9D5E8; text-decoration: underline; text-underline-offset: 3px; }
.cookie-btn--ghost:hover { color: var(--white); }

.cookie-dialog {
  width: min(560px, calc(100% - 32px));
  max-height: calc(100% - 32px);
  padding: 0;
  border: 0;
  border-radius: 24px;
  background: var(--white);
  color: var(--navy);
  box-shadow: 0 40px 80px -32px rgba(0, 19, 32, .6);
}
.cookie-dialog::backdrop { background: rgba(0, 19, 32, .55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.motion .cookie-dialog[open] { animation: cookie-in .45s var(--ease-out) both; }
.cookie-dialog__form { display: flex; flex-direction: column; gap: 4px; padding: 28px; }
.cookie-dialog__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.cookie-dialog__head h2 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -.5px; }
.cookie-close { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 999px; background: var(--ice); color: var(--navy); cursor: pointer; }
.cookie-dialog__intro { margin: 8px 0 12px; font-size: 14px; line-height: 1.6; color: #4A5866; }
.cookie-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 0; border-top: 1px solid #E3EAF5; }
.cookie-row strong { font-size: 15px; }
.cookie-row p { margin: 4px 0 0; font-size: 13px; line-height: 1.5; color: #4A5866; }
.cookie-always { flex-shrink: 0; font-size: 12px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--blue); }
.cookie-switch { position: relative; flex-shrink: 0; width: 48px; height: 28px; }
.cookie-switch input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.cookie-switch span { position: absolute; inset: 0; border-radius: 999px; background: #C8D6EE; transition: background-color .3s var(--ease); }
.cookie-switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 999px; background: var(--white); box-shadow: 0 2px 6px rgba(0, 19, 32, .2); transition: transform .3s var(--ease); }
.cookie-switch input:checked + span { background: var(--accent); }
.cookie-switch input:checked + span::after { transform: translateX(20px); }
.cookie-switch input:focus-visible + span { outline: 2px solid var(--cyan); outline-offset: 3px; }
.cookie-dialog__link { margin: 4px 0 16px; font-size: 13px; }
.cookie-dialog__link a { color: var(--blue); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.cookie-dialog .cookie-btn--outline { border-color: #C8D6EE; color: var(--navy); }
.cookie-dialog .cookie-btn--outline:hover { border-color: var(--navy); }
.cookie-dialog__actions { justify-content: flex-end; }

.cookie-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 90;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--navy);
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
  opacity: 0;
  transform: translate(-50%, 12px);
  pointer-events: none;
  transition: opacity .3s ease, transform .3s var(--ease);
}
.cookie-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 900px) {
  .cookie-banner { flex-direction: column; align-items: stretch; gap: 18px; left: 12px; right: 12px; bottom: 12px; padding: 20px; }
  .cookie-banner__actions { display: grid; grid-template-columns: 1fr 1fr; }
  .cookie-banner__actions .cookie-btn--ghost { grid-column: 1 / -1; order: 3; }
  .cookie-dialog__actions { display: grid; grid-template-columns: 1fr; }
}

/* ---------- Carrossel da Home ---------- */

.hero-carousel { isolation: isolate; }
.hero-carousel > :not(.slide-photo) { position: relative; z-index: 2; }
.hero-carousel::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 19, 32, .5) 0%, rgba(0, 19, 32, 0) 26%, rgba(0, 19, 32, .15) 45%, rgba(0, 19, 32, .6) 70%, rgba(0, 19, 32, .92) 100%);
}
.slide-photo {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 1.2s var(--ease), transform 1.2s var(--ease);
}
/* aproximação lenta durante a exibição (efeito Ken Burns) */
.slide-photo.is-active { opacity: 1; transform: scale(1.09); transition: opacity 1.2s var(--ease), transform 8s linear; }

.slide-name, .slide-place, .slide-count { display: inline-block; transition: opacity .28s ease, transform .28s ease; }
.slide-name.is-changing, .slide-place.is-changing, .slide-count.is-changing { opacity: 0; transform: translateY(6px); }

.slide-dot { padding: 8px 0; border: 0; background: none; cursor: pointer; }
.slide-dot span {
  position: relative;
  display: block;
  width: 6px;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, .4);
  transition: width .5s var(--ease);
}
.slide-dot.is-active span { width: 28px; }
.slide-dot span::after { content: ""; position: absolute; inset: 0; background: var(--white); transform: scaleX(0); transform-origin: 0 50%; }
.slide-dot.is-active span::after { animation: dot-fill 7s linear forwards; }
@keyframes dot-fill { to { transform: scaleX(1); } }
.hero-carousel:hover .slide-dot.is-active span::after,
.hero-carousel:focus-within .slide-dot.is-active span::after,
.hero-carousel.is-offscreen .slide-dot.is-active span::after,
.hero-carousel.is-hidden .slide-dot.is-active span::after { animation-play-state: paused; }

.slide-thumb {
  font: inherit;
  text-align: left;
  color: inherit;
  cursor: pointer;
  transition: background-color .3s var(--ease), border-color .3s var(--ease);
}
.slide-thumb:hover { background: rgba(0, 19, 32, .75) !important; border-color: rgba(255, 255, 255, .45) !important; }
.slide-thumbs { display: grid !important; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.slide-thumb { min-width: 0; }
.slide-thumb[style] { padding: 10px !important; justify-content: center; }
.slide-thumb > span:first-child { line-height: 1.2; }
.slide-thumb > span + span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 1200px) {
  .slide-thumb > span + span { display: none; }
  .slide-thumb[style] { text-align: center; }
}
.slide-thumb.is-active { background: rgba(255, 255, 255, .16) !important; border-color: rgba(255, 255, 255, .75) !important; }
.slide-prev, .slide-next { cursor: pointer; transition: transform .3s var(--ease); }
.slide-prev:hover, .slide-next:hover { transform: scale(1.06); }

@media (max-width: 760px) {
  .page .photo-card.photo-card { min-height: 240px; }
  .page .photo-slot.photo-slot[style] { height: 240px !important; }
  .page .hero-carousel.hero-carousel { min-height: 420px; }
  .slide-thumbs { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .slide-photo.is-active { transform: none; }
  .slide-dot.is-active span { background: var(--white); }
}
