/* =========================================================
   Diária Própria — camada visual v2
   Ícones SVG, animações de obra, simulador, casa em construção.
   Carregar DEPOIS de base.css. Há uma cópia deste arquivo no projeto da prova.
   ========================================================= */

:root {
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-back: cubic-bezier(0.34, 1.4, 0.64, 1);
  --t-fast: 180ms;
  --t-mid: 420ms;
}

/* ---------- Ícones ---------- */
.ico {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  vertical-align: -0.2em;
}
.topbar__label { display: inline-flex; align-items: center; gap: 6px; }
.microcopy, .kicker, .tip, .viewers, .sticky-cta { display: flex; align-items: center; justify-content: center; gap: 8px; }
.tip { display: flex; }
.tip .ico { color: var(--yellow); }
.sticky-cta { display: flex; }

/* ---------- Faixa zebrada em movimento ---------- */
.hazard--move {
  background-size: 62px 62px;
  animation: hazard-move 2.4s linear infinite;
}
@keyframes hazard-move { to { background-position: 62px 0; } }

/* grade de "planta" no fundo do topo */
.hero__blueprint {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 194, 26, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 194, 26, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
}
.hero__inner { position: relative; }

/* ---------- Cena do topo ---------- */
.hero__media { position: relative; }
.scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.scene .brick,
.scene__level,
.scene__bubble { transform-box: fill-box; transform-origin: center; }

.scene.is-on .brick {
  animation: brick-drop 0.5s var(--ease-back) both;
  animation-delay: calc(var(--i) * 45ms);
}
@keyframes brick-drop {
  from { opacity: 0; transform: translateY(-160px) rotate(-6deg); }
  70% { opacity: 1; }
  to { opacity: 1; transform: none; }
}
.scene.is-on .scene__level {
  animation: level-in 0.6s var(--ease-back) both;
  animation-delay: calc(var(--bricks, 30) * 45ms + 250ms);
}
@keyframes level-in {
  from { opacity: 0; transform: translateY(-80px); }
  to { opacity: 1; transform: none; }
}
.scene.is-on .scene__bubble {
  animation: bubble-settle 1.4s var(--ease-out) both;
  animation-delay: calc(var(--bricks, 30) * 45ms + 700ms);
}
@keyframes bubble-settle {
  0% { transform: translateX(-16px); }
  40% { transform: translateX(10px); }
  65% { transform: translateX(-5px); }
  85% { transform: translateX(2px); }
  100% { transform: translateX(0); }
}
.scene__trowel { transform-box: fill-box; transform-origin: 20% 80%; animation: trowel 3.2s ease-in-out infinite; }
@keyframes trowel {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(-7deg) translateY(-4px); }
}

/* legenda do mockup sobre a cena: canto superior esquerdo */
.mockup__screen { place-items: start; }
.mockup__caption {
  position: absolute;
  top: 5%;
  left: 4%;
  padding: 0;
  text-align: left;
  z-index: 2;
}
.mockup__caption strong { font-size: clamp(1.2rem, 4vw, 2rem); text-shadow: 2px 2px 0 #000; }
.mockup__caption em { font-size: clamp(0.6rem, 1.6vw, 0.75rem); }
.play { z-index: 2; padding-left: 0; box-shadow: 0 0 0 0 rgba(255, 194, 26, 0.6); animation: play-ping 2.4s ease-out infinite; }
.play .ico { width: 22px; height: 22px; }
@keyframes play-ping {
  0% { box-shadow: 0 0 0 0 rgba(255, 194, 26, 0.55); }
  80%, 100% { box-shadow: 0 0 0 18px rgba(255, 194, 26, 0); }
}

/* etiquetas flutuantes */
.chips { list-style: none; margin: 0; padding: 0; }
.chip {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 3px solid var(--asphalt);
  border-radius: 999px;
  background: var(--paper);
  color: var(--asphalt);
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 4px 4px 0 var(--asphalt);
  animation: chip-float 4s ease-in-out infinite;
}
.chip .ico { color: var(--brick); width: 18px; height: 18px; }
.chip--1 { top: -16px; left: -18px; transform: rotate(-4deg); }
.chip--2 { top: 42%; right: -24px; background: var(--yellow); animation-delay: -1.3s; }
.chip--2 .ico { color: var(--asphalt); }
.chip--3 { bottom: -18px; left: 14%; animation-delay: -2.6s; }
@keyframes chip-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -8px; }
}

/* ---------- Revelar ao rolar ---------- */
.rv {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity var(--t-mid) ease var(--d, 0ms), transform var(--t-mid) var(--ease-out) var(--d, 0ms);
}
.rv.is-in { opacity: 1; transform: none; }

/* ---------- Simulador ---------- */
.sim__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  max-width: 980px;
  margin: 0 auto;
  align-items: stretch;
}
.sim__inputs {
  display: grid;
  gap: 26px;
  align-content: center;
  padding: clamp(22px, 4vw, 36px);
  border: 3px solid var(--asphalt);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 6px 6px 0 var(--asphalt);
}
.range { display: grid; gap: 10px; cursor: pointer; }
.range__top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.range output {
  flex: none;
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: 0.02em;
  color: var(--brick);
  font-variant-numeric: tabular-nums;
}
.range input {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 44px;              /* área de toque */
  margin: 0;
  background: transparent;
  cursor: pointer;
}
.range input::-webkit-slider-runnable-track {
  height: 12px;
  border-radius: 999px;
  border: 2px solid var(--asphalt);
  background: linear-gradient(90deg, var(--yellow) var(--fill, 50%), var(--concrete-2) var(--fill, 50%));
}
.range input::-moz-range-track {
  height: 12px;
  border-radius: 999px;
  border: 2px solid var(--asphalt);
  background: linear-gradient(90deg, var(--yellow) var(--fill, 50%), var(--concrete-2) var(--fill, 50%));
}
.range input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 30px; height: 30px;
  margin-top: -11px;
  border-radius: 8px;
  border: 3px solid var(--asphalt);
  background: var(--brick);
  box-shadow: 2px 2px 0 var(--asphalt);
  transition: transform var(--t-fast) ease;
}
.range input::-moz-range-thumb {
  width: 26px; height: 26px;
  border-radius: 8px;
  border: 3px solid var(--asphalt);
  background: var(--brick);
}
.range input:active::-webkit-slider-thumb { transform: scale(1.15); }
.range input:focus-visible { outline: 3px solid var(--asphalt); outline-offset: 4px; border-radius: 8px; }

.sim__result {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: clamp(22px, 4vw, 32px);
  border-radius: var(--radius);
  background: var(--asphalt);
  color: var(--paper);
  box-shadow: 6px 6px 0 var(--brick);
}
.sim__row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
}
.sim__row > .ico {
  width: 44px; height: 44px;
  padding: 10px;
  border-radius: 50%;
}
.sim__row--bad > .ico { background: rgba(215, 50, 42, 0.18); color: #ff8a83; }
.sim__row--good > .ico { background: rgba(31, 157, 85, 0.2); color: #5fd796; }
.sim__row--gold > .ico { background: rgba(255, 194, 26, 0.18); color: var(--yellow); }
.sim__row p { margin: 0; display: grid; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.95; }
.sim__row strong {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  line-height: 1.05;
  letter-spacing: 0.02em;
  text-transform: none;
  font-variant-numeric: tabular-nums;
}
.sim__row--bad strong { color: #ff8a83; text-decoration: line-through; text-decoration-thickness: 3px; }
.sim__row--good strong { color: #5fd796; }
.sim__row--gold strong { color: var(--yellow); }
.sim__row small { font-size: 0.75rem; text-transform: none; letter-spacing: 0; opacity: 0.8; }
.sim__result .btn { margin-top: 6px; }
.sim__aviso { margin: 0; font-size: 0.75rem; opacity: 0.65; line-height: 1.4; }

/* ---------- Obra em construção (módulos) ---------- */
.obra {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(24px, 5vw, 56px);
  align-items: start;
  margin-top: 24px;
}
.obra__visual { position: sticky; top: calc(var(--topbar-h) + 24px); }
.obra__card {
  padding: 18px;
  border: 2px solid #3a3229;
  border-top: 6px solid var(--yellow);
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--asphalt);
}
.house { display: block; width: 100%; height: auto; }
.house .s {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: 50% 100%;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.6s var(--ease-back);
}
.house .s-plan { opacity: 1; transform: none; }
.house .s-wall { transform: scaleY(0.2); }

.house[data-stage="1"] .s-cant,
.house[data-stage="2"] .s-cant, .house[data-stage="2"] .s-fund,
.house[data-stage="3"] .s-cant, .house[data-stage="3"] .s-fund, .house[data-stage="3"] .s-wall,
.house[data-stage="4"] .s-cant, .house[data-stage="4"] .s-fund, .house[data-stage="4"] .s-wall, .house[data-stage="4"] .s-reboco {
  opacity: 1;
  transform: none;
}
.house[data-stage="3"] .s-plan, .house[data-stage="4"] .s-plan { opacity: 0.15; }

.obra__info { display: grid; gap: 2px; margin-top: 12px; }
.obra__stage {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.6rem;
  line-height: 1.1;
  text-transform: uppercase;
  color: var(--yellow);
}
.obra__mod { margin: 0; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.7; }
.obra__meter { height: 10px; margin-top: 10px; border-radius: 999px; background: #2e2720; overflow: hidden; }
.obra__meter span {
  display: block;
  height: 100%;
  width: 10%;
  background: repeating-linear-gradient(-45deg, var(--yellow) 0 10px, var(--yellow-deep) 10px 20px);
  transition: width 0.5s var(--ease-out);
}

/* lista de módulos em linha do tempo */
.modules.modules--timeline {
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 0;
}
.modules--timeline .module {
  display: grid;
  grid-template-columns: 64px 1fr;
  column-gap: 16px;
  align-items: start;
  padding: 18px 20px;
  border-top: 0;
  border-left: 5px solid #3a3229;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.modules--timeline .module__num {
  grid-row: span 2;
  margin: 0;
  font-size: 2.6rem;
  -webkit-text-stroke-color: #5a4d3e;
  transition: color 0.3s ease, -webkit-text-stroke-color 0.3s ease;
}
.modules--timeline .module h3 { font-size: 1.3rem; }
.modules--timeline .module.is-done { border-left-color: var(--yellow); background: #1d1914; }
.modules--timeline .module.is-done .module__num { color: var(--yellow); -webkit-text-stroke-color: var(--yellow); }

/* ---------- Cards do Completo ---------- */
.bonus__cover { overflow: hidden; }
.bonus__cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 22px 22px;
}
.bonus__ico {
  position: relative;
  width: 76px;
  height: 76px;
  color: var(--yellow);
  filter: drop-shadow(3px 3px 0 #000);
  transition: transform var(--t-mid) var(--ease-back);
}
.bonus:hover .bonus__ico { transform: scale(1.1) rotate(-4deg); }
.bonus { transition: transform var(--t-fast) ease, box-shadow var(--t-fast) ease; }
.bonus:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--asphalt); }
.carousel__btn .ico { width: 24px; height: 24px; }

/* ---------- Planos ---------- */
.plan { transition: transform var(--t-fast) ease, box-shadow var(--t-fast) ease; }
.plan:hover { transform: translateY(-4px); }
.plan--featured::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 194, 26, 0.18) 50%, transparent 70%) -200% 0 / 200% 100% no-repeat;
  animation: shine 4.5s ease-in-out infinite;
}
@keyframes shine { 0%, 60% { background-position: -200% 0; } 100% { background-position: 200% 0; } }

.selos {
  list-style: none;
  margin: 32px auto 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 14px;
}
.selos li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 2px solid #3a3229;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.selos .ico { color: #5fd796; }

/* ---------- Garantia: carimbo ---------- */
.seal { position: relative; }
.seal.is-ready { opacity: 0; transform: scale(1.8) rotate(-30deg); }
.seal.is-stamped { animation: stamp 0.55s var(--ease-back) forwards; }
@keyframes stamp {
  0% { opacity: 0; transform: scale(1.8) rotate(-30deg); }
  60% { opacity: 1; transform: scale(0.92) rotate(-6deg); }
  100% { opacity: 1; transform: scale(1) rotate(-8deg); }
}
.seal.is-stamped::after {
  content: "";
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  border: 4px solid var(--asphalt);
  opacity: 0;
  animation: stamp-ring 0.7s ease-out 0.3s;
}
@keyframes stamp-ring {
  from { opacity: 0.5; transform: scale(0.9); }
  to { opacity: 0; transform: scale(1.35); }
}

/* ---------- Botões: feedback tátil ---------- */
.btn { min-height: 48px; }
.btn--primary:active, .btn--dark:active { transform: translateY(3px); }

/* ---------- Responsivo ---------- */
@media (max-width: 900px) {
  .sim__grid { grid-template-columns: 1fr; }
  .obra { grid-template-columns: 1fr; gap: 16px; }
  .obra__visual { top: calc(var(--topbar-h) + 8px); z-index: 5; }
  .obra__card {
    display: grid;
    grid-template-columns: 132px 1fr;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.5);
  }
  .obra__info { margin: 0; }
  .obra__stage { font-size: 1.25rem; }
  .obra__meter { margin-top: 6px; }
}
@media (max-width: 760px) {
  .chip { font-size: 0.68rem; padding: 7px 10px; gap: 6px; }
  .chip .ico { width: 14px; height: 14px; }
  .chip--1 { left: -6px; top: -14px; }
  .chip--2 { right: -6px; top: auto; bottom: 30%; }
  .chip--3 { left: auto; right: 18%; bottom: -16px; }
  .modules--timeline .module { grid-template-columns: 48px 1fr; padding: 14px 16px; }
  .modules--timeline .module__num { font-size: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; }
  .hazard--move, .chip, .play, .scene__trowel, .plan--featured::after { animation: none !important; }
}

/* kicker alinhado à esquerda na garantia (desktop) */
.guarantee .kicker { justify-content: flex-start; }
@media (max-width: 760px) { .guarantee .kicker { justify-content: center; } }

/* topo no celular: legenda menor e etiquetas fora da parede */
@media (max-width: 560px) {
  .mockup__caption em { display: none; }
  .mockup__caption strong { font-size: 1.05rem; }
  .mockup__caption span { display: none; }
  .chip--1 { top: -14px; left: -6px; }
  .chip--2 { top: -14px; right: -6px; bottom: auto; }
  .chip--3 { bottom: -16px; left: 50%; right: auto; transform: translateX(-50%); }
}
