/* page-home-m1: mobile layer (ADR 0019), home sections 1-3: hero, intro + bento, stack marquee.
   Everything below 900px; desktop (>=900px) is untouched. Handoff: design_handoff_mobile_home, Screen 1 items 1-3. */
@media (min-width:900px){.m-only{display:none!important}}

@keyframes mm-line{from{transform:translateY(110%)}to{transform:none}}
@keyframes mm-fade{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}
@keyframes mm-ping{0%{box-shadow:0 0 0 0 rgba(77,255,159,.55)}100%{box-shadow:0 0 0 9px rgba(77,255,159,0)}}
@keyframes mm-marq{from{transform:translateX(0)}to{transform:translateX(-50%)}}
@keyframes mm-marq-r{from{transform:translateX(-50%)}to{transform:translateX(0)}}

@media (max-width:899.98px){
  /* desktop-only twins (text variants, hidden blocks) */
  .mm-dt{display:none!important}
  .hm-tile.mm-dt{display:none!important}

  /* ---------- 1. hero ---------- */
  .hm-hero{height:700px;background:#050914}
  .hm-hero__sticky{position:relative;top:auto;height:700px;overflow:hidden}
  .hm-hero__frame{clip-path:none!important;transform:none!important;filter:none!important}
  .hm-hero__media{transform:none!important}
  .hm-hero__media img{transform:scale(calc(1.12 + var(--hp,0) * .14)) translateY(calc(var(--hp,0) * 90px));will-change:transform}
  .hm-hero__media video{display:none}
  .hm-hero__shade{opacity:1!important;background:linear-gradient(180deg,rgba(5,9,20,.55),rgba(5,9,20,.15) 32%,rgba(5,9,20,.96) 82%),linear-gradient(90deg,rgba(5,9,20,.75),rgba(5,9,20,.1) 80%)}
  .hm-hero__grid{background:linear-gradient(rgba(255,255,255,.04) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.04) 1px,transparent 1px),radial-gradient(ellipse 90% 60% at 80% 25%,rgba(0,87,255,.3),transparent 60%);background-size:48px 48px,48px 48px,auto}
  .hm-hero__cap{display:none!important}
  .hm-hero__head{top:auto;bottom:0;left:0;right:0;padding:0 20px 28px;display:block;
    transform:translateY(calc(var(--hp,0) * -40px))!important;opacity:calc(1 - var(--hp,0) * .9)!important;
    filter:none!important;visibility:visible!important;pointer-events:auto!important;will-change:transform,opacity}
  .hm-hero__inner{display:flex;flex-direction:column;gap:20px;max-width:none;margin:0;width:100%}

  .mm-chip{align-self:flex-start;display:flex;align-items:center;gap:8px;padding:7px 12px;border-radius:999px;background:rgba(10,14,22,.5);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);border:1px solid rgba(255,255,255,.14);animation:mm-fade .8s cubic-bezier(.23,1,.32,1) .05s both}
  .mm-chip i{width:7px;height:7px;border-radius:50%;background:#4dff9f;animation:mm-ping 1.8s ease-out infinite}
  .mm-chip span{font-size:12px;font-weight:600;color:#fff;line-height:1.2}

  .hm-hero h1{font-size:50px;font-weight:600;line-height:.9;letter-spacing:-0.058em;color:#fff}
  .hm-hero h1>span{display:block;overflow:hidden;padding-bottom:.06em}
  .hm-hero h1>span:last-child{padding-bottom:.08em}
  .hm-hero h1 [data-line]{display:block;animation:mm-line 1s cubic-bezier(.23,1,.32,1) both}
  .hm-hero h1>span:nth-child(1) [data-line]{animation-delay:.1s}
  .hm-hero h1>span:nth-child(2) [data-line]{animation-delay:.18s}
  .hm-hero h1>span:nth-child(3) [data-line]{animation-delay:.26s}
  .hm-hero h1>span:nth-child(4) [data-line]{animation-delay:.34s}

  .mm-lede{margin:0;color:#d7dbe4;font-size:16px;line-height:1.5;max-width:330px;text-wrap:pretty;animation:mm-fade .8s cubic-bezier(.23,1,.32,1) .5s both}

  .hm-hero__row{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;flex-wrap:nowrap;gap:20px;margin-top:0}
  .hm-hero__btns{display:flex;flex-wrap:nowrap;gap:8px;animation:mm-fade .8s cubic-bezier(.23,1,.32,1) .6s both}
  .hm-btn-hero{flex:1;min-width:0;justify-content:space-between;gap:10px;height:56px;padding:0 8px 0 20px;font-size:15px;font-weight:700;white-space:nowrap;transition:transform 140ms cubic-bezier(.23,1,.32,1),background-color 150ms ease}
  .hm-btn-hero:active,.hm-btn-ghost:active{transform:scale(.97)}
  .mm-arr{width:40px;height:40px;border-radius:50%;background:#0057FF;display:flex;align-items:center;justify-content:center;flex:none}
  .hm-btn-ghost{flex:none;height:56px;padding:0 18px;font-size:15px;font-weight:600;white-space:nowrap;background:rgba(255,255,255,.1);border-color:rgba(255,255,255,.22);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);transition:transform 140ms cubic-bezier(.23,1,.32,1),background-color 150ms ease}
  .hm-hero__meta{flex-wrap:wrap;gap:8px 12px;font-size:13px;animation:mm-fade .8s cubic-bezier(.23,1,.32,1) .7s both}
  .hm-hero__meta>a{display:flex;align-items:center;gap:6px;white-space:nowrap}
  .hm-hero__meta .hm-stars{color:#fbbc04;letter-spacing:1px}
  .hm-hero__sep{width:1px;height:14px}
  .hm-hero__meta>span:last-child{font-size:0}
  .hm-hero__meta>span:last-child strong{font-size:13px;font-weight:400;color:#c3c8d3}

  /* ---------- 2. intro + bento ---------- */
  .hm-intro{padding:72px 16px 0}
  .hm-intro__wrap{gap:28px}
  .hm-intro__head{gap:16px;padding:0 4px;max-width:none}
  .hm-intro__head .hm-eyebrow{font-size:12px}
  .hm-intro__head .hm-h2{font-size:34px;line-height:1;letter-spacing:-0.045em}
  .hm-intro__grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .hm-intro__top{display:contents}

  .hm-akademia{order:0;grid-column:span 2;flex:none;min-height:210px;padding:22px;border-radius:28px;gap:18px;display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto 1fr;align-items:start}
  .hm-akademia::before{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(rgba(255,255,255,.07) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.07) 1px,transparent 1px);background-size:40px 40px;-webkit-mask-image:radial-gradient(ellipse at 100% 0%,#000,transparent 70%);mask-image:radial-gradient(ellipse at 100% 0%,#000,transparent 70%)}
  .hm-akademia__k{grid-column:1;grid-row:1;align-self:start}
  .hm-akademia__arrow{grid-column:2;grid-row:1;align-self:start;flex:none}
  .hm-akademia__t{grid-column:1 / -1;grid-row:2;align-self:end;gap:10px}
  .hm-akademia__t span:first-child{font-size:32px;line-height:1;letter-spacing:-0.035em}

  .hm-tile{order:1;flex-direction:column-reverse;justify-content:space-between;align-items:flex-start;gap:20px;min-height:116px;padding:16px 16px 18px;border-radius:22px;font-size:17px;line-height:1.15;letter-spacing:-0.02em}
  .hm-tile>span:not(.hm-glow):not(.hm-tile__arrow){display:block}
  .hm-tile__arrow{align-self:flex-end;width:32px;height:32px;flex:none}
  .hm-tile__arrow svg{width:12px;height:12px}
  .hm-tile:active{transform:scale(.97);border-color:rgba(102,153,255,.5)}

  .hm-intro__about{order:2;grid-column:span 2;flex:none;padding:22px;border-radius:28px;gap:20px}
  .hm-intro__about>p{font-size:16px;line-height:1.6}
  .hm-iso{flex-wrap:nowrap;gap:14px}
  .hm-iso img{width:42px;flex:none}
  .hm-iso>span>span{font-size:14px}
  .hm-iso a{font-size:13px}

  /* mobile-only reveal for the two blocks inside the display:contents wrapper (JS adds .mm-rv / .is-in) */
  .hm-akademia.mm-rv,.hm-intro__about.mm-rv{opacity:0;transform:translateY(24px)}
  .hm-akademia.mm-rv.is-in,.hm-intro__about.mm-rv.is-in{opacity:1;transform:none;transition:opacity .8s cubic-bezier(.23,1,.32,1),transform .8s cubic-bezier(.23,1,.32,1)}

  /* ---------- 3. stack marquee ---------- */
  .hm-stack{padding:48px 0 0}
  .mm-stack{display:flex;flex-direction:column;gap:10px;-webkit-mask-image:linear-gradient(90deg,transparent,#000 12%,#000 88%,transparent);mask-image:linear-gradient(90deg,transparent,#000 12%,#000 88%,transparent)}
  .mm-stack__row{overflow:hidden}
  .mm-stack__track{display:flex;gap:10px;width:max-content;will-change:transform}
  .mm-stack__track--l{animation:mm-marq 32s linear infinite}
  .mm-stack__track--r{animation:mm-marq-r 36s linear infinite}
  .mm-pill{display:inline-flex;align-items:center;gap:10px;flex-shrink:0;height:48px;padding:0 20px;border-radius:999px;font-size:16px;font-weight:600;color:#f1f3f7;background:#12161f;border:1px solid rgba(255,255,255,.07);white-space:nowrap}
  .mm-pill i{width:7px;height:7px;border-radius:50%;background:#0057FF;box-shadow:0 0 12px #0057FF}
  .mm-pill--ghost{color:#aeb4c2;background:transparent;border-color:rgba(255,255,255,.12)}
}

@media (max-width:899.98px) and (prefers-reduced-motion:reduce){
  .hm-hero__media img{transform:none;will-change:auto}
  .hm-hero__head{transform:none!important;opacity:1!important;will-change:auto}
  .mm-chip,.mm-lede,.hm-hero__btns,.hm-hero__meta,.hm-hero h1 [data-line]{animation:none!important}
  .mm-chip i{animation:none}
  .mm-stack__track{animation:none!important}
  .hm-akademia.mm-rv,.hm-intro__about.mm-rv{opacity:1;transform:none}
}

@media (max-width:899.98px) and (prefers-reduced-transparency:reduce){
  .mm-chip,.hm-btn-ghost{-webkit-backdrop-filter:none;backdrop-filter:none}
  .mm-chip{background:#12161f}
  .hm-btn-ghost{background:#12161f}
}
