/* CADD LABS v3 — "fx" finishing layer: light, depth and motion on top of v3.css.
   Loaded last. To switch it off, remove the fx.css / fx.js lines in lib/layout.mjs — nothing else depends on it.
   Colours stay the brand's navy / crimson / cyan. Motion is skipped for visitors who ask for reduced motion, cursor
   effects only run on devices with a real pointer, and nothing here hides content when JavaScript is off. */

/* ---------------- 1. scroll progress (top of the window) ---------------- */
.fx-progress { position: fixed; inset: 0 0 auto; height: 3px; z-index: 1200; pointer-events: none; transform-origin: 0 50%; transform: scaleX(var(--fx-p, 0)); background: linear-gradient(90deg, #e5173a, #ff6b86 50%, #2bd4f2); box-shadow: 0 0 12px rgba(229, 23, 58, .45); }

/* ---------------- 2. light sections: blueprint dot texture + soft brand glow ---------------- */
/* A faint drafting-paper dot grid fades in from one corner (alternating corners down the page), with a soft crimson
   or cyan glow behind it, so long white bands read as designed space instead of empty space. */
.section:not(.section--dark) { isolation: isolate; }
.section:not(.section--dark)::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(rgba(11, 20, 66, .11) 1px, transparent 1.3px) 0 0 / 22px 22px,
    radial-gradient(40% 55% at 100% 0%, rgba(229, 23, 58, .055), transparent 70%);
  -webkit-mask-image: radial-gradient(75% 70% at 100% 0%, #000 0%, transparent 72%);
  mask-image: radial-gradient(75% 70% at 100% 0%, #000 0%, transparent 72%);
}
main > .section:not(.section--dark):nth-of-type(even)::before {
  background:
    radial-gradient(rgba(11, 20, 66, .11) 1px, transparent 1.3px) 0 0 / 22px 22px,
    radial-gradient(40% 55% at 0% 100%, rgba(43, 212, 242, .07), transparent 70%);
  -webkit-mask-image: radial-gradient(75% 70% at 0% 100%, #000 0%, transparent 72%);
  mask-image: radial-gradient(75% 70% at 0% 100%, #000 0%, transparent 72%);
}

/* ---------------- 3. cursor spotlight on cards (added by fx.js) ---------------- */
.fx-glow { position: absolute; inset: 0; z-index: 2; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .35s ease;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), rgba(229, 23, 58, .075), transparent 45%); }
.fx-glow::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px;
  background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 50%), rgba(229, 23, 58, .95), rgba(43, 212, 242, .5) 45%, transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.section--dark .fx-glow, .placements3 .fx-glow { background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), rgba(43, 212, 242, .1), transparent 45%); }
.section--dark .fx-glow::before { background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 50%), rgba(43, 212, 242, .95), rgba(255, 107, 134, .5) 45%, transparent 70%); }
.fx-spot:hover > .fx-glow, .fx-spot:focus-within > .fx-glow { opacity: 1; }

/* ---------------- 4. 3D tilt on track and career cards (angles set by fx.js) ---------------- */
.track.fx-tilt, .track.fx-tilt:hover { transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--ty, 0px)); transition: transform .45s cubic-bezier(.2, .7, .2, 1), box-shadow .3s ease; }
.track.fx-tilt.is-tilting { transition: transform .08s linear, box-shadow .3s ease; }
.track.fx-tilt:hover { --ty: -6px; }

/* ---------------- 5. enquiry forms: a light ring travels round the card ---------------- */
@property --fx-a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.form-card__body::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 2px; pointer-events: none;
  background: conic-gradient(from var(--fx-a), transparent 0 62%, rgba(43, 212, 242, .9) 74%, #e5173a 86%, transparent 96%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: fx-spin 7s linear infinite; }
@keyframes fx-spin { to { --fx-a: 360deg; } }

/* ---------------- 6. home hero: drifting light orbs + grid lit around the cursor ---------------- */
.fx-orb { position: absolute; border-radius: 50%; filter: blur(60px); pointer-events: none; opacity: .8; translate: var(--px, 0) var(--py, 0); transition: translate .9s cubic-bezier(.2, .7, .2, 1); }
.fx-orb--1 { width: 420px; height: 420px; left: -120px; top: 10%; background: radial-gradient(circle, rgba(229, 23, 58, .7), transparent 65%); animation: fx-float 18s ease-in-out infinite; }
.fx-orb--2 { width: 520px; height: 520px; right: -160px; top: -140px; background: radial-gradient(circle, rgba(43, 212, 242, .45), transparent 65%); animation: fx-float 22s ease-in-out -6s infinite reverse; }
.fx-orb--3 { width: 360px; height: 360px; left: 42%; bottom: -180px; background: radial-gradient(circle, rgba(124, 58, 237, .4), transparent 65%); animation: fx-float 26s ease-in-out -12s infinite; }
@keyframes fx-float { 0%, 100% { transform: translate(0, 0) scale(1); } 33% { transform: translate(40px, -30px) scale(1.08); } 66% { transform: translate(-30px, 25px) scale(.95); } }
.fx-grid { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .5s ease;
  background-image: linear-gradient(rgba(95, 227, 247, .22) 1px, transparent 1px), linear-gradient(90deg, rgba(95, 227, 247, .22) 1px, transparent 1px);
  background-size: 48px 48px; background-position: -1px -1px;
  -webkit-mask-image: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), #000, transparent 70%);
  mask-image: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), #000, transparent 70%); }
.hero3:hover .fx-grid { opacity: 1; }

/* ---------------- 7. headings rise in from a soft blur ---------------- */
.reveal.fx-title { transform: translateY(18px); filter: blur(6px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1), filter .7s ease; }
.reveal.fx-title.is-visible { filter: none; }

/* ---------------- 8. primary buttons: light sweep on hover ---------------- */
.btn--primary { background-image: linear-gradient(110deg, transparent 38%, rgba(255, 255, 255, .38) 50%, transparent 62%), var(--grad-brand); background-size: 260% 100%, 100% 100%; background-position: 140% 0, 0 0; background-repeat: no-repeat; transition: transform .2s, box-shadow .2s, background-position .75s ease; }
.btn--primary:hover { background-position: -40% 0, 0 0; }

/* ---------------- 9. numbers in light gradient ---------------- */
.strip3__value { background: linear-gradient(180deg, #fff 30%, #9eeef9); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------------- 10. footer wordmark ---------------- */
.site-footer { position: relative; overflow: hidden; isolation: isolate; }
.site-footer::after { content: "CADD LABS" / ""; position: absolute; left: 50%; bottom: -.18em; z-index: -1; translate: -50% 0; white-space: nowrap; pointer-events: none;
  font-family: var(--font-head); font-weight: 800; font-size: clamp(4.5rem, 15vw, 15rem); letter-spacing: -.04em; line-height: 1;
  color: transparent; -webkit-text-stroke: 1px rgba(255, 255, 255, .07);
  background: linear-gradient(180deg, rgba(255, 255, 255, .05), transparent 70%); -webkit-background-clip: text; background-clip: text; }

/* ---------------- motion & pointer preferences ---------------- */
@media (prefers-reduced-motion: reduce) {
  .form-card__body::before, .fx-orb { animation: none; }
  .track.fx-tilt, .track.fx-tilt:hover { transform: none; }
  .reveal.fx-title { filter: none; }
  .btn--primary { transition: none; }
}
@media (hover: none) { .fx-glow, .fx-grid { display: none; } .track.fx-tilt:hover { --ty: 0px; } }
@media print { .fx-progress, .fx-glow, .fx-orb, .fx-grid, .site-footer::after, .section::before { display: none !important; } }

/* ---------------- 11. home hero: CAD cursor (crosshair, pick box, live coordinates) ---------------- */
.fx-cross { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .35s ease; }
.fx-cross::before, .fx-cross::after { content: ""; position: absolute; }
.fx-cross::before { left: 0; right: 0; top: var(--my, 50%); height: 1px; background: linear-gradient(90deg, transparent, rgba(95, 227, 247, .32) 15%, rgba(95, 227, 247, .32) 85%, transparent); }
.fx-cross::after { top: 0; bottom: 0; left: var(--mx, 50%); width: 1px; background: linear-gradient(180deg, transparent, rgba(95, 227, 247, .32) 15%, rgba(95, 227, 247, .32) 85%, transparent); }
.fx-cross i { position: absolute; left: var(--mx, 50%); top: var(--my, 50%); width: 14px; height: 14px; margin: -7px 0 0 -7px; border: 1px solid rgba(95, 227, 247, .85); }
.fx-coords { position: absolute; right: clamp(16px, 3vw, 40px); top: 12px; font-family: var(--mono); font-size: .66rem; letter-spacing: .14em; white-space: pre; color: rgba(143, 233, 248, .75); opacity: 0; transition: opacity .35s ease; }
.hero3:hover .fx-cross, .hero3:hover .fx-coords { opacity: 1; }
@media (hover: none) { .fx-cross, .fx-coords { display: none; } }

/* ---------------- 12. section labels: a dimension line with drafting ticks ---------------- */
.eyebrow::before, .section-head--center .eyebrow::after, .section--dark .eyebrow::before, .modal__intro .eyebrow::before { width: 30px; height: 9px; border-radius: 0; box-shadow: none;
  background: linear-gradient(currentColor, currentColor) center / 100% 1.5px no-repeat,
    linear-gradient(135deg, transparent 40%, currentColor 40% 60%, transparent 60%) left center / 8px 8px no-repeat,
    linear-gradient(135deg, transparent 40%, currentColor 40% 60%, transparent 60%) right center / 8px 8px no-repeat; }

/* ---------------- 13. "Why CADD LABS" cards: registration marks on hover ---------------- */
.roadmap__item::before, .roadmap__item::after { content: ""; position: absolute; width: 0; height: 0; border: 0 solid var(--brand); opacity: 0; transition: width .3s ease, height .3s ease, opacity .3s ease; pointer-events: none; }
.roadmap__item::before { top: 6px; left: 6px; border-top-width: 2px; border-left-width: 2px; }
.roadmap__item::after { bottom: 6px; right: 6px; border-bottom-width: 2px; border-right-width: 2px; }
.roadmap__item:hover::before, .roadmap__item:hover::after { width: 16px; height: 16px; opacity: 1; }
