/* ==========================================================================
   Devon Rex Brasil: componentes
   Tudo que depende de estado em runtime (drawer, carrossel, índice ativo,
   placeholders de imagem) vive aqui em CSS próprio, para não depender do
   compilador Tailwind em tempo de execução.
   ========================================================================== */

/* --- grão sobre a página (equivalente ao overlay de ruído do AEX) ------- */

.grain {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* --- dourado ----------------------------------------------------------- */

.gold-text {
  color: var(--gold);
}
.gold-metal {
  background: var(--gold-metal);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.gold-rule {
  background: var(--gold-metal);
}
.hairline-gold {
  box-shadow: inset 0 0 0 1px var(--line-gold);
}

/* --- tipografia fantasma (o "+CREA" da referência) --------------------- */

.ghost {
  color: transparent;
  -webkit-text-stroke: 1px rgba(11, 11, 11, 0.14);
  letter-spacing: -0.04em;
  user-select: none;
  pointer-events: none;
}
.ghost--light {
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.12);
}
.ghost--solid-light {
  color: rgba(255, 255, 255, 0.05);
  -webkit-text-stroke: 0;
}

/* --- trilhas laterais fixas (referência 1) ----------------------------- */

.rail {
  position: fixed;
  top: 0;
  bottom: 0;
  width: var(--rail);
  z-index: 40;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  pointer-events: none;
}
.rail > * {
  pointer-events: auto;
}
.rail--left {
  left: 0;
  border-right: 1px solid var(--line);
}
.rail--right {
  right: 0;
  border-left: 1px solid var(--line);
}
@media (min-width: 1280px) {
  .rail {
    display: flex;
  }
}

.vtext {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: rgba(11, 11, 11, 0.45);
}

.idx {
  font-family: 'Oswald', sans-serif;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: rgba(11, 11, 11, 0.35);
  transition: color 0.3s ease, transform 0.3s ease;
  position: relative;
}
.idx::after {
  content: '';
  position: absolute;
  left: -12px;
  top: 50%;
  width: 8px;
  height: 1px;
  background: var(--gold);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.idx:hover {
  color: var(--ink);
}
.idx.is-active {
  color: var(--ink);
  transform: translateX(4px);
}
.idx.is-active::after {
  opacity: 1;
}

.rail-social {
  color: rgba(11, 11, 11, 0.4);
  transition: color 0.3s ease, transform 0.3s ease;
}
.rail-social:hover {
  color: var(--gold-deep);
  transform: translateY(-2px);
}

/* --- persianas do hero (blinds do AEX) --------------------------------- */

/* Persianas do hero.

   Continuidade perfeita: em vez de cada lâmina enquadrar a foto por conta
   própria (o `500% 100%` + background-position do AEX, que corta e distorce),
   as cinco caixas de imagem ocupam EXATAMENTE o mesmo retângulo em
   coordenadas de página, a caixa da persiana inteira, mais uma folga de 8%
   em cima e embaixo para o parallax. Cada lâmina é só uma janela recortando
   sua fatia dessa imagem única.

   Os valores vêm das larguras/alturas das lâminas, em % da caixa:
     lâmina i em x_i / w_i / h_i  →  img: left = -(x_i/w_i)      width = 100/w_i
                                          top  = -((topo_i+8)/h_i) height = 116/h_i
   Geometria simétrica em uso: 15 / 19,5 / 25 / 19,5 / 15 de largura, vãos de
   1,5%, alturas 82 / 94 / 100 / 94 / 82. Mexer nisso exige recalcular os
   inline styles do hero em index.html. */

.blinds {
  position: absolute;
  background-color: #0d0d0d;
}
.blind {
  position: absolute;
  overflow: hidden;
  background-color: #0d0d0d;
}
.blind__img {
  position: absolute;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: 50% 50%;
  will-change: transform;
}
.blinds__veil {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background: linear-gradient(to top, rgba(5, 5, 5, 0.5), transparent 45%);
}

/* --- botão que atravessa a costura do hero ----------------------------- */

/* O botão é largo o bastante para invadir a coluna da foto: o deslocamento
   não pode vir de `transform`, porque o keyframe animationIn (fill both)
   sobrescreveria a propriedade ao terminar. */
.btn-seam {
  position: relative;
  z-index: 40;
  align-self: flex-start;
}
@media (min-width: 1024px) {
  .btn-seam {
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
  }
}

/* --- carrossel do padrão (referência 2) -------------------------------- */

.bslide {
  display: none;
}
.bslide.is-active {
  display: block;
  animation: animationIn 0.7s ease-out both;
}
.bnav {
  color: rgba(255, 255, 255, 0.4);
  transition: color 0.3s ease, transform 0.3s ease;
}
.bnav:hover {
  color: var(--gold-lite);
}
.bnav--prev:hover {
  transform: translateX(-4px);
}
.bnav--next:hover {
  transform: translateX(4px);
}
.bdot {
  font-family: 'Oswald', sans-serif;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.32);
  transition: color 0.3s ease;
}
.bdot:hover {
  color: rgba(255, 255, 255, 0.7);
}
.bdot.is-active {
  color: var(--gold);
}

.spec dt {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 4px;
}
.spec dd {
  font-size: 12px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.66);
  margin-bottom: 14px;
}
.spec dd:last-child {
  margin-bottom: 0;
}

/* --- FAQ --------------------------------------------------------------- */

.faq {
  border-top: 1px solid var(--line);
}
.faq:last-of-type {
  border-bottom: 1px solid var(--line);
}
.faq > summary {
  list-style: none;
  cursor: pointer;
  padding: 26px 0;
  display: flex;
  align-items: center;
  gap: 18px;
  font-family: 'Oswald', sans-serif;
  font-size: 18px;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--ink);
  transition: color 0.25s ease;
}
.faq > summary::-webkit-details-marker {
  display: none;
}
.faq > summary::before {
  content: '+';
  font-size: 20px;
  line-height: 1;
  color: var(--gold-deep);
  transition: transform 0.3s ease;
}
.faq[open] > summary::before {
  transform: rotate(45deg);
}
.faq > summary:hover {
  color: var(--gold-deep);
}
.faq__body {
  padding: 0 0 26px 36px;
  max-width: 62ch;
  font-size: 15px;
  line-height: 1.7;
  color: rgba(11, 11, 11, 0.68);
  animation: riseIn 0.4s ease-out both;
}

/* --- drawer (menu ≡) --------------------------------------------------- */

.drawer {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--ink-deep);
  display: flex;
  flex-direction: column;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.drawer.is-open {
  opacity: 1;
  visibility: visible;
}
.drawer a {
  font-family: 'Oswald', sans-serif;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  color: #fff;
  transition: color 0.25s ease, padding-left 0.25s ease;
}
.drawer a:hover {
  color: var(--gold);
  padding-left: 12px;
}
body.is-locked {
  overflow: hidden;
}

/* --- placeholders de imagem ------------------------------------------- */
/* Se o arquivo em assets/img/ não existir, o <img> é substituído por este
   bloco, mantendo o layout intacto. Ver README.md. */

.img-ph {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  padding: 16px;
  background-color: #0d0d0d;
  background-image: linear-gradient(to right, rgba(200, 160, 74, 0.16) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(200, 160, 74, 0.16) 1px, transparent 1px);
  background-size: 28px 28px;
  box-shadow: inset 0 0 0 1px rgba(200, 160, 74, 0.28);
  overflow: hidden;
}
.img-ph::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 70% 20%, rgba(200, 160, 74, 0.14), transparent 60%);
}
.img-ph__label {
  position: relative;
  z-index: 1;
  font-family: 'Oswald', sans-serif;
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-lite);
}
.img-ph__file {
  position: relative;
  z-index: 1;
  font-size: 9px;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.35);
  word-break: break-all;
}
.img-ph--light {
  background-color: var(--bone);
  background-image: linear-gradient(to right, rgba(11, 11, 11, 0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(11, 11, 11, 0.08) 1px, transparent 1px);
  box-shadow: inset 0 0 0 1px rgba(11, 11, 11, 0.1);
}
.img-ph--light .img-ph__label {
  color: var(--gold-deep);
}
.img-ph--light .img-ph__file {
  color: rgba(11, 11, 11, 0.35);
}
.img-ph--light::after {
  background: radial-gradient(120% 90% at 70% 20%, rgba(200, 160, 74, 0.18), transparent 60%);
}

/* --- galeria em mosaico ------------------------------------------------ */

.gal {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 150px;
  grid-auto-flow: dense;
  gap: 10px;
}
@media (min-width: 768px) {
  .gal {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 210px;
    gap: 14px;
  }
}
.gal figure {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  margin: 0;
}
.gal img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}
.gal figure:hover img {
  transform: scale(1.06);
}
.gal figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 26px 16px 12px;
  background: linear-gradient(to top, rgba(5, 5, 5, 0.8), transparent);
  font-family: 'Oswald', sans-serif;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #fff;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.gal figure:hover figcaption {
  opacity: 1;
}
.gal .w2 {
  grid-column: span 2;
}
.gal .h2 {
  grid-row: span 2;
}

/* --- marquee da faixa de palavras-chave ------------------------------- */

.ticker {
  display: flex;
  gap: 3rem;
  white-space: nowrap;
  animation: tickerScroll 32s linear infinite;
}
@keyframes tickerScroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}
.ticker:hover {
  animation-play-state: paused;
}
