/* Layout overrides follow the legacy template and section-specific styles. */
:root {
  --mk-gutter: clamp(20px, 4vw, 64px);
  --mk-content-width: 1280px;
}
/* Clip decorative parallax and offscreen carousel tracks, without a scroll container. */
html { overflow-x: clip; }
.transition-wrapper { overflow-x: clip; }

#hero .hero-s_title-l h1.h2 {
  font-size: clamp(36px, 7.5vw, 112px) !important;
  line-height: 1.06 !important;
  text-wrap: balance;
}
.mk-fgrid, #mk-tiers .mk-tiers-inner {
  max-width: var(--mk-content-width);
  padding-inline: var(--mk-gutter);
}
.mk-fgrid-inner > *, .mk-tiers-grid > * { min-width: 0; }
.mk-fcard-desc { font-size: clamp(15px, 1.1vw, 17px); }
.mk-fcard-title { font-size: clamp(20px, 1.6vw, 25px); }
.mk-fcard-label { font-size: 11px; }
#mk-tiers .mk-tier-list li { font-size: 15px !important; line-height: 1.55; }
.mk-stats > div { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mk-stats > div > div > div:first-child { font-size: clamp(28px, 4vw, 48px) !important; }
.mk-stats > div > div > div:last-child { font-size: 12px !important; }
#hero .mk-lang-pill { padding: 3px; gap: 2px; border-radius: 8px; background: rgba(0,0,0,.2); }
.mk-lang-pill [data-lang-set] { position: relative; display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 26px; padding: 0 6px; border: 0; border-radius: 5px; background: transparent; font: inherit; }
.mk-lang-pill .mk-lang-sep { display: none; }
.mk-lang-pill [data-lang-set]::before { content: ''; position: absolute; inset: -9px 0; }
.mk-tier-details summary { display: none; }
.btn-cta { display: flex; align-items: center; gap: 8px; }
.btn-cta_btn { height: 48px !important; min-height: 48px; padding: 0 20px !important; }
.btn-cta_btn-icon { width: 48px !important; height: 48px !important; min-height: 48px; }
.btn-cta_btn .t7, .btn-cta_btn .l1 { font-size: 16px !important; }
.cta { padding-bottom: max(12px, env(safe-area-inset-bottom)) !important; }
#use-cases-dark :is(input, select, textarea) { font-size: 16px !important; min-height: 48px; }
#use-cases-dark textarea { min-height: 112px; }
:is(a, button, input, select, textarea, [tabindex]):focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }

@media (max-width: 1199px) {
  /* Floating cards require space on both sides of the central previews. */
  .mk-card { display: none !important; }
  #mk-beforeafter-window { transform: none !important; max-width: 100%; }
}

@media (max-width: 991px) {
  /* The planet must fill the same viewport as the transparent spacecraft. */
  .sky-bg_hero { height: max(620px, 100svh) !important; min-height: max(620px, 100svh) !important; }
  .sky-bg_hero > .img-w { height: 100% !important; }
  .sky-bg_hero .img-w .img { transform: none !important; object-fit: cover; object-position: 50% 50%; }
  .sky-bg_hero_grad-over { height: 22% !important; }
  #hero .container { padding-inline: var(--mk-gutter); }
  #hero .hero_scroll-area { height: 100svh !important; min-height: 620px; }
  #hero .hero-w, #hero .hero-s { height: 100svh !important; min-height: 620px; }
  #hero .hero-s { transform: none !important; }
  #hero .unit-156 { height: clamp(112px, 18svh, 180px) !important; }
  #hero .hero-s_title-l { text-align: center; }
  #hero .hero-s_bot-mobile {
    display: flex !important;
    bottom: 150px;
    padding: 0;
    gap: 16px;
    max-width: 520px;
    margin-inline: auto;
  }
  .hero-mobile-tagline h3 { font-family: 'IBM Plex Sans', 'IBM Plex Sans Arabic', sans-serif; font-size: clamp(20px, 3vw, 28px) !important; }
  .hero-mobile-subtitle { display: none; }
  .hero-mobile-scroll { display: none; }
  .about-w { transform: none !important; padding-block: clamp(48px, 8vw, 80px); }
  .about-s { margin-top: 0 !important; }
  .about-w > h2.p2 { font-size: clamp(26px, 4.3vw, 42px) !important; line-height: 1.2 !important; max-width: 760px; text-wrap: balance; }
  .about-s_lead-text { padding: 0 !important; }
  .mk-dashboard-section { padding: 0 !important; }
  .mk-fgrid { padding-block: 48px; }
  .mk-fgrid .mk-fgrid-inner { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .mk-fcard { grid-column: auto !important; grid-row: auto !important; padding: clamp(20px, 3vw, 28px) !important; }
  .mk-fcard--agent { grid-column: 1 / -1 !important; }
  #mk-tiers .mk-tiers-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #mk-tiers .mk-tier-card:last-child { grid-column: 1 / -1; }
  #use-cases-dark .uc-header-content { margin-inline: auto !important; width: calc(100% - 2 * var(--mk-gutter)) !important; }
  #use-cases-dark .uc-spotlight { padding-bottom: 120px !important; }
  #use-cases-dark .mk-waitlist .mk-actions .mk-submit { min-height: 48px; font-size: 16px !important; }
  .mk-stats { padding-inline: var(--mk-gutter) !important; }
}

@media (max-width: 599px) {
  .mk-fgrid .mk-fgrid-inner, #mk-tiers .mk-tiers-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .mk-fcard--agent, #mk-tiers .mk-tier-card:last-child { grid-column: auto !important; }
  .mk-stats > div { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  #hero .hero-s_title-l h1.h2 { font-size: clamp(36px, 10vw, 56px) !important; }
  #hero .mk-lang-pill { top: 20px; left: 20px; }
  .hero-mobile-subtitle { display: none; }
  #hero .hero-s_bot-mobile { bottom: 112px; }
  .hero-mobile-tagline h3 { max-width: 320px; margin-inline: auto; font-size: 20px !important; text-wrap: balance; }
  /* Compact summaries on phones; the detailed lists remain one tap away. */
  #mk-tiers .mk-tier-card { padding: 24px; gap: 16px; }
  #mk-tiers .mk-tier-header { display: flex; flex-direction: column; gap: 12px; }
  #mk-tiers .mk-tier-headline { margin: 0; }
  #mk-tiers .mk-tier-desc { font-size: 15px; line-height: 1.6; }
  #mk-tiers .mk-tier-cta { align-self: flex-start; min-height: 44px; }
  .mk-tier-details summary { display: flex; align-items: center; justify-content: space-between; min-height: 48px; font-size: 14px; cursor: pointer; list-style: none; }
  .mk-tier-details summary::-webkit-details-marker { display: none; }
  .mk-tier-details summary::after { content: '+'; font-size: 20px; }
  .mk-tier-details[open] summary::after { content: '−'; }
  .mk-fcard:not(.mk-fcard--agent) { display: grid; grid-template-columns: 28px minmax(0, 1fr); column-gap: 12px; row-gap: 8px; }
  .mk-fcard:not(.mk-fcard--agent) .mk-fcard-icon { grid-column: 1; grid-row: 1 / 3; }
  .mk-fcard:not(.mk-fcard--agent) :is(.mk-fcard-label,.mk-fcard-title,.mk-fcard-desc,.mk-fcard-visual) { grid-column: 2; }
  .mk-fcard:not(.mk-fcard--agent) .mk-fcard-visual { display: none; }
}

@media (max-width: 991px) and (max-height: 500px) {
  /* Landscape phones keep content readable instead of squeezing into 100vh. */
  #hero .unit-156 { height: 100px !important; }
}

@media (hover: none), (pointer: coarse) {
  #mk-tiers .mk-tier-card { transform: none !important; }
  #mk-tiers .mk-tier-spot { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  #makan-logo-scroll-section [style*="animation"] { animation-play-state: paused !important; }
}

/* Product previews stay flat while the surrounding cards retain their motion. */
#mk-dashboard-window, #mk-beforeafter-window {
  transform: none !important;
  will-change: auto !important;
}

/* Start the dashboard's six cards nearer the preview center. */
@media (min-width:1200px) {
 #mk-tl, #mk-bl { left:8%; }
 #mk-left { left:6%; }
 #mk-tr, #mk-br { right:8%; }
 #mk-right { right:6%; }
}

/* Short, readable feature cards within the original animated containers. */
.mk-card-clean{background:#fff;border:1px solid #e4e7eb;border-radius:16px;box-shadow:0 6px 22px #0a0e1a0d;backdrop-filter:none;-webkit-backdrop-filter:none;color:#0a0e1a;}
.mk-card-clean .mk-card-label{padding:17px 18px 0;font:500 18px/1.25 'IBM Plex Sans','IBM Plex Sans Arabic',sans-serif;letter-spacing:-.02em;text-transform:none;color:#0a0e1a;}
.mk-card-clean .mk-card-visual{position:relative;min-height:84px;padding:12px 18px 17px;box-sizing:border-box;}
.mk-card-area,.mk-card-change svg{display:block;width:100%;height:76px;}
.mk-card-question{max-width:170px;margin:0;padding:0 20px 0 0;font:400 15px/1.5 'IBM Plex Sans','IBM Plex Sans Arabic',sans-serif;color:#535b64;}
.mk-card-arrow{position:absolute;width:19px;height:19px;right:18px;bottom:21px;}
.mk-card-notice{display:flex;align-items:center;gap:9px;margin:2px 0 8px;}
.mk-card-notice>span{width:6px;height:6px;flex:none;border-radius:50%;background:#0a0e1a;}
.mk-card-notice strong{font:400 15px/1.4 'IBM Plex Sans','IBM Plex Sans Arabic',sans-serif;}
.mk-card-note{padding-inline-start:15px;font:400 12px/1.4 'IBM Plex Sans','IBM Plex Sans Arabic',sans-serif;color:#62676d;}
.mk-card-layer-list{display:flex;flex-direction:column;gap:0;}
.mk-card-layer-list>span{font:400 14px/1.4 'IBM Plex Sans','IBM Plex Sans Arabic',sans-serif;padding:6px 0;border-bottom:1px solid #edf0f2;}
.mk-card-layer-list>span:last-child{border-bottom:0;}
.mk-card-history{width:100%;height:65px;display:block;}
/* Shared grid well + bold chips (picked style across all cards, 26 Oct) */
.mk-well{position:relative;height:76px;border-radius:10px;overflow:hidden;box-shadow:inset 0 0 0 1px #e4e7eb;background-image:linear-gradient(#eef0f3 1px,transparent 1px),linear-gradient(90deg,#eef0f3 1px,transparent 1px);background-size:14px 14px;}
.mk-well>svg{position:absolute;inset:0;width:100%;height:100%;display:block;}
.mk-q-pill{max-width:180px;background:#0a0e1a;color:#fff!important;padding:10px 16px;border-radius:14px 14px 14px 4px;box-shadow:0 6px 16px #0a0e1a33;font-size:14.5px!important;}
[dir=rtl] .mk-q-pill{border-radius:14px 14px 4px 14px;}
.mk-alert-f{padding:11px 14px 12px;border-radius:12px;box-shadow:inset 0 0 0 1px #e4e7eb,0 4px 12px #0a0e1a14;}
.mk-alert-f .mk-card-notice{margin:0 0 4px;}
.mk-alert-f .mk-card-notice>span{width:8px;height:8px;}
.mk-alert-f .mk-card-notice strong{font-weight:500;}
.mk-well-pict{display:grid;place-items:center;}
.mk-well-pict>svg{position:static;width:82%;height:58px;}
/* Detect card: big count + mini-map (picked style, 26 Oct) */
.mk-detect-f{display:flex;align-items:center;gap:14px;}
.mk-detect-stat{display:flex;flex-direction:column;flex:none;}
.mk-detect-stat .n{font:600 42px/0.8 'IBM Plex Sans','IBM Plex Sans Arabic',sans-serif;letter-spacing:-.04em;color:#0a0e1a;}
.mk-detect-stat .w{font:400 13px/1 'IBM Plex Sans','IBM Plex Sans Arabic',sans-serif;color:#0a0e1a;margin-top:6px;}
.mk-detect-map{position:relative;flex:1;height:76px;border-radius:10px;overflow:hidden;box-shadow:inset 0 0 0 1px #e4e7eb;background-image:linear-gradient(#eef0f3 1px,transparent 1px),linear-gradient(90deg,#eef0f3 1px,transparent 1px);background-size:14px 14px;}
.mk-detect-map i,.mk-detect-map b{display:block;position:absolute;}
.mk-detect-map .d{top:0;bottom:0;left:38%;width:1.5px;background:#0a0e1a;}
.mk-detect-map .h{top:50%;left:38%;transform:translate(-50%,-50%);width:15px;height:15px;border-radius:50%;background:#fff;box-shadow:0 0 0 1px #e4e7eb,0 2px 6px #0a0e1a38;}
.mk-detect-map b{border-radius:4px;background:#0a0e1a;box-shadow:0 0 0 2px #fff,0 3px 8px #0a0e1a42;}
.mk-card-layer-list>span{display:flex;align-items:center;gap:9px;}
.mk-card-layer-list>span::before{content:"";width:10px;height:10px;border-radius:3px;background:#0a0e1a;flex:none;}
.mk-card-layer-list>span:nth-child(2)::before{background:#0a0e1a99;}
.mk-card-layer-list>span:nth-child(3)::before{background:#0a0e1a4d;}
[dir=rtl] .mk-card-arrow{right:auto;left:18px;transform:scaleX(-1);}
[dir=rtl] .mk-card-question{padding:0 0 0 20px;}


/* Keep the original statistics typography; current content and placement are unchanged. */
.mk-proof-strip [data-i18n$=".value"]{font-family:'IBM Plex Sans','IBM Plex Sans Arabic',sans-serif!important;font-size:clamp(32px,4vw,48px)!important;font-weight:800!important;line-height:1!important;letter-spacing:-.02em!important;text-shadow:0 2px 14px #0a0e1a26;}
.mk-proof-strip [data-i18n$=".label"]{font-family:'IBM Plex Sans','IBM Plex Sans Arabic',sans-serif!important;font-size:11px!important;font-weight:400!important;line-height:1.5!important;letter-spacing:.15em!important;text-transform:uppercase!important;opacity:.8!important;text-shadow:none;}

/* Only the sky after the hero: the AVIF's transparent edges blend naturally.
   Offset two copies by half a tile so their clear ends never form bare bands.
   This replaces the five clipped image slots and the added shadow texture. */
@media(min-width:768px){
 html body .sky-bg_about > .img-w{
  --mk-sky-period:clamp(2200px,180vw,3600px);
  background-color:var(--mk-day-top,#015aa9);
  background-image:url('./sky-about.avif'),url('./sky-about.avif');
  background-repeat:repeat-y;
  background-size:100% var(--mk-sky-period);
  background-position:center top,center calc(var(--mk-sky-period) / 2);
 }
 html body .sky-bg_about > .img-w > img.img{display:none!important;}
}
.sky-bg_about .img-w::after{content:none!important;}
