/* ============================================================
   Westhird public site — futuristic premium layer.
   Loaded AFTER styles.css on every public page. Adds the login's
   immersive depth (subtle backdrop + glass cards + glow) while
   keeping the existing structure, copy, and professionalism.
   ============================================================ */

/* ---- Immersive backdrop: soft cyan/gold glow + faint grid ---- */
body {
  background:
    radial-gradient(1100px 640px at 86% -8%, rgba(6,182,212,.13), transparent 56%),
    radial-gradient(980px 600px at -8% 16%, rgba(245,183,42,.06), transparent 54%),
    radial-gradient(1000px 760px at 50% 120%, rgba(6,182,212,.06), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 54px 54px;
  -webkit-mask-image: radial-gradient(150% 92% at 50% 0%, #000 18%, transparent 68%);
  mask-image: radial-gradient(150% 92% at 50% 0%, #000 18%, transparent 68%);
}

/* ---- Header: translucent glass ---- */
.site-header {
  background: rgba(11,15,25,.72);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

/* ---- HERO: two columns + floating product card ---- */
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.hero-copy { max-width: 600px; }
.hero-visual { display: flex; justify-content: center; perspective: 1400px; }

.hero-card {
  width: 100%; max-width: 420px;
  background: rgba(18,24,38,.62);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid var(--border-light); border-radius: 18px; overflow: hidden;
  box-shadow: 0 44px 90px -42px rgba(0,0,0,.9), 0 0 0 1px rgba(6,182,212,.06);
  transform: rotateY(-7deg) rotateX(2deg); transition: transform .45s var(--ease);
}
.hero-card:hover { transform: rotateY(-2deg) rotateX(1deg) translateY(-4px); }
.hero-card-bar { display: flex; align-items: center; gap: 7px; padding: 13px 16px; border-bottom: 1px solid var(--border); background: rgba(255,255,255,.02); }
.hero-card-bar > span { width: 10px; height: 10px; border-radius: 50%; }
.hero-card-bar > span:nth-child(1){ background:#ff5f57; } .hero-card-bar > span:nth-child(2){ background:#febc2e; } .hero-card-bar > span:nth-child(3){ background:#28c840; }
.hero-card-bar em { margin-left: 8px; font-style: normal; font-size: 12px; color: var(--text-mute); }
.hero-card-inner { padding: 24px 24px 24px; }
.hero-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.hero-card-eyebrow { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-mute); font-weight: 600; }
.hero-card-badge { font-size: 11px; font-weight: 700; color: var(--gold); background: rgba(245,183,42,.12); border: 1px solid rgba(245,183,42,.3); padding: 3px 10px; border-radius: 999px; }
.hero-card-stage { font-family: 'Anton', Impact, sans-serif; font-size: 54px; line-height: .92; color: var(--text); text-transform: uppercase; letter-spacing: .5px; }
.hero-card-sub { font-size: 13px; color: var(--text-dim); margin: 4px 0 18px; }
.hero-card-steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; margin-bottom: 18px; }
.hero-card-steps span { height: 8px; border-radius: 5px; background: var(--border-light); }
.hero-card-steps span.on { background: var(--accent); }
.hero-card-steps span.cur { background: var(--gold); box-shadow: 0 0 0 4px rgba(245,183,42,.14); }
.hero-card-foot { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--text-dim); padding-top: 14px; border-top: 1px solid var(--border); }
.hero-card-go { color: var(--accent); font-weight: 600; }

@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
}

/* ---- Glassy cards across sections ---- */
.specialty-card, .detail-service, .step, .why-card, .audit-form, .about-card {
  background: rgba(20,26,40,.55);
  -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px);
  border: 1px solid var(--border); border-radius: 18px;
}
.specialty-card, .detail-service { transition: border-color .2s ease, transform .2s var(--ease), box-shadow .2s ease; }
.specialty-card:hover, .detail-service:hover {
  border-color: rgba(6,182,212,.42); transform: translateY(-4px);
  box-shadow: 0 24px 52px -26px rgba(0,0,0,.72);
}

/* ---- Proof stats as glass tiles ---- */
.proof-stats > div {
  background: rgba(20,26,40,.5);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  border: 1px solid var(--border); border-radius: 16px; padding: 22px 20px;
}

/* ---- Audit / contact form: portal-style inputs ---- */
.audit-form .form-group input, .audit-form .form-group textarea,
.contact-form .form-group input, .contact-form .form-group textarea {
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: 11px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.audit-form .form-group input:focus, .audit-form .form-group textarea:focus,
.contact-form .form-group input:focus, .contact-form .form-group textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(6,182,212,.16);
}

/* ---- Button polish ---- */
.btn-primary:hover { box-shadow: 0 10px 26px -10px rgba(6,182,212,.55); }

/* ============================================================
   Motion layer — coexists with motion.js. All non-essential
   motion sits inside (prefers-reduced-motion: no-preference) so
   reduced-motion users get a calm, static experience. Focus
   rings live OUTSIDE that query — accessibility is never gated.
   ============================================================ */

/* Count-up digits shouldn't reflow as their width changes. The pop scale in
   motion.js animates transform, so give the number its own transform origin and
   a box to scale within (motion.js also sets display:inline-block defensively). */
[data-count-to] { font-variant-numeric: tabular-nums; transform-origin: 50% 60%; }

/* Float helper hint (motion.js drives the actual animation). */
[data-float] { will-change: transform; }

/* Generic anim hook parity with .reveal (hidden only when motion is live). */
.wh-motion [data-anim] { opacity: 0; }

/* Hero aurora: a slow, low-opacity drifting glow injected by motion.js behind
   the hero content. Pure decoration — pointer-events off, aria-hidden, and only
   ever present when motion is live (motion.js injects it). It sits above the
   hero's static ::before gradient but BELOW the copy (.hero-inner is z-indexed
   in styles.css via position:relative; this element is not, so normal flow keeps
   it underneath). Transform/opacity are driven by motion.js. */
.wh-motion .hero { position: relative; }
.wh-motion .hero .wh-aurora {
  position: absolute;
  top: -22%; left: 50%;
  width: min(1100px, 120%); height: 150%;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 0;
  opacity: .7;
  background:
    radial-gradient(38% 46% at 32% 30%, rgba(6,182,212,.30), transparent 70%),
    radial-gradient(34% 42% at 72% 44%, rgba(245,183,42,.16), transparent 72%),
    radial-gradient(40% 48% at 54% 70%, rgba(6,182,212,.16), transparent 74%);
  filter: blur(64px) saturate(118%);
  -webkit-mask-image: radial-gradient(80% 70% at 50% 38%, #000 42%, transparent 82%);
  mask-image: radial-gradient(80% 70% at 50% 38%, #000 42%, transparent 82%);
}
/* Keep the hero copy above the aurora regardless of source order. */
.wh-motion .hero .hero-inner { position: relative; z-index: 1; }

@media (prefers-reduced-motion: no-preference) {

  /* Card hover: lift + accent border glow + sheen sweep. */
  .specialty-card, .step, .why-card, .detail-service {
    position: relative;
    transition: transform .28s var(--ease), border-color .28s ease, box-shadow .28s ease;
  }
  .specialty-card::after, .detail-service::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    border-radius: inherit;
    background: linear-gradient(115deg, transparent 30%, rgba(61,224,245,.10) 48%, transparent 66%);
    transform: translateX(-120%); transition: transform .65s var(--ease); opacity: 0;
  }
  .specialty-card:hover, .detail-service:hover, .step:hover, .why-card:hover {
    transform: translateY(-6px);
    border-color: rgba(20,194,224,.5);
    box-shadow: 0 26px 56px -26px rgba(0,0,0,.7), 0 0 0 1px rgba(20,194,224,.15);
  }
  .specialty-card:hover::after, .detail-service:hover::after {
    transform: translateX(120%); opacity: 1;
  }

  /* "Learn more →" arrow nudge. */
  .specialty-card-link { transition: gap .2s var(--ease), color .2s ease; }
  .specialty-card:hover .specialty-card-link { gap: 12px; }

  /* Button hover: scale + glow (layers on existing translateY). */
  .btn-primary { transition: background .15s ease, transform .18s var(--ease), box-shadow .2s ease; }
  .btn-primary:hover { transform: translateY(-2px) scale(1.015); box-shadow: 0 14px 34px -12px rgba(20,194,224,.6); }
  .btn-outline:hover { transform: translateY(-2px); }

  /* Accent underline-draw beneath eyebrows on reveal. */
  .eyebrow { position: relative; }
  .eyebrow::after {
    content: ""; position: absolute; left: 0; bottom: -4px; height: 2px; width: 100%;
    background: linear-gradient(90deg, var(--accent), transparent);
    transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease) .15s;
  }
  .reveal.in-view .eyebrow::after,
  .section-head.in-view .eyebrow::after { transform: scaleX(1); }
}

/* Focus rings — ALWAYS on, never gated by motion preference. */
.btn:focus-visible,
.specialty-card:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent-bright); outline-offset: 3px; border-radius: 6px;
}
