/* ==========================================================================
   Material Academy — Polish layer
   --------------------------------------------------------------------------
   Loaded AFTER every other stylesheet. Everything here is additive: it gives
   the existing design depth, spatial motion and conversion surfaces without
   replacing a single existing rule. Delete this file and the site returns
   exactly to how it was.

   Three principles, so this never becomes decoration for its own sake:
     1. Motion must say something — depth, hierarchy, or that a thing is
        interactive. Movement that only decorates is removed, not added.
     2. Nothing here may reduce a contrast ratio. The colours in tokens.css
        were measured, not guessed, and no text colour is touched.
     3. Everything degrades. With JavaScript off, or reduced motion asked
        for, the page is the calm, readable page it already was.
   ========================================================================== */

:root {
  /* Layered elevation. Two shadows per step: a tight contact shadow and a
     wide ambient one. A single blurred box-shadow reads as a smudge; this
     reads as an object sitting above paper. */
  --depth-1: 0 1px 2px rgba(10, 24, 38, 0.05), 0 8px 24px -14px rgba(10, 24, 38, 0.20);
  --depth-2: 0 2px 4px rgba(10, 24, 38, 0.06), 0 18px 44px -22px rgba(10, 24, 38, 0.30);
  --depth-3: 0 4px 10px rgba(10, 24, 38, 0.08), 0 36px 72px -28px rgba(10, 24, 38, 0.38);

  /* One diagonal highlight, reused for every lit surface. */
  --sheen: linear-gradient(115deg,
            transparent 0 38%,
            rgba(255, 255, 255, 0.20) 47%,
            rgba(255, 255, 255, 0.05) 54%,
            transparent 62% 100%);

  /* JS writes these; CSS does the work, so no handler ever touches layout. */
  --hero-scroll: 0;    /* 0 at the top of the page, 1 once the hero has gone */
  --px: 0;             /* pointer, -1 (left) .. 1 (right)  */
  --py: 0;             /* pointer, -1 (top)  .. 1 (bottom) */
}

/* ==========================================================================
   1. The hero becomes a space rather than a picture
   ========================================================================== */

body.has-hero .backgroundimage { perspective: 1400px; perspective-origin: 50% 40%; }

/* -- The hero photograph, in WebP where the browser takes it.
      image-set() lets the browser choose and fall back on its own, so there
      is no scripting and no risk of a format nobody can read. The original
      JPEG stays on disk and stays referenced: delete the .webp files and
      this line quietly serves the JPEG again. 683 KB becomes 121 KB. ----- */
body.has-hero .hero-parallax {
  background-image: -webkit-image-set(
      url("../../headway-5QgIuuBxKwM-unsplash.webp") type("image/webp"),
      url("../../headway-5QgIuuBxKwM-unsplash.jpg")  type("image/jpeg"));
  background-image: image-set(
      url("../../headway-5QgIuuBxKwM-unsplash.webp") type("image/webp"),
      url("../../headway-5QgIuuBxKwM-unsplash.jpg")  type("image/jpeg"));
}

/* <picture> is inline by default, which would leave a baseline gap under
   each card photograph. */
.single-popular-course .thumb picture {
  display: block;
  width: 100%;
  height: 100%;
}

/* -- Aurora: slow brand-tinted light behind the photograph.
      Screen blend LIGHTENS, and the headline is white, so this could only
      ever cost contrast. It is therefore masked to nothing across the
      middle of the hero: behind the text column the composite is exactly
      the scrim it always was, and the light only reaches the edges. ------ */
body.has-hero .hero-aurora {
  position: absolute;
  inset: -4%;             /* was -15%: a million pixels of texture nobody saw */
  z-index: -1;            /* above the scrim, which is -1 but earlier in the DOM */
  pointer-events: none;

  /* NO mix-blend-mode. It was `screen`, on 2.38 megapixels, over a layer
     that moves on every scroll frame.

     A blend mode is a COMPOSITING cost, not a paint cost, and it is the
     expensive kind: the compositor renders everything beneath into a
     separate backdrop texture, reads it back, and blends this layer
     against it - then repeats the whole thing every frame the backdrop
     changes. .hero-parallax sits directly beneath and translates on
     scroll, so the backdrop never stopped changing and the blend could
     never be cached. Taking backdrop-filter off the small glass cards
     earlier was the same idea; this is the one that was actually
     costing the frames.

     Screen over a dark backdrop is close to additive light, and these
     gradients are already translucent light over a dark navy scrim, so
     compositing them normally at a higher alpha lands in the same
     place. */
  opacity: 0.62;          /* was 0.45 under screen */
  -webkit-mask-image: radial-gradient(72% 64% at 50% 50%,
            transparent 0 44%, rgba(0, 0, 0, 0.55) 68%, #000 100%);
          mask-image: radial-gradient(72% 64% at 50% 50%,
            transparent 0 44%, rgba(0, 0, 0, 0.55) 68%, #000 100%);
  transform: translate3d(calc(var(--px) * 14px), calc(var(--py) * 10px), 0);
}

/* The drift lives on a child so that it can be a TRANSFORM.

   Animating background-position re-rasterises all three radial gradients on
   every single frame, forever, whether or not anyone is scrolling - and this
   layer also carries mix-blend-mode and a mask, so each repaint drags the
   blend and the mask along with it. A transform is handed straight to the
   compositor and costs nothing per frame. Same motion, none of the paint. */
body.has-hero .hero-aurora::before {
  content: "";
  position: absolute;
  inset: -3%;            /* only as much room as the 2.5% drift needs */
  background:
    radial-gradient(42% 46% at 22% 32%, rgba(96, 148, 214, 0.60) 0%, transparent 70%),
    radial-gradient(38% 42% at 78% 26%, rgba(214, 164, 86, 0.34) 0%, transparent 72%),
    radial-gradient(54% 48% at 60% 82%, rgba(68, 116, 170, 0.55) 0%, transparent 75%);
  animation: ma-aurora 42s ease-in-out infinite alternate;
}
@keyframes ma-aurora {
  0%   { transform: translate3d(0, 0, 0)          scale(1);    }
  50%  { transform: translate3d(2.5%, -1.8%, 0)   scale(1.04); }
  100% { transform: translate3d(-1.8%, 1.4%, 0)   scale(1.02); }
}

/* -- Floor: a grid in real perspective, receding to a horizon. This is what
      makes the hero read as a room instead of a flat photograph. It is
      masked away before the horizon, so there is no hard edge. ----------- */
body.has-hero .hero-floor {
  position: absolute;
  left: -30%;
  right: -30%;
  bottom: -14%;
  height: 58%;
  z-index: -1;
  pointer-events: none;
  transform: rotateX(76deg) translate3d(calc(var(--px) * -18px), 0, 0);
  transform-origin: bottom center;
  opacity: 0.30;
  overflow: hidden;      /* clips the drifting child below */
  -webkit-mask-image: linear-gradient(to top, #000 0%, rgba(0, 0, 0, 0.55) 38%, transparent 82%);
          mask-image: linear-gradient(to top, #000 0%, rgba(0, 0, 0, 0.55) 38%, transparent 82%);
}

/* The grid itself, one cell taller than its parent so that it can slide a
   whole cell downwards and still cover the top edge. Transform again, for
   the same reason as the aurora. */
body.has-hero .hero-floor::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -92px;            /* the extra cell */
  bottom: 0;
  background-image:
    linear-gradient(to right,  rgba(147, 178, 215, 0.55) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(147, 178, 215, 0.40) 1px, transparent 1px);
  background-size: 92px 92px;
  animation: ma-floor 26s linear infinite;
}
@keyframes ma-floor {
  to { transform: translate3d(0, 92px, 0); }   /* exactly one cell: seamless loop */
}

/* -- The lead used to lift and fade as the page scrolled past it, driven by
      --hero-scroll. Gone with the rest of the hero's scroll motion: it meant a
      transform and an opacity recomputed on this subtree every frame, and an
      opacity below 1 forces the whole lead onto its own layer. The headline
      still animates in on load, which is the part people actually see. ----- */

/* -- The three facts become objects: glass, a hairline, their own light. -- */
body.has-hero .hero-facts {
  border-top: 0;
  gap: var(--space-4);
  padding-top: var(--space-7);
}
body.has-hero .hero-facts li {
  flex: 1 1 180px;
  max-width: 260px;
  padding: var(--space-5) var(--space-4);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-lg);
  /* No backdrop-filter here. These three cards sit directly over the aurora
     and the floor, so a blurred backdrop had to be re-sampled and re-blurred
     every frame those layers moved - three times over. Behind them is a dark
     photograph under a scrim, where a 10px blur was costing a great deal and
     showing almost nothing. The gradient is lifted slightly to compensate. */
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.06));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 18px 40px -26px rgba(0, 0, 0, 0.9);
  transition: transform 320ms var(--ease-out), box-shadow 320ms var(--ease-out),
              border-color 320ms var(--ease-out);
}
body.has-hero .hero-facts li:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.30);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.30), 0 26px 50px -24px rgba(0, 0, 0, 0.95);
}
/* The counter must not reflow its neighbours while it climbs. */
body.has-hero .hero-fact__value { font-variant-numeric: tabular-nums; }

/* -- Primary call to action: a lit edge, real elevation, and a sheen that
      crosses once on hover. The arrow already moves; that stays. --------- */
.hero-cta--primary {
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), var(--depth-2);
}
.hero-cta--primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--sheen);
  transform: translateX(-130%);
  transition: transform 760ms var(--ease-out);
  pointer-events: none;
}
.hero-cta--primary:hover::after,
.hero-cta--primary:focus-visible::after { transform: translateX(130%); }
.hero-cta--primary:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34), var(--depth-3); }

/* ==========================================================================
   2. Depth for the cards already on the page
   ========================================================================== */

.employer__card,
.quiz__card,
.proof__card,
.faq__item {
  transition: transform 340ms var(--ease-out), box-shadow 340ms var(--ease-out);
  transform-style: preserve-3d;
}
.employer__card:hover,
.proof__card:hover { box-shadow: var(--depth-3); }

/* On the navy band a shadow is invisible, so depth is carried by the edge. */
.trust__item {
  transition: transform 340ms var(--ease-out), border-color 340ms var(--ease-out);
}
.trust__item:hover { border-color: rgba(255, 255, 255, 0.34); }

/* Pointer-tracked tilt. JS sets --tx/--ty per card; CSS applies it, so the
   handler never reads or writes layout. */
/* will-change only while the pointer is actually over the card. Applying it
   to every [data-tilt] element permanently promoted nine cards to their own
   layer for the whole life of the page, to serve an effect that only ever
   runs under the cursor. :hover fires before the tilt does, so the hint
   still arrives in time to be useful. */
[data-tilt]:hover { will-change: transform; }
[data-tilt].is-tilting {
  transform: perspective(900px)
             rotateX(calc(var(--ty, 0) * -4deg))
             rotateY(calc(var(--tx, 0) * 4deg))
             translateY(-4px);
}

/* ==========================================================================
   3. Standing call to action
   --------------------------------------------------------------------------
   Appears once the hero has gone and hides again over the contact section,
   so it never competes with the form it is trying to send people to.
   ========================================================================== */

.ma-standing-cta {
  position: fixed;
  left: 50%;
  bottom: max(var(--space-4), env(safe-area-inset-bottom, 0px));
  z-index: var(--z-sticky);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  max-width: min(680px, calc(100vw - 2 * var(--space-4)));
  padding: var(--space-3) var(--space-3) var(--space-3) var(--space-5);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-pill);
  /* Opaque to 97%, so the blur behind it was invisible - but being position:
     fixed, it had to re-blur whatever scrolled underneath on every frame of
     every scroll, for the whole page. All cost, no appearance. */
  background: linear-gradient(180deg, rgba(18, 40, 63, 0.99), rgba(10, 24, 38, 0.99));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 24px 60px -24px rgba(10, 24, 38, 0.85);
  transform: translate(-50%, calc(100% + var(--space-6)));
  opacity: 0;
  visibility: hidden;
  transition: transform 460ms var(--ease-out), opacity 300ms var(--ease-out),
              visibility 0s linear 460ms;
}
.ma-standing-cta.is-on {
  transform: translate(-50%, 0);
  opacity: 1;
  visibility: visible;
  transition: transform 460ms var(--ease-out), opacity 300ms var(--ease-out), visibility 0s;
}
.ma-standing-cta__text {
  margin: 0;
  color: rgba(255, 255, 255, 0.90);
  font-size: var(--text-sm);
  line-height: var(--leading-snug);
}
.ma-standing-cta__text b {
  display: block;
  color: #fff;
  font-family: var(--font-serif);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
}
/* Only one of the two titles is ever shown; see polish.js. The selector
   carries the parent class on purpose: `.ma-standing-cta__text b` above is
   0,1,1 and a lone `.ma-standing-cta__short` is 0,1,0, so the bare class
   loses and BOTH titles render. */
.ma-standing-cta__text b.ma-standing-cta__short { display: none; }
.ma-standing-cta__go {
  flex: 0 0 auto;
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-pill);
  background: var(--accent-700);
  color: #fff;
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  text-decoration: none;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24);
  transition: background-color var(--transition), transform var(--transition);
}
.ma-standing-cta__go:hover,
.ma-standing-cta__go:focus-visible {
  background: var(--accent-600);
  transform: translateY(-1px);
  color: #fff;
}
.ma-standing-cta__close {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.75);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background-color var(--transition), color var(--transition);
}
.ma-standing-cta__close:hover { background: rgba(255, 255, 255, 0.16); color: #fff; }
/* On a phone the full bar measured 149px tall and covered the contact
   details behind it. The supporting sentence goes; the offer and the way to
   act on it stay, which is the only part that was doing any work. */
@media (max-width: 575px) {
  .ma-standing-cta {
    gap: var(--space-3);
    padding: var(--space-2) var(--space-2) var(--space-2) var(--space-4);
  }
  .ma-standing-cta__sub { display: none; }
  .ma-standing-cta__text b.ma-standing-cta__long { display: none; }
  .ma-standing-cta__text b.ma-standing-cta__short {
    display: block;
    white-space: nowrap;
  }
  .ma-standing-cta__text b { font-size: var(--text-sm); }
  .ma-standing-cta__go {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-xs);
  }
}

/* The footer wordmark is 30px type with a line-height of 0 somewhere in the
   theme, so it renders at zero height: invisible, but still a focus stop.
   Restoring a line box is the smallest fix that makes it real again. */
.footer .footer-info .logo,
.footer .footer-info .logo span {
  line-height: var(--leading-snug);
}

/* ==========================================================================
   4. Motion that was NOT added, and why
   --------------------------------------------------------------------------
   Every looping animation already in this codebase was checked before this
   layer was written. All of them earn their place: three spinners that only
   run while something is genuinely loading, and the 34s industries marquee
   in the trust band. Nothing was switched off, because nothing was moving
   without reason.

   The one piece of motion worth questioning is not CSS: the certifications
   carousel auto-advances every 5.5s (include/theme-head.php). It already
   pauses on hover and stands still under reduced motion, so it is left as
   the deliberate choice it appears to be rather than quietly removed.
   ========================================================================== */

/* ==========================================================================
   5. Reduced motion — all of the above goes still, none of it disappears
   ========================================================================== */

/* ==========================================================================
   6. Reading progress
   --------------------------------------------------------------------------
   A long page needs to tell you how long. Three pixels, brand to brass.
   ========================================================================== */

.ma-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 250;                 /* above the sticky header at 200 */
  pointer-events: none;
  transform: scaleX(var(--read, 0));
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--brand-500), var(--accent-500));
}

/* ==========================================================================
   7. Certification cards
   --------------------------------------------------------------------------
   These already lift, change border and scale their photograph on hover —
   that work stays untouched. What is added is depth under the lift, a scrim
   so white text never sits on a bright photo, and a price that reads as a
   value rather than a number in a row.
   ========================================================================== */

.single-popular-course:hover { box-shadow: var(--depth-3); }

.single-popular-course .thumb { position: relative; }
.single-popular-course .thumb::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 48%;
  background: linear-gradient(to top, rgba(10, 24, 38, 0.42), transparent);
  opacity: 0;
  transition: opacity 420ms var(--ease-out);
  pointer-events: none;
}
.single-popular-course:hover .thumb::after { opacity: 1; }

/* The price was tried as a brass pill here and backed out. Two reasons, both
   worth leaving written down: the existing rule sets it in navy serif at
   0,3,0 specificity, so a pill meant either out-specifying a deliberate
   decision or !important; and brass behind navy measures 1.94:1, which is
   not a near miss, it is unreadable. tokens.css also asks that brass read as
   a seal rather than a sale banner, and a coloured price pill is the sale
   banner. The number keeps its serif and its navy. Only the figures are
   aligned, so a column of prices reads as a column. */
.single-popular-course .details .value { font-variant-numeric: tabular-nums; }
.single-popular-course .course-go__arrow {
  display: inline-block;
  transition: transform 260ms var(--ease-out);
}
.single-popular-course:hover .course-go__arrow { transform: translateX(5px); }

/* ==========================================================================
   8. The finder — the first thing a visitor actually uses
   ========================================================================== */

.finder__form { transition: box-shadow 300ms var(--ease-out); }
.finder__form:focus-within { box-shadow: var(--depth-2); }
.finder__input:focus,
.finder__input:focus-visible { box-shadow: 0 0 0 4px rgba(51, 102, 156, 0.18); }

.finder__chip {
  transition: transform 220ms var(--ease-out), box-shadow 220ms var(--ease-out),
              border-color 220ms var(--ease-out);
}
.finder__chip:hover {
  transform: translateY(-2px);
  box-shadow: var(--depth-1);
  border-color: var(--border-brand);
}

.finder__submit { position: relative; overflow: hidden; }
.finder__submit::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--sheen);
  transform: translateX(-130%);
  transition: transform 760ms var(--ease-out);
  pointer-events: none;
}
.finder__submit:hover::after,
.finder__submit:focus-visible::after { transform: translateX(130%); }

/* ==========================================================================
   9. What is included — the price is the decision, so give it an edge
   ========================================================================== */

.included__price {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--depth-2);
}
.included__price::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--accent-500), var(--accent-700));
}
.included__price-value { font-variant-numeric: tabular-nums; }

/* ==========================================================================
   10. Employers — a lit edge on approach
   ========================================================================== */

.employer__card { position: relative; overflow: hidden; }
.employer__card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-500), var(--accent-500));
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 420ms var(--ease-out);
}
.employer__card:hover::before { transform: scaleX(1); }
.employer__fact-value { font-variant-numeric: tabular-nums; }

/* ==========================================================================
   11. Proof — a quotation mark that stays behind the words
   --------------------------------------------------------------------------
   Drawn as a background image rather than a pseudo-element on purpose: a
   positioned ::before paints ABOVE text that is not itself positioned, and
   a decorative glyph must never land on top of what somebody wrote.
   ========================================================================== */

.proof__card {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ctext x='0' y='82' font-family='Georgia,serif' font-size='120' fill='%23efdcc0'%3E%E2%80%9C%3C/text%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px top 6px;
  background-size: 64px 64px;
}

/* ==========================================================================
   12. FAQ — a surface when you reach for it
   --------------------------------------------------------------------------
   The chevron already rotates correctly on [open] and the answer already
   animates with grid-template-rows. Neither is touched here.
   ========================================================================== */

.faq__item {
  border-radius: var(--radius);
  transition: background-color 260ms var(--ease-out), box-shadow 260ms var(--ease-out);
}
.faq__item:hover { background-color: var(--paper-raised); }
.faq__item[open] {
  background-color: var(--paper-raised);
  box-shadow: var(--depth-1);
}

/* ==========================================================================
   13. Contact — a focus ring you cannot miss
   ========================================================================== */

.contact .form-control {
  transition: border-color var(--transition), box-shadow var(--transition);
}
.contact .form-control:focus {
  border-color: var(--border-brand);
  box-shadow: 0 0 0 4px rgba(51, 102, 156, 0.16);
}

/* ==========================================================================
   14. Section eyebrows — one small mark, used everywhere
   ========================================================================== */

.eyebrow::before,
.quiz__eyebrow::before,
.employer__eyebrow::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 1px;
  margin-right: 0.6em;
  vertical-align: 0.3em;
  background: currentColor;
  opacity: 0.55;
}

/* ==========================================================================
   15. Grain
   --------------------------------------------------------------------------
   A single percent of noise over the hero. Large flat gradients band on
   8-bit screens, and grain is the standard, cheapest fix; it also stops the
   photograph reading as a stock photograph.
   ========================================================================== */

body.has-hero .hero-grain {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  /* No mix-blend-mode either. This was `overlay` across inset: 0 of the
     hero - 1.41 megapixels, measured - so it had the compositor reading back
     the backdrop and re-blending the full hero on every frame the parallax
     beneath it moved. Film grain at 7% opacity is barely perceptible with or
     without the blend; a frame budget is not. */
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ==========================================================================
   16. The certificate — a real object, in real perspective
   --------------------------------------------------------------------------
   This is the product. Drawn in CSS rather than photographed: it stays sharp
   at any size, adds no bytes, and it can be lit and turned. Every layer sits
   at its own translateZ, so when the card turns, the crest and the seal move
   across the face at a different rate to the paper. That parallax between
   layers is the whole reason it reads as an object and not a picture.
   ========================================================================== */

.cert3d {
  perspective: 1000px;
  max-width: 360px;
  margin-top: var(--space-6);
}
/* The shared tilt rule would turn the box; here the CARD turns inside it. */
.cert3d[data-tilt].is-tilting { transform: none; }

.cert3d__card {
  position: relative;
  aspect-ratio: 1.42 / 1;
  padding: var(--space-5);
  overflow: hidden;
  border: 1px solid var(--accent-200);
  border-radius: var(--radius);
  background: linear-gradient(145deg, #fffdf8 0%, var(--paper) 55%, #f3ece0 100%);
  box-shadow: var(--depth-2), 0 0 0 6px rgba(255, 255, 255, 0.55);
  transform-style: preserve-3d;
  transform: rotateX(calc(var(--ty, 0) * -9deg)) rotateY(calc(var(--tx, 0) * 12deg));
  transition: transform 220ms var(--ease-out), box-shadow 320ms var(--ease-out);
}
.cert3d.is-tilting .cert3d__card {
  box-shadow: var(--depth-3), 0 0 0 6px rgba(255, 255, 255, 0.7);
}
/* Breathing, but only while nobody is holding it. */
.cert3d:not(.is-tilting) .cert3d__card {
  animation: ma-cert-float 11s ease-in-out infinite alternate;
}
@keyframes ma-cert-float {
  from { transform: rotateX(3deg)  rotateY(-7deg) translateY(0); }
  to   { transform: rotateX(-2deg) rotateY(7deg)  translateY(-8px); }
}

.cert3d__crest {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--accent-500), var(--accent-700));
  color: #fff;
  font-family: var(--font-serif);
  font-weight: var(--weight-bold);
  font-size: var(--text-sm);
  letter-spacing: 0.02em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 6px 14px -8px rgba(10, 24, 38, 0.6);
  transform: translateZ(28px);
}
.cert3d__kicker {
  margin: var(--space-3) 0 0;
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--ink-600);
  transform: translateZ(18px);
}
.cert3d__title {
  margin: var(--space-1) 0 0;
  font-family: var(--font-serif);
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-tight);
  color: var(--brand-800);
  transform: translateZ(24px);
}
.cert3d__field {
  margin: var(--space-1) 0 0;
  max-width: 62%;
  font-size: var(--text-sm);
  line-height: var(--leading-snug);
  color: var(--ink-700);
  transform: translateZ(14px);
}
.cert3d__rule {
  display: block;
  width: 44%;
  height: 1px;
  margin: var(--space-4) 0 var(--space-2);
  background: var(--rule);
  transform: translateZ(10px);
}
.cert3d__foot {
  margin: 0;
  font-size: var(--text-xs);
  color: var(--ink-400);
  transform: translateZ(10px);
}
.cert3d__seal {
  position: absolute;
  right: 18px;
  bottom: 16px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--accent-500), var(--accent-800));
  box-shadow: inset 0 2px 5px rgba(255, 255, 255, 0.35), 0 8px 18px -10px rgba(10, 24, 38, 0.7);
  transform: translateZ(20px);
}
.cert3d__seal::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px dashed rgba(255, 255, 255, 0.5);
  border-radius: 50%;
}
.cert3d__sheen {
  position: absolute;
  inset: -20%;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(115deg,
              transparent 0 40%, rgba(255, 255, 255, 0.55) 50%, transparent 60% 100%);
  transform: translateX(calc(var(--tx, 0) * 22%)) translateZ(32px);
  transition: opacity 300ms var(--ease-out);
}
.cert3d.is-tilting .cert3d__sheen { opacity: 0.7; }

@media (max-width: 767px) { .cert3d { display: none; } }

/* ==========================================================================
   17. Section rail
   --------------------------------------------------------------------------
   Eight screens of page needs a sense of place. Real buttons, reachable by
   keyboard, labelled on hover and focus; wide screens only, where there is
   gutter to spare.
   ========================================================================== */

.ma-rail {
  position: fixed;
  right: 18px;
  top: 50%;
  z-index: 150;
  display: flex;
  flex-direction: column;
  gap: 11px;
  transform: translateY(-50%);
}
.ma-rail__dot {
  position: relative;
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(10, 24, 38, 0.22);
  cursor: pointer;
  transition: background-color 240ms var(--ease-out), transform 240ms var(--ease-out);
}
.ma-rail__dot:hover,
.ma-rail__dot:focus-visible { background: var(--brand-600); transform: scale(1.4); }
.ma-rail__dot.is-current { background: var(--accent-700); transform: scale(1.3); }
.ma-rail__label {
  position: absolute;
  right: 20px;
  top: 50%;
  translate: 0 -50%;
  padding: 4px 9px;
  border-radius: var(--radius-sm);
  background: var(--brand-900);
  color: #fff;
  font-size: var(--text-xs);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms var(--ease-out);
}
.ma-rail__dot:hover .ma-rail__label,
.ma-rail__dot:focus-visible .ma-rail__label { opacity: 1; }
@media (max-width: 1199px) { .ma-rail { display: none; } }

/* ==========================================================================
   18. Typesetting
   --------------------------------------------------------------------------
   Two lines that do more for perceived quality than any animation: headings
   stop leaving one orphaned word on the last line, and paragraphs stop
   leaving a single short word alone at the end.
   ========================================================================== */

h1, h2, h3,
.hero-title,
.included__heading,
.proof__heading,
.faq__heading { text-wrap: balance; }

p, li { text-wrap: pretty; }

.hero-title { font-optical-sizing: auto; }

/* ==========================================================================
   19. Tap targets
   --------------------------------------------------------------------------
   Measured at 375px, not guessed. WCAG 2.5.8 asks for 24x24 CSS pixels, and
   exempts links sitting inline inside a sentence. Three things failed it,
   all of them on the phone where most of this audience reads:

     - the carousel dots were 9x9
     - the footer navigation links were 14px tall
     - the FAQ "ask us" call to action was 23px

   The dots keep their 9px appearance; what grows is an invisible hit area
   around them, which is the honest fix - making the dot itself bigger would
   change a design decision to solve an ergonomics problem.
   ========================================================================== */

.popuar-course-carusel .owl-dot {
  position: relative;
  margin: 0 8px;          /* so neighbouring 24px targets do not overlap */
}
.popuar-course-carusel .owl-dot::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 24px;
  height: 24px;
  transform: translate(-50%, -50%);
}

.footer-links ul li a {
  display: inline-block;
  padding-block: 5px;     /* 14px of text becomes a 24px target */
}

.faq__help-cta {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
}

/* Breadcrumb links measured 23px tall on a phone - one pixel under the
   24x24 minimum, which is the kind of miss that only a measurement finds. */
.breadcrumbs a {
  display: inline-block;
  padding-block: 2px;
  min-height: 24px;
}

/* ==========================================================================
   20. Reduced motion — all of the above goes still, none of it disappears
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  body.has-hero .hero-aurora,
  body.has-hero .hero-floor { animation: none; }
  body.has-hero .hero-lead { transform: none; opacity: 1; }
  body.has-hero .hero-facts li:hover,
  [data-tilt].is-tilting,
  .hero-cta--primary:hover,
  .finder__chip:hover { transform: none; }
  .hero-cta--primary::after,
  .finder__submit::after { display: none; }
  .single-popular-course .thumb::after { transition: none; }
  .employer__card::before { transition: none; }
  .ma-standing-cta { transition: opacity 1ms linear; }
  .ma-progress { display: none; }

  /* The certificate stays, flat and still: it is the product, not an effect. */
  .cert3d:not(.is-tilting) .cert3d__card { animation: none; }
  .cert3d__card { transform: none; transition: none; }
  .cert3d__sheen { display: none; }

  .ma-rail__dot { transition: none; }
  .ma-rail__dot:hover,
  .ma-rail__dot:focus-visible,
  .ma-rail__dot.is-current { transform: none; }
}
