:root {
  --green: #2c5236;
  --gr: #29af4c;
  --ink: #233b2a;
  --paper: #f5f4ee;
  --muted: #536052;
  --line: #e3e8e5;
  --soft: #f4f6f5;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Montserrat', system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle at 15% 10%, rgba(41, 175, 76, .08), transparent 45%),
              radial-gradient(circle at 90% 85%, rgba(44, 82, 54, .07), transparent 40%),
              radial-gradient(#dfe6e1 1px, transparent 1px) 0 0 / 28px 28px;
  opacity: .85;
  pointer-events: none;
}

a {
  color: inherit;
}

.wrap {
  width: min(1200px, calc(100% - 96px));
  margin-inline: auto;
}

/* Header */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 112px;
  border-bottom: 1px solid #2c523629;
}

.brand {
  display: flex;
}

.brand img {
  width: 132px;
  height: 60px;
  object-fit: contain;
}

.header-label,
.eyebrow,
.note-number,
.category,
.catalog-caption {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
}

.nav-link {
  font-size: 13px;
  text-decoration: none;
  padding: 12px 0;
  font-weight: 600;
  transition: color .2s;
}

.nav-link:hover {
  color: var(--gr);
}

.nav-link span {
  margin-left: 14px;
  font-size: 18px;
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 70px;
  padding-block: 85px 92px;
}

.eyebrow {
  margin: 0 0 25px;
  display: inline-flex;
  align-items: center;
}

.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gr);
  margin-right: 10px;
}

h1 {
  font-size: clamp(48px, 5.5vw, 78px);
  line-height: 1.06;
  letter-spacing: -.04em;
  margin: 0;
  font-weight: 800;
  color: var(--green);
}

em {
  font-family: Georgia, serif;
  font-weight: 400;
}

h1 em {
  color: var(--gr);
  font-style: italic;
}

.intro {
  max-width: 450px;
  color: var(--muted);
  font-size: 16px;
  margin: 28px 0;
  font-weight: 500;
}

.button {
  display: inline-flex;
  gap: 28px;
  align-items: center;
  background: var(--green);
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  padding: 16px 28px;
  border-radius: 999px;
  letter-spacing: .08em;
  transition: transform .25s ease, background .25s ease, box-shadow .25s ease;
  box-shadow: 0 10px 24px -10px rgba(44, 82, 54, .6);
}

.button:hover {
  background: var(--gr);
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -10px rgba(41, 175, 76, .7);
}

.hero-note {
  align-self: end;
  max-width: 310px;
  justify-self: end;
}

.hero-note > p:last-child {
  color: var(--muted);
  font-size: 13px;
}

.note-number {
  font-size: 9px;
  margin: 26px 0 16px;
  color: var(--gr);
}

.note-title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
  color: var(--green);
}

.motif {
  width: 140px;
  height: 140px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  transform: rotate(-12deg);
  margin: 0 0 36px 18px;
}

.motif span {
  position: relative;
  background: var(--green);
}

.motif span:nth-child(2) {
  background: #abb9a1;
}

.motif span:nth-child(3) {
  background: #decdb1;
}

.motif span:nth-child(4) {
  background: #aa6048;
}

.motif span:nth-child(odd):after {
  content: "";
  position: absolute;
  right: -12px;
  top: 24px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: inherit;
  z-index: 1;
}

.motif span:nth-child(-n+2):before {
  content: "";
  position: absolute;
  bottom: -12px;
  left: 24px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: inherit;
  z-index: 2;
}

/* Catalog / Encontre a sua próxima peça */
.catalog {
  border-top: 1px solid #2c523629;
  padding-top: 48px;
  scroll-margin-top: 20px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  align-items: flex-end;
  margin-bottom: 44px;
}

.section-heading .eyebrow {
  margin-bottom: 12px;
  color: var(--gr);
}

h2 {
  font-size: clamp(28px, 3.2vw, 42px);
  letter-spacing: -.03em;
  line-height: 1.2;
  margin: 0;
  font-weight: 800;
  color: var(--green);
}

.section-heading > p {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
  font-weight: 500;
}

/* ==========================================================================
   PUZZLE STAGE & ANIMATION (FACOPI GESTÃO INTEGRADA)
   ========================================================================== */
.stage {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 44px;
  align-items: center;
  margin-bottom: 36px;
}

.puzzle-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.puzzle {
  position: relative;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}

.puzzle svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

.piece {
  --tx: 0px;
  --ty: 0px;
  --r: 0deg;
  opacity: 0;
  pointer-events: none;
  outline: none;
  transform: translate(var(--tx), var(--ty)) rotate(var(--r));
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 1.8s cubic-bezier(.65, 0, .2, 1), opacity 1s ease;
}

.in .piece {
  opacity: 1;
}

.joined .piece {
  --tx: 0px !important;
  --ty: 0px !important;
  --r: 0deg !important;
  pointer-events: auto;
  cursor: pointer;
}

.hv {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform .5s cubic-bezier(.2, .7, .2, 1), opacity .5s ease, filter .5s ease;
}

.joined .piece.dim .hv {
  opacity: .42;
}

.joined .piece.on .hv {
  transform: scale(1.035);
  filter: drop-shadow(0 10px 22px rgba(41, 175, 76, .45));
}

.joined .piece.sel .hv {
  transform: scale(1.075);
  filter: drop-shadow(0 0 16px rgba(41, 175, 76, .75));
}

.piece .hv > path {
  stroke: rgba(255, 255, 255, .92);
  stroke-width: 2.5;
  stroke-linejoin: round;
}

.piece:focus-visible .hv > path {
  stroke: var(--ink);
  stroke-width: 3.5;
}

.piece text {
  fill: #fff;
  font-family: inherit;
  font-weight: 700;
  letter-spacing: .12em;
  pointer-events: none;
  user-select: none;
}

.piece .t {
  font-size: 13px;
  letter-spacing: .1em;
  font-weight: 800;
}

.piece .b {
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: .02em;
  opacity: .92;
}

.ic {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform .5s cubic-bezier(.2, .7, .2, 1);
}

.joined .piece.on .ic {
  transform: scale(1.1);
}

.joined .ic {
  animation: pop 1s ease 2.1s;
}

@keyframes pop {
  0%, 100% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.14);
  }
}

.joined #pieces {
  filter: drop-shadow(0 18px 28px rgba(44, 82, 54, .2));
}

.core {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  transition: opacity .8s ease .9s;
  pointer-events: none;
}

.joined .core {
  opacity: 1;
}

.ring {
  fill: none;
  stroke: var(--gr);
  stroke-width: 1.5;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}

.joined .ring {
  animation: pulse 2.8s ease-out 1.4s infinite;
}

@keyframes pulse {
  0% {
    opacity: .7;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(5);
  }
}

/* Painel de Informações Interativo */
.info {
  min-height: 290px;
  background: rgba(255, 255, 255, .88);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 34px;
  backdrop-filter: blur(8px);
  box-shadow: 0 20px 50px -30px rgba(44, 82, 54, .35);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.info::before {
  content: "";
  position: absolute;
  left: 0;
  top: 32px;
  bottom: 32px;
  width: 4px;
  border-radius: 4px;
  background: linear-gradient(var(--gr), var(--green));
}

.info .swap {
  animation: infoUp .45s cubic-bezier(.2, .7, .2, 1) both;
}

@keyframes infoUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.info-category {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .18em;
  color: var(--gr);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.info h2 {
  margin: 0 0 10px;
  font-size: 24px;
  letter-spacing: .04em;
  color: var(--green);
  font-weight: 800;
}

.info p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  font-size: 15.5px;
  font-weight: 500;
}

.info ul.info-features {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.info ul.info-features li {
  display: flex;
  gap: 10px;
  font-size: 14.5px;
  line-height: 1.5;
  font-weight: 500;
  color: var(--ink);
}

.info ul.info-features li::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--gr);
}

.hint {
  display: block;
  margin-top: 18px;
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gr);
  font-weight: 700;
}

.info-actions {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.btn-app {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 28px;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: .1em;
  font-size: 12.5px;
  transition: transform .25s ease, background .25s ease, box-shadow .25s ease;
  box-shadow: 0 8px 20px -8px rgba(44, 82, 54, .6);
}

.btn-app:hover,
.btn-app:focus-visible {
  background: var(--gr);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -10px rgba(41, 175, 76, .7);
}

.replay {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 22px auto 0;
  background: none;
  border: 1px solid rgba(44, 82, 54, .18);
  border-radius: 999px;
  padding: 8px 22px;
  font: inherit;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .08em;
  cursor: pointer;
  transition: all .25s ease;
}

.replay:hover {
  color: var(--green);
  border-color: var(--gr);
  background: rgba(41, 175, 76, .06);
}

/* Rodapé do Catálogo */
.catalog-caption {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 9px;
  letter-spacing: .06em;
  padding-top: 24px;
}

.catalog-caption p {
  margin: 0;
}

.catalog-caption .dot {
  margin: 0;
  flex-shrink: 0;
}

.caption-line {
  height: 1px;
  background: #2c523629;
  flex: 1;
}

/* Closing */
.closing {
  position: relative;
  padding-block: 95px;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  column-gap: 50px;
}

.closing .eyebrow {
  grid-column: 1 / -1;
  color: var(--gr);
}

.closing h2 {
  font-size: clamp(35px, 4.2vw, 56px);
}

.closing > p:last-child {
  align-self: end;
  justify-self: end;
  font-size: 14px;
  color: var(--muted);
}

/* Footer */
.footer {
  border-top: 1px solid #2c523629;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 28px 35px;
  font-size: 11px;
}

.wordmark {
  font-size: 23px;
  letter-spacing: -1px;
  font-weight: 700;
}

.wordmark > span {
  font-family: Georgia, serif;
  font-style: italic;
  font-weight: 400;
  color: var(--gr);
}

.wordmark small {
  display: block;
  font-size: 9px;
  letter-spacing: 1px;
  font-weight: 400;
  color: var(--muted);
}

.footer p {
  color: var(--muted);
}

.footer a {
  text-decoration: none;
  padding: 10px 0;
}

.skip {
  position: fixed;
  top: 10px;
  left: 10px;
  transform: translateY(-150%);
  z-index: 10;
  background: var(--green);
  color: #fff;
  padding: 12px;
}

.skip:focus {
  transform: none;
}

a:focus-visible {
  outline: 3px solid var(--gr);
  outline-offset: 5px;
}

/* Responsividade */
@media (max-width: 1000px) {
  .wrap {
    width: calc(100% - 56px);
  }
  .hero {
    gap: 35px;
  }
  .hero-note {
    max-width: 250px;
  }
  .header-label {
    display: none;
  }
}

@media (max-width: 900px) {
  .stage {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .puzzle {
    max-width: 420px;
  }
  .info {
    padding: 26px 24px;
    min-height: 220px;
  }
}

@media (max-width: 759px) {
  .wrap {
    width: calc(100% - 40px);
  }
  .header {
    min-height: 88px;
    gap: 12px;
  }
  .brand img {
    width: 108px;
    height: 48px;
  }
  .nav-link {
    font-size: 11px;
  }
  .nav-link span {
    margin-left: 10px;
  }
  .hero {
    grid-template-columns: 1fr;
    padding-block: 52px;
    gap: 45px;
  }
  h1 {
    font-size: clamp(43px, 9.5vw, 68px);
  }
  .intro {
    font-size: 14px;
  }
  .hero-note {
    max-width: none;
    justify-self: stretch;
    border-top: 1px solid #2c523629;
    padding-top: 28px;
  }
  .motif {
    float: right;
    width: 88px;
    height: 88px;
    margin: 12px 10px 18px 20px;
  }
  .motif span:nth-child(odd):after {
    width: 16px;
    height: 16px;
    right: -8px;
    top: 14px;
  }
  .motif span:nth-child(-n+2):before {
    width: 16px;
    height: 16px;
    bottom: -8px;
    left: 14px;
  }
  .note-number {
    margin-top: 0;
    max-width: 180px;
  }
  .note-title {
    font-size: 21px;
  }
  .hero-note > p:last-child {
    clear: both;
  }
  .section-heading {
    display: block;
    margin-bottom: 30px;
  }
  .section-heading > p {
    margin-top: 16px;
  }
  .section-heading > p br {
    display: none;
  }
  .catalog-caption {
    flex-wrap: wrap;
    line-height: 1.5;
  }
  .catalog-caption > span:last-child {
    display: none;
  }
  .closing {
    grid-template-columns: 1fr;
    padding-block: 65px;
    gap: 20px;
  }
  .closing .eyebrow {
    margin-bottom: 0;
  }
  .closing > p:last-child {
    justify-self: start;
  }
  .footer {
    flex-wrap: wrap;
  }
  .footer p {
    width: 100%;
    order: 3;
    margin: 0;
  }
  .footer a {
    margin-left: auto;
  }
}

/* Acessibilidade: Movimento Reduzido */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    transition-duration: .01s !important;
    animation-duration: .01s !important;
    transition-delay: 0s !important;
  }
}
