/* Clock Relojoaria e Óptica · versão Marinho e Dourado
   Carregado depois de clock.css. Azul-marinho como fachada, dourado como luz
   e moldura, marfim nas áreas de leitura. */

:root {
  --navy: #0f2350;
  --navy-deep: #0b1a38;
  --navy-night: #071127;
  --gold: #dcbc7a;
  --gold-deep: #86631f;
  --blue: #0f2350;
  --blue-deep: #1b3774;
  --blue-soft: #eaeef6;
  --beige: #dcbc7a;
  --beige-soft: #f3ecdf;
  --ivory: #fbf9f5;
  --ink: #131b2e;
  --muted: #556074;
  --line: rgba(15, 35, 80, .16);
  --line-gold: rgba(220, 188, 122, .38);
  --serif: "Gilda Display", Georgia, "Times New Roman", serif;
  --soft: cubic-bezier(.25, .1, .25, 1);
  --head: 64px;
}

body { background: var(--ivory); }
h1, h2, h3, .card-title, .editorial-row strong { letter-spacing: -.01em; }
.eyebrow { color: var(--gold-deep); }
a:focus-visible, button:focus-visible { outline-color: var(--gold-deep); }

/* ---------- Cabeçalho ---------- */

.site-header {
  min-height: var(--head);
  background: var(--navy-deep);
  box-shadow: 0 0 0 100vmax var(--navy-deep);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  transition: background-color .5s var(--soft), box-shadow .5s var(--soft);
}

body:has(#relogios:not([hidden])) .site-header { background: var(--navy-deep); }

.contact {
  border-color: var(--line-gold);
  color: var(--gold);
}

@media (hover: hover) {
  .contact:hover { background: var(--gold); border-color: var(--gold); color: var(--navy-deep); }
}

/* Na página inicial, o cabeçalho flutua sobre a vitrine. */
[data-view="inicio"]:not(.rolou) .site-header { background: transparent; box-shadow: none; }

/* ---------- Abertura: a vitrine é o menu ---------- */

.hero {
  --vh: 100vh;
  --vh: 100svh;
  position: relative;
  display: block;
  height: var(--vh);
  min-height: 520px;
  margin: calc(var(--head) * -1) calc(50% - 50vw) 0;
  padding: 0;
  overflow: hidden;
  background: var(--navy-night);
}

.hero::before, .hero::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  z-index: 1;
  height: 150px;
  background: linear-gradient(rgba(7, 17, 39, .78), rgba(7, 17, 39, 0));
  pointer-events: none;
}

.hero::after {
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(to top, rgba(7, 17, 39, .96) 6%, rgba(7, 17, 39, .6) 40%, rgba(7, 17, 39, 0));
}

.vitrine {
  position: absolute;
  inset: 0;
  overflow: auto hidden;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}

.vitrine::-webkit-scrollbar { display: none; }

.vitrine-cena {
  --w: max(100vw, calc(max(var(--vh), 520px) * 1.7686));
  position: relative;
  width: var(--w);
  height: calc(var(--w) / 1.7686);
  margin-top: calc((max(var(--vh), 520px) - var(--w) / 1.7686) / 2);
}

.vitrine-cena img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Foco de luz que acompanha o cursor (vitrine.js define --lx e --ly). */
.vitrine-luz {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle 26vmax at var(--lx, 50%) var(--ly, 38%), rgba(7, 17, 39, 0) 0, rgba(7, 17, 39, .05) 55%, rgba(7, 17, 39, .2) 100%);
  pointer-events: none;
}

.ponto {
  position: absolute;
  left: var(--x);
  top: var(--y);
  z-index: 2;
  width: 48px;
  height: 48px;
  margin: -24px 0 0 -24px;
  border-radius: 50%;
  color: #fff;
  text-decoration: none;
}

.ponto::before, .ponto::after {
  content: "";
  position: absolute;
  inset: 15px;
  border-radius: 50%;
  background: #fff;
  border: 5px solid var(--navy);
}

.ponto::after { inset: 9px; border: 1.5px solid var(--navy); background: none; }

.ponto-nome {
  position: absolute;
  left: 44px;
  top: 50%;
  padding: 9px 18px 10px;
  border-radius: 999px;
  background: var(--navy);
  font: 400 1.02rem/1 var(--serif);
  white-space: nowrap;
  transform: translateY(-50%);
  transition: background-color .4s var(--soft), color .4s var(--soft);
}

.ponto--esq .ponto-nome { left: auto; right: 44px; }
.ponto:focus-visible { outline: 2px solid #fff; outline-offset: 0; }
.ponto:focus-visible .ponto-nome { background: var(--gold); color: var(--navy-deep); }

@media (hover: hover) {
  .ponto:hover .ponto-nome { background: var(--gold); color: var(--navy-deep); }
}

.hero-copy {
  position: absolute;
  z-index: 2;
  left: max(var(--gutter), calc(50vw - 620px));
  right: var(--gutter);
  bottom: clamp(26px, 5vh, 56px);
  padding: 0;
  color: #fff;
  pointer-events: none;
}

.hero .eyebrow, .hero-clock { color: var(--gold); }
.hero-clock .hand-s { stroke: #fff; }
.hero h1 { max-width: 11.5em; margin: 12px 0 10px; font-size: clamp(1.6rem, 8.1vw, 3rem); line-height: 1.1; text-wrap: balance; letter-spacing: -.01em; }
.hero h1 em { color: var(--gold); display: inline; font-style: normal; }
.hero-intro { color: rgba(255, 255, 255, .82); }
.so-mouse { display: none; }

@media (hover: hover) and (min-width: 740px) {
  .so-mouse { display: inline; }
  .so-toque { display: none; }
}

.rever {
  position: absolute;
  z-index: 2;
  right: max(var(--gutter), calc(50vw - 620px));
  bottom: clamp(18px, 4.4vh, 48px);
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: rgba(255, 255, 255, .86);
  font: 400 .8rem/1 var(--sans);
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-underline-offset: 6px;
  cursor: pointer;
}

.rever:hover { color: var(--gold); }
.rever:focus-visible { outline-color: #fff; }
html:not(.js) .rever { display: none; }
@media (max-width: 739px) { .rever { display: none; } }
@media (prefers-reduced-motion: reduce) { .rever { display: none; } }

/* ---------- Entrada: zoom da fachada até a vitrine ---------- */

.entrada {
  position: fixed;
  inset: 0;
  z-index: 100;
  overflow: hidden;
  background: var(--navy-night);
  color: #fff;
}

.entrada-foto, .entrada-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.entrada-video { opacity: 0; }

/* A vitrine por dentro do vidro; vitrine.js dá o tamanho e a posição. */
.entrada-dentro { position: absolute; max-width: none; object-fit: cover; opacity: 0; transform-origin: 0 0; -webkit-mask-image: linear-gradient(transparent, #000 16%); mask-image: linear-gradient(transparent, #000 16%); }

.entrada-sombra {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(7, 17, 39, .6), rgba(7, 17, 39, 0) 22%),
    linear-gradient(to top, rgba(7, 17, 39, .9), rgba(7, 17, 39, 0) 38%);
}

.entrada-texto {
  position: absolute;
  left: max(var(--gutter), calc(50vw - 620px));
  bottom: clamp(36px, 7vh, 72px);
  margin: 0;
}

.entrada-texto { opacity: clamp(0, 3.2 - var(--p, 0) * 5, 1); }
.entrada-texto strong { display: block; max-width: 11ch; font: 400 clamp(2rem, 4.6vw, 3.5rem)/1.06 var(--serif); }
.entrada-texto span { display: block; margin-top: 10px; color: var(--gold); font-size: .95rem; }

.entrada-pular {
  position: absolute;
  top: 16px;
  right: var(--gutter);
  min-height: 44px;
  padding: 0 22px;
  border: 1px solid var(--line-gold);
  border-radius: 999px;
  background: rgba(7, 17, 39, .6);
  color: #fff;
  font: 400 .84rem/1 var(--sans);
  cursor: pointer;
  transition: background-color .3s var(--soft), color .3s var(--soft);
}

.entrada-pular:hover { background: var(--gold); color: var(--navy-deep); }
.entrada-pular:focus-visible { outline-color: #fff; }

.entrada-linha {
  position: absolute;
  inset: auto 0 0;
  height: 2px;
  background: var(--gold);
  transform: scaleX(var(--p, 0));
  transform-origin: left;
}

/* O intervalo entre o HTML e o script não pode mostrar a página por trás. */
.intro body { overflow: hidden; }
.intro:not(.entrada-pronta) body::before { content: ""; position: fixed; inset: 0; z-index: 99; background: var(--navy-night); }
.intro .entrada, .intro .entrada * { animation-play-state: running !important; }

/* ---------- Categorias: vitrines que se acendem ---------- */

.catalogue {
  margin: 0 calc(50% - 50vw);
  padding: clamp(56px, 8vw, 112px) max(var(--gutter), calc(50vw - 620px));
  background: var(--navy-deep);
  color: #fff;
}

.catalogue > h2 {
  display: block;
  margin: 0 0 clamp(24px, 3.4vw, 44px);
  color: #fff;
  font: 400 clamp(1.9rem, 4vw, 3rem)/1.1 var(--serif);
  letter-spacing: -.01em;
  text-transform: none;
}

.catalogue > h2::after { content: none; }

.cards, .cards:has(.card) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 14px; }

.card, .card:nth-child(even) {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: visible;
  border-radius: 0;
  background: none;
}

.card .card-media, .card:nth-child(even) .card-media {
  order: 0;
  aspect-ratio: 3 / 4;
  border: 1px solid var(--gold);
  outline: 1px solid var(--line-gold);
  outline-offset: 5px;
  background: var(--navy-night);
}

.card-photo { transition: transform 1.2s var(--soft); }
.card--optica { --photo-position: 40%; }
.card--relogios { --photo-position: 58%; }
.card--joias { --photo-position: 42%; }
.card--manutencoes { --photo-position: 100%; }

/* Vidro apagado: some quando a luz da vitrine acende. */
.card-luz { position: absolute; inset: 0; background: var(--navy-night); opacity: .62; transition: opacity 1s var(--soft); }
.card.is-lit .card-luz, .card:focus-visible .card-luz { opacity: 0; }

.card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 90% 70% at 50% 0, rgba(255, 226, 164, .42), rgba(255, 226, 164, 0));
  opacity: 0;
  transition: opacity 1s var(--soft);
}

.card.is-lit .card-media::after, .card:focus-visible .card-media::after { opacity: 1; }

.card .card-body { display: grid; grid-template-columns: minmax(0, 1fr) auto; flex: 1; align-items: start; gap: 10px; padding: 20px 0 0; }
.card-title { color: #fff; font-size: clamp(1.4rem, 2.3vw, 1.95rem); transition: color .5s var(--soft); }
.card-description { color: rgba(255, 255, 255, .72); font-size: .86rem; }
.card-arrow { align-self: start; border-color: var(--line-gold); color: var(--gold); }
.card:active .card-arrow { background: var(--gold); border-color: var(--gold); color: var(--navy-deep); }
.card.is-lit .card-title { color: var(--gold); }
.card:focus-visible { outline: 2px solid var(--gold); outline-offset: 10px; }

@media (max-width: 739px) {
  .card-arrow { display: none; }
  .card .card-media, .card:nth-child(even) .card-media { outline-offset: 3px; }
}

@media (hover: hover) {
  .card:hover .card-luz { opacity: 0; }
  .card:hover .card-media::after { opacity: 1; }
  .card:hover .card-title { color: var(--gold); }
  .card:hover .card-arrow { background: var(--gold); border-color: var(--gold); color: var(--navy-deep); }
}

@media (min-width: 1040px) {
  .cards, .cards:has(.card) { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 34px; }
}

/* ---------- Trilho: peças reais, para arrastar ---------- */

.trilho { margin: clamp(52px, 8vw, 104px) calc(50% - 50vw) 0; }

.trilho-topo {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 22px;
  padding-inline: max(var(--gutter), calc(50vw - 620px));
}

.trilho h3, .encontro h3 { margin: 0; color: var(--navy); font: 400 clamp(1.8rem, 3.8vw, 2.9rem)/1.1 var(--serif); }

.trilho-setas { display: flex; gap: 8px; }

.trilho-setas button {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: none;
  color: var(--navy);
  font: 400 1.05rem/1 var(--serif);
  cursor: pointer;
  transition: background-color .3s var(--soft), color .3s var(--soft);
}

.trilho-setas button:hover { background: var(--navy); color: #fff; }
.trilho.cabe .trilho-setas { display: none; }

.trilho-lista {
  display: flex;
  gap: clamp(14px, 2vw, 26px);
  margin: 0;
  padding: 0 max(var(--gutter), calc(50vw - 620px)) 10px;
  overflow-x: auto;
  scroll-padding-inline: max(var(--gutter), calc(50vw - 620px));
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  list-style: none;
}

.trilho-lista::-webkit-scrollbar { display: none; }
.trilho-lista > li { flex: 0 0 clamp(210px, 62vw, 290px); scroll-snap-align: start; }
.trilho-lista a { display: block; text-decoration: none; }
.trilho-lista.arrastando { scroll-snap-type: none; cursor: grabbing; }
.trilho-lista.arrastando a { pointer-events: none; }
@media (hover: hover) { .trilho-lista { cursor: grab; } }

.trilho-foto { display: block; aspect-ratio: 4 / 5; overflow: hidden; background: var(--beige-soft); }
.trilho-foto img { display: block; width: 100%; height: 100%; object-fit: cover; user-select: none; transition: transform 1.2s var(--soft); }
.trilho-lista strong { display: block; margin-top: 14px; color: var(--navy); font: 400 1.22rem/1.2 var(--serif); }
.trilho-lista small { display: block; margin-top: 3px; color: var(--muted); font-size: .88rem; }

@media (hover: hover) {
  .trilho-lista a:hover img { transform: scale(1.045); }
  .trilho-lista a:hover strong { color: var(--gold-deep); }
}

/* ---------- Encontro: a equipe ---------- */

.encontro { display: grid; gap: 28px; margin-top: clamp(60px, 9vw, 128px); }
.encontro-foto { overflow: hidden; aspect-ratio: 4 / 4.4; background: var(--beige-soft); }
.encontro-foto img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }
.encontro h3 { max-width: 12ch; font-size: clamp(2.2rem, 5vw, 4rem); }
.encontro-texto > p { max-width: 38ch; margin: 18px 0 26px; color: var(--muted); font-size: 1.05rem; }
.bio-links a { border-radius: 999px; padding-inline: 18px; }
.bio-links svg { stroke: var(--gold-deep); }

@media (max-width: 420px) { .bio-links { grid-template-columns: 1fr; } }

@media (min-width: 740px) {
  .encontro { grid-template-columns: minmax(0, 46fr) minmax(0, 54fr); align-items: center; gap: clamp(36px, 7vw, 104px); }
  :root { --head: 80px; }
  .hero h1 { max-width: none; font-size: clamp(1.9rem, 3.9vw, 4rem); }
  @media (max-aspect-ratio: 1/1) { .hero h1 { font-size: 2.8rem; } }
  .hero-copy { right: 230px; }
  .hero-intro { font-size: 1rem; }
}

/* ---------- Páginas internas ---------- */

.editorial-hero, #manutencoes .editorial-hero { --feature-bg: var(--navy); --feature-accent: var(--gold); }

#relogios .editorial-hero {
  --feature-bg: var(--navy);
  --feature-fg: #fff;
  --feature-accent: var(--gold);
  --feature-muted: rgba(255, 255, 255, .84);
}

#joias .editorial-hero {
  --feature-bg: var(--beige-soft);
  --feature-accent: var(--gold-deep);
}

#manutencoes .editorial-hero { --feature-bg: var(--navy-deep); }

.editorial h2 { font-size: clamp(2.5rem, 11vw, 4.7rem); line-height: 1.02; letter-spacing: -.015em; }
.editorial h2 em { font-style: normal; }
.service-copy h2 em, .fitting-copy h2 em { color: var(--gold-deep); }

/* Joias e manutenção já usam o botão marinho; sobre marinho, o botão é dourado. */
#optica .editorial-hero .button,
#relogios .editorial-hero .button,
#manutencoes .editorial-hero .button { background: var(--gold); color: var(--navy-deep); }

@media (hover: hover) {
  #optica .editorial-hero .button:hover, #relogios .editorial-hero .button:hover { background-color: #f1dcab; }
  .button:hover { box-shadow: none; }
}

/* Listas: o traço dourado substitui a numeração, que não indicava ordem. */
.editorial-index { display: block; width: 18px; height: 1px; background: var(--gold-deep); }
.row-arrow { border-color: var(--line); }
.editorial-section .trilho { grid-column: 1 / -1; }
.editorial .trilho { margin-top: clamp(44px, 6vw, 80px); }

/* ---------- Provador ---------- */

.fitting-stage { background: radial-gradient(ellipse at 50% 42%, #fff 8%, #f4eee3 62%, #e8dcc3 100%); }

/* ---------- Rodapé ---------- */

.site-footer { background: var(--navy-deep); }
.footer-meta { border-top-color: var(--line-gold); }
.site-footer a:hover { color: var(--gold); }

/* ---------- Peças que se abrem ---------- */

.js .watch-scroll { margin-top: -44px; }
.js .watch-scroll--noite { margin-top: -56px; }
.watch-stage { background: radial-gradient(closest-side, #fff 0 50%, var(--ivory) 100%) var(--ivory); }
.watch-progress::after { background: var(--gold-deep); }

.watch-scroll--noite .watch-stage { background: radial-gradient(60% 60% at 50% 46%, #1a3570, var(--navy-deep) 78%); }

.watch-scroll--noite canvas {
  mix-blend-mode: screen;
  transform: perspective(1400px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .9s var(--soft);
}

.watch-scroll--noite .watch-progress { background: var(--line-gold); }
.watch-scroll--noite .watch-progress::after { background: var(--gold); }

#joias > .editorial-back { position: relative; z-index: 2; color: rgba(255, 255, 255, .82); }
#joias > .editorial-back:hover { color: var(--gold); }

.watch-hint {
  position: absolute;
  inset: auto 0 clamp(40px, 7vh, 72px);
  margin: 0;
  color: rgba(255, 255, 255, .8);
  font: 400 1.06rem/1.3 var(--serif);
  text-align: center;
  transition: opacity .6s var(--soft);
}

.is-moving .watch-hint { opacity: 0; }

.watch-notes { margin: 0; padding: 0; list-style: none; color: #fff; }

.watch-notes li {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 12px;
  font: 400 clamp(.92rem, 1.3vw, 1.15rem)/1 var(--serif);
  white-space: nowrap;
  opacity: 0;
  transform: translate(0, -50%);
  transition: opacity .7s var(--soft);
}

.watch-notes li::before { content: ""; width: clamp(16px, 5vw, 92px); height: 1px; background: var(--gold); }
.watch-notes li[data-side="e"] { flex-direction: row-reverse; transform: translate(-100%, -50%); }
.is-open .watch-notes li { opacity: 1; }
.is-open .watch-notes li:nth-child(2) { transition-delay: .12s; }
.is-open .watch-notes li:nth-child(3) { transition-delay: .24s; }
.is-open .watch-notes li:nth-child(4) { transition-delay: .36s; }
.is-open .watch-notes li:nth-child(5) { transition-delay: .48s; }

@media (prefers-reduced-motion: no-preference) {
  .hero .hero-copy > * { animation: rise 1.4s var(--soft) both; }
  .hero .hero-copy h1 { animation-delay: .15s; }
  .hero .hero-copy > .hero-intro { animation-delay: .3s; }
  .hero .hero-copy h1 em { animation: none; }
  .ponto { animation: aparecer 1s var(--soft) .5s both; }
  .ponto:nth-of-type(2) { animation-delay: .7s; }
  .ponto:nth-of-type(3) { animation-delay: .9s; }
  .ponto::after { animation: pulso 3.2s var(--soft) infinite; }
  @keyframes aparecer { from { opacity: 0; } }
  @keyframes pulso {
    0% { transform: scale(.8); opacity: 1; }
    70%, 100% { transform: scale(1.6); opacity: 0; }
  }
}

@media (prefers-reduced-motion: reduce) {
  .watch-hint { display: none; }
}

/* Trilho que cabe inteiro na tela: as peças ocupam a largura, em formato deitado. */
@media (min-width: 900px) {
  .trilho.cabe .trilho-lista > li { flex: 1 1 0; }
  .trilho.cabe .trilho-foto { aspect-ratio: 4 / 3; }
  .trilho.cabe .trilho-foto img { object-position: 50% 32%; }
}

/* Celular em pé: a fachada começa recuada para o letreiro caber inteiro e
   chega ao tamanho cheio durante o avanço, no mesmo enquadramento da vitrine. */
@media (max-aspect-ratio: 2/3) {
  .entrada-foto, .entrada-video {
    left: -15%;
    width: 130%;
    max-width: none;
    --ida: clamp(0, var(--p, 0) * 1.5, 1);
    /* O deslocamento final (1,3% da cena) centraliza corrente e brincos. */
    transform: translate(calc(-2.3svh * var(--ida)), calc(-16svh * var(--ida))) scale(calc(.78 + .22 * var(--ida)));
    transform-origin: 50% 0;
  }
  .entrada-sombra { background: linear-gradient(rgba(7, 17, 39, .6), rgba(7, 17, 39, 0) 18%), linear-gradient(to top, var(--navy-night) 22%, rgba(7, 17, 39, 0) 46%); }
}

/* Telas em que a vitrine não cabe inteira: botões levam a câmera a cada grupo. */
.paradas { display: none; }
.rola .paradas {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 460px;
  margin-top: 18px;
  border: 1px solid var(--line-gold);
  border-radius: 999px;
  background: rgba(7, 17, 39, .72);
  pointer-events: auto;
}

.paradas button {
  min-height: 46px;
  padding: 0 6px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: #fff;
  font: 400 1.02rem/1 var(--serif);
  cursor: pointer;
  transition: background-color .5s var(--soft), color .5s var(--soft);
}

.paradas button[aria-pressed="true"] { background: var(--gold); color: var(--navy-deep); }
.paradas button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.rola .vitrine { cursor: grab; }
.rola .vitrine.arrastando { cursor: grabbing; }
.rola .vitrine.arrastando a { pointer-events: none; }
.vitrine img { user-select: none; -webkit-user-drag: none; }
.hero.rola .hero-copy { bottom: 22px; right: var(--gutter); }
.hero.rola .rever { display: none; }
.hero.rola .so-mouse { display: none; }
.hero.rola .so-toque { display: inline; }

/* Celular em pé: a cena sobe para as peças ficarem acima do título. */
@media (max-aspect-ratio: 2/3) {
  .vitrine-cena { margin-top: -16svh; }
  .hero::after { height: 46%; background: linear-gradient(to top, var(--navy-night) 38%, rgba(7, 17, 39, .5) 68%, rgba(7, 17, 39, 0)); }
  .hero-copy .hero-top { display: none; }
}
