/**
 * Focel — Seção do prêmio "Destaque 2018" (Rotary Club Santa Cruz do Sul Oeste + Gazeta)
 * ---------------------------------------------------------------------------
 * Palco sempre escuro (nos dois temas), com o troféu recortado flutuando,
 * inclinação 3D que segue o ponteiro, brilho que atravessa só o troféu e
 * o certificado ampliado num <dialog>. Comportamento em js/premio.js.
 * Prefixo das classes: aw-
 * ---------------------------------------------------------------------------
 */

.aw {
  --aw-gold:       #E7C06A;
  --aw-gold-light: #F7E4AE;
  --aw-gold-deep:  #B8862F;
  --aw-rx: 0deg;
  --aw-ry: 0deg;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding-block: clamp(72px, 9vw, 120px);
  background:
    radial-gradient(ellipse 60% 70% at 28% 55%, rgba(231, 192, 106, 0.16), transparent 70%),
    radial-gradient(ellipse 50% 60% at 85% 20%, rgba(30, 144, 230, 0.14), transparent 70%),
    linear-gradient(180deg, #06122A 0%, #040B18 100%);
  color: rgba(255, 255, 255, 0.78);
}
/* Malha fina ao fundo, esmaecendo nas bordas */
.aw::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(247, 228, 174, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(247, 228, 174, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 30% 50%, #000 20%, transparent 75%);
          mask-image: radial-gradient(ellipse 70% 80% at 30% 50%, #000 20%, transparent 75%);
}

.aw-grid {
  display: grid;
  gap: clamp(40px, 6vw, 72px);
  align-items: center;
}
.aw-grid > * { min-width: 0; }
@media (min-width: 1024px) {
  .aw-grid { grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); }
}

/* ---------- Palco do troféu ---------- */
.aw-stage {
  position: relative;
  display: grid;
  place-items: center;
  height: clamp(380px, 48vw, 560px);
  perspective: 1100px;
}
/* Raios de luz girando devagar atrás do troféu */
.aw-rays {
  position: absolute;
  width: min(120%, 620px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: repeating-conic-gradient(from 0deg,
    rgba(247, 228, 174, 0.10) 0deg 6deg,
    transparent 6deg 18deg);
  -webkit-mask-image: radial-gradient(circle, #000 15%, transparent 68%);
          mask-image: radial-gradient(circle, #000 15%, transparent 68%);
  animation: aw-spin 60s linear infinite;
}
/* Halo dourado */
.aw-halo {
  position: absolute;
  width: min(80%, 420px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(231, 192, 106, 0.42) 0%, rgba(231, 192, 106, 0.12) 45%, transparent 70%);
  filter: blur(20px);
  animation: aw-breathe 5s ease-in-out infinite alternate;
}
/* Luz do pedestal (elipse sob o troféu) */
.aw-floor {
  position: absolute;
  bottom: 6%;
  width: min(62%, 330px);
  height: 34px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(247, 228, 174, 0.45) 0%, rgba(231, 192, 106, 0.12) 50%, transparent 72%);
  filter: blur(6px);
}

.aw-trophy {
  position: relative;
  height: clamp(334px, 42vw, 492px); /* ~88% da altura do palco */
  aspect-ratio: 602 / 1000;
  transform-style: preserve-3d;
  transform: rotateX(var(--aw-rx)) rotateY(var(--aw-ry));
  transition: transform 500ms cubic-bezier(0.22, 1, 0.36, 1);
  animation: aw-float 6s ease-in-out infinite;
}
.aw-trophy img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.55)) drop-shadow(0 0 30px rgba(231, 192, 106, 0.25));
}
/* Brilho que atravessa: recortado no formato do próprio troféu */
.aw-shine {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.55) 48%, rgba(255, 248, 220, 0.2) 54%, transparent 62%);
  background-size: 250% 100%;
  background-position: 130% 0;
  /* a imagem da máscara vem no atributo style do HTML (caminho relativo à página) */
  -webkit-mask-position: center; -webkit-mask-size: contain; -webkit-mask-repeat: no-repeat;
          mask-position: center;         mask-size: contain;         mask-repeat: no-repeat;
  mix-blend-mode: overlay;
  animation: aw-shine 5.5s ease-in-out infinite;
}

/* Faíscas douradas */
.aw-spark {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--aw-gold-light);
  box-shadow: 0 0 10px 2px rgba(247, 228, 174, 0.8);
  opacity: 0;
  animation: aw-twinkle 4s ease-in-out infinite;
}
.aw-spark:nth-of-type(1) { top: 18%; left: 22%; animation-delay: 0s; }
.aw-spark:nth-of-type(2) { top: 30%; right: 18%; animation-delay: 1.2s; }
.aw-spark:nth-of-type(3) { top: 62%; left: 14%; animation-delay: 2.1s; }
.aw-spark:nth-of-type(4) { top: 12%; right: 30%; animation-delay: 2.9s; width: 3px; height: 3px; }
.aw-spark:nth-of-type(5) { top: 74%; right: 16%; animation-delay: 0.6s; width: 3px; height: 3px; }

/* ---------- Texto ---------- */
.aw-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--aw-gold);
}
.aw-eyebrow svg { width: 16px; height: 16px; }

.aw-title {
  margin-top: 18px;
  font-family: var(--lp-font-display);
  font-weight: 800;
  font-size: clamp(2.25rem, 1.2rem + 3.4vw, 4rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: #fff;
}
body .aw-title { font-weight: 800; }
/* Mesmo ajuste dos títulos com máscara de linha (ver .lp-h2 em landing.css) */
.aw-title:has(.lp-line-mask) { display: grid; }
.aw-title em {
  font-style: normal;
  background: linear-gradient(100deg, var(--aw-gold-deep) 0%, var(--aw-gold-light) 45%, var(--aw-gold) 70%, var(--aw-gold-deep) 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  animation: aw-gold-text 6s ease-in-out infinite;
}

.aw-quote {
  position: relative;
  margin: 28px 0 0;
  padding-left: 22px;
  border-left: 2px solid rgba(231, 192, 106, 0.55);
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
  font-style: italic;
}

.aw-meta {
  display: grid;
  gap: 12px;
  margin-top: 30px;
}
@media (min-width: 560px) { .aw-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.aw-meta div {
  padding: 14px 16px;
  border: 1px solid rgba(247, 228, 174, 0.16);
  border-radius: var(--lp-r-md, 14px);
  background: rgba(255, 255, 255, 0.03);
}
.aw-meta dt {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(247, 228, 174, 0.7);
}
.aw-meta dd { margin: 4px 0 0; font-size: 0.9375rem; font-weight: 600; color: #fff; line-height: 1.45; }

.aw-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 34px; }
.aw-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0.875rem 1.5rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--aw-gold-light), var(--aw-gold) 55%, var(--aw-gold-deep));
  color: #2A1C04;
  font-family: var(--lp-font-body);
  font-size: 0.9375rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 30px -8px rgba(231, 192, 106, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transition: transform 180ms ease, box-shadow 220ms ease;
}
.aw-btn:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -8px rgba(231, 192, 106, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.5); }
.aw-btn:focus-visible { outline: 2px solid var(--aw-gold-light); outline-offset: 3px; }
.aw-btn svg { width: 18px; height: 18px; }

/* ---------- Certificado ampliado ---------- */
.aw-dialog {
  width: min(94vw, 1100px);
  max-height: 92vh;
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: transparent;
  overflow: visible;
}
.aw-dialog::backdrop { background: rgba(3, 8, 18, 0.82); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.aw-dialog[open] { animation: aw-pop 320ms cubic-bezier(0.22, 1, 0.36, 1); }
.aw-dialog img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 86vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.8);
}
.aw-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #0A2247;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}
.aw-close svg { width: 20px; height: 20px; }
@media (max-width: 559px) { .aw-close { top: -18px; right: 4px; } }

/* ---------- Animações ---------- */
@keyframes aw-spin      { to { transform: rotate(360deg); } }
@keyframes aw-breathe   { from { transform: scale(0.9); opacity: 0.75; } to { transform: scale(1.08); opacity: 1; } }
@keyframes aw-float     { 0%, 100% { translate: 0 0; } 50% { translate: 0 -12px; } }
@keyframes aw-shine     { 0%, 55% { background-position: 130% 0; } 85%, 100% { background-position: -30% 0; } }
@keyframes aw-twinkle   { 0%, 100% { opacity: 0; transform: scale(0.4); } 50% { opacity: 1; transform: scale(1); } }
@keyframes aw-gold-text { 0%, 100% { background-position: 0% 0; } 50% { background-position: 100% 0; } }
@keyframes aw-pop       { from { opacity: 0; transform: scale(0.94); } to { opacity: 1; transform: scale(1); } }

@media (prefers-reduced-motion: reduce) {
  .aw-rays, .aw-halo, .aw-trophy, .aw-shine, .aw-spark, .aw-title em, .aw-dialog[open] { animation: none; }
  .aw-spark { opacity: 0.7; }
  .aw-trophy { transition: none; }
}
