/* Melhorias de design — carregado depois dos estilos da página */

/* ===== Acessibilidade e foco ===== */
:focus-visible {
  outline: 3px solid var(--gold-light);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ===== Ritmo e tipografia das seções ===== */
.section-title { text-wrap: balance; letter-spacing: -0.015em; }
.section-subtitle, .section-header p { text-wrap: pretty; }

/* ===== Cartões: elevação suave ao passar o mouse ===== */
.servico-card, .norma-card, .segmento-card, .diferencial-card, .depoimento-card, .home-article-card, .proposito-card {
  transition: transform .28s cubic-bezier(.2,.7,.2,1), box-shadow .28s ease, border-color .28s ease;
}
@media (hover: hover) {
  .servico-card:hover, .norma-card:hover, .segmento-card:hover, .diferencial-card:hover,
  .home-article-card:hover, .proposito-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 36px -14px rgb(13 51 64 / .28);
  }
}

/* ===== Botões ===== */
.btn { transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease; }
.btn:active { transform: translateY(1px) scale(.99); }

/* ===== Revelação ao rolar (ativada por assets/js/reveal.js) ===== */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.is-in { opacity: 1; transform: none; }

/* ===== Seção: obra 3D com linha de vida ===== */
.obra3d {
  position: relative;
  padding: clamp(64px, 9vw, 112px) 0;
  color: #fff;
  background:
    radial-gradient(900px 420px at 85% -10%, rgb(212 160 23 / .16), transparent 60%),
    radial-gradient(700px 500px at 0% 110%, rgb(26 100 128 / .55), transparent 60%),
    linear-gradient(160deg, var(--petrol-dark) 0%, #0a2630 100%);
  overflow: hidden;
}
.obra3d-head { max-width: 760px; margin: 0 auto clamp(28px, 4vw, 48px); text-align: center; }
.obra3d-eyebrow {
  display: inline-block; padding: 6px 14px; margin-bottom: 16px; border-radius: 999px;
  font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--gold-light); background: rgb(212 160 23 / .12); border: 1px solid rgb(212 160 23 / .35);
}
.obra3d-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); line-height: 1.15; text-wrap: balance; color: #fff; }
.obra3d-head h2 .highlight { color: var(--gold-light); }
.obra3d-head p { margin-top: 16px; color: rgb(255 255 255 / .78); font-size: 1.05rem; line-height: 1.65; text-wrap: pretty; }

.obra3d-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; }

.obra3d-stage { min-width: 0; }
.obra3d-canvas-wrap {
  position: relative; width: 100%; aspect-ratio: 4 / 3; min-height: 320px; max-height: 620px;
  border-radius: 20px; overflow: hidden; background: #cfe4f1;
  box-shadow: 0 30px 60px -20px rgb(0 0 0 / .55), 0 0 0 1px rgb(255 255 255 / .12);
  cursor: grab;
}
.obra3d-canvas-wrap.is-dragging { cursor: grabbing; }
.obra3d-canvas-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; outline: none; }
.obra3d-canvas-wrap canvas:focus-visible { outline: 3px solid var(--gold-light); outline-offset: -3px; }

.obra3d-label {
  position: absolute; left: 0; top: 0; z-index: 2; pointer-events: none; white-space: nowrap;
  padding: 5px 10px; border-radius: 8px; font-size: .74rem; font-weight: 600; color: var(--petrol-dark);
  background: rgb(255 255 255 / .94); box-shadow: 0 6px 16px -6px rgb(0 0 0 / .4);
  opacity: 0; transition: opacity .25s ease; will-change: transform;
}
.obra3d-label::after {
  content: ""; position: absolute; left: 50%; bottom: -5px; width: 10px; height: 10px; background: inherit;
  transform: translateX(-50%) rotate(45deg); border-radius: 2px;
}
.obra3d-label--accent { background: var(--gold-light); }
.obra3d-label--green { background: #22c55e; color: #052e16; }
.obra3d-hint {
  position: absolute; right: 14px; bottom: 14px; z-index: 2; padding: 6px 12px; border-radius: 999px;
  font-size: .75rem; font-weight: 600; color: #fff; background: rgb(13 51 64 / .78); backdrop-filter: blur(6px);
  pointer-events: none; transition: opacity .4s ease;
}
.obra3d-canvas-wrap.is-dragging .obra3d-hint { opacity: 0; }
.obra3d-fallback { display: none; position: absolute; inset: 0; padding: 24px; align-items: center; justify-content: center; text-align: center; color: var(--petrol-dark); background: #eaf3f8; }
.obra3d--fallback .obra3d-fallback { display: flex; }
.obra3d--fallback .obra3d-label, .obra3d--fallback .obra3d-hint { display: none; }

.obra3d-controls { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.obra3d-btn {
  appearance: none; cursor: pointer; padding: 9px 16px; border-radius: 999px; font: inherit; font-size: .85rem; font-weight: 600;
  color: #fff; background: rgb(255 255 255 / .08); border: 1px solid rgb(255 255 255 / .22);
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .15s ease;
}
.obra3d-btn:hover { background: rgb(255 255 255 / .16); }
.obra3d-btn:active { transform: scale(.97); }
.obra3d-btn.is-active { color: var(--petrol-dark); background: var(--gold-light); border-color: var(--gold-light); }

.obra3d-points { list-style: none; display: grid; gap: 14px; margin-bottom: 28px; }
.obra3d-points li {
  position: relative; padding: 16px 18px 16px 52px; border-radius: 14px;
  background: rgb(255 255 255 / .06); border: 1px solid rgb(255 255 255 / .1);
}
.obra3d-points li::before {
  content: ""; position: absolute; left: 18px; top: 19px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--gold-light) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230D3340' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.obra3d-points strong { display: block; margin-bottom: 4px; font-size: 1rem; color: #fff; }
.obra3d-points span { display: block; font-size: .9rem; line-height: 1.55; color: rgb(255 255 255 / .74); }
.obra3d-info .btn { display: inline-flex; }
.obra3d-link { display: block; margin-top: 16px; font-size: .92rem; font-weight: 600; color: var(--gold-light); text-decoration: none; }
.obra3d-link:hover { text-decoration: underline; }

@media (max-width: 960px) {
  .obra3d-grid { grid-template-columns: 1fr; }
  .obra3d-canvas-wrap { aspect-ratio: 1 / 1; max-height: 520px; }
}
@media (max-width: 520px) {
  .obra3d-btn { flex: 1 1 calc(50% - 8px); text-align: center; }
}

/* ===== Movimento reduzido ===== */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .servico-card:hover, .norma-card:hover, .segmento-card:hover, .diferencial-card:hover, .home-article-card:hover, .proposito-card:hover { transform: none; }
}
