/* ==========================================================================
   Mobile App Development page (/service/mobile-app-development-company-dubai/)
   One stylesheet for every section between the Hero and the FAQ.
   Loaded only for the "mobile-app" service template. Every selector uses the
   page-only "mad-" classes (or the page wrapper .mobile-app-template), so no
   other page, the Hero, the FAQ or the CTA is affected.

   Sections: intro · services · platforms · why · process · industries
   ========================================================================== */

/* ---------- Page tokens ---------- */

.mobile-app-template {
  --mad-red: #e10000;
  --mad-red-bright: #ff2a2a;
  --mad-red-deep: #b80000;
  --mad-red-soft: #fdecec;
  --mad-ink: #0b0b0b;
  --mad-body: #4b5563;
  --mad-line: #ececec;
  --mad-radius: 22px;
  --mad-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---------- Shared section shell ---------- */

.mad-intro,
.mad-services,
.mad-platforms,
.mad-why,
.mad-process,
.mad-industries {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: 64px 0;
}

/* ---------- Shared heading pieces ----------
   shared/fonts.css forces weights on headings, p, span, a and li with
   !important, so the weights below are scoped and !important too. */

.mobile-app-template .mad-kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
  color: var(--mad-red);
  font-size: 13px;
  font-weight: 700 !important;
  letter-spacing: 0.14em;
  line-height: 1.4;
  text-transform: uppercase;
}

.mad-kicker::before {
  content: "";
  flex: 0 0 auto;
  width: 28px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.mobile-app-template .mad-kicker--light {
  color: #ff4d4d;
}

.mobile-app-template .mad-title {
  margin: 0 0 14px;
  color: var(--mad-ink);
  font-size: clamp(28px, 3.2vw, 44px);
  font-weight: 700 !important;
  line-height: 1.14;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.mobile-app-template .mad-title--light {
  color: #ffffff;
}

.mad-accent {
  color: var(--mad-red);
}

.mobile-app-template .mad-subtitle {
  max-width: 44em;
  margin: 0;
  color: var(--mad-body);
  font-size: 16px;
  line-height: 1.65;
}

.mad-head {
  margin: 0 0 40px;
}

.mad-head--center {
  text-align: center;
}

.mad-head--center .mad-subtitle {
  margin: 0 auto;
}

.mad-head--split {
  display: grid;
  gap: 14px;
}

.mad-head--split .mad-title {
  margin: 0;
}

/* ==========================================================================
   1. Intro: copy + CSS phone mockup
   ========================================================================== */

.mad-intro {
  background:
    radial-gradient(ellipse at 85% 35%, rgba(225, 0, 0, 0.08), rgba(225, 0, 0, 0) 55%),
    #ffffff;
}

.mad-intro__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 48px;
  align-items: center;
}

.mad-intro__copy {
  min-width: 0;
}

.mad-intro__copy > * {
  animation: mad-rise-in 0.8s var(--mad-ease) both;
}

.mad-intro__copy > :nth-child(2) { animation-delay: 0.1s; }
.mad-intro__copy > :nth-child(3) { animation-delay: 0.2s; }
.mad-intro__copy > :nth-child(4) { animation-delay: 0.3s; }
.mad-intro__copy > :nth-child(5) { animation-delay: 0.4s; }

.mobile-app-template .mad-intro__title {
  font-size: clamp(28px, 3.3vw, 44px);
  margin-bottom: 20px;
}

.mobile-app-template .mad-intro__lead {
  margin: 0 0 18px;
  color: #1f2937;
  font-size: 17px;
  line-height: 1.7;
}

.mobile-app-template .mad-intro__support {
  margin: 0 0 30px;
  padding-left: 18px;
  border-left: 3px solid var(--mad-red);
  color: var(--mad-body);
  font-size: 16px;
  line-height: 1.65;
}

.mobile-app-template .mad-intro__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 26px;
  border-radius: 999px;
  background: var(--mad-ink);
  color: #ffffff;
  font-size: 16px;
  font-weight: 700 !important;
  text-decoration: none;
  box-shadow: 0 12px 26px rgba(15, 15, 15, 0.18);
  transition:
    background-color 0.35s ease,
    transform 0.35s var(--mad-ease),
    box-shadow 0.35s ease;
}

.mad-intro__cta i {
  display: inline-block;
  transition: transform 0.35s var(--mad-ease);
}

.mobile-app-template .mad-intro__cta:hover,
.mobile-app-template .mad-intro__cta:focus-visible {
  background: var(--mad-red);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(225, 0, 0, 0.32);
}

.mad-intro__cta:hover i,
.mad-intro__cta:focus-visible i {
  transform: rotate(45deg);
}

.mad-intro__cta:focus-visible {
  outline: 3px solid rgba(225, 0, 0, 0.35);
  outline-offset: 4px;
}

/* Visual column */
.mad-intro__visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 440px;
  animation: mad-rise-in 1s 0.2s var(--mad-ease) both;
}

/* Soft glow + dashed orbit behind the phone */
.mad-intro__visual::before {
  content: "";
  position: absolute;
  width: min(380px, 90%);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(225, 0, 0, 0.18), rgba(225, 0, 0, 0) 68%);
  z-index: -1;
}

.mad-intro__visual::after {
  content: "";
  position: absolute;
  width: min(400px, 92%);
  aspect-ratio: 1;
  border: 1.5px dashed rgba(225, 0, 0, 0.25);
  border-radius: 50%;
  z-index: -1;
  animation: mad-spin 48s linear infinite;
}

/* Phone frame */
.mad-phone {
  position: relative;
  z-index: 1;
  width: 220px;
  aspect-ratio: 9 / 18.5;
  padding: 10px;
  border-radius: 40px;
  background: linear-gradient(160deg, #1d1d20 0%, #0b0b0d 100%);
  box-shadow:
    inset 0 0 0 2px #2b2b30,
    0 40px 70px rgba(15, 15, 15, 0.28),
    0 12px 24px rgba(225, 0, 0, 0.12);
  animation: mad-float 6s ease-in-out infinite;
}

.mad-phone__notch {
  position: absolute;
  top: 18px;
  left: 50%;
  z-index: 2;
  width: 72px;
  height: 20px;
  border-radius: 999px;
  background: #0b0b0d;
  transform: translateX(-50%);
}

.mad-phone__screen {
  display: flex;
  flex-direction: column;
  gap: 11px;
  height: 100%;
  padding: 44px 13px 13px;
  border-radius: 31px;
  background: linear-gradient(180deg, #ffffff 0%, #fff4f4 100%);
  overflow: hidden;
}

.mad-phone__hero {
  position: relative;
  display: block;
  flex: 0 0 auto;
  height: 96px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--mad-red-bright) 0%, var(--mad-red) 55%, var(--mad-red-deep) 100%);
  box-shadow: 0 10px 20px rgba(225, 0, 0, 0.25);
}

.mad-phone__hero::before {
  content: "";
  position: absolute;
  top: 16px;
  left: 16px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
}

.mad-phone__hero::after {
  content: "";
  position: absolute;
  left: 16px;
  bottom: 18px;
  width: 58%;
  height: 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.75);
  box-shadow: 0 -14px 0 rgba(255, 255, 255, 0.45);
}

.mad-phone__tiles {
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.mad-phone__tile {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border-radius: 14px;
  background: #ffffff;
  color: var(--mad-red);
  font-size: 19px;
  box-shadow: 0 6px 14px rgba(15, 15, 15, 0.07);
}

.mad-phone__row {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  height: 46px;
  padding: 0 12px 0 46px;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 6px 14px rgba(15, 15, 15, 0.06);
}

.mad-phone__row::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 11px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--mad-red-soft);
  transform: translateY(-50%);
}

.mad-phone__line {
  display: block;
  width: 80%;
  height: 6px;
  border-radius: 6px;
  background: #e5e7eb;
}

.mad-phone__line--short {
  width: 48%;
  background: #f1d4d4;
}

.mad-phone__tabbar {
  display: block;
  flex: 0 0 auto;
  height: 34px;
  margin-top: auto;
  border-radius: 14px;
  background:
    radial-gradient(circle, var(--mad-red) 4px, transparent 5px) 18% 50% / 20px 20px no-repeat,
    radial-gradient(circle, #d1d5db 4px, transparent 5px) 40% 50% / 20px 20px no-repeat,
    radial-gradient(circle, #d1d5db 4px, transparent 5px) 62% 50% / 20px 20px no-repeat,
    radial-gradient(circle, #d1d5db 4px, transparent 5px) 84% 50% / 20px 20px no-repeat,
    #ffffff;
  box-shadow: 0 6px 14px rgba(15, 15, 15, 0.06);
}

/* Floating chips around the phone */
.mobile-app-template .mad-intro__chip {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: #ffffff;
  color: var(--mad-ink);
  font-size: 14px;
  font-weight: 700 !important;
  white-space: nowrap;
  box-shadow: 0 14px 30px rgba(15, 15, 15, 0.12);
  animation: mad-float 7s ease-in-out infinite;
}

.mad-intro__chip i {
  color: var(--mad-red);
  font-size: 17px;
}

.mad-intro__chip--a { top: 12%; left: 2%; animation-delay: -1s; }
.mad-intro__chip--b { top: 44%; right: 0; animation-delay: -3s; }
.mad-intro__chip--c { bottom: 8%; left: 6%; animation-delay: -5s; }

/* ==========================================================================
   2. Services: bento grid, first card featured
   ========================================================================== */

.mad-services {
  background: linear-gradient(180deg, #fafafa 0%, #ffffff 100%);
}

.mad-services__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

.mad-service {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 26px 24px 28px;
  border: 1px solid var(--mad-line);
  border-radius: var(--mad-radius);
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 15, 15, 0.05);
  overflow: hidden;
  transition:
    transform 0.45s var(--mad-ease),
    box-shadow 0.45s ease,
    border-color 0.45s ease;
}

/* Red accent bar that sweeps in on hover */
.mad-service::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--mad-red), #ff6b6b);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.5s var(--mad-ease);
}

.mad-service__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}

.mad-service__icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--mad-red-soft);
  color: var(--mad-red);
  font-size: 24px;
  transition:
    background-color 0.4s ease,
    color 0.4s ease,
    transform 0.45s var(--mad-ease),
    box-shadow 0.4s ease;
}

.mobile-app-template .mad-service__num {
  color: #c4c4c4;
  font-size: 14px;
  font-weight: 800 !important;
  letter-spacing: 0.08em;
}

.mobile-app-template .mad-service__name {
  margin: 0 0 10px;
  color: var(--mad-ink);
  font-size: 19px;
  font-weight: 700 !important;
  line-height: 1.3;
}

.mobile-app-template .mad-service__desc {
  margin: 0;
  color: var(--mad-body);
  font-size: 15px;
  line-height: 1.65;
}

.mad-service:hover,
.mad-service:focus-within {
  transform: translateY(-6px);
  border-color: rgba(225, 0, 0, 0.25);
  box-shadow: 0 24px 48px rgba(225, 0, 0, 0.12);
}

.mad-service:hover::before,
.mad-service:focus-within::before {
  transform: scaleX(1);
}

.mad-service:hover .mad-service__icon,
.mad-service:focus-within .mad-service__icon {
  background: var(--mad-red);
  color: #ffffff;
  transform: rotate(-8deg) scale(1.05);
  box-shadow: 0 12px 24px rgba(225, 0, 0, 0.3);
}

/* Featured first card: dark with a red glow and an outlined phone shape */
.mad-service--featured {
  justify-content: flex-end;
  border-color: transparent;
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 42, 42, 0.45), rgba(255, 42, 42, 0) 55%),
    linear-gradient(150deg, #151517 0%, #0b0b0c 60%, #2a0606 100%);
  box-shadow: 0 22px 46px rgba(15, 15, 15, 0.22);
}

.mad-service--featured::after {
  content: "";
  position: absolute;
  right: 28px;
  bottom: -60px;
  width: 120px;
  height: 220px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 28px;
  transform: rotate(-12deg);
  transition: transform 0.6s var(--mad-ease);
  pointer-events: none;
}

.mad-service--featured .mad-service__top {
  margin-bottom: auto;
  padding-bottom: 28px;
}

.mad-service--featured .mad-service__icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(145deg, var(--mad-red-bright), var(--mad-red-deep));
  color: #ffffff;
  font-size: 28px;
  box-shadow: 0 14px 28px rgba(225, 0, 0, 0.4);
}

.mobile-app-template .mad-service--featured .mad-service__num {
  color: rgba(255, 255, 255, 0.45);
}

.mobile-app-template .mad-service--featured .mad-service__name {
  position: relative;
  color: #ffffff;
  font-size: 24px;
}

.mobile-app-template .mad-service--featured .mad-service__desc {
  position: relative;
  max-width: 34em;
  color: rgba(255, 255, 255, 0.76);
  font-size: 16px;
}

.mad-service--featured:hover,
.mad-service--featured:focus-within {
  border-color: transparent;
  box-shadow: 0 28px 56px rgba(225, 0, 0, 0.28);
}

.mad-service--featured:hover::after,
.mad-service--featured:focus-within::after {
  transform: rotate(-4deg) translateY(-10px);
}

/* ==========================================================================
   3. Platforms: tall cards with large platform icons
   ========================================================================== */

.mad-platforms {
  background: #ffffff;
}

.mad-platforms::before {
  content: "";
  position: absolute;
  top: -180px;
  right: -200px;
  width: 560px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(225, 0, 0, 0.08), rgba(225, 0, 0, 0) 70%);
  z-index: -1;
  pointer-events: none;
}

.mad-platforms__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}

.mad-platform {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 30px 24px 32px;
  border: 1px solid #f3dede;
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff 0%, #fff7f7 100%);
  box-shadow: 0 14px 34px rgba(225, 0, 0, 0.06);
  overflow: hidden;
  transition:
    transform 0.45s var(--mad-ease),
    box-shadow 0.45s ease,
    border-color 0.45s ease;
}

/* Bottom bar that grows on hover */
.mad-platform::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--mad-red-deep), var(--mad-red-bright));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.5s var(--mad-ease);
}

.mobile-app-template .mad-platform__num {
  position: absolute;
  top: 24px;
  right: 24px;
  color: #d9a3a3;
  font-size: 13px;
  font-weight: 800 !important;
  letter-spacing: 0.1em;
}

.mad-platform__art {
  position: relative;
  display: grid;
  place-items: center;
  width: 80px;
  height: 80px;
  margin: 8px 0 26px 8px;
  border-radius: 24px;
  background: linear-gradient(145deg, var(--mad-red-bright) 0%, var(--mad-red) 55%, var(--mad-red-deep) 100%);
  color: #ffffff;
  font-size: 34px;
  box-shadow: 0 18px 34px rgba(225, 0, 0, 0.3);
  transition: transform 0.5s var(--mad-ease);
}

.mad-platform__ring {
  position: absolute;
  inset: -9px;
  border: 1.5px dashed rgba(225, 0, 0, 0.35);
  border-radius: 30px;
  transition: transform 0.8s var(--mad-ease);
}

.mobile-app-template .mad-platform__name {
  margin: 0 0 10px;
  color: var(--mad-ink);
  font-size: 19px;
  font-weight: 700 !important;
  line-height: 1.3;
}

.mobile-app-template .mad-platform__desc {
  margin: 0;
  color: var(--mad-body);
  font-size: 15px;
  line-height: 1.65;
}

.mad-platform:hover,
.mad-platform:focus-within {
  transform: translateY(-8px);
  border-color: rgba(225, 0, 0, 0.35);
  box-shadow: 0 28px 54px rgba(225, 0, 0, 0.16);
}

.mad-platform:hover::after,
.mad-platform:focus-within::after {
  transform: scaleX(1);
}

.mad-platform:hover .mad-platform__art,
.mad-platform:focus-within .mad-platform__art {
  transform: translateY(-4px) rotate(-6deg);
}

.mad-platform:hover .mad-platform__ring,
.mad-platform:focus-within .mad-platform__ring {
  transform: rotate(18deg) scale(1.06);
}

/* ==========================================================================
   4. Why choose us: full-width black band, centred heading, four red-glow cards
   ========================================================================== */

.mad-why {
  background:
    radial-gradient(ellipse at 0% 0%, rgba(225, 0, 0, 0.28), rgba(225, 0, 0, 0) 42%),
    radial-gradient(ellipse at 100% 100%, rgba(225, 0, 0, 0.26), rgba(225, 0, 0, 0) 45%),
    #050505;
  color: #ffffff;
}

/* Eyebrow with a thin red rule on each side */
.mobile-app-template .mad-why__eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: 0 0 18px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700 !important;
  letter-spacing: 0.22em;
  line-height: 1.4;
  text-transform: uppercase;
}

.mad-why__eyebrow::before,
.mad-why__eyebrow::after {
  content: "";
  flex: 0 0 auto;
  width: 64px;
  height: 2px;
  border-radius: 2px;
  background: #ffffff;
}

.mad-why__head {
  max-width: 920px;
  margin: 0 auto 52px;
  text-align: center;
}

.mobile-app-template .mad-why__title {
  margin: 0 0 16px;
  color: #ffffff;
  font-size: clamp(34px, 4.6vw, 62px);
  font-weight: 700 !important;
  line-height: 1.06;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.mad-why .mad-accent {
  color: #ffffff;
}

.mobile-app-template .mad-why__subtitle {
  max-width: 40em;
  margin: 0 auto;
  color: #ffffff;
  font-size: 19px;
  line-height: 1.55;
}

/* Cards: one column on mobile, two on tablet, four on desktop */
.mad-why__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}

.mad-why__card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  padding: 30px 26px 30px;
  border: 1px solid rgba(225, 0, 0, 0.7);
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 60%, rgba(0, 0, 0, 0.25) 100%);
  box-shadow:
    0 0 22px rgba(225, 0, 0, 0.22),
    inset 0 0 22px rgba(225, 0, 0, 0.05);
  transition:
    transform 0.45s var(--mad-ease),
    box-shadow 0.45s ease,
    border-color 0.45s ease;
}

/* Red number badge, top-left */
.mobile-app-template .mad-why__num {
  display: inline-grid;
  place-items: center;
  align-self: flex-start;
  width: 64px;
  height: 48px;
  margin: 0 0 24px;
  border-radius: 12px;
  background: linear-gradient(145deg, #ff2a2a 0%, #e10000 60%, #b80000 100%);
  color: #ffffff;
  font-size: 24px;
  line-height: 1;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 8px 20px rgba(225, 0, 0, 0.4);
  transition: transform 0.45s var(--mad-ease), box-shadow 0.45s ease;
}

/* Icon inside the badge */
.mobile-app-template .mad-why__num i {
  display: block;
  color: #ffffff;
  font-size: inherit;
  line-height: 1;
  transition: transform 0.45s var(--mad-ease);
}

.mobile-app-template .mad-why__name {
  margin: 0;
  min-height: 2.6em;
  color: #ffffff;
  font-size: 21px;
  font-weight: 700 !important;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

/* Short red divider under the heading */
.mad-why__rule {
  display: block;
  flex: 0 0 auto;
  width: 56px;
  height: 2px;
  margin: 18px 0;
  border-radius: 2px;
  background: var(--mad-red-bright);
  box-shadow: 0 0 10px rgba(225, 0, 0, 0.6);
}

.mobile-app-template .mad-why__desc {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 16px;
  line-height: 1.65;
}

/* Hover: lift, brighter border and stronger glow */
.mad-why__card:hover,
.mad-why__card:focus-within {
  transform: translateY(-6px);
  border-color: #ff2a2a;
  box-shadow:
    0 24px 50px rgba(0, 0, 0, 0.5),
    0 0 38px rgba(225, 0, 0, 0.45),
    inset 0 0 26px rgba(225, 0, 0, 0.08);
}

.mad-why__card:hover .mad-why__num i,
.mad-why__card:focus-within .mad-why__num i {
  transform: scale(1.12);
}

.mad-why__card:hover .mad-why__num,
.mad-why__card:focus-within .mad-why__num {
  transform: scale(1.06);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 12px 28px rgba(225, 0, 0, 0.6);
}

@media (min-width: 640px) {
  .mad-why__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
  }
}

@media (min-width: 1100px) {
  .mad-why__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
  }
}

@media (max-width: 639px) {
  .mad-why__head {
    margin-bottom: 36px;
  }

  .mad-why__eyebrow {
    gap: 12px;
    font-size: 12px;
  }

  .mad-why__eyebrow::before,
  .mad-why__eyebrow::after {
    width: 36px;
  }

  .mobile-app-template .mad-why__subtitle {
    font-size: 17px;
  }

  .mad-why__card {
    padding: 24px 22px 26px;
  }

  .mobile-app-template .mad-why__num {
    width: 56px;
    height: 42px;
    margin-bottom: 20px;
    font-size: 20px;
  }

  .mobile-app-template .mad-why__name {
    min-height: 0;
    font-size: 20px;
  }
}

/* ==========================================================================
   5. Process approach: eyebrow + title, five connected cards (desktop),
   two columns (tablet), one column with a vertical connector (mobile)
   ========================================================================== */

.mad-process {
  background:
    radial-gradient(ellipse at 0% 0%, rgba(225, 0, 0, 0.09), rgba(225, 0, 0, 0) 38%),
    radial-gradient(ellipse at 100% 100%, rgba(225, 0, 0, 0.08), rgba(225, 0, 0, 0) 40%),
    #ffffff;
  padding: 56px 0 64px;
}

.mobile-app-template .mad-process__eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 0 0 14px;
  color: var(--mad-red);
  font-size: 14px;
  font-weight: 700 !important;
  letter-spacing: 0.18em;
  line-height: 1.4;
  text-transform: uppercase;
}

.mad-process__eyebrow::before,
.mad-process__eyebrow::after {
  content: "";
  flex: 0 0 auto;
  width: 44px;
  height: 2px;
  border-radius: 2px;
  background: var(--mad-red);
}

.mad-process__head {
  max-width: 860px;
  margin: 0 auto 40px;
  text-align: center;
}

.mobile-app-template .mad-process__title {
  margin: 0 0 12px;
  color: var(--mad-ink);
  font-size: clamp(28px, 3.6vw, 48px);
  font-weight: 700 !important;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.mad-process .mad-accent {
  color: var(--mad-red);
}

.mobile-app-template .mad-process__subtitle {
  max-width: 42em;
  margin: 0 auto;
  color: var(--mad-body);
  font-size: 16px;
  line-height: 1.6;
}

/* Track: one column on mobile. Each step is a node above its card, with a
   dotted connector running down to the next node. */
.mad-process__track {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mad-step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  padding: 0 0 32px;
}

/* Connector: only in the 32px gap between a card's bottom edge and the next
   step's badge. It sits below the card, so it never crosses card content. */
.mad-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: auto;
  bottom: 0;
  left: 50%;
  height: 32px;
  margin-left: -1px;
  border-left: 2px dotted rgba(225, 0, 0, 0.6);
  pointer-events: none;
}

.mobile-app-template .mad-step__node {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--mad-red-bright), var(--mad-red-deep));
  color: #ffffff;
  font-size: 20px;
  font-weight: 800 !important;
  line-height: 1;
  box-shadow:
    0 0 0 8px #ffffff,
    0 10px 22px rgba(225, 0, 0, 0.3);
  transition: transform 0.45s var(--mad-ease), box-shadow 0.45s ease;
}

/* Card: white, rounded, soft shadow, red curve top-left, red bottom bar */
.mad-step__card {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 420px;
  margin-top: 22px;
  padding: 30px 22px 26px;
  border: 1px solid rgba(15, 15, 15, 0.05);
  border-radius: 20px;
  background: #ffffff;
  text-align: center;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(15, 15, 15, 0.08);
  transition:
    transform 0.45s var(--mad-ease),
    box-shadow 0.45s ease;
}

.mad-step__card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 42%;
  height: 58px;
  background: linear-gradient(135deg, var(--mad-red-bright), var(--mad-red-deep));
  border-bottom-right-radius: 100%;
  pointer-events: none;
}

.mad-step__card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: var(--mad-red);
  transform: scaleX(0.4);
  transition: transform 0.5s var(--mad-ease), box-shadow 0.5s ease;
  pointer-events: none;
}

.mad-step__icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 10px 0 16px;
  color: var(--mad-red);
}

.mad-step__icon i {
  display: block;
  font-size: 44px;
  line-height: 1;
  transition: transform 0.45s var(--mad-ease);
}

.mobile-app-template .mad-step__name {
  margin: 0;
  color: var(--mad-ink);
  font-size: 20px;
  font-weight: 700 !important;
  line-height: 1.3;
}

.mad-step__rule {
  display: block;
  width: 44px;
  height: 2px;
  margin: 12px auto 14px;
  border-radius: 2px;
  background: var(--mad-red);
}

.mobile-app-template .mad-step__desc {
  margin: 0;
  color: var(--mad-body);
  font-size: 15px;
  line-height: 1.6;
}

/* Hover: node grows, card lifts, shadow deepens, bottom bar widens */
.mad-step:hover .mad-step__node,
.mad-step:focus-within .mad-step__node {
  transform: scale(1.08);
  box-shadow:
    0 0 0 8px #ffffff,
    0 14px 28px rgba(225, 0, 0, 0.4);
}

.mad-step:hover .mad-step__card,
.mad-step:focus-within .mad-step__card {
  transform: translateY(-6px);
  box-shadow: 0 22px 44px rgba(225, 0, 0, 0.14), 0 6px 14px rgba(15, 15, 15, 0.06);
}

.mad-step:hover .mad-step__card::after,
.mad-step:focus-within .mad-step__card::after {
  transform: scaleX(1);
  box-shadow: 0 0 14px rgba(225, 0, 0, 0.6);
}

.mad-step:hover .mad-step__icon i,
.mad-step:focus-within .mad-step__icon i {
  transform: scale(1.08);
}

/* Tablet (768px to 1199px): two columns; the last (odd) step is centred on its own row */
@media (min-width: 768px) {
  .mad-process__track {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 28px;
  }

  .mad-step:not(:last-child)::after {
    display: none;
  }

  .mad-step:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    justify-self: center;
    width: calc(50% - 14px);
    min-width: 280px;
  }
}

/* Desktop (1200px and up): five equal cards in one row, joined by a dotted line
   through the node centres (each column is 20% wide, so the line runs from 10% to 90%). */
@media (min-width: 1200px) {
  .mad-process {
    padding: 64px 0 72px;
  }

  .mad-process__head {
    margin-bottom: 44px;
  }

  .mad-process__track {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
  }

  .mad-process__track::before {
    content: "";
    position: absolute;
    top: 29px;
    left: 10%;
    right: 10%;
    height: 4px;
    background: radial-gradient(circle, var(--mad-red) 1.6px, transparent 2px) center / 12px 4px repeat-x;
    pointer-events: none;
  }

  .mad-step {
    padding: 0 12px;
  }

  .mad-step:last-child:nth-child(odd) {
    grid-column: auto;
    justify-self: stretch;
    width: auto;
    min-width: 0;
  }

  .mad-step__card {
    max-width: none;
    padding: 28px 18px 22px;
  }

  .mobile-app-template .mad-step__name {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2.6em;
    font-size: 19px;
  }
}

/* ==========================================================================
   6. Industries: icon tiles
   ========================================================================== */

.mad-industries {
  background: #f7f7f8;
}

.mad-industries__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.mad-industry {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  padding: 18px 20px;
  border: 1px solid var(--mad-line);
  border-radius: 18px;
  background: #ffffff;
  transition:
    transform 0.4s var(--mad-ease),
    box-shadow 0.4s ease,
    border-color 0.4s ease;
}

.mad-industry__icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--mad-red-soft);
  color: var(--mad-red);
  font-size: 22px;
  transition: background-color 0.4s ease, color 0.4s ease;
}

.mobile-app-template .mad-industry__name {
  margin: 0;
  min-width: 0;
  color: var(--mad-ink);
  font-size: 17px;
  font-weight: 700 !important;
  line-height: 1.3;
}

.mad-industry:hover,
.mad-industry:focus-within {
  transform: translateY(-4px);
  border-color: rgba(225, 0, 0, 0.3);
  box-shadow: 0 18px 36px rgba(225, 0, 0, 0.1);
}

.mad-industry:hover .mad-industry__icon,
.mad-industry:focus-within .mad-industry__icon {
  background: var(--mad-red);
  color: #ffffff;
}

/* ==========================================================================
   Motion
   ========================================================================== */

/* Staggered scroll reveal. Browsers without scroll-driven animations
   simply show everything. */
@supports (animation-timeline: view()) {
  .mad-service,
  .mad-platform,
  .mad-why__card,
  .mad-step,
  .mad-industry {
    animation: mad-reveal linear backwards;
    animation-timeline: view();
    animation-range:
      entry calc(var(--mad-i, 0) * 4%) entry calc(var(--mad-i, 0) * 4% + 45%);
  }

  /* The dotted line draws in from left to right as the steps scroll in */
  .mad-process__track::before {
    animation: mad-dots-in linear both;
    animation-timeline: view();
    animation-range: entry 10% cover 40%;
  }

  /* Number badges pop in as their step arrives */
  .mad-step__node {
    animation: mad-pop linear backwards;
    animation-timeline: view();
    animation-range:
      entry calc(var(--mad-i, 0) * 4%) entry calc(var(--mad-i, 0) * 4% + 40%);
  }
}

@keyframes mad-reveal {
  from {
    opacity: 0;
    transform: translate3d(0, 36px, 0);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes mad-rise-in {
  from {
    opacity: 0;
    transform: translate3d(0, 24px, 0);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes mad-float {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, -10px, 0);
  }
}

@keyframes mad-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes mad-dots-in {
  from {
    clip-path: inset(0 100% 0 0);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}

@keyframes mad-pop {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ==========================================================================
   Tablet (640px and up)
   ========================================================================== */

@media (min-width: 640px) {
  .mad-intro,
  .mad-services,
  .mad-platforms,
  .mad-why,
  .mad-industries {
    padding: 80px 0;
  }

  .mobile-app-template .mad-kicker {
    font-size: 14px;
  }

  .mobile-app-template .mad-subtitle {
    font-size: 17px;
  }

  .mad-services__grid,
  .mad-platforms__grid,
  .mad-industries__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mad-service--featured {
    grid-column: span 2;
  }

  .mad-intro__visual {
    width: 100%;
    max-width: 520px;
    min-height: 480px;
    margin: 0 auto;
  }

  .mad-phone {
    width: 236px;
  }
}

/* ==========================================================================
   Desktop (992px and up)
   ========================================================================== */

@media (min-width: 992px) {
  .mad-intro,
  .mad-services,
  .mad-platforms,
  .mad-why,
  .mad-industries {
    padding: 96px 0;
  }

  .mad-head {
    margin-bottom: 48px;
  }

  .mad-head--split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
    gap: 48px;
    align-items: end;
  }

  .mad-intro__grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 64px;
  }

  .mad-intro__visual {
    max-width: none;
    margin: 0;
  }

  .mad-industries__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

}

/* ==========================================================================
   Wide desktop (1100px and up): four-column services and platforms
   ========================================================================== */

@media (min-width: 1100px) {
  .mad-services__grid,
  .mad-platforms__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
  }
}

/* ==========================================================================
   Small phones (639px and below)
   ========================================================================== */

@media (max-width: 639px) {
  .mad-intro__visual {
    min-height: 400px;
  }

  .mad-phone {
    width: 196px;
    border-radius: 34px;
  }

  .mad-phone__screen {
    border-radius: 26px;
  }

  .mobile-app-template .mad-intro__chip {
    padding: 8px 13px;
    font-size: 13px;
  }

  .mobile-app-template .mad-intro__cta {
    justify-content: center;
    width: 100%;
  }

  .mobile-app-template .mad-service--featured .mad-service__name {
    font-size: 21px;
  }

}

/* ==========================================================================
   Reduced motion: keep the layout, drop all movement
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .mobile-app-template [class*="mad-"],
  .mobile-app-template [class*="mad-"]::before,
  .mobile-app-template [class*="mad-"]::after {
    animation: none !important;
    transition: none !important;
  }
}
