/* =========================================================
   Giovana Santiago, arquiteta
   Direção: a página é uma prancha de projeto. A planta se
   desenha, vira maquete e acende o LED do espelho orgânico,
   a assinatura do feed dela. O resto fica quieto.
   ========================================================= */

:root {
  --reboco: #EBDDD2;         /* fundo: a parede rosada do avatar */
  --linho: #F7F0EA;          /* superfície da prancha */
  --nogueira: #33241D;       /* texto: madeira escura (12:1 no reboco) */
  --nogueira-suave: #6A564B; /* texto de apoio (5.2:1 no reboco) */
  --caramelo: #97572F;       /* ação: a faixa dos posts (branco sobre ele 5.6:1) */
  --caramelo-fundo: #7E4521; /* ação pressionada e links de texto (5.7:1 no reboco) */
  --salvia: #8D9A82;         /* apoio: o sofá, marcadores */
  --led: #F6B874;            /* a luz do espelho; só brilho, nunca texto */
  --noite: #241915;          /* a sala com a luz acesa */
  --noite-texto: #F2E6DC;
  --noite-suave: #CDB8A9;

  --f-titulo: "Marcellus", "Times New Roman", serif;
  --f-texto: "Albert Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --motion-instant: 80ms;
  --motion-fast: 140ms;
  --motion-standard: 220ms;
  --motion-emphasis: 320ms;
  --motion-scene: 450ms;
  --ease-enter: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-exit: cubic-bezier(0.7, 0, 0.84, 0);
  --ease-standard: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-emphasis: cubic-bezier(0.22, 1, 0.36, 1);
  --shift-md: 14px;
  --press-scale: 0.98;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --gutter: 20px;
  --coluna: 560px;
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --shift-md: 0px;
    --press-scale: 1;
    --motion-scene: 200ms;
  }
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--reboco);
  color: var(--nogueira);
  font-family: var(--f-texto);
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }

h1, h2, h3 { margin: 0; font-weight: 400; }

h1, h2 {
  font-family: var(--f-titulo);
  letter-spacing: -0.005em;
  text-wrap: balance;
}

h1 { font-size: clamp(32px, 9.4vw, 40px); line-height: 1.1; }
h2 { font-size: clamp(27px, 7.6vw, 32px); line-height: 1.15; }
h3 { font-size: 17px; font-weight: 600; line-height: 1.3; }

p { margin: 0; }

.texto {
  max-width: 34em;
  color: var(--nogueira-suave);
  font-size: 16px;
}

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--nogueira);
  outline-offset: 3px;
  border-radius: 4px;
}

.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.pular {
  position: absolute;
  left: var(--gutter);
  top: calc(8px + var(--safe-top));
  z-index: 40;
  padding: 10px 14px;
  background: var(--nogueira);
  color: var(--linho);
  text-decoration: none;
  border-radius: 8px;
  transform: translateY(-160%);
}
.pular:focus-visible { transform: none; }

.marco-scroll {
  position: absolute;
  top: 160px;
  left: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

/* ---------- Hero ---------- */

.hero {
  display: flex;
  flex-direction: column;
  gap: 22px;
  /* faixa de largura total (a noite pinta tudo); conteúdo na coluna */
  padding: calc(28px + var(--safe-top)) max(var(--gutter), calc((100% - var(--coluna)) / 2)) 40px;
  background: var(--reboco);
  transition:
    background-color var(--motion-scene) var(--ease-standard),
    color var(--motion-scene) var(--ease-standard);
}

.hero.is-noite { background: var(--noite); color: var(--noite-texto); }
.hero.is-noite .cargo,
.hero.is-noite .lead,
.hero.is-noite .palco-legenda { color: var(--noite-suave); }
.hero.is-noite :focus-visible { outline-color: var(--noite-texto); }

.assinatura {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 26px;
}

.avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 2px var(--reboco), 0 0 0 3.5px var(--caramelo);
}

.nome {
  font-family: var(--f-titulo);
  font-size: 21px;
  line-height: 1.15;
}

.cargo {
  color: var(--nogueira-suave);
  font-size: 14px;
  transition: color var(--motion-scene) var(--ease-standard);
}

.hero h1 { max-width: 11em; }

.lead {
  margin-top: 14px;
  max-width: 30em;
  color: var(--nogueira-suave);
  font-size: 17px;
  transition: color var(--motion-scene) var(--ease-standard);
}

/* palco da maquete */
.palco { margin: 0; }

.palco-quadro {
  position: relative;
  width: calc(100% + 2 * var(--gutter));
  max-width: 480px;
  margin: 0 calc(-1 * var(--gutter));
  aspect-ratio: 1 / 1;
}

@media (min-width: 520px) {
  .palco-quadro { width: 100%; margin: 0 auto; }
}

.planta,
.maquete {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.planta {
  transition: opacity var(--motion-scene) var(--ease-standard);
}

.maquete {
  opacity: 0;
  touch-action: pan-y;
  cursor: grab;
  transition: opacity var(--motion-scene) var(--ease-standard);
}
.maquete:active { cursor: grabbing; }

.palco.is-3d .maquete { opacity: 1; }
.palco.is-3d .planta { opacity: 0; }

.traco path,
.traco rect,
.traco circle {
  fill: none;
  stroke: var(--nogueira);
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.traco-parede path { fill: var(--nogueira); fill-opacity: 0.88; stroke-width: 1.4; }
.traco-fino path { stroke-width: 1; }
.traco-movel > * { stroke-width: 1.3; }
.traco-projecao > * { stroke-width: 1; stroke-dasharray: 5 5; opacity: 0.7; }
.traco-cota path { stroke: var(--caramelo-fundo); stroke-width: 1; }

.rotulos text {
  fill: var(--nogueira-suave);
  font-family: var(--f-texto);
  font-size: 19px;
}
.rotulos .rotulo-ambiente {
  fill: var(--nogueira);
  font-family: var(--f-titulo);
  font-size: 28px;
}

/* o desenho da planta: um traço por vez, uma única vez */
@media (prefers-reduced-motion: no-preference) {
  .js .planta .traco-parede path,
  .js .planta .traco-fino path,
  .js .planta .traco-movel > *,
  .js .planta .traco-cota path {
    animation: desenha 640ms var(--ease-standard) both;
    animation-delay: calc(var(--i, 0) * 38ms);
  }
  .js .planta .traco-parede path {
    animation-name: desenha, preenche;
    animation-duration: 640ms, 360ms;
    animation-delay: calc(var(--i, 0) * 38ms), 520ms;
  }
  .js .planta .traco-projecao,
  .js .planta .rotulos {
    animation: aparece 420ms var(--ease-enter) 760ms both;
  }
}

@keyframes desenha {
  0%   { stroke-dasharray: 1; stroke-dashoffset: 1; }
  99%  { stroke-dasharray: 1; stroke-dashoffset: 0; }
  100% { stroke-dasharray: none; stroke-dashoffset: 0; }
}
@keyframes preenche { from { fill-opacity: 0; } to { fill-opacity: 0.88; } }
@keyframes aparece { from { opacity: 0; } to { opacity: 1; } }

.palco-legenda {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 48px;
  margin-top: 8px;
  color: var(--nogueira-suave);
  font-size: 14px;
  line-height: 1.4;
  transition: color var(--motion-scene) var(--ease-standard);
}

.palco.is-3d .palco-descricao { display: none; }

.btn-luz {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 18px;
  border: 1.5px solid currentColor;
  border-radius: 999px;
  background: transparent;
  color: var(--nogueira);
  font: 600 15px/1 var(--f-texto);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform var(--motion-fast) var(--ease-standard),
    background-color var(--motion-standard) var(--ease-standard),
    color var(--motion-standard) var(--ease-standard);
}
.btn-luz:active { transform: scale(var(--press-scale)); }
.btn-luz[hidden] { display: none; }

.btn-luz-ponto {
  width: 10px;
  height: 10px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  transition: background-color var(--motion-standard) var(--ease-standard), box-shadow var(--motion-standard) var(--ease-standard);
}

.hero.is-noite .btn-luz { color: var(--noite-texto); }
.hero.is-noite .avatar { box-shadow: 0 0 0 2px var(--noite), 0 0 0 3.5px var(--led); }
.btn-luz.is-acesa .btn-luz-ponto {
  border-color: var(--led);
  background: var(--led);
  box-shadow: 0 0 10px 2px rgba(246, 184, 116, 0.75);
}

.ancora {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  color: var(--caramelo-fundo);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  transition: color var(--motion-scene) var(--ease-standard);
}
.hero.is-noite .ancora { color: var(--led); }

/* ---------- Seções ---------- */

main > section {
  max-width: calc(var(--coluna) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 56px var(--gutter);
}

main > section > h2 + .texto,
.dicas-topo .texto { margin-top: 12px; }

/* consultoria: uma prancha só, com carimbo */
.consultoria { padding-top: 24px; }

.prancha {
  padding: 28px 22px 24px;
  background: var(--linho);
  border: 1px solid rgba(51, 36, 29, 0.22);
  border-radius: 3px;
}

.preco {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  margin: 18px 0 14px;
}
.preco-valor {
  color: var(--caramelo-fundo);
  font-family: var(--f-titulo);
  font-size: 46px;
  line-height: 1;
}
.preco-unidade { color: var(--nogueira-suave); font-size: 16px; }

.etapas {
  display: grid;
  gap: 26px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
}

.etapa {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 14px;
}

/* o balão de chamada de detalhe, como nas pranchas */
.etapa-num {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1.5px solid var(--nogueira);
  border-radius: 50%;
  font-family: var(--f-titulo);
  font-size: 19px;
  line-height: 1;
}

.etapa h3 { margin: 6px 0 6px; }
.etapa p { color: var(--nogueira-suave); }

.entregas {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}
.entregas li {
  position: relative;
  padding-left: 20px;
}
.entregas li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 7px;
  height: 7px;
  background: var(--salvia);
}

.carimbo {
  width: 100%;
  margin: 30px 0 24px;
  border-collapse: collapse;
  font-size: 15px;
}
.carimbo caption {
  padding-bottom: 8px;
  color: var(--nogueira-suave);
  font-size: 13px;
  text-align: left;
}
.carimbo th,
.carimbo td {
  padding: 9px 12px;
  border: 1px solid rgba(51, 36, 29, 0.35);
  text-align: left;
  vertical-align: top;
}
.carimbo th {
  width: 40%;
  color: var(--nogueira-suave);
  font-weight: 400;
  font-size: 13px;
}

/* botões */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 12px;
  font: 600 16px/1.2 var(--f-texto);
  text-align: center;
  text-decoration: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform var(--motion-fast) var(--ease-standard),
    background-color var(--motion-fast) var(--ease-standard),
    border-color var(--motion-fast) var(--ease-standard);
}
.btn:active { transform: scale(var(--press-scale)); }
.btn .fa-brands { font-size: 20px; }

.btn-principal {
  background: var(--caramelo);
  color: #FFFFFF;
}
.btn-principal:active { background: var(--caramelo-fundo); }

.btn-contorno {
  border: 1.5px solid var(--nogueira);
  color: var(--nogueira);
}
.btn-contorno:active { background: rgba(51, 36, 29, 0.08); }

@media (hover: hover) and (pointer: fine) {
  .btn-principal:hover { background: var(--caramelo-fundo); }
  .btn-contorno:hover { background: rgba(51, 36, 29, 0.06); }
}

.prancha .btn { width: 100%; }

.link-texto {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--caramelo-fundo);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

/* projeto */
.projeto-destaque { margin: 28px 0 0; }
.projeto-destaque img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 3px;
  background: var(--linho);
}
.projeto-destaque figcaption { padding-top: 16px; }
.projeto-destaque p { margin-top: 6px; color: var(--nogueira-suave); }

/* dicas: faixa horizontal com scroll nativo */
.dicas { padding-left: 0; padding-right: 0; }
.dicas-topo { padding: 0 var(--gutter); }

.dicas-lista {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(64%, 240px);
  gap: 14px;
  margin: 24px 0 0;
  padding: 0 var(--gutter) 6px;
  list-style: none;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  scrollbar-width: none;
}
.dicas-lista::-webkit-scrollbar { display: none; }
.dicas-lista li { scroll-snap-align: start; }

.dicas-lista a {
  display: grid;
  gap: 10px;
  text-decoration: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform var(--motion-fast) var(--ease-standard);
}
.dicas-lista a:active { transform: scale(var(--press-scale)); }
.dicas-lista img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 3px;
  background: var(--linho);
}
.dicas-lista span {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
}

/* fim */
.fim { padding-bottom: 40px; }

.fim-retrato {
  width: min(62%, 250px);
  margin: 0 auto 34px;
  /* o LED atrás do espelho, estático: o brilho segue o recorte */
  filter: drop-shadow(0 0 14px rgba(246, 184, 116, 0.95)) drop-shadow(0 0 4px rgba(246, 184, 116, 0.9));
}
.fim-retrato img {
  width: 100%;
  aspect-ratio: 524 / 640;
  object-fit: cover;
  -webkit-clip-path: url(#forma-espelho);
  clip-path: url(#forma-espelho);
}

.fim h2 { max-width: 12em; }
.fim .texto { margin-top: 12px; }

.acoes {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}

/* ---------- Rodapé ---------- */

.rodape {
  max-width: calc(var(--coluna) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 28px var(--gutter) calc(28px + var(--safe-bottom));
  border-top: 1px solid rgba(51, 36, 29, 0.18);
  color: var(--nogueira-suave);
  font-size: 13px;
  text-align: center;
}

.credito {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 14px;
  min-height: 44px;
  margin: 18px auto 0;
  color: var(--nogueira);
  text-align: left;
  font-size: 13px;
  line-height: 1.35;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.credito-txt strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.selo-b2 {
  --seal-ink: currentColor;
  --seal-accent: var(--caramelo);
  --seal-ring: 2 1.2;          /* linha tracejada de projeção, como na planta */
  --seal-font: var(--f-texto);
  flex: none;
  width: 70px;
  height: 70px;
  overflow: visible;
  transition: rotate 320ms cubic-bezier(0.22, 1, 0.36, 1);
}
.selo-borda,
.selo-anel { fill: none; stroke: var(--seal-ink); }
.selo-borda { stroke-width: 1; }
.selo-anel { stroke-width: 0.7; stroke-dasharray: var(--seal-ring); opacity: 0.75; }
.selo-texto {
  fill: var(--seal-ink);
  font-family: var(--seal-font);
  font-size: 6.3px;
  font-weight: 600;
  letter-spacing: 0.8px;
}
.selo-b { fill: var(--seal-ink); }
.selo-acento { fill: var(--seal-accent); }

.credito:active .selo-b2 { rotate: -10deg; }

.selo-giro {
  transform-box: view-box;
  transform-origin: 50px 50px;
}
@keyframes selo-gira { to { transform: rotate(360deg); } }
@keyframes selo-flutua {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -3px; }
}
@media (prefers-reduced-motion: no-preference) {
  .selo-giro { animation: selo-gira 24s linear infinite; }
  .selo-b2 { animation: selo-flutua 4.8s ease-in-out infinite; }
  .selo-b2.is-still,
  .selo-b2.is-still .selo-giro,
  .is-page-hidden .selo-b2,
  .is-page-hidden .selo-giro { animation-play-state: paused; }
}
@media (prefers-reduced-motion: reduce) {
  .credito:active .selo-b2 { rotate: none; }
}

/* ---------- CTA flutuante (Regra do CTA) ---------- */

.cta-flutuante {
  position: fixed;
  left: 50%;
  bottom: calc(16px + var(--safe-bottom));
  z-index: 30;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 10px 26px -8px rgba(51, 36, 29, 0.55);
  translate: -50% 16px;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity var(--motion-standard) var(--ease-exit),
    translate var(--motion-standard) var(--ease-exit),
    transform var(--motion-fast) var(--ease-standard),
    visibility 0s linear var(--motion-standard);
}
.cta-flutuante.is-visivel {
  translate: -50% 0;
  opacity: 1;
  visibility: visible;
  transition:
    opacity var(--motion-emphasis) var(--ease-enter),
    translate var(--motion-emphasis) var(--ease-enter),
    transform var(--motion-fast) var(--ease-standard),
    visibility 0s;
}
@media (prefers-reduced-motion: reduce) {
  .cta-flutuante,
  .cta-flutuante.is-visivel { translate: -50% 0; }
}

/* ---------- Reveal (só com JS) ---------- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(var(--shift-md));
  transition:
    opacity var(--motion-scene) var(--ease-enter),
    transform var(--motion-scene) var(--ease-enter);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .hero,
  .cargo,
  .lead,
  .ancora,
  .palco-legenda,
  .planta,
  .maquete { transition-duration: 200ms; }
}
