/* =========================================================
   ORVA — réplica de estudo da dinâmica do site "OYLA"
   Tokens -> base -> componentes -> seções -> responsivo
   ========================================================= */

:root {
  --paper: #FBFBF9;
  --ink: #1B1A19;
  --muted: #6E6B67;
  --garnet: #7B1426;
  --mist: #EFEEEB;
  --rule: #BDB9B3;

  --font-display: "Instrument Serif", "Times New Roman", serif;
  --font-body: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;

  --header-h: 72px;
  --gutter: clamp(16px, 2.2vw, 32px);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }
/* recomendações do Lenis */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 15px/1.5 var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, canvas, video { display: block; max-width: 100%; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
ul { list-style: none; margin: 0; padding: 0; }

:focus-visible { outline: 2px solid var(--garnet); outline-offset: 3px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed; left: var(--gutter); top: 12px; z-index: 100;
  padding: 10px 14px; background: var(--ink); color: var(--paper);
  transform: translateY(-160%); transition: transform .3s var(--ease-out);
}
.skip-link:focus { transform: none; }

/* rótulos pequenos em caixa-alta (nav e botões, como na referência) */
.label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
}

/* ---------- botão pílula com "+" ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 5px 5px 14px;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 2px rgb(27 26 25 / .06), 0 8px 24px -12px rgb(27 26 25 / .25);
}
.pill--dark { background: var(--ink); color: var(--paper); box-shadow: none; }

.pill__plus {
  position: relative;
  flex: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--ink);
  transition: transform .5s var(--ease-out);
}
.pill--dark .pill__plus { background: var(--paper); }
.pill__plus::before, .pill__plus::after {
  content: "";
  position: absolute; left: 50%; top: 50%;
  width: 8px; height: 1.5px;
  background: #fff;
  transform: translate(-50%, -50%);
}
.pill--dark .pill__plus::before, .pill--dark .pill__plus::after { background: var(--ink); }
.pill__plus::after { transform: translate(-50%, -50%) rotate(90deg); }
.pill:hover .pill__plus,
.newsletter__submit:hover .pill__plus { transform: rotate(90deg); }

/* =========================================================
   CABEÇALHO
   Grade de 3 colunas: "Sobre" começa na mesma linha da 3ª coluna de produtos.
   ========================================================= */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--header-h);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  color: var(--garnet);
  border-bottom: 1px solid transparent;
  transition: background-color .5s, border-color .5s, backdrop-filter .5s;
}
.site-header.is-solid {
  background: rgb(251 251 249 / .72);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
  border-bottom-color: var(--rule);
}
.menu-open .site-header {
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-bottom-color: transparent;
}

.logo {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
  display: flex;
  align-items: center;
  padding-left: var(--gutter);
}
.logo__o { width: 40px; height: 40px; fill: currentColor; }
.logo__word {
  margin-left: -11px;
  font-family: var(--font-display);
  font-size: 27px;
  line-height: 1;
  letter-spacing: -.02em;
}

.site-header__about {
  grid-column: 3;
  grid-row: 1;
  justify-self: start;
  padding-left: var(--gutter);
}
.site-header__actions {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 44px);
  padding-right: var(--gutter);
}

.burger {
  display: grid;
  gap: 4px;
  width: 30px;
  padding: 8px 4px;
}
.burger span {
  display: block;
  height: 1.5px;
  background: currentColor;
  transition: transform .5s var(--ease-out);
}
.burger[aria-expanded="true"] span:first-child { transform: translateY(2.75px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: translateY(-2.75px) rotate(-45deg); }

.bag-toggle { white-space: nowrap; }
.bag-toggle__count { display: inline-block; margin-left: .45em; }
.bag-toggle__count[hidden] { display: none; }

/* =========================================================
   1. HERO
   ========================================================= */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: radial-gradient(120% 90% at 62% 38%, #FFFFFF 0%, #F4F4F2 55%, #E6E6E3 100%);
}
.hero__media {
  position: absolute;
  inset: 0;
  will-change: transform;
}
.hero__canvas,
.hero__video,
.reveal__canvas,
.reveal__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero__video,
.reveal__video {
  object-fit: cover;
  opacity: 0;
  transition: opacity .8s;
}
.hero__video.is-ready,
.reveal__video.is-ready { opacity: 1; }

.hero__content {
  position: absolute;
  left: var(--gutter);
  bottom: clamp(28px, 7vh, 72px);
  z-index: 2;
}
.hero__title {
  margin: 0 0 .4em;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(3.25rem, 7.2vw, 7.5rem);
  line-height: .88;
  letter-spacing: -.012em;
  text-transform: uppercase;
}
.hero__title .line { display: block; }
.hero__title .word { display: inline-block; white-space: nowrap; }
/* .char = camada animada pela rolagem; .char__in = camada animada na entrada */
.hero__title .char,
.hero__title .char__in { display: inline-block; }
.hero__title .char { will-change: opacity, filter, transform; }

/* Esconde o hero até a animação de entrada começar.
   Se o JS falhar, a animação "failsafe" mostra tudo depois de 4s. */
/* Só o título fica oculto até a entrada: o cabeçalho pinta logo, e a primeira
   pintura (FCP) não espera a animação. */
.js .hero__content { opacity: 0; animation: failsafe 0s 4s forwards; }
@keyframes failsafe { to { opacity: 1; } }

/* =========================================================
   2. COLEÇÃO (rolagem horizontal) + 3. REVELAÇÃO
   ========================================================= */
.collection {
  position: relative;
  height: 100vh;
  height: 100svh;
  overflow: clip;           /* impede o navegador de rolar a trilha ao focar com Tab */
  background: var(--paper);
}
.collection__track {
  display: flex;
  height: 100%;
  will-change: transform;
}

.product {
  position: relative;
  flex: 0 0 calc(100vw / 3);
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--header-h) var(--gutter) 48px;
  border-left: 1px solid var(--rule);
  text-align: center;
}
.product:first-child { border-left: 0; }

.product__media {
  position: relative;
  width: min(54%, 280px);
  aspect-ratio: 3 / 4;
  background: var(--mist);
  overflow: hidden;
}
/* sombra de contato suave debaixo do anel */
.product__media::after {
  content: "";
  position: absolute;
  left: 22%; right: 22%; bottom: 17%;
  height: 7%;
  background: radial-gradient(closest-side, rgb(27 26 25 / .16), transparent);
}
.product__media img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity .8s, transform 1s var(--ease-out);
}
.product__media img.is-loaded { opacity: 1; }
.product:hover .product__media img,
.product:focus-within .product__media img { transform: scale(1.06); }

.product__name { margin: 20px 0 2px; font-size: 14px; font-weight: 500; }
.product__price { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }

.product__add {
  margin-top: 16px;
  padding: 7px 12px;
  border: 1px solid currentColor;
  border-radius: 999px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .4s, transform .6s var(--ease-out), background-color .3s, color .3s;
}
.product:hover .product__add,
.product:focus-within .product__add { opacity: 1; transform: none; }
.product__add:hover { background: var(--ink); color: var(--paper); }
.product__add.is-added { background: var(--garnet); border-color: var(--garnet); color: var(--paper); opacity: 1; transform: none; }

.reveal {
  position: absolute;
  inset: 0;
  z-index: 5;
  overflow: hidden;
  clip-path: inset(0% 50% 0% 50%);   /* começa como uma faixa de largura zero no centro */
  pointer-events: none;
  background: #DDE4E7;
}
.reveal__media { position: absolute; inset: 0; }
.reveal__caption {
  position: absolute;
  left: var(--gutter);
  bottom: clamp(24px, 6vh, 56px);
  color: var(--ink);
}
.reveal__name {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.6vw, 3.5rem);
  line-height: 1;
}
.reveal__meta { margin-top: 6px; font-size: 13px; color: #3C4448; }

/* =========================================================
   4. ATELIÊ
   ========================================================= */
.atelier {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--paper);
  border-top: 1px solid var(--rule);
}
.atelier__intro {
  position: sticky;
  top: var(--header-h);
  height: calc(100svh - var(--header-h));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  padding: 28px var(--gutter) 32px;
}
.atelier__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.75rem, 2.5vw, 2.4rem);
  line-height: 1.05;
}
.atelier__body { max-width: 46ch; font-size: 14px; line-height: 1.55; }
.atelier__body p + p { margin-top: 1em; }
.atelier__cta { align-self: flex-start; }

.atelier__stats { border-left: 1px solid var(--rule); }
.stat {
  display: flex;
  flex-direction: column;
  min-height: clamp(280px, 44svh, 440px);
  padding: 28px var(--gutter) 32px;
  border-bottom: 1px solid var(--rule);
}
.stat:last-child { border-bottom: 0; }
.stat__figure {
  margin-bottom: 22px;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 4.2vw, 4.25rem);
  line-height: .95;
  font-variant-numeric: tabular-nums;
}
.stat__note { max-width: 36ch; font-size: 14px; }
.stat__meta { margin-top: 10px; font-size: 11px; color: var(--muted); }

/* =========================================================
   5. RODAPÉ
   ========================================================= */
.site-footer {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr 2fr;
  gap: 32px var(--gutter);
  padding: 28px var(--gutter) 48px;
  background: var(--paper);
  border-top: 1px solid var(--rule);
  font-size: 13px;
}
.site-footer__col { display: flex; flex-direction: column; gap: 18px; }
.site-footer__col--wide { max-width: 520px; }
.site-footer__head { margin: 0 0 8px; font: inherit; font-weight: 500; }
.site-footer__links { display: grid; gap: 4px; }
.site-footer a:hover { color: var(--garnet); }

.newsletter {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 5px 5px 5px 14px;
  border-radius: 999px;
  background: var(--mist);
}
.newsletter__input {
  flex: 1;
  min-width: 0;
  padding: 6px 0;
  border: 0;
  background: transparent;
  font: inherit;
  color: var(--ink);
}
.newsletter__input:focus { outline: none; }
.newsletter:focus-within { outline: 2px solid var(--garnet); outline-offset: 3px; }
.newsletter__input[aria-invalid="true"] { color: var(--garnet); }
.newsletter__submit { display: inline-flex; align-items: center; gap: 10px; }
.newsletter__msg { min-height: 1.5em; font-size: 12.5px; color: var(--muted); }
.newsletter__msg.is-error { color: var(--garnet); }

/* =========================================================
   MENU EM TELA CHEIA
   ========================================================= */
.menu {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: calc(var(--header-h) + 6vh) var(--gutter) 32px;
  background: var(--paper);
  visibility: hidden;
  clip-path: inset(0% 0% 100% 0%);
}
.menu__nav { display: grid; gap: 4px; }
.menu__link {
  display: block;
  overflow: hidden;
  font-family: var(--font-display);
  font-size: clamp(3rem, 9vw, 8rem);
  line-height: 1;
}
.menu__link span { display: inline-block; transition: color .3s; }
.menu__link:hover span { color: var(--garnet); }
.menu__foot { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }

/* =========================================================
   SACOLA
   ========================================================= */
.bag { position: fixed; inset: 0; z-index: 60; visibility: hidden; }
.bag__scrim { position: absolute; inset: 0; background: rgb(27 26 25 / .28); opacity: 0; }
.bag__panel {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: min(420px, 100%);
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border-left: 1px solid var(--rule);
}
.bag__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  padding: 0 var(--gutter);
  border-bottom: 1px solid var(--rule);
}
.bag__title { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 28px; }
.bag__list { flex: 1; overflow-y: auto; }
.bag__item {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 16px var(--gutter);
  border-bottom: 1px solid var(--rule);
  font-size: 14px;
}
.bag__thumb { width: 64px; aspect-ratio: 3 / 4; background: var(--mist); object-fit: contain; }
.bag__meta { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.bag__remove { font-size: 12px; text-decoration: underline; text-underline-offset: 3px; color: var(--muted); }
.bag__remove:hover { color: var(--garnet); }
.bag__empty { flex: 1; padding: 28px var(--gutter); color: var(--muted); max-width: 34ch; }
.bag__foot { display: grid; gap: 14px; padding: 20px var(--gutter) 28px; border-top: 1px solid var(--rule); }
.bag__total { display: flex; justify-content: space-between; font-size: 15px; font-variant-numeric: tabular-nums; }
.bag__foot .pill { justify-self: start; }
.bag__note { font-size: 12px; color: var(--muted); }

/* =========================================================
   RESPONSIVO
   ========================================================= */
@media (max-width: 900px) {
  .product { flex-basis: 50vw; }
}

@media (max-width: 760px) {
  :root { --header-h: 60px; }
  .site-header__about { display: none; }
  .logo__o { width: 34px; height: 34px; }
  .logo__word { font-size: 23px; margin-left: -9px; }

  .hero__title { font-size: clamp(3rem, 15vw, 4.5rem); }

  .product { flex-basis: 78vw; }
  .product__media { width: min(62%, 260px); }
  .product__add { opacity: 1; transform: none; }

  .atelier { grid-template-columns: 1fr; }
  .atelier__intro { position: static; height: auto; gap: 28px; padding-bottom: 36px; }
  .atelier__stats { border-left: 0; border-top: 1px solid var(--rule); }
  .stat { min-height: 0; padding-bottom: 40px; }

  .site-footer { grid-template-columns: 1fr 1fr; }
  .site-footer__col--wide { grid-column: 1 / -1; }
}

@media (hover: none) {
  .product__add { opacity: 1; transform: none; }
}

/* Movimento reduzido: sem pin, trilha rola na horizontal de forma nativa */
.is-reduced .collection { height: auto; overflow: visible; }
.is-reduced .collection__track { height: 88svh; overflow-x: auto; scroll-snap-type: x mandatory; }
.is-reduced .product { scroll-snap-align: start; }
.is-reduced .reveal { position: relative; height: 88svh; clip-path: none; }
.is-reduced .product__add { opacity: 1; transform: none; }

/* =========================================================
   Legenda da revelação: véu claro atrás do texto.
   O fundo de água tem cáusticas quase brancas; o véu garante o
   contraste nos picos de luz sem virar uma caixa.
   ========================================================= */
.reveal__caption::before {
  content: "";
  position: absolute;
  inset: -40px -120px -40px -60px;
  z-index: -1;
  background: radial-gradient(closest-side, rgb(237 241 243 / .82), rgb(237 241 243 / 0));
}

/* =========================================================
   3b. PROVADOR (coleção em arco em 3D)
   ========================================================= */
.provador {
  --provador-tom: var(--paper);
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 2fr 1fr;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--provador-tom);
  border-top: 1px solid var(--rule);
  transition: background-color 1.2s var(--ease-out);
}
.provador__palco {
  position: relative;
  overflow: hidden;
  min-height: 60svh;
}
.provador__fundo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(4rem, 11vw, 11rem);
  line-height: .9;
  white-space: nowrap;
  color: var(--ink);
  opacity: .07;
  pointer-events: none;
  user-select: none;
  transition: opacity .5s;
}
.provador__fundo.is-trocando { opacity: 0; }
.provador__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: pan-y;
}
.provador__canvas:active { cursor: grabbing; }

.provador__painel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  padding: calc(var(--header-h) + 28px) var(--gutter) 40px;
  border-left: 1px solid var(--rule);
}
.provador__titulo {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.75rem, 2.5vw, 2.4rem);
  line-height: 1.05;
}
.provador__dica { max-width: 34ch; font-size: 14px; color: var(--muted); }
.provador__posicao { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.provador__nome {
  margin: 6px 0 10px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.2rem, 3.6vw, 3.4rem);
  line-height: 1;
}
.provador__detalhe { max-width: 34ch; font-size: 15px; }
.provador__preco { margin-top: 12px; font-size: 15px; font-variant-numeric: tabular-nums; }
.provador__acoes { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.provador__seta {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  transition: background-color .3s, color .3s;
}
.provador__seta svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.provador__seta:hover { background: var(--ink); color: var(--paper); }
.provador__add { margin-left: auto; }

@media (max-width: 760px) {
  .provador { grid-template-columns: 1fr; }
  .provador__palco { min-height: 58svh; }
  .provador__painel { border-left: 0; border-top: 1px solid var(--rule); padding-top: 28px; }
  .provador__add { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .provador, .provador__fundo { transition: none; }
}

/* ---------- aviso de marca fictícia no rodapé ---------- */
.site-footer__ficcao {
  grid-column: 1 / -1;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  font-size: 12.5px;
  color: var(--muted);
}

/* =========================================================
   Página legal (privacidade.html)
   ========================================================= */
.legal { background: var(--paper); }
.legal__main {
  max-width: 68ch;
  margin: 0 auto;
  padding: 56px var(--gutter) 96px;
}
.legal__voltar { display: inline-block; margin-bottom: 40px; color: var(--garnet); }
.legal__titulo {
  margin: 0 0 20px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1;
}
.legal__lead { font-size: 18px; line-height: 1.55; margin-bottom: 40px; }
.legal section { padding-top: 28px; border-top: 1px solid var(--rule); margin-bottom: 36px; scroll-margin-top: 24px; }
.legal h2 { margin: 0 0 14px; font-family: var(--font-display); font-weight: 400; font-size: 28px; }
.legal p { max-width: 64ch; line-height: 1.6; }
.legal p + p { margin-top: 12px; }
.legal a { color: var(--garnet); text-decoration: underline; text-underline-offset: 3px; }
.legal__data { font-size: 13px; color: var(--muted); }

.reveal__caption { isolation: isolate; } /* o véu (::before, z-index -1) fica atrás do texto e à frente da água */
