/* ============================================================
   EMBER GLASS system: halketsg.com redesign
   Loaded after each page's inline <style>. Glass selectors use
   quadruple class repetition to reach specificity (0,4,0) so
   they beat the pages' inline !important hover rules; source
   order settles exact ties in this file's favour.
   ============================================================ */

/* ---------- Glow blobs ---------- */
.glow-blob {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(40px);
  background: radial-gradient(circle at 40% 40%,
    rgba(249,115,22,0.30), rgba(157,67,0,0.10) 55%, transparent 72%);
  animation: ember-drift 9s ease-in-out infinite alternate;
  z-index: 0;
}
.glow-blob.glow-strong {
  background: radial-gradient(circle at 40% 40%,
    rgba(249,115,22,0.45), rgba(157,67,0,0.15) 55%, transparent 72%);
}
@keyframes ember-drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(-32px, 26px) scale(1.12); }
}

/* ---------- Frosted glass cards ---------- */
.glass-card.glass-card.glass-card.glass-card {
  background: rgba(255,255,255,0.55) !important;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(249,115,22,0.18) !important;
  box-shadow: 0 8px 28px rgba(157,67,0,0.08), 0 2px 8px rgba(26,28,28,0.04) !important;
}
.glass-card.glass-card.glass-card.glass-card:hover {
  background: rgba(255,255,255,0.78) !important;
  border: 1px solid rgba(249,115,22,0.30) !important;
  box-shadow: 0 14px 36px rgba(157,67,0,0.13), 0 3px 10px rgba(26,28,28,0.05) !important;
}
@supports not ((backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px))) {
  .glass-card.glass-card.glass-card.glass-card,
  .glass-card.glass-card.glass-card.glass-card:hover { background: #ffffff !important; }
}
/* Hard-rule guard: the dark Suncorp card must never go light,
   even if glass-card is mistakenly applied to it later. */
.no-white-hover.no-white-hover.no-white-hover.no-white-hover,
.no-white-hover.no-white-hover.no-white-hover.no-white-hover:hover {
  background: #9d4300 !important;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

/* ---------- Hero entrance ---------- */
.hero-line {
  opacity: 0;
  transform: translateY(28px);
  animation: ember-rise 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}
.hero-line:nth-child(2) { animation-delay: 0.12s; }
.hero-line:nth-child(3) { animation-delay: 0.24s; }
@keyframes ember-rise { to { opacity: 1; transform: none; } }

/* ---------- Staggered reveals ----------
   ember.js sets transition-delay on children of [data-stagger].
   Children need the existing .reveal class to animate. */

/* ---------- Primary button glow ---------- */
a.bg-primary-container:hover, button.bg-primary-container:hover {
  box-shadow: 0 8px 30px rgba(249,115,22,0.5) !important;
}

/* ---------- Pulse glow (Operations featured card) ---------- */
.pulse-glow { position: relative; }
.pulse-glow::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 0 44px rgba(249,115,22,0.35);
  opacity: 0;
  pointer-events: none;
  animation: ember-pulse 4s ease-in-out infinite;
}
@keyframes ember-pulse {
  0%, 100% { opacity: 0; }
  50%      { opacity: 1; }
}
/* ember.js toggles this on decorative animations when offscreen */
.anim-paused, .anim-paused::after { animation-play-state: paused !important; }

/* ---------- Scroll progress lines ---------- */
.progress-track {
  position: absolute;
  background: rgba(224,192,177,0.6);
  overflow: hidden;
}
.progress-track.horizontal { height: 2px; left: 0; right: 0; }
.progress-track.vertical { width: 2px; top: 0; bottom: 0; left: 0; }
.progress-fill {
  position: absolute;
  left: 0; top: 0;
  background: linear-gradient(90deg, #f97316, #9d4300);
}
.progress-track.horizontal .progress-fill { height: 100%; width: 0%; }
.progress-track.vertical .progress-fill {
  width: 100%; height: 0%;
  background: linear-gradient(180deg, #f97316, #9d4300);
}

/* ---------- Timeline dots ---------- */
.timeline-dot { transition: box-shadow 0.4s ease, background 0.4s ease; }
.timeline-dot.dot-lit {
  background: #f97316 !important;
  box-shadow: 0 0 16px rgba(249,115,22,0.6);
}

/* ---------- Photo reveal (About) ---------- */
.photo-reveal img { transition: opacity 1s ease, transform 1.2s ease; }
.photo-reveal:not(.visible) img { opacity: 0; transform: scale(1.04); }

/* ---------- Input focus glow (Contact) ---------- */
input:focus, select:focus, textarea:focus {
  box-shadow: 0 4px 20px rgba(249,115,22,0.15) !important;
}

/* ---------- Success check draw (Contact) ---------- */
.check-draw circle { stroke-dasharray: 110; stroke-dashoffset: 110; }
.check-draw path { stroke-dasharray: 30; stroke-dashoffset: 30; }
.show .check-draw circle { animation: ember-draw 0.6s ease forwards; }
.show .check-draw path   { animation: ember-draw 0.5s 0.45s ease forwards; }
@keyframes ember-draw { to { stroke-dashoffset: 0; } }

/* ---------- Reduced motion: kill everything ---------- */
@media (prefers-reduced-motion: reduce) {
  .glow-blob, .hero-line, .pulse-glow::after,
  .check-draw circle, .check-draw path {
    animation: none !important;
  }
  .hero-line, .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .timeline-dot { transition: none !important; }
  .check-draw circle, .check-draw path { stroke-dashoffset: 0; }
  .photo-reveal:not(.visible) img { opacity: 1; transform: none; }
  .progress-fill { width: 100% !important; height: 100% !important; }
}
