/* ==========================================================================
MODULAR APPS SUITE
========================================================================== */

#modular-apps {
  background: var(--a-bg) !important;
  padding: 104px 0 96px !important;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  overflow: hidden !important;
  position: relative;
}

#modular-apps::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 120vw;
  height: 132px;
  border-radius: 0 0 50% 50%;
  background: #f5f5f7;
  transform: translateX(-50%);
  pointer-events: none;
}

[data-theme="dark"] #modular-apps {
  background: #000000 !important;
  border-top-color: rgba(255, 255, 255, 0.09);
}

/* Header */
.ma-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 80px;
  position: relative;
  z-index: 1;
}

.ma-header .eyebrow {
  font-family: var(
    --apple-font,
    -apple-system,
    BlinkMacSystemFont,
    "SF Pro Text",
    sans-serif
  ) !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
  font-size: 0.75rem !important;
  color: #000000 !important;
  margin-bottom: 12px !important;
  display: block;
}

.ma-header h2 {
  font-family:
    "SF Pro Display",
    -apple-system,
    BlinkMacSystemFont,
    sans-serif !important;
  font-size: clamp(2.25rem, 3.8vw, 3.25rem) !important;
  font-weight: 500 !important;
  letter-spacing: -0.035em !important;
  line-height: 1.06 !important;
  color: var(--a-ink, #1d1d1f) !important;
  margin-bottom: 14px !important;
}

.ma-header p {
  font-family: var(
    --apple-font,
    -apple-system,
    BlinkMacSystemFont,
    sans-serif
  ) !important;
  font-size: 1.0625rem !important;
  color: var(--a-ink-3, #6e6e73) !important;
  line-height: 1.6 !important;
  margin: 0 !important;
}

/* App Grid Container */
.ma-grid-container {
  max-width: 960px;
  margin: 0 auto 40px;
  padding: 54px 56px 58px;
  background: #f5f5f7;
  border-radius: 0;
  border: 0;
  box-shadow: none;
  position: relative;
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease;
  z-index: 1;
}

[data-theme="dark"] .ma-grid-container {
  background: #1c1c1e;
  border-color: rgba(255, 255, 255, 0.02);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.05),
    0 12px 40px rgba(0, 0, 0, 0.2);
}

.ma-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(136px, 1fr));
  gap: 48px 44px;
  justify-items: center;
  position: relative;
  /* Allow annotations to render outside grid bounds */
  overflow: visible !important;
}

.ma-grid-container.show-replacements .ma-grid {
  row-gap: 46px;
}

/* App Card styling - Apple/Bloomeor Premium Glassmorphic Tiles */
.ma-card {
  width: 136px;
  min-height: 132px;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: visible !important;
  cursor: pointer;
  text-decoration: none;
  opacity: 0;
  transform: translateY(18px) scale(0.985);
  animation: ma-card-rise 720ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: var(--ma-delay, 0ms);
  transition: transform 420ms cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: none;
}

[data-theme="dark"] .ma-card {
  background: transparent;
  border: 0;
  box-shadow: none;
}

.ma-card:hover {
  background: transparent;
  border-color: transparent;
  transform: translateY(-6px);
  box-shadow: none;
}

[data-theme="dark"] .ma-card:hover {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.ma-icon-box {
  width: 82px;
  height: 82px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.035);
  border-radius: 18px;
  box-shadow:
    0 18px 34px rgba(0, 0, 0, 0.08),
    0 2px 5px rgba(0, 0, 0, 0.035),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  display: grid;
  place-items: center;
  padding: 0;
  overflow: hidden;
  margin-bottom: 16px;
  transition:
    transform 420ms cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 420ms cubic-bezier(0.16, 1, 0.3, 1),
    border-color 420ms cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] .ma-icon-box {
  background: rgba(44, 44, 46, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.075);
  box-shadow:
    0 18px 34px rgba(0, 0, 0, 0.36),
    0 2px 6px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.ma-card:hover .ma-icon-box {
  transform: translateY(-2px) scale(1.055);
  box-shadow:
    0 26px 46px rgba(0, 0, 0, 0.11),
    0 4px 10px rgba(0, 0, 0, 0.045),
    inset 0 1px 0 rgba(255, 255, 255, 1);
}

.ma-icon-box svg,
.ma-icon-box img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.ma-label {
  font-family: var(
    --apple-font,
    -apple-system,
    BlinkMacSystemFont,
    "SF Pro Text",
    sans-serif
  ) !important;
  font-size: 0.9rem;
  font-weight: 700;
  color: #1d1d1f;
  margin-top: 0;
  transition: color 0.3s ease;
}

.ma-sub {
  margin-top: 4px;
  font-family: var(
    --apple-font,
    -apple-system,
    BlinkMacSystemFont,
    "SF Pro Text",
    sans-serif
  ) !important;
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.2;
  color: #86868b;
}

[data-theme="dark"] .ma-label {
  color: #f5f5f7;
}

/* Footer Switch Row */
.ma-footer {
  max-width: 960px;
  margin: 40px auto 0;
  padding: 0 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 1;
}

.ma-toggle-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  position: relative;
  padding: 6px 12px 6px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    0 1px 2px rgba(0, 0, 0, 0.03),
    0 8px 24px rgba(0, 0, 0, 0.04);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  color: inherit;
}

.ma-spark {
  width: 34px;
  height: 34px;
  position: relative;
  display: inline-block;
  flex: 0 0 34px;
}

.ma-spark::before,
.ma-spark::after {
  content: "";
  position: absolute;
  inset: 7px 3px;
  border-radius: 999px;
  border-top: 4px solid #0084ff;
  transform: rotate(18deg);
}

.ma-spark::after {
  inset: 11px 1px;
  transform: rotate(-18deg);
  border-top-color: #0cd016;
}

[data-theme="dark"] .ma-toggle-wrap {
  background: rgba(44, 44, 46, 0.72);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 12px 30px rgba(0, 0, 0, 0.28);
}

/* Custom Switch Element - iOS-style toggle */
.ma-switch {
  appearance: none;
  -webkit-appearance: none;
  width: 52px;
  height: 32px;
  background: #e8e8ed;
  border-radius: 999px;
  position: relative;
  cursor: pointer;
  border: 1px solid rgba(0, 0, 0, 0.04);
  flex-shrink: 0;
  transition:
    background-color 0.28s cubic-bezier(0.25, 0.1, 0.25, 1),
    border-color 0.28s cubic-bezier(0.25, 0.1, 0.25, 1),
    box-shadow 0.28s cubic-bezier(0.25, 0.1, 0.25, 1),
    transform 0.28s cubic-bezier(0.25, 0.1, 0.25, 1);
  padding: 0;
  outline: none;
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.08),
    inset 0 -1px 0 rgba(255, 255, 255, 0.72);
}

.ma-switch:focus,
.ma-switch:active {
  outline: none;
}

.ma-switch:focus-visible {
  box-shadow:
    0 0 0 4px rgba(0, 113, 227, 0.18),
    inset 0 1px 2px rgba(0, 0, 0, 0.08),
    inset 0 -1px 0 rgba(255, 255, 255, 0.72);
}

.ma-switch:hover {
  transform: scale(1.015);
}

[data-theme="dark"] .ma-switch {
  background: #39393d;
  border-color: rgba(255, 255, 255, 0.04);
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.35),
    inset 0 -1px 0 rgba(255, 255, 255, 0.08);
}

.ma-switch-circle {
  width: 28px;
  height: 28px;
  background: #ffffff;
  border-radius: 50%;
  position: absolute;
  top: 1px;
  left: 1px;
  box-shadow:
    0 3px 8px rgba(0, 0, 0, 0.16),
    0 1px 2px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  transition: transform 0.28s cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* Active switch state - iOS System Green */
.ma-grid-container.show-replacements ~ .ma-footer .ma-switch,
.ma-switch.active {
  background: #000000;
  border-color: rgb(0, 0, 0);
  box-shadow:
    inset 0 1px 1px rgba(0, 0, 0, 0.08),
    inset 0 -1px 0 rgba(255, 255, 255, 0.22);
}

[data-theme="dark"]
  .ma-grid-container.show-replacements
  ~ .ma-footer
  .ma-switch,
[data-theme="dark"] .ma-switch.active {
  background: #ffe600;
  border-color: rgb(51, 255, 0);
}

.ma-grid-container.show-replacements ~ .ma-footer .ma-switch .ma-switch-circle,
.ma-switch.active .ma-switch-circle {
  transform: translateX(20px);
}

.ma-toggle-label {
  font-family: var(
    --apple-font,
    -apple-system,
    BlinkMacSystemFont,
    "SF Pro Text",
    sans-serif
  ) !important;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.2;
  color: #1d1d1f;
  user-select: none;
  cursor: pointer;
  transition: color 0.25s ease;
}

[data-theme="dark"] .ma-toggle-label {
  color: #f5f5f7;
}

/* View all Apps Link */
.ma-view-all {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(
    --apple-font,
    -apple-system,
    BlinkMacSystemFont,
    "SF Pro Text",
    sans-serif
  ) !important;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #000000;
  /* Apple Blue */
  text-decoration: none;
  transition: color 0.2s ease;
}

[data-theme="dark"] .ma-view-all {
  color: #ff2929; /* Apple Dark Blue */
}

.ma-view-all:hover {
  color: #000000;
  text-decoration: underline;
  text-underline-offset: 3px;
}

[data-theme="dark"] .ma-view-all:hover {
  color: #ff5151;
}

.ma-manifesto {
  max-width: 800px;
  margin: 0 auto;
  padding: 100px 32px 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  background: var(--a-bg);
}

[data-theme="dark"] .ma-manifesto {
  border-top-color: rgba(255, 255, 255, 0.07);
  background: #000000;
}

/* ── Base line ── */
.mf-line {
  margin: 0;
  width: 100%;
  font-family:
    "SF Pro Display",
    -apple-system,
    BlinkMacSystemFont,
    "Helvetica Neue",
    Arial,
    sans-serif;
  font-size: clamp(2.5rem, 4.5vw, 4.25rem);
  font-weight: 600;
  line-height: 1.07;
  letter-spacing: -0.035em;
  color: #000000;
  text-wrap: balance;
  padding: 0 0 56px;
  opacity: 0;
  transform: translateY(28px);
  filter: blur(6px);
  transition:
    opacity 0.95s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.95s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.75s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform, filter;
}

.mf-line.mf-visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

html:not(.js) .mf-line,
html:not(.js) .mf-divider {
  opacity: 1;
  transform: none;
  filter: none;
}

[data-theme="dark"] .mf-line {
  color: #f5f5f7;
}

/* Secondary — same size, lighter weight + grey */
.mf-line--secondary {
  font-weight: 300;
  color: #6e6e73;
  transition-delay: 0.1s;
}

[data-theme="dark"] .mf-line--secondary {
  color: #86868b;
}

/* Caption sign-off */
.mf-line--caption {
  font-size: clamp(1rem, 1.6vw, 1.1875rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.5;
  color: #86868b;
  padding: 24px 0 0;
  transition-delay: 0.2s;
}

[data-theme="dark"] .mf-line--caption {
  color: #636366;
}

/* ── Hairline divider ── */
.mf-divider {
  width: 28px;
  height: 1px;
  background: rgba(0, 0, 0, 0.1);
  margin: 0 auto 56px;
  flex-shrink: 0;
  opacity: 0;
  transform: scaleX(0);
  transition:
    opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: center;
  transition-delay: 0.05s;
}

.mf-divider.mf-visible {
  opacity: 1;
  transform: scaleX(1);
}

[data-theme="dark"] .mf-divider {
  background: rgba(255, 255, 255, 0.12);
}

/* ── Word picker — just colour, no decoration ── */
.ma-word-picker,
.ma-word-picker-soft {
  display: inline;
  color: #e31e24;
  font-weight: inherit;
  font-size: inherit;
  font-style: normal;
  letter-spacing: inherit;
  line-height: inherit;
  border: none;
  background: none;
  box-shadow: none;
  padding: 0;
  margin: 0;
  cursor: default;
  vertical-align: baseline;
}

[data-theme="dark"] .ma-word-picker,
[data-theme="dark"] .ma-word-picker-soft {
  color: #ff453a;
}

.ma-word-current {
  display: inline;
  will-change: opacity, filter;
}

.ma-word-picker.is-leaving .ma-word-current {
  animation: maWordLeave 0.28s cubic-bezier(0.4, 0, 1, 1) both;
}

.ma-word-picker.is-switching .ma-word-current {
  animation: maWordEnter 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes maWordLeave {
  0% {
    opacity: 1;
    filter: blur(0);
  }

  100% {
    opacity: 0;
    filter: blur(4px);
  }
}

@keyframes maWordEnter {
  0% {
    opacity: 0;
    filter: blur(4px);
  }

  100% {
    opacity: 1;
    filter: blur(0);
  }
}

/* ── Mobile ── */
@media (max-width: 640px) {
  .ma-manifesto {
    padding: 72px 20px 80px;
  }

  .mf-line {
    font-size: clamp(2rem, 8.5vw, 2.875rem);
    padding-bottom: 40px;
    letter-spacing: -0.028em;
  }

  .mf-line--caption {
    font-size: 1rem;
    padding-top: 20px;
  }

  .mf-divider {
    margin-bottom: 40px;
  }
}

/* ── Scroll-reveal fallback keyframe ── */
@keyframes ma-copy-rise {
  0% {
    opacity: 0;
    transform: translateY(22px);
    filter: blur(6px);
  }

  60% {
    filter: blur(0);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}
/* ==========================================================================
HANDWRITTEN OVERLAY ANNOTATIONS
========================================================================== */

.ma-annotation {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.9) translateY(4px);
  transition:
    opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10;
}

.show-replacements .ma-annotation {
  opacity: 1;
  transform: scale(1) translateY(0);
}

@font-face {
  font-family: 'Batang Tebo';
  src: url('../../fonts/Batang Tebo/BatangTebo-DYY19.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

.ma-handwritten-text {
  font-family: 'Batang Tebo', "Comic Sans MS", "Segoe Print", cursive;
  font-size: 1.2rem;
  font-weight: normal;
  line-height: 1.05;
  color: #000000;
  white-space: nowrap;
  position: absolute;
  pointer-events: none;
}

.annotation-pos .ma-handwritten-text,
.annotation-hms .ma-handwritten-text,
.annotation-erp .ma-handwritten-text {
  color: #000000;
}

.annotation-pos .ma-handwritten-arrow path,
.annotation-hms .ma-handwritten-arrow path,
.annotation-erp .ma-handwritten-arrow path {
  stroke: #000000;
}

.ma-card-pos .ma-icon-box {
  border-color: rgb(255, 255, 255);
}

.ma-card-hms .ma-icon-box {
  border-color: rgba(13, 148, 136, 0.12);
}

.ma-card-erp .ma-icon-box {
  border-color: rgba(124, 58, 237, 0.12);
}

.ma-card-pos-app .ma-icon-box {
  border-color: rgb(255, 255, 255);
}

.ma-card-erp-parent .ma-icon-box {
  border-color: rgba(124, 58, 237, 0.12);
}

.ma-card-erp-teacher .ma-icon-box {
  border-color: rgba(124, 58, 237, 0.12);
}

@keyframes ma-card-rise {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

[data-theme="dark"] .ma-handwritten-text {
  color: #fb7185;
}

.ma-handwritten-arrow {
  position: absolute;
  overflow: visible;
  pointer-events: none;
}

.ma-handwritten-arrow path {
  stroke: #65e11d;
  stroke-width: 1.8px;
  stroke-linecap: round;
  fill: none;
  stroke-dasharray: 120;
  stroke-dashoffset: 120;
  transition: stroke-dashoffset 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] .ma-handwritten-arrow path {
  stroke: #fb7185;
}

.show-replacements .ma-handwritten-arrow path {
  stroke-dashoffset: 0;
}

/* Specific Annotation Positions relative to ma-card parent */

/* Row 1 */
.annotation-accounting .ma-handwritten-text {
  top: -44px;
  left: -68px;
  transform: rotate(-6deg);
}
.annotation-accounting svg {
  top: -36px;
  left: -28px;
  width: 50px;
  height: 35px;
}

.annotation-knowledge .ma-handwritten-text {
  top: -52px;
  left: -42px;
  transform: rotate(3deg);
}
.annotation-knowledge svg {
  top: -38px;
  left: 24px;
  width: 38px;
  height: 30px;
}

.annotation-sign .ma-handwritten-text {
  top: -44px;
  left: -54px;
  transform: rotate(-4deg);
}
.annotation-sign svg {
  top: -36px;
  left: -10px;
  width: 45px;
  height: 35px;
}

.annotation-crm .ma-handwritten-text {
  top: -42px;
  left: 78px;
  transform: rotate(5deg);
}
.annotation-crm svg {
  top: -38px;
  left: 36px;
  width: 46px;
  height: 35px;
}

.annotation-studio .ma-handwritten-text {
  top: -42px;
  left: 82px;
  transform: rotate(-3deg);
}
.annotation-studio svg {
  top: -38px;
  left: 38px;
  width: 48px;
  height: 35px;
}

.annotation-subscriptions .ma-handwritten-text {
  top: -46px;
  left: 18px;
  transform: rotate(4deg);
}
.annotation-subscriptions svg {
  top: -36px;
  left: 50px;
  width: 48px;
  height: 35px;
}

/* Row 2 */
.annotation-ai .ma-handwritten-text {
  top: -24px;
  left: -92px;
  transform: rotate(-5deg);
}
.annotation-ai svg {
  top: -14px;
  left: -34px;
  width: 58px;
  height: 30px;
}

.annotation-pos .ma-handwritten-text {
  top: 92px;
  left: -82px;
  transform: rotate(4deg);
}
.annotation-pos svg {
  top: 48px;
  left: -46px;
  width: 52px;
  height: 48px;
}

.annotation-discuss .ma-handwritten-text {
  top: -42px;
  left: 78px;
  transform: rotate(3deg);
}
.annotation-discuss svg {
  top: -38px;
  left: 36px;
  width: 46px;
  height: 35px;
}

.annotation-project .ma-handwritten-text {
  top: 92px;
  left: -62px;
  transform: rotate(-3deg);
}
.annotation-project svg {
  top: 48px;
  left: -36px;
  width: 42px;
  height: 48px;
}

.annotation-timesheets .ma-handwritten-text {
  top: 30px;
  left: 125px;
  transform: rotate(3deg);
}
.annotation-timesheets svg {
  top: 35px;
  left: 68px;
  width: 55px;
  height: 25px;
}

/* Row 3 */
.annotation-fieldservice .ma-handwritten-text {
  top: 28px;
  left: -78px;
  transform: rotate(-5deg);
}
.annotation-fieldservice svg {
  top: 35px;
  left: -28px;
  width: 55px;
  height: 25px;
}

.annotation-planning .ma-handwritten-text {
  top: 94px;
  left: -44px;
  transform: rotate(4deg);
}
.annotation-planning svg {
  top: 50px;
  left: -32px;
  width: 44px;
  height: 42px;
}

.annotation-helpdesk .ma-handwritten-text {
  top: 94px;
  left: -20px;
  transform: rotate(-4deg);
}
.annotation-helpdesk svg {
  top: 48px;
  left: -36px;
  width: 42px;
  height: 48px;
}

.annotation-ecommerce .ma-handwritten-text {
  top: -28px;
  left: 4px;
  transform: rotate(4deg);
}
.annotation-ecommerce svg {
  top: -18px;
  left: 42px;
  width: 42px;
  height: 30px;
}

.annotation-website .ma-handwritten-text {
  top: 118px;
  left: 50%;
  transform: translateX(-50%) rotate(-3deg);
  font-size: 0.82rem;
}
.annotation-website svg {
  top: 78px;
  left: 50%;
  width: 38px;
  height: 34px;
  transform: translateX(-50%);
}

.annotation-email .ma-handwritten-text {
  top: 25px;
  left: 130px;
  transform: rotate(5deg);
}
.annotation-email svg {
  top: 30px;
  left: 68px;
  width: 60px;
  height: 25px;
}

/* Row 4 */
.annotation-purchase .ma-handwritten-text {
  top: -44px;
  left: 20px;
  transform: rotate(-4deg);
}
.annotation-purchase svg {
  top: -36px;
  left: 56px;
  width: 55px;
  height: 30px;
}

.annotation-inventory .ma-handwritten-text {
  top: -44px;
  left: 50%;
  transform: translateX(-50%) rotate(3deg);
}
.annotation-inventory svg {
  top: -34px;
  left: 50%;
  width: 48px;
  height: 35px;
  transform: translateX(-40%);
}

.annotation-manufacturing .ma-handwritten-text {
  top: -46px;
  left: -16px;
  transform: rotate(-4deg);
}
.annotation-manufacturing svg {
  top: -36px;
  left: 18px;
  width: 52px;
  height: 30px;
}

.annotation-hr .ma-handwritten-text {
  top: 92px;
  left: 78px;
  transform: rotate(-4deg);
}
.annotation-hr svg {
  top: 48px;
  left: 38px;
  width: 48px;
  height: 48px;
}

.annotation-dashboard .ma-handwritten-text {
  top: -46px;
  left: 50%;
  transform: translateX(-50%) rotate(4deg);
  font-size: 0.82rem;
}
.annotation-dashboard svg {
  top: -34px;
  left: 50%;
  width: 34px;
  height: 32px;
  transform: translateX(-50%);
}

.annotation-hms .ma-handwritten-text {
  top: 92px;
  left: -82px;
  transform: rotate(4deg);
}
.annotation-hms svg {
  top: 48px;
  left: -46px;
  width: 52px;
  height: 48px;
}

.annotation-erp .ma-handwritten-text {
  top: 92px;
  left: 78px;
  transform: rotate(-4deg);
}
.annotation-erp svg {
  top: 48px;
  left: 38px;
  width: 48px;
  height: 48px;
}

/* Multi-app operations annotation underneath Purchase/Inventory/Manufacturing */
.annotation-sap {
  position: absolute;
  grid-column: 1 / 4;
  grid-row: 5;
  top: auto;
  bottom: -50px;
  left: 18%;
  right: 18%;
  height: 54px;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.98) translateY(2px);
  transition:
    opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10;
}

.show-replacements .annotation-sap {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.annotation-sap .ma-handwritten-text {
  top: 34px;
  left: 50%;
  transform: translateX(-50%) rotate(2deg);
  font-size: 0.78rem;
}

.annotation-sap svg {
  width: 100%;
  height: 24px;
}

.annotation-sap path {
  stroke: #ff0000;
  stroke-width: 1.8px;
  stroke-linecap: round;
  fill: none;
  stroke-dasharray: 550;
  stroke-dashoffset: 550;
  transition: stroke-dashoffset 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] .annotation-sap path {
  stroke: #ff0000;
}

.show-replacements .annotation-sap path {
  stroke-dashoffset: 0;
}

/* Product-grid annotation overrides for the three Bloomeor icons */
#modular-apps .annotation-pos .ma-handwritten-text {
  top: -42px;
  left: -78px;
  transform: rotate(-5deg);
}

#modular-apps .annotation-pos svg {
  top: -28px;
  left: -22px;
  width: 58px;
  height: 42px;
}

#modular-apps .annotation-hms .ma-handwritten-text {
  top: -44px;
  left: 78px;
  transform: rotate(4deg);
}

#modular-apps .annotation-hms svg {
  top: -30px;
  left: 42px;
  width: 58px;
  height: 42px;
}

#modular-apps .annotation-erp .ma-handwritten-text {
  top: -44px;
  right: -88px;
  left: auto;
  transform: rotate(4deg);
}

#modular-apps .annotation-erp svg {
  top: -28px;
  right: -32px;
  left: auto;
  width: 58px;
  height: 42px;
  transform: none;
}

/* POS App, Parent App, and Teacher App annotation coordinates */
#modular-apps .annotation-pos-app .ma-handwritten-text {
  top: -38px;
  left: -82px;
  transform: rotate(-6deg);
}

#modular-apps .annotation-pos-app svg {
  top: -24px;
  left: -24px;
  width: 58px;
  height: 42px;
}

#modular-apps .annotation-erp-parent .ma-handwritten-text {
  top: -38px;
  right: -82px;
  transform: rotate(-6deg);
}

#modular-apps .annotation-erp-parent svg {
  top: -24px;
  right: -24px;
  width: 58px;
  height: 42px;
}

#modular-apps .annotation-erp-teacher .ma-handwritten-text {
  top: -44px;
  right: -92px;
  left: auto;
  transform: rotate(4deg);
}

#modular-apps .annotation-erp-teacher svg {
  top: -28px;
  right: -34px;
  left: auto;
  width: 58px;
  height: 42px;
  transform: none;
}

/* ── Per-logo annotation colours (light mode) ── */

/* POS — Electric Blue */
#modular-apps .annotation-pos .ma-handwritten-text {
  color: #147af6;
}

#modular-apps .annotation-pos .ma-handwritten-arrow path {
  stroke: #147af6;
}

/* HMS — Emerald Green */
#modular-apps .annotation-hms .ma-handwritten-text {
  color: #00c853;
}

#modular-apps .annotation-hms .ma-handwritten-arrow path {
  stroke: #00c853;
}

/* Edu ERP — Bright Purple */
#modular-apps .annotation-erp .ma-handwritten-text {
  color: #aa00ff;
}

#modular-apps .annotation-erp .ma-handwritten-arrow path {
  stroke: #aa00ff;
}

/* POS App — Neon Indigo */
#modular-apps .annotation-pos-app .ma-handwritten-text {
  color: #536dfe;
}

#modular-apps .annotation-pos-app .ma-handwritten-arrow path {
  stroke: #536dfe;
}

/* Parent App — Aqua Teal */
#modular-apps .annotation-erp-parent .ma-handwritten-text {
  color: #4868ff;
}

#modular-apps .annotation-erp-parent .ma-handwritten-arrow path {
  stroke: #4868ff;
}

/* Teacher App — Vibrant Orange */
#modular-apps .annotation-erp-teacher .ma-handwritten-text {
  color: #ff6d00;
}
#modular-apps .annotation-erp-teacher .ma-handwritten-arrow path {
  stroke: #ff6d00;
}

/* ── Per-logo annotation colours (dark mode) ── */

[data-theme="dark"] #modular-apps .annotation-pos .ma-handwritten-text {
  color: #4fc3ff;
}

[data-theme="dark"] #modular-apps .annotation-pos .ma-handwritten-arrow path {
  stroke: #4fc3ff;
}

[data-theme="dark"] #modular-apps .annotation-hms .ma-handwritten-text {
  color: #69f0ae;
}

[data-theme="dark"] #modular-apps .annotation-hms .ma-handwritten-arrow path {
  stroke: #69f0ae;
}

[data-theme="dark"] #modular-apps .annotation-erp .ma-handwritten-text {
  color: #ea80fc;
}

[data-theme="dark"] #modular-apps .annotation-erp .ma-handwritten-arrow path {
  stroke: #ea80fc;
}

[data-theme="dark"] #modular-apps .annotation-pos-app .ma-handwritten-text {
  color: #8c9eff;
}

[data-theme="dark"]
  #modular-apps
  .annotation-pos-app
  .ma-handwritten-arrow
  path {
  stroke: #8c9eff;
}

[data-theme="dark"] #modular-apps .annotation-erp-parent .ma-handwritten-text {
  color: #64ffda;
}

[data-theme="dark"]
  #modular-apps
  .annotation-erp-parent
  .ma-handwritten-arrow
  path {
  stroke: #64ffda;
}

[data-theme="dark"] #modular-apps .annotation-erp-teacher .ma-handwritten-text {
  color: #ffab40;
}
[data-theme="dark"]
  #modular-apps
  .annotation-erp-teacher
  .ma-handwritten-arrow
  path {
  stroke: #ffab40;
}

/* ==========================================================================
RESPONSIVENESS
========================================================================== */

@media (max-width: 1024px) {
  .ma-grid-container {
    padding: 32px 24px;
    border-radius: 28px;
  }

  .ma-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 36px 20px;
  }

  .ma-footer {
    padding: 0 24px;
    margin-top: 32px;
  }

  /* Inline handwritten annotations on mobile/tablet to prevent layout overlap while remaining visible */
  #modular-apps .ma-annotation {
    display: block !important;
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    width: auto !important;
    height: auto !important;
    transform: none !important;
    opacity: 0 !important;
    transition: opacity 0.3s ease !important;
    z-index: 5 !important;
    margin-top: 4px !important;
  }

  #modular-apps .show-replacements .ma-annotation {
    opacity: 1 !important;
  }

  #modular-apps .ma-handwritten-text {
    position: static !important;
    display: block !important;
    font-size: 0.72rem !important;
    text-align: center !important;
    white-space: normal !important;
    transform: none !important;
    margin: 2px 0 0 0 !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
  }

  /* Hide the arrows and SAP line on mobile to keep it clean */
  .ma-handwritten-arrow,
  .annotation-sap {
    display: none !important;
  }
}

@media (max-width: 680px) {
  #modular-apps {
    padding: 64px 0 !important;
  }

  .ma-grid-container {
    padding: 24px 16px 32px;
    border-radius: 24px;
  }

  .ma-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px 12px;
  }

  .ma-card {
    width: 100% !important;
    max-width: 110px;
    padding: 12px 6px;
    border-radius: 16px;
    min-height: auto !important;
  }

  .ma-icon-box {
    width: 48px;
    height: 48px;
    padding: 0;
    margin-bottom: 2px;
  }

  .ma-icon-box svg {
    width: 36px;
    height: 36px;
  }

  .ma-label {
    font-size: 0.8rem !important;
  }

  .ma-footer {
    flex-direction: column;
    gap: 28px;
    align-items: center;
    margin-top: 24px;
    padding: 0 16px;
  }

  .ma-manifesto {
    margin-top: 46px;
    gap: 20px;
    padding-inline: 10px;
  }

  .ma-manifesto p {
    font-size: clamp(1.42rem, 8vw, 2.1rem) !important;
    line-height: 1.12 !important;
  }

  .ma-manifesto p:last-child {
    font-size: 1.02rem !important;
  }

  .ma-toggle-wrap {
    justify-content: center;
  }
}

@media (max-width: 420px) {
  .ma-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px 8px;
  }

  .ma-card {
    max-width: 88px;
    padding: 10px 4px;
    min-height: auto !important;
  }

  .ma-icon-box {
    width: 40px;
    height: 40px;
  }

  .ma-icon-box svg {
    width: 30px;
    height: 30px;
  }

  .ma-label {
    font-size: 0.75rem !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ma-manifesto p {
    opacity: 1;
    transform: none;
    animation: none;
    filter: none;
  }
}

/* ==========================================================================
WORD PICKER — Apple inline highlight style
========================================================================== */

.ma-word-picker {
  display: inline-flex;
  align-items: center;
  position: relative;
  color: #000000;
  font-weight: inherit !important;
  font-size: inherit !important;
  font-style: normal;
  padding: 0 0.15em 0.05em;
  margin: 0 0.04em;
  cursor: default;
  vertical-align: baseline;
  border-radius: 4px;
  border-bottom: none;
  background: none;
  line-height: inherit;
  /* underline drawn as a gradient bottom border */
  box-shadow: inset 0 -2px 0 rgba(227, 30, 36, 0.35);
  transition:
    box-shadow 0.25s ease,
    color 0.25s ease;
}

[data-theme="dark"] .ma-word-picker {
  color: #ff6961;
  box-shadow: inset 0 -2px 0 rgba(255, 105, 97, 0.4);
}

.ma-word-picker-soft {
  color: #1e42e3;
  box-shadow: inset 0 -2px 0 rgba(227, 30, 36, 0.35);
}

[data-theme="dark"] .ma-word-picker-soft {
  color: #ff6961;
  box-shadow: inset 0 -2px 0 rgba(255, 105, 97, 0.4);
}

.ma-word-current {
  display: inline-block;
  will-change: transform, opacity, filter;
}

/* Phase 1: exit — blur up */
.ma-word-picker.is-leaving .ma-word-current {
  animation: maWordLeave 0.28s cubic-bezier(0.4, 0, 1, 1) both;
}

/* Phase 2: enter — spring in from below */
.ma-word-picker.is-switching .ma-word-current {
  animation: maWordEnter 0.52s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes maWordLeave {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }

  100% {
    opacity: 0;
    transform: translateY(-10px) scale(0.94);
    filter: blur(3px);
  }
}

@keyframes maWordEnter {
  0% {
    opacity: 0;
    transform: translateY(12px) scale(0.94);
    filter: blur(3px);
  }
  55% {
    filter: blur(0);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}
/* ==========================================================================
MANIFESTO — Apple editorial redesign
========================================================================== */

#modular-apps .ma-manifesto {
  width: 100vw;
  max-width: none;
  margin: 72px calc(50% - 50vw) 0;
  padding: clamp(84px, 10vw, 148px) max(24px, calc((100vw - 1080px) / 2));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(22px, 3vw, 38px);
  text-align: center;
  background: #f5f5f7;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] #modular-apps .ma-manifesto {
  background: #000000;
  border-color: rgba(255, 255, 255, 0.1);
}

#modular-apps .mf-eyebrow {
  margin: 0;
  color: #6e6e73;
  font-family: var(
    --apple-font,
    -apple-system,
    BlinkMacSystemFont,
    "SF Pro Text",
    sans-serif
  );
  font-size: clamp(0.78rem, 1.2vw, 0.92rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

[data-theme="dark"] #modular-apps .mf-eyebrow {
  color: #86868b;
}

#modular-apps .mf-line {
  max-width: 980px;
  margin: 0;
  padding: 0;
  color: #1d1d1f;
  font-family:
    "SF Pro Display",
    -apple-system,
    BlinkMacSystemFont,
    "Helvetica Neue",
    Arial,
    sans-serif;
  font-size: clamp(3rem, 7vw, 6.6rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: 0;
  text-wrap: balance;
}

[data-theme="dark"] #modular-apps .mf-line {
  color: #f5f5f7;
}

#modular-apps .mf-line--secondary {
  max-width: 720px;
  color: #6e6e73;
  font-size: clamp(1.35rem, 2.6vw, 2.35rem);
  font-weight: 500;
  line-height: 1.16;
}

[data-theme="dark"] #modular-apps .mf-line--secondary {
  color: #a1a1a6;
}

#modular-apps .mf-line--caption {
  color: #86868b;
  font-size: clamp(0.98rem, 1.35vw, 1.18rem);
  font-weight: 600;
  line-height: 1.35;
}

#modular-apps .mf-divider {
  width: min(100%, 560px);
  height: 1px;
  margin: 4px 0;
  background: rgba(0, 0, 0, 0.09);
}

[data-theme="dark"] #modular-apps .mf-divider {
  background: rgba(255, 255, 255, 0.14);
}

#modular-apps .ma-word-picker,
#modular-apps .ma-word-picker-soft {
  display: inline-flex;
  align-items: center;
  color: #1d1d1f;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.24em;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 10px 28px rgba(0, 0, 0, 0.08);
  padding: 0.02em 0.16em 0.08em;
  margin: 0 0.02em;
  line-height: 0.94;
  vertical-align: baseline;
}

[data-theme="dark"] #modular-apps .ma-word-picker,
[data-theme="dark"] #modular-apps .ma-word-picker-soft {
  color: #f5f5f7;
  background: #1c1c1e;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: none;
}

#modular-apps .ma-word-current {
  display: inline-block;
}

@media (max-width: 680px) {
  #modular-apps .ma-manifesto {
    margin-top: 56px;
    padding: 72px 24px 84px;
    gap: 22px;
  }

  #modular-apps .mf-line {
    max-width: 420px;
    font-size: clamp(2.55rem, 12vw, 4.5rem);
    line-height: 1.02;
  }

  #modular-apps .mf-line--secondary {
    max-width: 360px;
    font-size: clamp(1.18rem, 5.4vw, 1.75rem);
    line-height: 1.22;
  }
}

/* ── Robotics annotation ── */
.annotation-rob .ma-handwritten-text {
  top: -46px;
  right: -88px;
  left: auto;
  transform: rotate(4deg);
  color: #000000;
}

.annotation-rob .ma-handwritten-arrow {
  top: -34px;
  right: -32px;
  left: auto;
  width: 52px;
  height: 38px;
}

.annotation-rob .ma-handwritten-arrow path {
  stroke: #000000;
}

[data-theme="dark"] .annotation-rob .ma-handwritten-text {
  color: #000000;
}

[data-theme="dark"] .annotation-rob .ma-handwritten-arrow path {
  stroke: #000000;
}
