/* Base comum às três versões: reset, marca, espaços de foto, botões, formulário, movimento. */

:root {
  --marinho: #2C3E4D;
  --marinho-escuro: #1B2731;
  --marinho-noite: #141D25;
  --creme: #FCFBF7;
  --ouro: #B19D6A;
  --ouro-claro: #D9C79A;
  --nevoa: #E1E1DF;
  --preto: #0A0A0A;

  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Inter Tight", "Helvetica Neue", Arial, sans-serif;

  --t-sm: 0.875rem;
  --t-base: 1.0625rem;
  --t-lead: clamp(1.1875rem, 1.05rem + 0.5vw, 1.4375rem);
  --t-h3: clamp(1.5rem, 1.25rem + 1vw, 2.125rem);
  --t-h2: clamp(2.25rem, 1.5rem + 3vw, 4.5rem);
  --t-h1: clamp(2.75rem, 1.6rem + 5vw, 7rem);
  --t-mega: clamp(4rem, 2rem + 12vw, 16rem);

  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --section: clamp(6rem, 14vw, 12rem);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-inout: cubic-bezier(.65, 0, .35, 1);
}

@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .6s; animation-timing-function: var(--ease-inout); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body { margin: 0; font: 400 var(--t-base)/1.6 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg, video, iframe { display: block; max-width: 100%; }
p { margin: 0 0 1em; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 400; text-wrap: balance; }
[id] { scroll-margin-top: 5rem; }
:focus-visible { outline: 2px solid var(--ouro); outline-offset: 3px; }
a, button, summary { touch-action: manipulation; -webkit-tap-highlight-color: rgba(177, 157, 106, .25); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 1rem; top: -4rem; z-index: 1000; padding: .75rem 1rem; background: var(--creme); color: var(--marinho); }
.skip:focus { top: 1rem; }

/* Marca */
.logo { display: inline-block; background-color: currentColor; -webkit-mask: var(--src) no-repeat center / contain; mask: var(--src) no-repeat center / contain; }
.logo--monograma  { --src: url("assets/logo/monograma.svg"); aspect-ratio: 330.9 / 243.6; }
.logo--wordmark   { --src: url("assets/logo/wordmark.svg"); aspect-ratio: 784.4 / 218.5; }
.logo--assinatura { --src: url("assets/logo/assinatura-horizontal.svg"); aspect-ratio: 791 / 130.9; }
.logo--selo       { --src: url("assets/logo/selo.svg"); aspect-ratio: 1; }

/* Faixa de esboço */
.sketch-bar { position: relative; z-index: 60; font-size: .8125rem; line-height: 1.4; padding: .55rem var(--gutter); text-align: center; background: var(--ouro); color: var(--marinho-escuro); }
.sketch-bar a { color: inherit; font-weight: 500; text-underline-offset: .2em; margin-left: .35rem; }

/* Espaço reservado para foto real, com granulação e luz */
.ph {
  position: relative; margin: 0; overflow: hidden;
  display: grid; place-items: center;
  min-height: 10rem;
  background: var(--ph-bg, #2A3A48);
  color: var(--ph-fg, rgba(252, 251, 247, .7));
  isolation: isolate;
}
.ph::before {
  content: ""; position: absolute; inset: -50%; z-index: -1;
  background: radial-gradient(40% 35% at 50% 45%, var(--ph-glow, rgba(217, 199, 154, .16)), transparent 70%);
  animation: ph-drift 14s var(--ease-inout) infinite alternate;
}
.ph::after {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .22; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
@keyframes ph-drift { to { transform: translate(12%, 8%) scale(1.1); } }
.ph__label { position: relative; max-width: 22em; padding: 1.25rem; font-size: .8125rem; line-height: 1.45; text-align: center; }
.ph__label::before { content: "Espaço para foto real"; display: block; margin-bottom: .35rem; font: italic 400 1rem/1.3 var(--serif); color: var(--ph-title, var(--ouro-claro)); }
.ph--light { --ph-bg: #E4E3DF; --ph-fg: #56636E; --ph-glow: rgba(177, 157, 106, .25); --ph-title: var(--marinho); }

/* Botões */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 3.25rem; padding: .8rem 2rem; border-radius: 999px;
  border: 1px solid currentColor; background: transparent; color: inherit;
  font: 500 .9375rem/1.2 var(--sans); letter-spacing: .01em; text-decoration: none; cursor: pointer;
  overflow: hidden; isolation: isolate;
  transition: color .5s var(--ease-out), border-color .5s var(--ease-out);
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: var(--btn-fill, var(--ouro));
  transform: translateY(101%); transition: transform .6s var(--ease-out);
}
.btn:hover::before, .btn:focus-visible::before { transform: translateY(0); }
.btn:hover, .btn:focus-visible { color: var(--btn-ink, var(--marinho-escuro)); border-color: var(--btn-fill, var(--ouro)); }
.btn--solid { background: var(--btn-bg, var(--ouro)); color: var(--btn-ink, var(--marinho-escuro)); border-color: var(--btn-bg, var(--ouro)); }
.btn--solid::before { background: var(--btn-hover, var(--creme)); }
.btn--solid:hover, .btn--solid:focus-visible { border-color: var(--btn-hover, var(--creme)); }
.btn--full { width: 100%; }
.link { text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat; padding-bottom: .15em; transition: background-size .5s var(--ease-out); }
.link:hover { background-size: 0 1px; background-position: 100% 100%; }

/* Menu em tela cheia */
.menu-btn { display: inline-flex; align-items: center; gap: .7rem; background: none; border: 0; color: inherit; font: 500 .9375rem var(--sans); cursor: pointer; padding: .5rem 0; }
.menu-btn__lines { display: grid; gap: 5px; width: 22px; }
.menu-btn__lines span { height: 1px; background: currentColor; transition: transform .5s var(--ease-out); }
[aria-expanded="true"] .menu-btn__lines span:first-child { transform: translateY(3px) rotate(45deg); }
[aria-expanded="true"] .menu-btn__lines span:last-child { transform: translateY(-3px) rotate(-45deg); }
.overlay {
  position: fixed; inset: 0; z-index: 80;
  display: grid; align-content: center; padding: 6rem var(--gutter) 3rem;
  background: var(--marinho-noite); color: var(--creme);
  clip-path: inset(0 0 100% 0); visibility: hidden;
  transition: clip-path .9s var(--ease-inout), visibility 0s .9s;
  overscroll-behavior: contain;
}
.overlay.is-open { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path .9s var(--ease-inout), visibility 0s 0s; }
.overlay__list { list-style: none; margin: 0; padding: 0; counter-reset: m; }
.overlay__list li { overflow: hidden; counter-increment: m; }
.overlay__list a {
  display: flex; align-items: baseline; gap: 1.25rem;
  font: 400 clamp(2.5rem, 1.5rem + 5vw, 6rem)/1.08 var(--serif); text-decoration: none;
  transform: translateY(110%); transition: transform .9s var(--ease-out), color .3s ease;
}
.overlay__list a::before { content: counter(m); font: italic 400 1rem var(--serif); color: var(--ouro); }
.overlay__list a:hover { color: var(--ouro-claro); }
.overlay.is-open .overlay__list a { transform: none; }
.overlay.is-open li:nth-child(2) a { transition-delay: .06s; }
.overlay.is-open li:nth-child(3) a { transition-delay: .12s; }
.overlay.is-open li:nth-child(4) a { transition-delay: .18s; }
.overlay.is-open li:nth-child(5) a { transition-delay: .24s; }
.overlay__foot { margin-top: 3rem; display: flex; flex-wrap: wrap; gap: 1rem 2rem; font-size: .9375rem; color: rgba(252, 251, 247, .7); }

/* Pré-carregamento: o ouro enche o monograma */
.loader {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center;
  background: var(--marinho-noite); color: var(--ouro);
}
.loader__mono { position: relative; width: clamp(7rem, 18vw, 11rem); aspect-ratio: 330.9 / 243.6; }
.loader__mono .logo { position: absolute; inset: 0; width: 100%; }
.loader__mono .logo:first-child { color: rgba(177, 157, 106, .18); }
.loader__mono .loader__fill { clip-path: inset(100% 0 0 0); background: linear-gradient(180deg, var(--ouro-claro), var(--ouro) 60%, #8E7C4E); }
.loader__count { position: absolute; bottom: 2.5rem; left: 50%; translate: -50% 0; font: italic 400 1rem var(--serif); color: rgba(177, 157, 106, .8); font-variant-numeric: tabular-nums; }
html.no-motion .loader, html.is-loaded .loader { display: none; }

/* Cursor personalizado (só com mouse) */
.cursor { position: fixed; left: 0; top: 0; z-index: 150; pointer-events: none; display: none; }
@media (hover: hover) and (pointer: fine) {
  html.has-cursor .cursor { display: block; }
}

/* Texto dividido em linhas para revelar */
.split-line { overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; }

/* Formulário */
.field { display: grid; gap: .4rem; margin-bottom: 1.25rem; min-width: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.field label { font-size: var(--t-sm); opacity: .85; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 3rem; padding: .7rem 0;
  font: 400 1.0625rem/1.4 var(--sans); color: inherit;
  background: transparent; border: 0; border-bottom: 1px solid var(--field-line, rgba(252, 251, 247, .35)); border-radius: 0;
  transition: border-color .3s ease;
}
.field select { -webkit-appearance: none; appearance: none; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 10px) 55%, calc(100% - 5px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
.field select option { background-color: var(--marinho); color: var(--creme); }
.field input::placeholder, .field textarea::placeholder { color: currentColor; opacity: .4; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: none; border-bottom-color: var(--ouro); box-shadow: 0 1px 0 var(--ouro); }
.field input[type="file"] { padding: .7rem 0; font-size: .9375rem; }
.field [aria-invalid="true"] { border-bottom-color: #E8A48C; }
.field__error { font-size: var(--t-sm); color: var(--err, #F1B8A3); margin: 0; }
.form__status { min-height: 1.5em; margin-top: 1rem; font-size: .9375rem; }
@media (max-width: 36rem) { .field-row { grid-template-columns: 1fr; gap: 0; } }

/* Sem movimento: tudo visível, nada escondido */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Esconde o que vai animar até o JS assumir (com falha de rede, o script do head devolve tudo) */
html.js-motion [data-split],
html.js-motion [data-reveal],
html.js-motion [data-scrub-words],
html.js-motion [data-fade],
html.js-motion [data-intro-fade] { visibility: hidden; }

/* Cabeçalho que some e volta */
[data-header] { transition: transform .7s var(--ease-out), background-color .5s ease, color .5s ease; }
[data-header].is-hidden { transform: translateY(-110%); }

/* Foto flutuante da lista de projetos */
.hover-float { position: fixed; left: 0; top: 0; z-index: 70; width: clamp(14rem, 22vw, 20rem); aspect-ratio: 4 / 5; pointer-events: none; opacity: 0; visibility: hidden; translate: -50% -50%; scale: .85; }
.hover-float .ph { width: 100%; height: 100%; --ph-bg: #33475A; box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }

/* A: luz de bancada */
.lamp {
  position: fixed; inset: 0; z-index: 90; pointer-events: none;
  background: radial-gradient(circle var(--r, 26rem) at var(--x) var(--y), rgba(255, 214, 150, .07) 0%, transparent 35%, rgba(8, 12, 16, .62) 100%);
  transition: --r .6s ease;
  mix-blend-mode: multiply;
}
.lamp::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle 16rem at var(--x) var(--y), rgba(255, 220, 160, .10), transparent 70%);
  mix-blend-mode: screen;
}
.lamp.is-bright { --r: 34rem; }
@property --r { syntax: "<length>"; inherits: true; initial-value: 26rem; }

/* B: lupa */
.loupe { translate: -50% -50%; }
.loupe__ring { position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; translate: -50% -50%; border: 1px solid var(--marinho); border-radius: 50%; transition: width .5s var(--ease-out), height .5s var(--ease-out), border-color .3s ease, background-color .3s ease; }
.loupe.is-link .loupe__ring { width: 56px; height: 56px; background: rgba(177, 157, 106, .15); border-color: var(--ouro); }
.loupe__lens {
  position: absolute; left: 50%; top: 50%; width: 220px; height: 220px; translate: -50% -50%;
  border-radius: 50%; overflow: hidden; background: #E4E3DF;
  box-shadow: 0 0 0 1px var(--ouro), 0 0 0 6px rgba(252, 251, 247, .9), 0 0 0 7px var(--ouro), 0 30px 60px rgba(0, 0, 0, .25);
  scale: 0; transition: scale .6s var(--ease-out);
}
.loupe.is-zoom .loupe__lens { scale: 1; }
.loupe.is-zoom .loupe__ring { opacity: 0; }
.loupe__clone { position: absolute; left: 0; top: 0; margin: 0; }
html.has-cursor body[data-cursor="loupe"], html.has-cursor body[data-cursor="loupe"] a, html.has-cursor body[data-cursor="loupe"] button { cursor: none; }

/* C: fio de ouro */
[data-thread] { position: relative; }
.thread { position: absolute; left: 0; top: 0; width: 100%; pointer-events: none; z-index: 2; overflow: visible; }
.thread path { fill: none; stroke: var(--ouro); stroke-width: 1.5; stroke-linecap: round; }
.thread .thread__glow { stroke: var(--ouro-claro); stroke-width: 6; opacity: .25; filter: blur(4px); }
html.no-motion .thread { display: none; }

/* Faixa de esboço como pílula flutuante (não briga com cabeçalho fixo) */
.sketch-bar { position: fixed; z-index: 95; left: 50%; bottom: 1rem; translate: -50% 0; width: max-content; max-width: calc(100% - 2rem); border-radius: 999px; padding: .55rem 1.1rem; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
@media (max-width: 40rem) {
  .sketch-bar { font-size: .6875rem; padding: .4rem .9rem; border-radius: 1rem; bottom: .6rem; }
}

/* Fotos ilustrativas (Unsplash), só para mostrar o tipo de imagem; serão trocadas pelas fotos do ateliê */
.ph__img { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; }
.ph:has(.ph__img) { background: #1A232C; }
.ph:has(.ph__img) .ph__label {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; max-width: none; margin: 0;
  padding: 2.5rem 1rem .9rem; text-align: left; font-size: .8125rem; line-height: 1.4; color: #FCFBF7;
  background: linear-gradient(transparent, rgba(10, 15, 20, .82));
  opacity: 0; transform: translateY(.5rem); transition: opacity .4s ease, transform .4s ease;
}
.ph:has(.ph__img) .ph__label::before { content: "Sugestão de foto do ateliê"; color: #D9C79A; font-size: .9375rem; }
.ph:has(.ph__img):hover .ph__label { opacity: 1; transform: none; }
.ph__tag {
  position: absolute; top: .6rem; left: .6rem; z-index: 2; pointer-events: none;
  padding: .3rem .6rem; border-radius: 999px; font: 500 .6875rem/1 "Inter Tight", Arial, sans-serif; letter-spacing: .01em;
  background: rgba(10, 15, 20, .55); color: #FCFBF7; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
@media (hover: none) { .ph:has(.ph__img) .ph__label { opacity: 1; transform: none; font-size: .75rem; padding-top: 2rem; } }
.hover-float .ph .ph__label { opacity: 1; transform: none; }
.ph[class*="hero"] .ph__tag { top: 6.5rem; }
.ph.mz__media .ph__tag { top: 6.5rem; }
.ph[class*="hero"] .ph__img { filter: brightness(.6); }
