/* =========================================================
   JPN Marcenaria — estilos
   ========================================================= */

:root {
  --green: #334d3d;
  --green-dark: #2a4033;
  --gold: #cc9f73;
  --ink: #101010;
  --muted: #55554f;
  --bg: #f8f6f2;
  --white: #ffffff;
  --line: #e4ded3;

  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: 20px;
  --header-h: 68px;
  --section-y: 88px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

@media (min-width: 768px) {
  :root { --gutter: 40px; --section-y: 120px; --header-h: 80px; }
}
@media (min-width: 1200px) {
  :root { --section-y: 150px; }
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 500; }
p { margin: 0; }
ol, ul { list-style: none; margin: 0; padding: 0; }
button { font: inherit; color: inherit; cursor: pointer; }

:focus-visible { outline: 1px solid var(--gold); outline-offset: 4px; }

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section { padding: var(--section-y) 0; }

/* ---------- Tipografia ---------- */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 22px;
}
.eyebrow::before {
  content: "";
  width: 32px;
  height: 1px;
  background: var(--gold);
  flex: none;
}
.eyebrow--light { color: var(--bg); }

.title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(34px, 6vw, 56px);
  line-height: 1.08;
  letter-spacing: -.01em;
  color: var(--ink);
}

.lead {
  margin-top: 22px;
  max-width: 520px;
  font-size: 16px;
  color: var(--muted);
}
@media (min-width: 768px) { .lead { font-size: 17px; } }

.section-head { margin-bottom: 48px; }
@media (min-width: 768px) { .section-head { margin-bottom: 64px; } }

/* ---------- Botões ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 54px;
  padding: 16px 30px;
  border: 1px solid transparent;
  border-radius: 0;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  line-height: 1.3;
  text-align: center;
  background: none;
  transition: background-color .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease);
}
.btn__icon { width: 16px; height: 16px; flex: none; }

.btn--primary { background: var(--green); color: var(--white); }
.btn--primary .btn__icon { color: var(--gold); transition: color .35s var(--ease); }
.btn--primary:hover { background: var(--gold); color: var(--ink); }
.btn--primary:hover .btn__icon { color: var(--ink); }

.btn--outline { border-color: var(--gold); color: var(--green); }
.btn--outline .btn__icon { color: var(--gold); transition: color .35s var(--ease); }
.btn--outline:hover { background: var(--gold); color: var(--ink); }
.btn--outline:hover .btn__icon { color: var(--ink); }
.btn--on-dark { color: var(--white); }

.btn--gold { background: var(--gold); color: var(--ink); }
.btn--gold:hover { background: var(--bg); }

.btn--ghost { border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); }

.btn--sm { min-height: 40px; padding: 10px 16px; font-size: 11px; letter-spacing: .14em; gap: 8px; }
.btn--lg { min-height: 64px; padding: 20px 40px; font-size: 13px; }
.btn--lg .btn__icon { width: 18px; height: 18px; }

@media (max-width: 599px) {
  .btn:not(.btn--sm) { width: 100%; padding-left: 16px; padding-right: 16px; letter-spacing: .1em; gap: 10px; }
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  border-bottom: 1px solid var(--gold);
  padding-bottom: 4px;
  transition: color .3s var(--ease);
}
.link-arrow::after { content: "→"; color: var(--gold); transition: transform .3s var(--ease); }
.link-arrow:hover::after { transform: translateX(4px); }

/* ---------- Cabeçalho ---------- */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(248, 246, 242, .94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease);
}
.header.is-scrolled { border-bottom-color: var(--line); }
.header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.header__logo img { height: 40px; width: auto; }
@media (min-width: 768px) { .header__logo img { height: 46px; } }

.header__nav { display: none; }
@media (min-width: 960px) {
  .header__nav { display: flex; gap: 40px; margin-left: auto; }
  .header__nav a {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: .04em;
    position: relative;
    padding: 6px 0;
  }
  .header__nav a::after {
    content: "";
    position: absolute; left: 0; bottom: 0;
    width: 100%; height: 1px;
    background: var(--gold);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .35s var(--ease);
  }
  .header__nav a:hover::after { transform: scaleX(1); }
}

/* ---------- 1. Hero ---------- */

.hero {
  display: grid;
  background: var(--bg);
}
.hero__media { position: relative; height: 44vh; height: 44svh; min-height: 280px; max-height: 560px; overflow: hidden; }
@media (min-width: 600px) and (max-width: 959px) { .hero__media { height: 56vh; } }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: center 60%; }
.hero__content { padding: 36px var(--gutter) 64px; }
@media (max-width: 599px) {
  .hero .eyebrow { margin-bottom: 16px; }
  .hero__text { margin-top: 18px; }
  .hero__actions { margin-top: 28px; }
}
.hero__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(40px, 10vw, 76px);
  line-height: 1.02;
  letter-spacing: -.015em;
}
.hero__title em { font-style: italic; color: var(--green); }
.hero__text { margin-top: 24px; max-width: 460px; font-size: 16px; color: var(--muted); }
.hero__actions {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px 32px;
}

@media (min-width: 960px) {
  .hero {
    grid-template-columns: 1fr 1fr;
    min-height: calc(100vh - var(--header-h));
    min-height: calc(100svh - var(--header-h));
  }
  .hero__media { order: 2; height: auto; max-height: none; }
  .hero__content {
    order: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 64px 64px 64px max(var(--gutter), calc((100vw - 1280px) / 2 + var(--gutter)));
  }
}
@media (min-width: 1200px) {
  .hero { grid-template-columns: 1.05fr 1fr; }
  .hero__content { padding-right: 96px; }
}

/* ---------- 2. Números ---------- */

.stats { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--white); }
.stats__grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 32px 8px;
}
.stat + .stat { border-left: 1px solid var(--line); }
.stat__num {
  font-family: var(--serif);
  font-size: clamp(36px, 8vw, 60px);
  line-height: 1;
  color: var(--gold);
}
.stat__label {
  margin-top: 10px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.4;
}
@media (min-width: 768px) {
  .stat { padding: 48px 16px; }
  .stat__label { font-size: 11px; letter-spacing: .2em; }
}

/* ---------- 3. Por que a JPN ---------- */

.why__grid { display: grid; gap: 56px; }
.why__cta { margin-top: 40px; }
.why__list { counter-reset: none; border-top: 1px solid var(--line); }
.why__item {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 16px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}
.why__num { font-family: var(--serif); font-size: 22px; color: var(--gold); line-height: 1.2; }
.why__item h3 { font-family: var(--serif); font-size: 26px; line-height: 1.15; margin-bottom: 8px; }
.why__item p { color: var(--muted); font-size: 15px; }

@media (min-width: 960px) {
  .why__grid { grid-template-columns: 5fr 6fr; gap: 96px; align-items: start; }
  .why__intro { position: sticky; top: calc(var(--header-h) + 48px); }
  .why__item { grid-template-columns: 72px 1fr; padding: 36px 0; }
  .why__item h3 { font-size: 30px; }
}

/* ---------- 4. Portfólio ---------- */

.portfolio { background: var(--white); }
.portfolio .section-head { display: grid; gap: 0; }
@media (min-width: 960px) {
  .portfolio .section-head {
    grid-template-columns: 1fr 1fr;
    align-items: end;
    column-gap: 64px;
  }
  .portfolio .section-head .eyebrow { grid-column: 1 / -1; }
  .portfolio .section-head .lead { margin-top: 0; justify-self: end; }
}

.filters {
  display: flex;
  gap: 8px 28px;
  margin-bottom: 32px;
  overflow-x: auto;
  scrollbar-width: none;
  margin-left: calc(var(--gutter) * -1);
  margin-right: calc(var(--gutter) * -1);
  padding: 0 var(--gutter);
  border-bottom: 1px solid var(--line);
}
.filters::-webkit-scrollbar { display: none; }
@media (min-width: 768px) {
  .filters { flex-wrap: wrap; margin-left: 0; margin-right: 0; padding: 0; gap: 8px 36px; }
}
.filter {
  flex: none;
  padding: 14px 0;
  background: none;
  border: 0;
  border-bottom: 1px solid transparent;
  margin-bottom: -1px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color .3s var(--ease), border-color .3s var(--ease);
}
.filter:hover { color: var(--ink); }
.filter.is-active { color: var(--ink); border-bottom-color: var(--gold); }
.filter__count { color: var(--gold); margin-left: 6px; font-size: 10px; }

.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
@media (min-width: 768px) { .gallery { gap: 16px; } }
@media (min-width: 960px) { .gallery { grid-template-columns: repeat(3, 1fr); gap: 20px; } }

.gallery__item { animation: galleryIn .6s var(--ease) both; }
@keyframes galleryIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.gallery__btn {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: #ece8e1;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  text-align: left;
  cursor: zoom-in;
}
.gallery__btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.1s var(--ease);
}
.gallery__btn::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(16,16,16,.72) 0%, rgba(16,16,16,.3) 28%, rgba(16,16,16,0) 55%);
  pointer-events: none;
}
.gallery__btn:hover img { transform: scale(1.04); }
.gallery__caption {
  position: absolute;
  left: 12px; right: 12px; bottom: 12px;
  z-index: 1;
  color: var(--white);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.gallery__type {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold);
}
.gallery__name { font-family: var(--serif); font-size: 17px; line-height: 1.15; }
@media (min-width: 768px) {
  .gallery__caption { left: 22px; right: 22px; bottom: 20px; gap: 4px; }
  .gallery__type { font-size: 10px; }
  .gallery__name { font-size: 22px; }
}

.portfolio__footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-top: 48px;
}
@media (min-width: 600px) {
  .portfolio__footer { flex-direction: row; justify-content: center; }
}

/* ---------- 5. Como funciona ---------- */

.process { background: var(--green); color: var(--bg); }
.process .title { color: var(--white); max-width: 640px; }
.steps { display: grid; gap: 0; border-top: 1px solid rgba(204,159,115,.35); }
.step {
  display: grid;
  grid-template-columns: 56px 1fr;
  column-gap: 12px;
  padding: 28px 0;
  border-bottom: 1px solid rgba(248,246,242,.12);
}
.step__num {
  grid-row: span 2;
  font-family: var(--serif);
  font-size: 30px;
  line-height: 1;
  color: var(--gold);
}
.step h3 { font-family: var(--serif); font-size: 24px; line-height: 1.2; color: var(--white); margin-bottom: 6px; }
.step p { font-size: 15px; color: rgba(248,246,242,.75); }

@media (min-width: 960px) {
  .steps { grid-template-columns: repeat(5, 1fr); gap: 32px; border-top: 0; }
  .step {
    display: block;
    padding: 32px 0 0;
    border-bottom: 0;
    border-top: 1px solid rgba(204,159,115,.45);
  }
  .step__num { display: block; font-size: 44px; margin-bottom: 28px; }
  .step h3 { font-size: 24px; margin-bottom: 10px; }
}
.process__cta { margin-top: 56px; display: flex; justify-content: center; }

/* ---------- 6. Diferenciais ---------- */

.quality .title { max-width: 720px; }
.quality__grid { display: grid; gap: 48px; }
@media (min-width: 768px) { .quality__grid { grid-template-columns: repeat(3, 1fr); gap: 32px; } }
@media (min-width: 1200px) { .quality__grid { gap: 48px; } }
.quality__img { aspect-ratio: 4 / 5; overflow: hidden; background: #ece8e1; margin-bottom: 28px; }
.quality__img img { width: 100%; height: 100%; object-fit: cover; }
.quality__item h3 {
  font-family: var(--serif);
  font-size: 28px;
  margin-bottom: 10px;
  padding-top: 18px;
  border-top: 1px solid var(--gold);
  display: inline-block;
  min-width: 60%;
}
.quality__item p { color: var(--muted); font-size: 15px; max-width: 360px; }

/* ---------- 7. Chamada final ---------- */

.final { background: var(--green); color: var(--bg); padding: var(--section-y) 0; text-align: center; }
.final__inner { display: flex; flex-direction: column; align-items: center; }
.final__inner::before { content: ""; width: 1px; height: 56px; background: var(--gold); margin-bottom: 40px; }
.final__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(38px, 7vw, 68px);
  line-height: 1.05;
  max-width: 820px;
  color: var(--white);
}
.final__text { margin: 24px 0 44px; max-width: 480px; color: rgba(248,246,242,.78); }

/* ---------- 8. Rodapé ---------- */

.footer {
  background: var(--green);
  color: rgba(248,246,242,.78);
  font-size: 14px;
  border-top: 1px solid rgba(204,159,115,.3);
  padding: 72px 0 0;
}
.footer__grid { display: grid; gap: 40px; padding-bottom: 56px; }
@media (min-width: 768px) { .footer__grid { grid-template-columns: 2fr 1fr 1fr; gap: 48px; } }
.footer__brand img { height: 64px; width: auto; margin-bottom: 20px; }
.footer__brand p { max-width: 300px; }
.footer__col h3 {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}
.footer__col a { display: flex; align-items: center; gap: 10px; padding: 4px 0; transition: color .3s var(--ease); }
.footer__col a:hover { color: var(--white); }
.footer__icon { width: 16px; height: 16px; color: var(--gold); }
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 24px;
  padding-bottom: 96px;
  border-top: 1px solid rgba(248,246,242,.12);
  font-size: 12px;
  color: rgba(248,246,242,.55);
}
@media (max-width: 767px) { .footer__bottom { flex-direction: column; padding-right: 80px; } }
@media (min-width: 768px) { .footer__bottom { padding-bottom: 28px; padding-right: 100px; } }

/* ---------- Botão flutuante ---------- */

.wa-float {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 60;
  width: 54px; height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: var(--gold);
  border: 1px solid rgba(204,159,115,.6);
  box-shadow: 0 6px 20px rgba(16,16,16,.14);
  transition: background-color .35s var(--ease), color .35s var(--ease), transform .35s var(--ease);
}
.wa-float svg { width: 24px; height: 24px; }
.wa-float:hover { background: var(--gold); color: var(--ink); transform: translateY(-2px); }
@media (min-width: 768px) { .wa-float { right: 28px; bottom: 28px; width: 58px; height: 58px; } }

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(12, 14, 13, .96);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .35s var(--ease);
  touch-action: pan-y;
}
.lightbox[hidden] { display: none; }
.lightbox.is-open { opacity: 1; }

.lightbox__stage {
  margin: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 0 0;
  overflow: hidden;
}
.lightbox__track {
  flex: 1;
  min-height: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  will-change: transform;
}
.lightbox__img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  transition: opacity .25s var(--ease);
}
.lightbox__img.is-loading { opacity: 0; }

.lightbox__caption {
  width: 100%;
  max-width: 1100px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px 24px;
  padding: 18px 20px calc(20px + env(safe-area-inset-bottom));
}
.lightbox__caption > div:first-child { display: flex; flex-direction: column; gap: 2px; }
.lightbox__type { font-size: 10px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.lightbox__name { font-family: var(--serif); font-size: 22px; line-height: 1.2; }
.lightbox__side { display: flex; align-items: center; gap: 24px; }
.lightbox__count { font-size: 12px; letter-spacing: .14em; color: rgba(248,246,242,.6); font-variant-numeric: tabular-nums; }
.lightbox__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  padding: 10px 14px;
  border: 1px solid rgba(204,159,115,.7);
  transition: background-color .3s var(--ease), color .3s var(--ease);
}
.lightbox__cta .btn__icon { color: var(--gold); width: 14px; height: 14px; }
.lightbox__cta:hover { background: var(--gold); color: var(--ink); }
.lightbox__cta:hover .btn__icon { color: var(--ink); }

.lightbox__close,
.lightbox__nav {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  background: none;
  border: 0;
  color: var(--bg);
  transition: color .3s var(--ease);
}
.lightbox__close:hover, .lightbox__nav:hover { color: var(--gold); }
.lightbox__close svg, .lightbox__nav svg { width: 28px; height: 28px; }
.lightbox__close { top: 8px; right: 8px; }
.lightbox__nav { top: 50%; transform: translateY(-50%); display: none; }
.lightbox__nav--prev { left: 12px; }
.lightbox__nav--next { right: 12px; }
.lightbox__nav--next svg { transform: scaleX(-1); }

@media (min-width: 768px) {
  .lightbox__nav { display: grid; width: 64px; height: 64px; }
  .lightbox__nav svg { width: 36px; height: 36px; }
  .lightbox__nav--prev { left: 20px; }
  .lightbox__nav--next { right: 20px; }
  .lightbox__close { top: 16px; right: 20px; }
  .lightbox__track { padding: 0 104px; }
  .lightbox__stage { padding-top: 72px; }
  .lightbox__caption { padding: 22px 104px 28px; max-width: none; }
  .lightbox__name { font-size: 26px; }
}
@media (max-width: 599px) {
  .lightbox__caption { flex-direction: column; align-items: stretch; }
  .lightbox__side { justify-content: space-between; }
}

body.no-scroll { position: fixed; left: 0; right: 0; overflow: hidden; }

/* ---------- Animações de entrada ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .gallery__item { animation: none; }
  .gallery__btn img, .gallery__btn:hover img { transition: none; transform: none; }
}
