/* Mohamed Fathi — small additions on top of the Reeni theme (style.css stays untouched apart from local fonts) */

/* Text logo (replaces the Reeni image logo) */
.mf-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.mf-logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-primary-2nd);
  color: var(--color-white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-primary);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .5px;
}
.mf-logo-text {
  color: var(--color-heading);
  font-family: var(--font-primary);
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}
.mf-logo-text span { color: var(--color-primary-2nd); }

/* Company names in the "supported company" strip */
.mf-company {
  color: var(--color-gray);
  font-family: var(--font-primary);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  text-align: center;
  transition: color .3s;
}
.support-company-logo:hover .mf-company { color: var(--color-heading); }

/* Hero portrait: B&W by default; on hover it turns into the colour 'AI-native' cyborg version with a light sweep + tool-logo particles */
.mf-hero-portrait .mf-hero-photo {
  position: relative;
  width: 76%;            /* same footprint the theme gives the single hero image */
  margin: auto;
}
/* separate layer for the hover lift, so it doesn't fight the theme's scroll-in zoom */
.mf-hero-portrait .mf-hero-lift {
  position: relative;
  transition: transform 1.1s cubic-bezier(.22, 1, .36, 1);
  will-change: transform;
}
/* soft red light behind the portrait — only its opacity animates, which stays smooth */
.mf-hero-portrait .mf-hero-lift::before {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  top: 18%;
  bottom: 0;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(255, 73, 74, .45), rgba(255, 73, 74, 0));
  filter: blur(30px);
  opacity: 0;
  transition: opacity 1.2s cubic-bezier(.4, 0, .2, 1);
  pointer-events: none;
}
.mf-hero-portrait .mf-hero-photo img {
  width: 100%;
  display: block;
  margin: 0;
}
.mf-hero-portrait .mf-hero-color {
  position: absolute;
  inset: 0;
  height: 100%;
  opacity: 0;
  transition: opacity 1.1s cubic-bezier(.4, 0, .2, 1);
  will-change: opacity;
}
/* the sweep is masked to the cut-out, so it only lights up the person */
.mf-hero-portrait .mf-hero-shine {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, .55) 48%, rgba(255, 210, 200, .35) 52%, transparent 62%) no-repeat;
  background-size: 250% 100%;
  background-position: 160% 0;
  -webkit-mask: url(../images/mohamed/mohamed-fathi-cyborg-cutout.png) center / 100% 100% no-repeat;
          mask: url(../images/mohamed/mohamed-fathi-cyborg-cutout.png) center / 100% 100% no-repeat;
  mix-blend-mode: soft-light;
  opacity: 0;
  transition: opacity .8s ease;
}
.mf-hero-portrait .mf-hero-particles {
  position: absolute;
  left: -15%;
  top: -10%;
  width: 130%;
  height: 115%;
  pointer-events: none;
  z-index: 2;
}
.mf-hero-portrait::before { transition: filter 1.1s cubic-bezier(.4, 0, .2, 1), box-shadow 1.1s cubic-bezier(.4, 0, .2, 1); }

.mf-hero-portrait.is-active .mf-hero-lift { transform: translateY(-5px) scale(1.015); }
.mf-hero-portrait.is-active .mf-hero-lift::before { opacity: 1; }
.mf-hero-portrait.is-active .mf-hero-color { opacity: 1; }
.mf-hero-portrait.is-active .mf-hero-shine {
  opacity: 1;
  animation: mf-shine 2.2s cubic-bezier(.4, 0, .2, 1) .15s 1 both;
}
.mf-hero-portrait.is-active::before {
  filter: brightness(1.18) saturate(1.1);
  box-shadow: 0 0 80px rgba(255, 73, 74, .3);
}
@keyframes mf-shine {
  from { background-position: 160% 0; }
  to   { background-position: -60% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .mf-hero-portrait .mf-hero-lift,
  .mf-hero-portrait.is-active .mf-hero-lift { transform: none; transition: none; }
  .mf-hero-portrait.is-active .mf-hero-shine { animation: none; opacity: 0; }
}

/* Contact links in the hero keep the paragraph look */
.banner-contact-info .para a { color: inherit; }
.banner-contact-info .para a:hover { color: var(--color-primary-2nd); }

/* Portrait in the experience block: three cut-out photos that cross-fade (assets/js/exp-slideshow.js) */
.mf-exp-photo {
  position: relative;
  z-index: 1;
}
.mf-exp-slides {
  position: relative;
  aspect-ratio: 1122 / 1402;   /* all three photos share this size */
}
/* the photo column is sticky on desktop: keep photo + dots within the screen height */
@media (min-width: 992px) {
  .mf-exp-slides { max-height: calc(100vh - 190px); }
}
.mf-exp-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transform: translateY(14px) scale(1.02);
  will-change: opacity, transform;
}
/* fade-through: the outgoing photo clears first, then the next one rises in — the two cut-out poses never overlap */
.mf-exp-slide.is-active {
  opacity: 1;
  transform: none;
  transition: opacity .9s cubic-bezier(0, 0, .2, 1) .45s, transform 1.4s cubic-bezier(.22, 1, .36, 1) .45s;
}
.mf-exp-slide.is-leaving {
  opacity: 0;
  transform: translateY(-8px) scale(.985);
  transition: opacity .5s cubic-bezier(.4, 0, 1, 1), transform .6s cubic-bezier(.4, 0, 1, 1);
}
.mf-exp-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}
.mf-exp-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, .22);
  cursor: pointer;
  transition: width .5s cubic-bezier(.22, 1, .36, 1), background-color .5s ease;
}
.mf-exp-dots button:hover { background: rgba(255, 255, 255, .45); }
.mf-exp-dots button.is-active {
  width: 30px;
  background: var(--color-primary-2nd);
}
@media (prefers-reduced-motion: reduce) {
  .mf-exp-slide, .mf-exp-dots button { transition: none; }
}
/* Six roles make the text column long — keep the portrait in view beside it */
@media (min-width: 992px) {
  .experiences-wrapper .experiences-wrap-right-content {
    position: sticky;
    top: 120px;
  }
}

/* "How I Work": the photo takes exactly the height of the three step cards beside it */
@media (min-width: 992px) {
  .latest-service-area .service-card-v2:last-child { margin-bottom: 0; }
  .latest-service-area .service-card-user-image {
    position: relative;
    height: 100%;
  }
  .latest-service-area .service-card-user-image .mf-float {
    position: absolute;
    inset: 0;
  }
  .latest-service-area .service-card-user-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
}
/* slow float + a red glow that follows the cut-out's outline on hover */
.mf-float { animation: mf-float 6s ease-in-out infinite; }
@keyframes mf-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-14px); }
}
.service-card-user-image img { transition: filter .6s ease; }
.service-card-user-image:hover img { filter: drop-shadow(0 22px 45px rgba(255, 73, 74, .38)); }

/* shared 3D tilt — photo-effects.js feeds --mf-rx / --mf-ry from the cursor */
.mf-tilt {
  transform: perspective(1100px) rotateX(var(--mf-rx, 0deg)) rotateY(var(--mf-ry, 0deg));
  transform-style: preserve-3d;
  transition: transform .7s cubic-bezier(.2, .7, .2, 1), box-shadow .5s ease;
  will-change: transform;
}
.mf-tilt.is-tilting { transition: transform .15s ease-out, box-shadow .5s ease; }

@media (prefers-reduced-motion: reduce) {
  .mf-float { animation: none; }
  .mf-tilt, .mf-tilt.is-tilting { transform: none; }
}

/* Tools & Software — Home 13 skill cards, on the same dark card surface as the rest of this page */
.mf-tool-card {
  background: var(--color-gray-2);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  padding: 30px 12px 24px;
}
.mf-tool-card .skill-inner { position: relative; z-index: 1; }
.mf-tool-card img {
  width: 50px;
  height: 50px;
  object-fit: contain;
}
.mf-tool-card .name {
  color: var(--color-heading);
  font-family: var(--font-primary);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 6px;
}
.mf-tool-card .mf-tool-use {
  color: var(--color-gray);
  font-size: 14px;
  line-height: 1.4;
  margin-bottom: 0;
}
.mf-tool-pair {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 20px;
}
.mf-tool-pair img { margin: 0; }

/* Footer call-to-action buttons (replace the newsletter field) */
.mf-footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

/* Hero heading typewriter (assets/js/hero-typing.js) */
.mf-typing .mf-type-intro,
.mf-typing .mf-type-role { display: block; }
.mf-typing .mf-type-em { color: var(--color-primary-2nd); }
.mf-typing .mf-type-role { transition: opacity .4s ease; }
.mf-typing .mf-type-role.is-fading { opacity: 0; }
.mf-caret,
.mf-typing.is-typing-intro .mf-type-intro::after {
  content: "";
  display: inline-block;
  width: 3px;
  height: .9em;
  margin-left: 5px;
  vertical-align: -.08em;
  border-radius: 2px;
  background: var(--color-primary-2nd);
  animation: mf-caret 1s steps(1) infinite;
}
/* solid caret while letters are moving, blinking while a role is held */
.mf-typing.is-typing .mf-caret,
.mf-typing.is-typing-intro .mf-type-intro::after { animation: none; }
.mf-typing.is-typing-intro .mf-type-role .mf-caret { visibility: hidden; }
@keyframes mf-caret {
  0%   { opacity: 1; }
  50%  { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .mf-caret { animation: none; display: none; }
}

/* Hero background lines: the contour lines drift slowly, and bands of light travel along them.
   The glow is masked by banner-lines-mask.png (same lines, full strength) so only the lines light up. */
.rpp-banner-five-area .mf-lines {
  position: absolute;
  inset: 0;
  animation: mf-lines-drift 14s ease-in-out infinite alternate;
  will-change: transform;
}
.rpp-banner-five-area .mf-lines img {
  width: 100%;
  height: 100%;
  display: block;
}
.mf-lines-glow {
  position: absolute;
  inset: 0;
  overflow: hidden;
  -webkit-mask: url(../images/banner/banner-lines-mask.png) 0 0 / 100% 100% no-repeat;
          mask: url(../images/banner/banner-lines-mask.png) 0 0 / 100% 100% no-repeat;
}
.mf-lines-band {
  position: absolute;
  top: -30%;
  bottom: -30%;
  left: 0;
  width: 38%;
  background: linear-gradient(90deg,
    rgba(255, 73, 74, 0) 0%,
    rgba(255, 73, 74, .55) 38%,
    rgba(255, 190, 180, .95) 50%,
    rgba(255, 73, 74, .55) 62%,
    rgba(255, 73, 74, 0) 100%);
  transform: translateX(-120%) skewX(-18deg);
  animation: mf-lines-sweep 5.5s cubic-bezier(.45, 0, .55, 1) infinite;
  will-change: transform;
}
/* a second, fainter white band on its own rhythm so the light never feels like a loop */
.mf-lines-band.is-soft {
  width: 26%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .35) 50%, rgba(255, 255, 255, 0));
  animation-duration: 8.5s;
  animation-delay: -3s;
  animation-direction: reverse;
}
@keyframes mf-lines-drift {
  0%   { transform: translate3d(0, 0, 0) scale(1.04); }
  50%  { transform: translate3d(-1.5%, 1%, 0) scale(1.08) rotate(.4deg); }
  100% { transform: translate3d(1.5%, -1%, 0) scale(1.05) rotate(-.4deg); }
}
@keyframes mf-lines-sweep {
  0%        { transform: translateX(-120%) skewX(-18deg); }
  65%, 100% { transform: translateX(380%) skewX(-18deg); }
}
@media (prefers-reduced-motion: reduce) {
  .rpp-banner-five-area .mf-lines,
  .mf-lines-band { animation: none; }
  .mf-lines-glow { display: none; }
}

/* Circle behind the portrait: reds flow slowly across it; the mask keeps the theme's fade to transparent at the bottom */
.banner-five-main-wrapper .mf-hero-portrait::before {
  background: linear-gradient(125deg, #FF494A 0%, #ff7a5c 22%, #d61f3a 45%, #FF494A 62%, #ff8a66 80%, #c9182f 100%);
  background-size: 260% 260%;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, .85) 45%, transparent 100%);
          mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, .85) 45%, transparent 100%);
  animation: mf-arch-flow 7s ease-in-out infinite alternate;
}
@keyframes mf-arch-flow {
  0%   { background-position: 0% 0%; }
  50%  { background-position: 100% 40%; }
  100% { background-position: 40% 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .banner-five-main-wrapper .mf-hero-portrait::before { animation: none; }
}

/* AI-Native Design section (Home 02 "About Me" layout): the AI tool logos inside the big counter card */
.mf-ai-area .mf-ai-tools {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
  position: relative;
  z-index: 1;
}
.mf-ai-area .mf-ai-tools img {
  width: 40px;
  height: 40px;
  padding: 8px;
  object-fit: contain;
  border-radius: 10px;
  background: rgba(20, 20, 20, .5);
  border: 1px solid rgba(255, 255, 255, .12);
}

/* Story-order layout tweaks (site audit) */
.mf-experience-section .experiences-wrapper { margin-top: 0; }       /* it now opens its own section */

/* CV format chooser (assets/js/cv-download.js) */
.mf-cv-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.mf-cv-modal[hidden] { display: none; }
.mf-cv-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .72);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity .25s ease;
}
.mf-cv-dialog {
  position: relative;
  width: 100%;
  max-width: 560px;
  background: var(--color-gray-2);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  padding: 36px 32px 32px;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .8);
  opacity: 0;
  transform: translateY(16px) scale(.98);
  transition: opacity .25s ease, transform .3s cubic-bezier(.22, 1, .36, 1);
}
.mf-cv-modal.is-open .mf-cv-backdrop,
.mf-cv-modal.is-open .mf-cv-dialog { opacity: 1; transform: none; }
.mf-cv-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-heading);
  font-size: 18px;
}
.mf-cv-close:hover { background: rgba(255, 255, 255, .06); }
.mf-cv-kicker {
  display: block;
  color: var(--color-primary-2nd);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.mf-cv-title {
  color: var(--color-heading);
  font-family: var(--font-primary);
  font-size: 32px;
  font-weight: 700;
  margin: 0 0 24px;
}
.mf-cv-options { display: grid; gap: 14px; }
.mf-cv-option {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border-radius: 16px;
  border: 1px solid var(--color-border);
  background: rgba(255, 255, 255, .02);
  color: var(--color-body);
  text-decoration: none;
  transition: border-color .25s ease, background-color .25s ease, transform .25s ease;
}
.mf-cv-option:hover,
.mf-cv-option:focus-visible {
  border-color: rgba(255, 73, 74, .55);
  background: rgba(255, 73, 74, .06);
  transform: translateY(-2px);
  outline: none;
}
.mf-cv-icon {
  flex: 0 0 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary-2nd);
  color: #fff;
  font-size: 22px;
}
.mf-cv-text { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.mf-cv-text strong {
  color: var(--color-heading);
  font-family: var(--font-primary);
  font-size: 20px;
  font-weight: 700;
}
.mf-cv-text span { font-size: 14px; line-height: 1.5; }
.mf-cv-text em { font-style: normal; font-size: 12px; color: var(--color-primary-2nd); letter-spacing: .5px; }
.mf-cv-arrow { color: var(--color-heading); font-size: 16px; }
@media (max-width: 575px) {
  .mf-cv-dialog { padding: 30px 18px 20px; }
  .mf-cv-title { font-size: 26px; }
  .mf-cv-option { padding: 14px; gap: 12px; }
  .mf-cv-icon { flex-basis: 44px; height: 44px; font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .mf-cv-backdrop, .mf-cv-dialog, .mf-cv-option { transition: none; }
}

/* Hero arch: the theme fixes it at 482px from 400px wide, which on large phones (414–430px) and
   ~1024px screens is taller than the photo column and slides up behind the heading (red role
   text on the red arch). Follow the photo column instead; big desktops keep the full 482px. */
@media (min-width: 400px) {
  .banner-five-main-wrapper .mf-hero-portrait::before { height: min(482px, 92%); }
}
/* keep the heading legible over anything behind it */
.banner-five-main-wrapper .inner .title.mf-typing {
  text-shadow: 0 2px 14px rgba(0, 0, 0, .55);
}

/* "How I Work" photo: hover (or tap on touch screens) reveals the cyborg "AI-native" version */
.mf-swap .mf-float { position: relative; }
@media (min-width: 992px) {
  .latest-service-area .mf-swap .mf-float { position: absolute; }   /* keep the height-matched layout */
}
.mf-swap .mf-swap-alt {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transform: scale(1.01);
  transition: opacity .9s cubic-bezier(.4, 0, .2, 1), transform 1.1s cubic-bezier(.22, 1, .36, 1);
  pointer-events: none;
}
.mf-swap:hover .mf-swap-alt,
.mf-swap.is-swapped .mf-swap-alt { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .mf-swap .mf-swap-alt { transition: opacity .3s linear; transform: none; }
}

/* ---------- Polish pass ---------- */

/* Keyboard users: the theme removes every focus outline; bring back a visible ring
   (only for keyboard focus — mouse clicks stay clean) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
label:focus-visible,
[tabindex]:not([tabindex="-1"]):focus-visible {
  outline: 2px solid #FF494A !important;
  outline-offset: 3px;
}
.ready-chatting-option input:focus-visible + label { outline: 2px solid #fff; outline-offset: 3px; }
main:focus { outline: none; }

/* "Skip to content" link — hidden until a keyboard user tabs to it */
.mf-skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 10000;
  padding: 10px 18px;
  border-radius: 8px;
  background: #FF494A;
  color: #fff;
  font-weight: 500;
  transform: translateY(-160%);
  transition: transform .2s ease;
}
.mf-skip-link:focus { transform: none; color: #fff; }

/* Anchor jumps (keyboard / shared links) land below the sticky header */
html { scroll-padding-top: 90px; }

/* Text selection in the brand colour */
::selection { background: rgba(255, 73, 74, .85); color: #fff; }

/* Balanced headings (no lonely last word) and fewer orphans in paragraphs */
.title, .section-head .title, h1, h2, h3, .card-title .main-title, .portfolio-card-title { text-wrap: balance; }
p { text-wrap: pretty; }

/* Buttons: a small press-down feedback */
.tmp-btn:active, .read-more-btn:active, .mf-cv-option:active { transform: translateY(1px); }

/* No grey flash when tapping links on phones */
a, button, label { -webkit-tap-highlight-color: transparent; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .mf-skip-link { transition: none; }
}
.mf-typing { text-wrap: wrap; }   /* the typed hero heading changes length constantly — don't rebalance it */
.mf-nowrap { white-space: nowrap; }

/* Phones: the big outlined "SELECTED WORK" backdrop broke mid-word ("SELECTE / D WORK") — size it to fit one line */
@media (max-width: 575px) {
  .latest-portfolio-custom-title { font-size: min(40px, 8.4vw); line-height: 1.25; white-space: nowrap; }
}
/* Phones/tablets: leave room under the copyright line for the floating chat + back-to-top buttons */
@media (max-width: 991px) {
  .copyright-area-one { padding-bottom: 96px; }
}

/* Toptal "Top 3% talent" badge (Freelance section) — Toptal's own badge, restyled with scoped
   class names so it can't clash with the theme, and the site's Rubik font instead of Typekit */
.mf-toptal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  margin-top: 70px;
  text-align: center;
}
.mf-toptal-badge {
  --mf-hex: polygon(50% 0, 100% 24%, 100% 76%, 50% 100%, 0 76%, 0 24%);
  display: inline-block;
  filter: drop-shadow(0 28px 50px rgba(6, 30, 96, .35));
  transition: transform .35s cubic-bezier(.22, 1, .36, 1), filter .35s ease;
}
.mf-toptal-badge:hover { transform: translateY(-6px); filter: drop-shadow(0 34px 56px rgba(6, 60, 200, .45)); }
.mf-toptal-badge:focus-visible { outline-offset: 8px; }
.mf-toptal-ring {
  display: inline-block;
  padding: 6px;
  background: #25a9ef;
  clip-path: var(--mf-hex);
}
.mf-toptal-hex {
  width: 200px;
  padding: 24px 0 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-family: var(--font-secondary, Rubik), Arial, sans-serif;
  background: linear-gradient(153deg, #0667ff 18%, #204ecf 40%, #0f256e 80%);
  clip-path: var(--mf-hex);
}
.mf-toptal-title { font-size: 19px; font-weight: 700; line-height: 1; letter-spacing: .3px; }
.mf-toptal-rule { width: 120px; height: 1px; background: #25a9ef; }
.mf-toptal-by { font-size: 16px; opacity: .8; margin-bottom: -6px; }
.mf-toptal-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 20px;
  border-radius: 6px;
  background: #296bff;
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: .5px;
  text-underline-offset: 2px;
  transition: background-color .25s ease;
}
.mf-toptal-badge:hover .mf-toptal-cta { background: #3d7bff; }
.mf-toptal-note { max-width: 440px; margin: 0; color: var(--color-body, #a9a9a9); font-size: 16px; }
.mf-toptal-note strong { color: #fff; font-weight: 500; }
@media (prefers-reduced-motion: reduce) { .mf-toptal-badge { transition: none; } .mf-toptal-badge:hover { transform: none; } }

/* Smaller copies of the Toptal badge: hero (under Contact) and footer (beside the buttons).
   zoom shrinks the whole badge including its layout box, unlike transform: scale */
.mf-hero-portrait { position: relative; }
.mf-toptal-hero {           /* sits like a sticker on the lower-right edge of the red arch */
  position: absolute;
  right: 3%;
  bottom: 9%;
  z-index: 3;
}
.mf-toptal-hero .mf-toptal-badge { zoom: .56; filter: drop-shadow(0 18px 36px rgba(0, 0, 0, .5)); }
.mf-footer-actions { align-items: center; }
.mf-toptal-badge.mf-toptal-footer { zoom: .46; margin-left: 6px; }
@media (max-width: 575px) {
  .mf-toptal-hero { right: 0; bottom: 6%; }
  .mf-toptal-hero .mf-toptal-badge { zoom: .42; }
}

/* Companies strip: real logos (assets/images/companies). White by default; on hover the brand-colour
   version (transparent, dark text recoloured white for the dark theme) fades in. Linked logos open the
   company site; the link covers the whole cell. */
.support-company-logo { position: relative; }
.mf-logo-swap { position: relative; display: inline-flex; align-items: center; justify-content: center; max-width: 100%; }
.support-company-logo .mf-company-logo {
  width: auto;
  height: 46px;
  max-width: min(170px, 70%);
  object-fit: contain;
  opacity: .6;
  transition: opacity .35s ease, transform .35s ease;
}
.mf-logo-swap .mf-company-logo { max-width: 170px; }
.mf-logo-swap .mf-company-logo.is-color { position: absolute; inset: 0; margin: auto; opacity: 0; }
.support-company-logo:hover .mf-company-logo { opacity: 0; transform: scale(1.04); }
.support-company-logo:hover .mf-company-logo.is-color { opacity: 1; }
.mf-company-link { display: inline-flex; align-items: center; }   /* same baseline as unlinked logos */
.mf-company-link::after { content: ""; position: absolute; inset: 0; }        /* whole cell is clickable */
.mf-company-link:focus-visible { outline: none; }
.support-company-logo:has(.mf-company-link:focus-visible) { outline: 2px solid #FF494A; outline-offset: -2px; }
.support-company-logo:has(.mf-company-link:focus-visible) .mf-company-logo { opacity: 0; }
.support-company-logo:has(.mf-company-link:focus-visible) .mf-company-logo.is-color { opacity: 1; }
@media (max-width: 767px) {
  .support-company-logo .mf-company-logo { height: 38px; max-width: min(150px, 75%); }
  .mf-logo-swap .mf-company-logo { max-width: 150px; }
}
/* boxed two-line mark reads small at the shared height */
.support-company-logo .mf-company-logo[src*="fitrepublik"] { height: 60px; }
@media (max-width: 767px) { .support-company-logo .mf-company-logo[src*="fitrepublik"] { height: 50px; } }
