:root {
  --noite: #14100c;
  --noite-2: #1e1812;
  --gesso: #f4efe7;
  --papel: #fbf8f3;
  --tinta: #1d1712;
  --suave: #6a5f53;
  --linha: #ddd4c7;
  --bronze: #a0784f;
  --bronze-texto: #7d5a35;
  --ouro: #c9a271;
  --display: 'Marcellus', Georgia, serif;
  --texto: 'Hanken Grotesk', system-ui, sans-serif;
  --gutter: clamp(16px, 5vw, 72px);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; background: var(--papel); color: var(--tinta); font: 400 17px/1.65 var(--texto); -webkit-font-smoothing: antialiased; }
img, video { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.12; margin: 0; letter-spacing: -0.005em; text-wrap: balance; }
h2 { font-size: clamp(30px, 4.2vw, 52px); }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--bronze); outline-offset: 3px; }

.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }
.wrap { max-width: 1320px; margin: 0 auto; padding: 0 var(--gutter); }

/* Botões */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 28px; font: 600 15px/1 var(--texto); letter-spacing: 0.01em; text-decoration: none; border: 1px solid transparent; background: none; cursor: pointer; transition: background .25s, color .25s, border-color .25s; }
.btn-sm { min-height: 42px; padding: 0 18px; font-size: 14px; }
.btn-full { width: 100%; }
.btn-gold { background: var(--ouro); color: var(--noite); }
.btn-gold:hover { background: #dcb988; }
.btn-line { border-color: rgba(244, 239, 231, .35); color: var(--gesso); }
.btn-line:hover { border-color: var(--ouro); color: var(--ouro); }
.btn-dark { background: var(--noite); color: var(--gesso); }
.btn-dark:hover { background: var(--bronze-texto); }

/* Topo */
.top { position: fixed; inset: 0 0 auto; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 14px var(--gutter); background: rgba(20, 16, 12, .9); backdrop-filter: blur(10px); color: var(--gesso); }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.brand img { width: 46px; height: auto; }
.brand span { font: 400 14px/1 var(--display); letter-spacing: .16em; text-transform: uppercase; color: var(--ouro); }
.top nav { display: flex; align-items: center; gap: clamp(16px, 2.2vw, 32px); }
.top nav a:not(.btn) { font-size: 15px; text-decoration: none; opacity: .82; transition: opacity .2s, color .2s; }
.top nav a:not(.btn):hover { opacity: 1; color: var(--ouro); }
.menu-toggle { display: none; width: 44px; height: 44px; padding: 0; background: none; border: 0; cursor: pointer; position: relative; }
.menu-toggle span { position: absolute; left: 10px; right: 10px; height: 1.5px; background: var(--gesso); transition: transform .25s, top .25s; }
.menu-toggle span:first-child { top: 17px; }
.menu-toggle span:last-child { top: 26px; }
.menu-toggle[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }

/* Abertura */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr); gap: clamp(32px, 5vw, 88px); align-items: center; min-height: 100svh; padding: 128px var(--gutter) 72px; background: var(--noite); color: var(--gesso); overflow: hidden; }
.hero-copy { max-width: 640px; }
.kicker { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--ouro); margin-bottom: 26px; }
.hero h1 { font-size: clamp(44px, 6.3vw, 92px); line-height: 1.04; }
.lede { font-size: clamp(18px, 1.5vw, 21px); line-height: 1.55; color: #cfc6b9; max-width: 34em; margin-top: 28px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }

.hero-art { position: relative; margin: 0; padding: 38px 0 0 46px; max-width: 640px; justify-self: end; width: 100%; }
.hero-main { width: 100%; aspect-ratio: 5 / 5.7; object-fit: cover; object-position: 60% 40%; }
.hero-side { position: absolute; left: 0; bottom: -28px; width: 36%; aspect-ratio: 4 / 5; object-fit: cover; border: 6px solid var(--noite); }

/* Cotas: as linhas de medida de um desenho técnico de marcenaria */
.dim { position: absolute; color: var(--ouro); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.dim::before, .dim::after { content: ''; position: absolute; background: var(--ouro); }
.dim span { position: absolute; background: var(--noite); padding: 0 12px; white-space: nowrap; }
.dim-h { top: 16px; left: 46px; right: 0; height: 1px; background: var(--bronze); transform-origin: left; animation: draw-x 1.2s .2s cubic-bezier(.2, .7, .2, 1) both; }
.dim-h::before, .dim-h::after { width: 1px; height: 11px; top: -5px; }
.dim-h::before { left: 0; }
.dim-h::after { right: 0; }
.dim-h span { left: 50%; top: -9px; transform: translateX(-50%); }
.dim-v { top: 38px; bottom: 150px; left: 22px; width: 1px; background: var(--bronze); transform-origin: top; animation: draw-y 1.2s .35s cubic-bezier(.2, .7, .2, 1) both; }
.dim-v::before, .dim-v::after { height: 1px; width: 11px; left: -5px; }
.dim-v::before { top: 0; }
.dim-v::after { bottom: 0; }
.dim-v span { top: 42%; left: 0; transform: translate(-50%, -50%) rotate(-90deg); }
@keyframes draw-x { from { transform: scaleX(0); } }
@keyframes draw-y { from { transform: scaleY(0); } }

/* Seções */
.section { padding: clamp(72px, 10vw, 140px) 0; position: relative; }
.section-head { margin-bottom: clamp(32px, 4vw, 56px); max-width: 800px; }
.index { display: flex; align-items: center; gap: 14px; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--bronze-texto); margin-bottom: 20px; }
.index i { display: block; width: 72px; height: 9px; background: repeating-linear-gradient(90deg, currentColor 0 1px, transparent 1px 8px); opacity: .7; }

/* Galeria */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.chip { min-height: 42px; padding: 0 18px; border: 1px solid var(--linha); background: none; color: var(--tinta); font: 500 15px/1 var(--texto); cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.chip:hover { border-color: var(--bronze); }
.chip[aria-pressed="true"] { background: var(--noite); border-color: var(--noite); color: var(--gesso); }
.chip small { margin-left: 5px; font-size: 13px; opacity: .6; }
.gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.tile { position: relative; padding: 0; border: 0; background: var(--gesso); cursor: zoom-in; overflow: hidden; aspect-ratio: 4 / 5; }
.tile:nth-child(9n + 1) { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2, .7, .2, 1); }
.tile:hover img { transform: scale(1.04); }
.tile span { position: absolute; left: 0; bottom: 0; padding: 6px 12px; background: var(--noite); color: var(--gesso); font-size: 13px; opacity: 0; transform: translateY(100%); transition: opacity .25s, transform .25s; }
.tile:hover span, .tile:focus-visible span { opacity: 1; transform: none; }
.gallery-more { text-align: center; margin-top: 40px; }
.gallery-more[hidden] { display: none; }

/* Sobre */
.about { background: var(--gesso); }
.about-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 7vw, 112px); align-items: center; }
.about-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.about-copy h2 { margin-bottom: 26px; }
.about-copy p:not(.index) { color: var(--suave); font-size: 19px; max-width: 34em; }
.about-copy p + p { margin-top: 14px; }
.about-logo { width: 120px; margin-top: 36px; filter: brightness(.7) saturate(1.1); }

/* Serviços */
.services-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(32px, 7vw, 112px); align-items: end; }
.service-list { list-style: none; counter-reset: s; margin: 0; padding: 0; border-top: 1px solid var(--linha); }
.service-list li { counter-increment: s; display: flex; align-items: baseline; gap: 22px; padding: 20px 0; border-bottom: 1px solid var(--linha); transition: padding .3s, color .3s; }
.service-list li::before { content: '0' counter(s); font-size: 13px; color: var(--bronze-texto); }
.service-list span { font: 400 clamp(22px, 2.5vw, 34px)/1.2 var(--display); }
.service-list li:hover, .service-list li.on { padding-left: 14px; color: var(--bronze-texto); }
.service-preview img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; transition: opacity .3s; }

/* Vídeos */
.videos { background: var(--noite); color: var(--gesso); }
.videos .index { color: var(--ouro); }
.video-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.video-card { position: relative; padding: 0; border: 0; background: var(--noite-2); aspect-ratio: 9 / 16; cursor: pointer; overflow: hidden; }
.video-card video { width: 100%; height: 100%; object-fit: cover; opacity: .86; transition: opacity .3s; pointer-events: none; }
.video-card:hover video { opacity: 1; }
.video-card i { position: absolute; left: 50%; top: 50%; width: 58px; height: 58px; transform: translate(-50%, -50%); border-radius: 50%; background: rgba(20, 16, 12, .72); border: 1px solid var(--ouro); }
.video-card i::after { content: ''; position: absolute; left: 23px; top: 18px; border-left: 16px solid var(--ouro); border-top: 11px solid transparent; border-bottom: 11px solid transparent; }

/* Contato */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 7vw, 112px); align-items: start; }
.contact h2 { font-size: clamp(40px, 6vw, 76px); }
.contact-lede { color: var(--suave); font-size: 20px; margin-top: 18px; }
.contact-list { list-style: none; padding: 0; margin: 40px 0 0; border-top: 1px solid var(--linha); }
.contact-list li { padding: 16px 0; border-bottom: 1px solid var(--linha); }
.contact-list small { display: block; font-size: 14px; color: var(--suave); }
.contact-list a { font: 500 22px/1.35 var(--texto); text-decoration: none; }
.contact-list a:hover { color: var(--bronze-texto); }
.quote { background: var(--gesso); padding: clamp(24px, 3.4vw, 48px); display: grid; gap: 18px; }
.quote h3 { font-size: 28px; }
.quote label { display: grid; gap: 6px; font-size: 15px; font-weight: 500; }
.quote input, .quote select, .quote textarea { width: 100%; min-height: 50px; padding: 12px 14px; border: 1px solid var(--linha); background: var(--papel); color: var(--tinta); font: 400 17px/1.4 var(--texto); border-radius: 0; }
.quote input:focus, .quote select:focus, .quote textarea:focus { outline: 2px solid var(--bronze); outline-offset: 0; border-color: var(--bronze); }
.form-note { font-size: 14px; color: var(--suave); text-align: center; }

/* Rodapé */
.foot { background: var(--noite); color: #b9ae9f; padding: 36px 0; font-size: 15px; }
.foot-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.foot img { width: 92px; }
.foot a:hover { color: var(--ouro); }

.wa-float { display: none; }

/* Foto e vídeo ampliados */
.lightbox { border: 0; padding: 0; background: transparent; width: 100vw; height: 100dvh; max-width: none; max-height: none; color: var(--gesso); overflow: hidden; }
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: rgba(12, 9, 6, .94); }
.lightbox img, .lightbox video { max-width: min(92vw, 1100px); max-height: 86dvh; width: auto; height: auto; }
.lb-close, .lb-nav { position: absolute; z-index: 2; width: 52px; height: 52px; background: rgba(20, 16, 12, .75); color: var(--gesso); border: 1px solid rgba(244, 239, 231, .25); font: 400 28px/1 var(--texto); cursor: pointer; }
.lb-close:hover, .lb-nav:hover { border-color: var(--ouro); color: var(--ouro); }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: calc(50% - 26px); }
.lb-next { right: 16px; top: calc(50% - 26px); }
.lb-count { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; font-size: 14px; }

/* Revelação ao rolar (ativa só com JavaScript) */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1); }
.js .reveal.in { opacity: 1; transform: none; }

@media (max-width: 1040px) {
  .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .video-row { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; margin-right: calc(var(--gutter) * -1); padding-right: var(--gutter); }
  .video-card { flex: 0 0 min(58vw, 240px); scroll-snap-align: start; }
}

@media (max-width: 860px) {
  .menu-toggle { display: block; }
  .top nav { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--gutter) 20px; background: var(--noite); display: none; }
  .top nav.open { display: flex; }
  .top nav a:not(.btn) { padding: 14px 0; font-size: 18px; border-bottom: 1px solid rgba(244, 239, 231, .12); }
  .top nav .btn { margin-top: 16px; min-height: 50px; }

  .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; padding-top: 112px; padding-bottom: 72px; }
  .hero-art { justify-self: stretch; max-width: none; }
  .about-grid, .services-grid, .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .service-preview { display: none; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .tile span { display: none; }

  .wa-float { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 30; display: flex; align-items: center; justify-content: center; min-height: 52px; background: var(--ouro); color: var(--noite); font-weight: 600; font-size: 15px; text-decoration: none; box-shadow: 0 8px 24px rgba(0, 0, 0, .3); transition: transform .3s; }
  .wa-float.hide { transform: translateY(90px); }
  .foot { padding-bottom: 88px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
