/* style.css — ponto de entrada de estilos */
@import url('variables.css?v=4');
@import url('base.css?v=4');
@import url('components.css?v=4');

/* Estilos específicos de seção são adicionados nas tasks de seção abaixo. */

/* Hero */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center;
  background: url('https://images.pexels.com/photos/35676564/pexels-photo-35676564.jpeg?auto=compress&cs=tinysrgb&w=1920') center/cover no-repeat; color: var(--color-white); }
.hero__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.hero__overlay { position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(26,26,26,0.55), rgba(26,26,26,0.75)); }
/* vídeo também no mobile (a foto continua como poster/fallback e sob prefers-reduced-motion) */
.hero__content { position: relative; z-index: 2; max-width: 760px; }
.hero__content h1 { color: var(--color-white); margin: 10px 0 20px; }
.hero__sub { font-size: 1.15rem; margin-bottom: 32px; opacity: 0.95; max-width: 560px; }
.hero__scroll { position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%); z-index: 2;
  color: var(--color-amber); width: 34px; animation: bounce 1.8s infinite; }
@keyframes bounce { 0%,100% { transform: translate(-50%,0); } 50% { transform: translate(-50%,10px); } }

/* Section head */
.section__head { text-align: center; max-width: 640px; margin: 0 auto 60px; }

/* Sobre */
.sobre { overflow: hidden; } /* contém os reveals direcionais (translateX) da seção */
.sobre__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.sobre__img img { border-radius: var(--radius); box-shadow: var(--shadow); }
.sobre__text h2 { margin: 10px 0 20px; }
.sobre__text p { margin-bottom: 16px; }
.sobre__list { margin-top: 24px; }
.sobre__list li { padding-left: 28px; position: relative; margin-bottom: 10px; color: var(--color-text-soft); }
.sobre__list li::before { content: "✓"; position: absolute; left: 0; color: var(--color-accent); font-weight: 700; }

/* Serviços */
.servicos__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.section--dark .card { background: #242424; }
.section--dark .card h3 { color: var(--color-bg); }

@media (max-width: 1024px) { .servicos__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) {
  .sobre__grid { grid-template-columns: 1fr; gap: 30px; }
  .servicos__grid { grid-template-columns: 1fr; }
}

/* Portfólio destaque */
.destaque__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.destaque__item { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.destaque__item img { aspect-ratio: 6/7; object-fit: cover; transition: transform var(--transition); }
.destaque__item:hover img { transform: scale(1.06); }
.destaque__title { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 16px 14px; font-size: 0.85rem;
  color: #fff; background: linear-gradient(transparent, rgba(0,0,0,0.75)); }

/* Depoimentos */
.depoimentos__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.depoimento { background: #242424; padding: 36px 30px; border-radius: var(--radius); border-top: 3px solid var(--color-amber); }
.depoimento p { font-family: var(--font-title); font-size: 1.15rem; line-height: 1.5; margin-bottom: 20px; }
.depoimento footer strong { display: block; color: var(--color-accent); }
.depoimento footer span { font-size: 0.85rem; opacity: 0.7; }

@media (max-width: 1024px) { .destaque__grid { grid-template-columns: repeat(2, 1fr); } .depoimentos__grid { grid-template-columns: 1fr; } }
@media (max-width: 768px) { .destaque__grid { grid-template-columns: 1fr; } }

/* Wizard / formulário */
.orcamento__wrap { max-width: 720px; margin: 0 auto; }
.wizard__progress { height: 3px; background: var(--color-border); border-radius: 3px; margin-bottom: 40px; overflow: hidden; }
.wizard__bar { display: block; height: 100%; width: 20%; background: var(--color-accent); transition: width var(--transition); }
.step { border: none; }
.step:not(.is-active) { display: none; }
.step legend { font-family: var(--font-title); font-size: 1.4rem; margin-bottom: 28px; }

/* Campos underline com label flutuante */
.field { position: relative; margin-bottom: 30px; }
.field input, .field textarea, .field select { width: 100%; border: none; border-bottom: 1px solid var(--color-border);
  background: transparent; padding: 10px 0; font-family: var(--font-body); font-size: 1rem; color: var(--color-text); outline: none; }
.field textarea { resize: vertical; }
.field label { position: absolute; left: 0; top: 10px; color: var(--color-text-soft); pointer-events: none;
  transition: transform var(--transition), font-size var(--transition), color var(--transition); }
.field input:focus, .field textarea:focus, .field select:focus { border-bottom-color: var(--color-accent); }
.field input:focus ~ label, .field textarea:focus ~ label,
.field input:not(:placeholder-shown) ~ label,
.field.field--filled label, .field input[type="date"] ~ label {
  transform: translateY(-22px); font-size: 0.78rem; color: var(--color-accent); }
.field--select select { appearance: none; }
.field.invalid input, .field.invalid select { border-bottom-color: #c0392b; }

/* Radios / checkboxes */
.radio-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 14px; }
.radio-card { display: block; border: 1px solid var(--color-border); border-radius: var(--radius); padding: 16px 18px; cursor: pointer; transition: var(--transition); }
.radio-card:hover { border-color: var(--color-accent); }
.radio-card input { margin-right: 10px; accent-color: var(--color-accent); }
.radio-card:has(input:checked) { border-color: var(--color-accent); background: rgba(198,160,46,0.12); }
.check-group { margin-bottom: 22px; }
.check-group h4 { color: var(--color-accent); margin-bottom: 10px; font-family: var(--font-body); text-transform: uppercase; font-size: 0.8rem; letter-spacing: 1px; }
.check, .radio-inline label { display: inline-flex; align-items: center; gap: 8px; margin-right: 20px; margin-bottom: 8px; cursor: pointer; }
.check input, .radio-inline input { accent-color: var(--color-accent); }
.field-label { font-weight: 600; margin: 18px 0 8px; }
.radio-inline { margin-bottom: 14px; }

.wizard__nav { display: flex; justify-content: space-between; margin-top: 30px; }
.wizard__result { text-align: center; padding: 40px 20px; }
.wizard__result.success h3 { color: var(--color-moss); }
.wizard__result.error h3 { color: #c0392b; }

@media (max-width: 768px) { .radio-grid { grid-template-columns: 1fr; } }

/* Portfólio */
.portfolio-hero { padding-bottom: 40px; }
.filtros { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 40px; }
.filtro { background: transparent; border: 1px solid var(--color-border); border-radius: 40px; padding: 9px 22px;
  cursor: pointer; font-family: var(--font-body); font-size: 0.9rem; transition: var(--transition); }
.filtro:hover, .filtro.is-active { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-text); }
.projetos__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; transition: opacity var(--transition); }
.projeto { position: relative; border-radius: var(--radius); overflow: hidden; cursor: pointer; box-shadow: var(--shadow); }
.projeto img { aspect-ratio: 4/3; object-fit: cover; transition: transform var(--transition); }
.projeto:hover img { transform: scale(1.05); }
.projeto__overlay { position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 22px;
  background: linear-gradient(transparent 50%, rgba(0,0,0,0.7)); opacity: 0; transition: opacity var(--transition); }
.projeto:hover .projeto__overlay { opacity: 1; }
.projeto__overlay h3 { color: #fff; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,0.85); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; padding: 20px; }
.lightbox[hidden] { display: none; }
.lightbox__content { background: var(--color-white); border-radius: var(--radius); max-width: 820px; width: 100%;
  overflow: hidden; display: grid; grid-template-columns: 1.3fr 1fr; }
.lightbox__content img { height: 100%; object-fit: cover; }
.lightbox__info { padding: 40px 34px; }
.lightbox__info h3 { margin-bottom: 14px; }
.lb-materials { margin-top: 18px; color: var(--color-accent); font-weight: 600; }
.lightbox__close { position: absolute; top: 20px; right: 26px; background: none; border: none; color: #fff; font-size: 2.4rem; cursor: pointer; line-height: 1; }

@media (max-width: 1024px) { .projetos__grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 768px) { .projetos__grid { grid-template-columns: 1fr; } .lightbox__content { grid-template-columns: 1fr; } }

/* ==================== ANIMAÇÕES GLOBAIS ==================== */

/* Reveal direcional (data-reveal="up|left|right|scale") */
[data-reveal] { opacity: 0; transition: opacity 0.85s ease, transform 0.85s cubic-bezier(0.25,0.46,0.45,0.94); will-change: opacity, transform; }
[data-reveal="up"]    { transform: translateY(42px); }
[data-reveal="left"]  { transform: translateX(-48px); }
[data-reveal="right"] { transform: translateX(48px); }
[data-reveal="scale"] { transform: scale(0.92); }
[data-reveal].in { opacity: 1; transform: none; }

/* Stagger dos filhos (containers com data-stagger) */
.reveal-child { opacity: 0; transform: translateY(30px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.25,0.46,0.45,0.94); }
[data-stagger].in .reveal-child, [data-stagger].is-visible .reveal-child { opacity: 1; transform: none; }

/* Entrada do hero ao carregar */
.hero__content > * { opacity: 0; transform: translateY(26px); }
.loaded .hero__content > * { animation: heroIn 0.9s cubic-bezier(0.25,0.46,0.45,0.94) forwards; }
.loaded .hero__content > *:nth-child(1) { animation-delay: 0.10s; }
.loaded .hero__content > *:nth-child(2) { animation-delay: 0.25s; }
.loaded .hero__content > *:nth-child(3) { animation-delay: 0.40s; }
.loaded .hero__content > *:nth-child(4) { animation-delay: 0.55s; }
@keyframes heroIn { to { opacity: 1; transform: none; } }

/* Entrada dos cards do portfólio (re-dispara a cada render/filtro) */
.projetos__grid .projeto { animation: cardIn 0.55s cubic-bezier(0.25,0.46,0.45,0.94) both; }
.projetos__grid .projeto:nth-child(1) { animation-delay: 0.03s; }
.projetos__grid .projeto:nth-child(2) { animation-delay: 0.09s; }
.projetos__grid .projeto:nth-child(3) { animation-delay: 0.15s; }
.projetos__grid .projeto:nth-child(4) { animation-delay: 0.21s; }
.projetos__grid .projeto:nth-child(5) { animation-delay: 0.27s; }
.projetos__grid .projeto:nth-child(6) { animation-delay: 0.33s; }
@keyframes cardIn { from { opacity: 0; transform: translateY(28px) scale(0.98); } to { opacity: 1; transform: none; } }

/* Micro-interações */
.btn { position: relative; overflow: hidden; }
.btn--gold::after { content: ''; position: absolute; top: 0; left: -120%; width: 60%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.35), transparent); transform: skewX(-20deg); transition: left 0.6s ease; pointer-events: none; }
.btn--gold:hover::after { left: 140%; }
.nav a:not(.btn) { position: relative; }
.nav a:not(.btn)::after { content: ''; position: absolute; left: 0; bottom: -4px; width: 0; height: 2px; background: var(--color-accent); transition: width var(--transition); }
.nav a:not(.btn):hover::after { width: 100%; }
.card__icon { transition: transform var(--transition); }
.card:hover .card__icon { transform: translateY(-4px) scale(1.06); }
.filtro { will-change: transform; }
.filtro:active { transform: scale(0.96); }

/* Respeita usuários que preferem menos movimento */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal], .reveal-child, .hero__content > *, .projetos__grid .projeto {
    opacity: 1 !important; transform: none !important; animation: none !important; transition: none !important; }
  .btn--gold::after { display: none; }
}
