/* Sommeliart. Estrutura e movimento. Nenhuma cor aqui: todas vêm de tema.css. */

@font-face { font-family: "Bodoni Moda"; font-style: normal; font-weight: 400; font-display: swap; src: url(../fontes/bodoni-moda-normal-1.woff2) format("woff2"); }
@font-face { font-family: "Bodoni Moda"; font-style: italic; font-weight: 400; font-display: swap; src: url(../fontes/bodoni-moda-italic-0.woff2) format("woff2"); }
@font-face { font-family: "Jost"; font-style: normal; font-weight: 300 400; font-display: swap; src: url(../fontes/jost-normal-2.woff2) format("woff2"); }

:root {
  --display: "Bodoni Moda", "Didot", "Bodoni MT", Georgia, serif;
  --corpo: "Jost", "Futura", "Century Gothic", "Segoe UI", sans-serif;
  --g: clamp(22px, 5.5vw, 80px);          /* margem lateral */
  --topo: clamp(60px, 9vw, 84px);         /* altura da faixa do topo */
  --lento: 1.4s;
  --curva: cubic-bezier(.22, .61, .21, 1);
  --S: min(46vw, 34svh, 340px);           /* A Medida na abertura */
  --s: 38px;                             /* A Medida no topo */
}

*, *::before, *::after { box-sizing: border-box; }
html {
  background: var(--fundo); color: var(--texto);
  transition: --fundo var(--lento) ease, --texto var(--lento) ease, --apoio var(--lento) ease, --linha var(--lento) ease;
  scrollbar-gutter: stable;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0; font-family: var(--corpo); font-weight: 300; font-size: 1.0625rem; line-height: 1.65;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
  overflow-x: clip;
}
h1, h2, h3, p, ul, ol, dl, dd, fieldset, legend { margin: 0; padding: 0; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
::selection { background: var(--texto); color: var(--fundo); }
:focus-visible { outline: 1px solid var(--texto); outline-offset: 6px; }

/* barra de rolagem */
@supports selector(::-webkit-scrollbar) {
  html::-webkit-scrollbar { width: 10px; }
  html::-webkit-scrollbar-track { background: var(--fundo); }
  html::-webkit-scrollbar-thumb { background: var(--linha); border: 3px solid var(--fundo); border-radius: 10px; }
  html::-webkit-scrollbar-thumb:hover { background: var(--apoio); }
}
@supports not selector(::-webkit-scrollbar) {
  html { scrollbar-color: var(--apoio) var(--fundo); scrollbar-width: thin; }
}

/* tipos */
.d { font-family: var(--display); font-weight: 400; letter-spacing: -.012em; text-wrap: balance; }
.d em, em.d { font-style: italic; }
.rot { font-family: var(--corpo); font-weight: 400; font-size: .7rem; line-height: 1.4; letter-spacing: .24em; text-transform: uppercase; color: var(--apoio); }
.apoio { color: var(--apoio); }
.pular { position: fixed; left: var(--g); top: -4rem; z-index: 30; background: var(--texto); color: var(--fundo); padding: .6rem 1rem; }
.pular:focus { top: 1rem; }

/* topo: faixa lisa na cor do fundo; A Medida pousa à esquerda */
.topo {
  position: fixed; inset: 0 0 auto 0; height: var(--topo); z-index: 10;
  display: flex; align-items: center; justify-content: flex-end; padding-inline: var(--g);
  background: var(--fundo);
}
.topo a { padding: 1rem 0 1rem 1rem; transition: color .8s ease; }
.topo a:hover { color: var(--texto); }

/* A Medida */
.medida {
  position: fixed; left: 0; top: 0; z-index: 11; width: var(--S); height: var(--S);
  transform-origin: 0 0; padding: 0; border: 0; background: none; color: var(--texto); cursor: pointer;
  border-radius: 50%; transition: opacity var(--lento) ease; -webkit-tap-highlight-color: transparent;
}
.medida svg { display: block; width: 100%; height: 100%; overflow: visible; }
.medida .vinho { fill: var(--vinho); }
.medida .aro, .medida .eco { fill: none; stroke: currentColor; }
.medida:focus-visible { outline-offset: 10px; }
html.js .medida:not(.pronta) { visibility: hidden; }
html:not(.js) .medida { position: absolute; left: 50%; top: 41svh; transform: translate(-50%, -50%); }
html.final .medida { opacity: 0; pointer-events: none; }

/* abertura */
.abertura { min-height: 100svh; display: grid; grid-template-rows: 1fr auto; padding: var(--topo) var(--g) clamp(22px, 4vw, 40px); }
.abertura .centro { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(2.4rem, 7svh, 4.5rem); text-align: center; }
.vaga { width: var(--S); height: var(--S); flex: none; }
.abertura h1 { font-size: clamp(2.05rem, 7.6vw, 4.75rem); line-height: 1.04; }
.abertura h1 span { display: block; }
.abertura .pe { display: flex; justify-content: space-between; gap: 1rem; }
html.abre .abertura h1, html.abre .abertura .pe, html.abre .topo a { opacity: 0; }
html.abre.fala .abertura h1 { opacity: 1; transform: none; transition: opacity 1.8s ease, transform 1.8s var(--curva); }
html.abre .abertura h1 { transform: translateY(14px); }
html.abre.fala .abertura .pe, html.abre.fala .topo a { opacity: 1; transition: opacity 1.6s ease 1.1s; }

/* seções */
.sec { padding: clamp(7rem, 20svh, 13rem) var(--g); }
.cab { display: flex; flex-direction: column; gap: 1.5rem; margin-bottom: clamp(3.5rem, 10svh, 7rem); }
.cab h2 { font-size: clamp(3rem, 10.5vw, 7.75rem); line-height: 1; }
.cab p { max-width: 30ch; font-size: 1.15rem; }
.larg { max-width: 1240px; margin-inline: auto; }

html.js [data-entra] { opacity: 0; transform: translateY(18px); }
html.js [data-entra].visto { opacity: 1; transform: none; transition: opacity var(--lento) ease calc(var(--i, 0) * .14s), transform var(--lento) var(--curva) calc(var(--i, 0) * .14s); }

/* manifesto: as palavras acendem na altura da leitura */
.manifesto { padding-block: clamp(4rem, 14svh, 9rem) clamp(9rem, 26svh, 16rem); }
.manifesto p { font-size: clamp(2rem, 6.1vw, 4.6rem); line-height: 1.1; max-width: 17ch; margin-top: clamp(7rem, 30svh, 16rem); }
.manifesto p:first-of-type { margin-top: 0; }
.manifesto p:nth-of-type(even) { margin-left: auto; }
.manifesto .rot { display: block; margin-bottom: clamp(4rem, 12svh, 7rem); }
html.js .manifesto .w { opacity: .16; transition: opacity 1.3s ease; }
html.js .manifesto .w.lida { opacity: 1; }

/* a carta */
.carta li {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: .75rem clamp(1.5rem, 5vw, 5rem); align-items: baseline;
  padding-block: clamp(1.9rem, 4.6vw, 3.4rem); border-top: 1px solid var(--linha); transition: opacity 1s ease;
}
.carta li:last-child { border-bottom: 1px solid var(--linha); }
.carta h3 { font-size: clamp(2.5rem, 6.6vw, 5rem); line-height: 1; }
.carta .rot { display: block; margin-bottom: .9rem; font-size: .78rem; color: var(--texto); }
.carta p { max-width: 36ch; }
.nota { margin-top: clamp(3rem, 8svh, 5rem); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(1.5rem, 5vw, 5rem); }
.nota p { grid-column: 2; max-width: 34ch; font-size: clamp(1.45rem, 2.6vw, 2rem); line-height: 1.25; }
@media (hover: hover) { .carta ul:hover li:not(:hover) { opacity: .32; } }

/* casos */
.obras { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(4rem, 9vw, 8rem) clamp(2rem, 5vw, 5rem); align-items: start; }
.obra { display: flex; flex-direction: column; gap: 1.7rem; }
.obra:nth-child(even) { margin-top: clamp(4rem, 12vw, 10rem); }
.prancha { position: relative; display: block; width: 100%; aspect-ratio: 16 / 10; padding: 0; border: 0; border-radius: 0; background: none; overflow: hidden; cursor: pointer; }
.prancha.alta { aspect-ratio: 4 / 5; }
div.prancha { cursor: default; }
.prancha::after { content: ""; position: absolute; inset: 0; border: 1px solid var(--linha); pointer-events: none; }
.prancha img { display: block; width: 100%; height: 100%; object-fit: cover; }
.prancha.viva img { opacity: 0; transition: opacity 1.2s ease; }
.prancha.viva img.on, .prancha.viva noscript img { opacity: 1; }
.leg { display: flex; flex-direction: column; align-items: flex-start; gap: .55rem; }
.leg h3 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); line-height: 1.05; margin-top: .35rem; }
.leg p { max-width: 36ch; }
.leg .estado { margin-top: .5rem; }
.leg a, .fim a { color: var(--texto); border-bottom: 1px solid var(--linha); padding-bottom: .15em; transition: border-color .8s ease; white-space: nowrap; }
.leg a:hover, .fim a:hover { border-color: var(--texto); }

/* arquivo: em segundo plano, pequeno e em meia-luz */
.arquivo { margin-top: clamp(7rem, 20svh, 12rem); display: flex; flex-direction: column; gap: 2rem; }
.tira { display: flex; align-items: flex-start; gap: clamp(1rem, 2vw, 1.75rem); }
.tira li { flex: var(--a) 1 0; min-width: 0; display: flex; flex-direction: column; gap: .25rem; opacity: .6; transition: opacity 1s ease; }
.tira img { display: block; width: 100%; height: auto; margin-bottom: .8rem; }
.tira .papel img { background: var(--papel); }
.tira .tipo { font-size: .85rem; line-height: 1.4; color: var(--apoio); }
@media (hover: hover) { .tira li:hover { opacity: 1; } }
@media (hover: none) { .tira li { opacity: .92; } }

/* primeira conversa: cada assunto abre o WhatsApp com a mensagem pronta */
.aplica .grade { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(3rem, 5vw, 5rem); align-items: start; }
.aplica .cab { margin: 0; position: sticky; top: calc(var(--topo) + 2rem); }
.assuntos { display: flex; flex-direction: column; gap: 1.6rem; padding-top: clamp(.5rem, 2vw, 1.6rem); }
.assuntos li { border-top: 1px solid var(--linha); transition: opacity 1s ease; }
.assuntos li:last-child { border-bottom: 1px solid var(--linha); }
.assuntos a { display: flex; align-items: baseline; justify-content: space-between; gap: 1.5rem; min-height: 56px; padding-block: clamp(1.15rem, 2.4vw, 1.6rem); }
.assuntos a .d { font-size: clamp(1.7rem, 3.6vw, 2.5rem); line-height: 1.1; }
.assuntos a .rot { flex: none; transition: color .8s ease; }
.assuntos a:hover .rot, .assuntos a:focus-visible .rot { color: var(--texto); }
.assuntos p { font-size: .92rem; }
@media (hover: hover) { .assuntos ul:hover li:not(:hover) { opacity: .32; } }

/* fim: o logotipo. A Medida sai antes de ele entrar. */
.fim { min-height: 88svh; display: grid; grid-template-rows: 1fr auto auto; padding: var(--topo) var(--g) clamp(22px, 4vw, 40px); }
.fim .centro { display: flex; align-items: center; justify-content: center; padding-bottom: 7svh; }
.wm { font-family: var(--display); font-weight: 400; font-variation-settings: "opsz" 60; letter-spacing: .02em; line-height: 1; white-space: nowrap; font-size: clamp(3.1rem, 14.4vw, 12.5rem); }
.wm .i { position: relative; display: inline-block; }
/* posição e diâmetro medidos sobre o pingo real da Bodoni Moda (preparar.py) */
.wm .i i { position: absolute; left: calc(.143em - .0648em); top: calc(.1625em - .0648em); width: .1296em; height: .1296em; border-radius: 50%; background: var(--gota); }
.fim .servicos { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 clamp(1.2rem, 3vw, 2.4rem); margin-bottom: clamp(1.2rem, 3svh, 2rem); }
.fim .servicos a { color: var(--apoio); border: 0; padding: .7rem 0; white-space: nowrap; transition: color .8s ease; }
.fim .servicos a:hover { color: var(--texto); }
.fim .pe { display: flex; justify-content: space-between; align-items: center; gap: 0 2rem; flex-wrap: wrap; }
.fim .pe a { color: var(--apoio); border: 0; padding: .9rem 0; margin-block: -.9rem; transition: color .8s ease; }
@media (max-width: 620px) { .rot { font-size: .62rem; } .carta .rot { font-size: .74rem; } .topo .rot { font-size: .7rem; } .pe span.rot { font-size: .52rem; } .fim .pe a { order: -1; flex-basis: 100%; margin-block: 0 .4rem; } }
.fim .pe a:hover { color: var(--texto); }
html.js .wm { opacity: 0; transition: opacity 1.8s ease .5s; }
html.js .wm .i i { opacity: 0; transform: translateY(-.42em); transition: opacity 1.2s ease 1.5s, transform 1.6s cubic-bezier(.5, 0, .2, 1) 1.5s; }
html.js.final .wm { opacity: 1; }
html.js.final .wm .i i { opacity: 1; transform: none; }

/* cursor próprio: só com mouse, e só depois do primeiro movimento */
.cursor { position: fixed; left: 0; top: 0; z-index: 40; pointer-events: none; display: none; color: var(--texto); }
html.cursor-proprio, html.cursor-proprio * { cursor: none !important; }
html.cursor-proprio .cursor { display: block; }
.cursor::before, .cursor::after { content: ""; position: absolute; border-radius: 50%; }
.cursor::before { width: 6px; height: 6px; left: -3px; top: -3px; background: currentColor; transition: opacity .6s ease; }
.cursor::after { width: 40px; height: 40px; left: -20px; top: -20px; border: 1px solid currentColor; opacity: 0; transform: scale(.3); transition: opacity .7s ease, transform .7s var(--curva); }
.cursor.sobre::before { opacity: 0; }
.cursor.sobre::after { opacity: 1; transform: none; }

@media (max-width: 860px) {
  .carta li, .nota, .aplica .grade { grid-template-columns: minmax(0, 1fr); }
  .nota p { grid-column: 1; }
  .obras { grid-template-columns: minmax(0, 1fr); gap: 4.5rem; }
  .obra:nth-child(even) { margin-top: 0; }
  .tira { overflow-x: auto; margin-inline: calc(var(--g) * -1); padding-inline: var(--g); scroll-snap-type: x proximity; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .tira::-webkit-scrollbar { display: none; }
  .tira li { flex: none; width: calc(var(--a) * 150px); scroll-snap-align: center; }
  .aplica .cab { position: static; }
  .manifesto p:nth-of-type(even) { margin-left: 0; }
  .carta h3 { margin-bottom: .6rem; }
}

@media (prefers-reduced-motion: reduce) {
  html, *, *::before, *::after { transition-duration: .01s !important; transition-delay: 0s !important; }
}
