:root {
  /* Marca (logo oficial) */
  --green: #003826;
  --navy: #04263E;
  /* Símbolo */
  --wood: #A08D5D;
  --forest: #3C4D37;
  --char: #26292A;
  --sage: #83A7A7;
  --teal: #19738A;
  /* Papel e traço */
  --paper: #F4F0EC;
  --paper-2: #E8E1D6;
  --line: #4F7C82;
  --muted: #5d6262;

  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Montserrat', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--paper); }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body { background: var(--paper); color: var(--char); font-family: var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; }
figure { margin: 0; }
small { font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--line); }
h2 { font-family: var(--serif); font-weight: 300; line-height: 1.05; color: var(--green); }
p { line-height: 1.6; }

/* ---------- Prancha: moldura, barra superior e carimbo ---------- */
:root { --fx: 14px; --top: 62px; --cw: clamp(190px, 14vw, 230px); --sheet-line: #9fbccb; --sheet-ink: #4f7f96; }
main, .contact { margin-left: var(--fx); margin-right: calc(var(--fx) + var(--cw)); }
.sheet { position: fixed; inset: 0; z-index: 50; pointer-events: none; }
.sheet-frame { position: absolute; inset: var(--fx); border: 1px solid var(--sheet-line); border-radius: 0 0 26px 0; box-shadow: 0 0 0 60px var(--paper); }
.tick { position: absolute; background: var(--sheet-line); }
.t-top { top: -1px; width: 1px; height: 9px; }
.t-left { left: -15px; width: 22px; height: 1px; }
.t-right { right: -15px; width: 22px; height: 1px; }

.sheet-top { position: absolute; top: var(--fx); left: var(--fx); right: calc(var(--fx) + var(--cw)); height: var(--top); display: flex; align-items: center; gap: clamp(16px, 3vw, 40px); padding: 0 22px; background: var(--paper); border-bottom: 1px solid var(--sheet-line); pointer-events: auto; }
.sheet-top a { color: var(--green); text-decoration: none; }
.nav-brand { display: block; }
.nav-mark { height: 32px; width: auto; max-width: none; }
.nav-links { display: flex; align-items: center; font-family: var(--sans); font-size: 10.5px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; }
.nav-links a { padding: 2px clamp(10px, 1.4vw, 20px); border-left: 1px solid var(--sheet-line); color: var(--sheet-ink) !important; transition: color .3s; }
.nav-links a:first-child { border-left: 0; }
.nav-links a:hover, .nav-links a.on { color: var(--green) !important; }

.stamp { position: absolute; top: var(--fx); right: var(--fx); bottom: var(--fx); width: var(--cw); display: flex; flex-direction: column; background: var(--paper); border-left: 1px solid var(--sheet-line); border-radius: 0 0 26px 0; overflow: hidden; pointer-events: auto; color: var(--sheet-ink); font-family: var(--sans); }
.stamp-cell { border-bottom: 1px solid var(--sheet-line); padding: 14px 16px; }
.stamp-nv { height: var(--top); display: flex; align-items: center; justify-content: space-between; padding-top: 0; padding-bottom: 0; font-size: 11px; font-weight: 600; letter-spacing: .08em; }
.north { width: 30px; height: 30px; }
.north circle, .north line { fill: none; stroke: var(--sheet-ink); stroke-width: 1; }
.north path { fill: var(--sheet-ink); }
.stamp-about h4 { font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--green); margin-top: 12px; }
.stamp-about h4:first-child { margin-top: 0; }
.stamp-about p { font-size: 11px; line-height: 1.5; margin-top: 3px; }
.stamp-brand { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 18px 16px; }
.stamp-brand > img { width: 70%; }
.qr { width: 78px; height: 78px; }
.qr img, .qr canvas { width: 100% !important; height: 100% !important; }
.stamp-table { display: grid; grid-template-columns: auto 1fr; padding: 0; font-size: 9.5px; }
.stamp-table dt, .stamp-table dd { padding: 7px 10px; border-bottom: 1px solid var(--sheet-line); margin: 0; overflow-wrap: anywhere; }
.stamp-table dt { border-right: 1px solid var(--sheet-line); color: #7a98a8; }
.stamp-table dd a { color: inherit; text-decoration: none; }
.stamp-table dt:nth-last-of-type(1), .stamp-table dd:last-child { border-bottom: 0; }
.stamp-sheet { margin-top: auto; border-bottom: 0; border-top: 1px solid var(--sheet-line); display: flex; flex-direction: column; align-items: flex-end; gap: 2px; padding: 12px 20px 16px; }
.sheet-title { font-size: 10px; color: #7a98a8; }
.sheet-num { font-family: var(--sans); font-weight: 300; font-size: 32px; letter-spacing: .04em; color: var(--sheet-ink); }

/* ---------- Anéis de progresso ---------- */
.rings { position: fixed; right: calc(var(--fx) + var(--cw) + 20px); bottom: calc(var(--fx) + 18px); width: 50px; height: 50px; z-index: 40; mix-blend-mode: difference; pointer-events: none; }
.rings path { fill: none; stroke: #c9c1b4; stroke-width: 1.4; }
.rings circle { fill: #c9c1b4; }

/* ---------- Hero ---------- */
.hero { position: relative; height: 100vh; overflow: hidden; display: grid; place-items: center; }
.hero-topo { position: absolute; inset: -10%; width: 120%; height: 120%; }
.hero-topo path { fill: none; stroke: var(--paper-2); stroke-width: 5; }
.hero-inner { position: relative; display: flex; flex-direction: column; align-items: center; gap: 26px; padding: 0 16px; }
.hero-logo { width: clamp(140px, 17vw, 220px); aspect-ratio: 1070 / 1180; }
.tagline { font-family: var(--mono); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--line); text-align: center; }
.scroll-hint { position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 10px; font-family: var(--mono); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--line); }
.scroll-hint i { width: 1px; height: 46px; background: var(--line); transform-origin: top; animation: hint 2s ease-in-out infinite; }
@keyframes hint { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ---------- Canvases 3D ---------- */
.gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* ---------- Processo ---------- */
.process { position: relative; height: 100vh; overflow: hidden; background: var(--paper); }
.sky { position: absolute; inset: 0; background: linear-gradient(180deg, #7d93a3 0%, #c9b8a4 42%, #ecc79c 62%, #e9c9a2 100%); opacity: 0; }
.process-ui { z-index: 1; position: absolute; left: clamp(16px, 4vw, 56px); top: clamp(84px, 14vh, 140px); width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.process-ui::before { content: ''; position: absolute; inset: -70px -110px -60px -80px; background: radial-gradient(closest-side, rgba(244, 240, 236, .82), rgba(244, 240, 236, 0)); z-index: -1; }
.stage-list { position: relative; display: flex; gap: 18px; padding-bottom: 14px; margin-bottom: 22px; flex-wrap: wrap; }
.stage-list span { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: color-mix(in srgb, var(--ui-ink, var(--green)) 40%, transparent); transition: color .3s; }
.stage-list span i { font-style: normal; margin-right: 6px; opacity: .7; }
.stage-list span.on { color: var(--ui-ink, var(--green)); }
.stage-list .bar { position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: color-mix(in srgb, var(--ui-ink, var(--green)) 20%, transparent); }
.stage-list .bar b { position: absolute; inset: 0; background: var(--ui-ink, var(--green)); transform-origin: left; transform: scaleX(0); }
.stage-caps { position: relative; height: 150px; }
.cap { position: absolute; inset: 0; opacity: 0; visibility: hidden; }
.cap:first-child { opacity: 1; visibility: visible; }
.cap h2 { font-size: clamp(44px, 5.4vw, 84px); margin-bottom: 12px; color: var(--ui-ink, var(--green)); }
.cap p { font-size: 15px; color: var(--ui-sub, var(--muted)); max-width: 30ch; }
.process.dusk { --ui-ink: #fff8ee; --ui-sub: #f6e6d2; }
.process.dusk .cap h2, .process.dusk .cap p { text-shadow: 0 2px 24px rgba(40, 30, 20, .35); }

/* ---------- Marcenaria ---------- */
.joinery { position: relative; height: 100vh; overflow: hidden; background: radial-gradient(ellipse at 62% 60%, #efe9e0 0%, var(--paper-2) 70%); }
.joinery .gl-chair { left: 28vw; width: 72vw; }
.joinery-text { position: absolute; left: clamp(16px, 6vw, 96px); top: 50%; transform: translateY(-50%); width: min(360px, calc(100vw - 32px)); }
.joinery-text h2 { font-size: clamp(40px, 4.6vw, 70px); margin: 12px 0 20px; }
.joinery-text p { font-size: 15px; color: var(--muted); margin-bottom: 26px; }
.joinery-steps { list-style: none; counter-reset: j; border-top: 1px solid #d8cfc1; }
.joinery-steps li { counter-increment: j; padding: 9px 0; border-bottom: 1px solid #d8cfc1; font-size: 14px; color: #a39d93; transition: color .3s, padding .3s; }
.joinery-steps li::before { content: '0' counter(j); font-family: var(--mono); font-size: 11px; margin-right: 14px; }
.joinery-steps li.on { color: var(--green); padding-left: 8px; }

/* ---------- Projetos ---------- */
.projects { padding: 18vh clamp(16px, 6vw, 96px) 16vh; background: var(--paper); }
.projects header h2 { font-size: clamp(38px, 4.6vw, 68px); margin-top: 12px; }
.showcase { margin-top: 10vh; display: flex; flex-direction: column; gap: 16vh; }
.show { position: relative; width: 78%; }
.show--right { align-self: flex-end; }
.show .cover { aspect-ratio: 16 / 9; overflow: hidden; }
.show .cover img { width: 100%; height: 120%; object-fit: cover; max-width: none; }
.show-txt { margin-top: 18px; display: flex; justify-content: space-between; gap: 24px; align-items: baseline; flex-wrap: wrap; }
.show h3 { font-family: var(--serif); font-weight: 300; font-size: clamp(26px, 2.6vw, 38px); color: var(--green); }
.show p { font-size: 13px; color: var(--muted); }

/* ---------- Sobre ---------- */
.about { display: grid; grid-template-columns: minmax(240px, 0.7fr) 1.3fr; gap: 6vw; align-items: center; padding: 14vh clamp(16px, 8vw, 140px); background: var(--paper-2); }
.about-photo { aspect-ratio: 872 / 1100; overflow: hidden; }
.about-photo img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.about-text h2 { font-size: clamp(38px, 4.4vw, 64px); margin: 12px 0 6px; }
.about-role { font-family: var(--mono); font-size: 12px; color: var(--line); margin-bottom: 22px; }
.about-text p:not(.about-role) { font-size: 16px; color: var(--muted); max-width: 52ch; margin-bottom: 14px; }

/* ---------- Contato ---------- */
.contact { min-height: 100vh; background: var(--navy); color: var(--paper); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; text-align: center; padding: 16vh 16px 8vh; }
.contact-logo { width: 96px; aspect-ratio: 1070 / 1180; }
.contact h2 { font-size: clamp(40px, 6vw, 84px); color: var(--paper); }
.contact p { color: var(--sage); font-size: 17px; }
.contact-links { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }
.btn { padding: 15px 26px; border: 1px solid var(--sage); background: var(--sage); color: var(--navy); text-decoration: none; font-family: var(--mono); font-size: 13px; letter-spacing: .06em; transition: background .3s, color .3s; }
.btn:hover, .btn--ghost { background: transparent; color: var(--paper); }
.btn--ghost:hover { background: var(--sage); color: var(--navy); }
.contact-mark { width: 200px; margin-top: 10vh; opacity: .9; }
.contact small { color: var(--sage); }

/* ---------- Responsivo ---------- */
@media (max-width: 860px) {
  :root { --fx: 8px; --top: 52px; --cw: 0px; }
  .stamp { display: none; }
  .nav-links { display: none; }
  .nav-mark { height: 26px; }
  .process-ui { top: 76px; }
  .stage-list { gap: 10px; }
  .stage-list span { font-size: 10px; }
  .cap h2 { font-size: 40px; }
  .joinery .gl-chair { left: 0; width: 100%; top: 30vh; height: 70vh; }
  .joinery-text { top: 84px; transform: none; }
  .joinery-text p, .joinery-steps { display: none; }
  .show { width: 100%; }
  .about { grid-template-columns: 1fr; }
  .about-photo { max-width: 320px; }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-hint i { animation: none; }
}
