/* EPCIMA PMT · mobile.css — a dedicated phone layout (≤ 640px). Loaded after site.css and motion.css.
   Goal: the same story in a third of the height. Compact grids, horizontal steppers, one column of
   sections with tighter rhythm, thumb-sized targets. */
@media (max-width: 640px) {
  :root { --gutter: 18px; }
  /* rhythm */
  .scenes, .drill, .mods, .how, .scope, .sec, .faq { padding: 52px 0; }
  .cta { padding: 60px 0 56px; }
  h2 { font-size: clamp(26px, 7.4vw, 31px); line-height: 1.08; }

  /* static hero (no WebGL) */
  .hero { padding: 28px 0 40px; }
  .hero__lede { font-size: 16px; }
  .hero__cta .btn { width: 100%; justify-content: center; }
  .hero__proof { margin-top: 4px; }
  .hero__shot { margin-top: 28px; }

  /* scenes: three landscape photo cards, caption tight */
  .scenes__grid { gap: 10px; }
  .scene { aspect-ratio: 3 / 2; padding: 16px; }
  .scene__ico { top: 16px; left: 16px; width: 30px; height: 30px; }
  .scene__n { margin-bottom: 6px; }
  .scene p { font-size: 18px; }
  .scene--top.has-photo { padding-top: 58px; }
  .scene--top.has-photo::before { background-position: 40% 100%; }
  .scene:first-child.has-photo::before { background-position: 50% 82%; }   /* the two people sit low in that photo */


  /* modules: two columns, name only; detail panel opens below the grid */
  .mods__grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .mod { padding: 12px 12px 12px; gap: 2px; border-radius: 10px; }
  .mod__mark { width: 34px; height: 34px; margin-bottom: 6px; }
  .mod b { font-size: 13.5px; }
  .mod span { display: none; }
  .mods__wrap.is-open .mods__panel { order: 2; margin: 10px 0 0; }
  .mods__panel-in { padding: 20px 18px 22px; gap: 16px; }
  .mods__pname { font-size: 20px; }
  .mods__pv { font-size: 14.5px; }

  /* setup: three compact cards in one row, detail unfolds under the row */

  .scope__col { padding: 20px 18px 22px; }
  .scope__col h3 { font-size: 20px; margin-bottom: 6px; }
  .scope__list li { padding: 10px 0; font-size: 14.5px; }

  /* who */
  .who__band { height: 220px; }
  .who__band-text { bottom: 20px; }
  .who__band-text h2 { font-size: clamp(24px, 6.6vw, 28px); }
  .who__grid { padding-top: 24px; gap: 14px; }
  .who__intro { font-size: 18px; }
  .who__chips li { padding: 11px 0; font-size: 14.5px; }

  /* security: two columns, icon + title + line */
  .sec__grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .sec__grid li { padding: 14px 14px 16px; gap: 3px; }
  .sec__grid svg { width: 22px; height: 22px; margin-bottom: 4px; }
  .sec__grid b { font-size: 14px; }
  .sec__grid span { font-size: 12.5px; line-height: 1.4; }

  /* faq */
  .faq__list summary { font-size: 15.5px; padding: 16px 40px 16px 0; min-height: 44px; }
  .faq__list details p { font-size: 14.5px; padding-right: 0; }

  /* cta */
  .cta h2 { font-size: clamp(28px, 8vw, 34px); }
  .cta p { font-size: 15.5px; margin-top: 12px; }
  .cta__grid { gap: 22px; }

  /* footer title block: one column, meta as a row */
  .tblock { grid-template-columns: 1fr; }
  .tblock__cell, .tblock__cell:nth-child(even) { border-left: 0; }
  .tblock__cell + .tblock__cell { border-top: 1px solid rgba(255,255,255,0.2); }
  .tblock__cell--meta { grid-template-columns: 1fr 1fr; font-size: 11.5px; }
  .foot__legal { font-size: 11.5px; line-height: 1.6; }

  /* nav: brand only + hamburger; CTA lives in the menu */
  .nav__actions { display: none; }

  /* Rev H */
  .levels { padding: 52px 0; }
  .msecs { padding-bottom: 52px; }
  .msec { padding: 16px; gap: 14px; border-radius: 12px; }
  .msec__title .mod__mark { width: 36px; height: 36px; }
  .msec h3 { font-size: 20px; }
  .msec__desc { font-size: 14.5px; }
  .msec__dl { grid-template-columns: 1fr; row-gap: 4px; }
  .msec__dl dd { margin-bottom: 8px; }
  .eproc__flow li { padding: 12px; }
  .eproc__flow b { font-size: 16px; }
  .eproc__list li { font-size: 14px; }
  .mod span { display: none; }
  .mod a { display: grid; gap: 2px; color: inherit; text-decoration: none; }
}

/* Rev H.7: portals stack on phones */
@media (max-width: 640px) {
  .portals { grid-template-columns: 1fr; gap: 8px; margin-top: 18px; }
  .portal { gap: 10px 12px; padding: 16px; }
  .portal .mod__mark { width: 44px; height: 44px; }
  .portal__t > b { font-size: 17px; }
  .portal__t > span:not(.portal__flow) { font-size: 14px; }
  .portal__flow { font-size: 10.5px; }
  .portal__cta { grid-column: 1 / -1; justify-self: stretch; justify-content: center; }
}

/* Rev H.6: drill stacks on phones (screen first), the drawer covers the whole screen; the 31-day line goes vertical */
@media (max-width: 760px) {
  .drill { grid-template-columns: 1fr; gap: 18px; }
  .drill__screen { order: 1; }
  .drill__side { order: 2; }
  .drill__lv { grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 16px; }
  .drill__lv button { grid-template-columns: 1fr; justify-items: center; row-gap: 4px; padding: 8px 4px; background: var(--paper); }
  .drill__ln { width: 100%; height: 26px; font-size: 11.5px; }
  .drill__lt { font-size: 12.5px; }
  .drill__hint { margin-top: 12px; font-size: 13px; }
  .ui { --uf: 9.5px; aspect-ratio: 4 / 5; }
  .ui__menu, .ui__user { display: none; }
  .ui__top { justify-content: space-between; }
  .ui__tabs { gap: 1.6em; }
  .ui__kpis { grid-template-columns: repeat(3, 1fr); gap: .6em; }
  .ui__kpi { padding: .9em .9em 1em; }
  .ui__kpi b { font-size: 1.9em; }
  .ui__kpi span { font-size: .8em; }
  .ui__row { grid-template-columns: 1fr; }
  .ui__row--low { display: none; }
  .ui__drawer { width: 100%; box-shadow: none; }
  .ui__cursor { width: 14px; height: 14px; margin: -7px 0 0 -7px; }
  .how__head { flex-direction: column; align-items: flex-start; gap: 6px; }
  .tl { grid-template-columns: 22px 1fr; gap: 0 14px; }
  .tl__track { width: 6px; height: auto; align-self: stretch; }
  .tl__fill { transform-origin: center top; transform: scaleY(var(--p)); }
  .tl__tick { display: none; }
  .tl__end { top: 100%; width: 14px; height: 14px; margin: -7px 0 0 -7px; }
  .tl__end span { top: 50%; left: 22px; transform: translateY(-50%); }
  .tl__steps { grid-template-columns: 1fr; gap: 10px; margin-top: 0; }
  .tl__step { padding: 16px 16px 18px; opacity: 1; }
  .tl__step .how__ico { width: 24px; height: 24px; margin-bottom: 12px; }
  .tl__step .how__big { font-size: 26px; }
  .tl__step h3 { font-size: 15px; margin-top: 6px; }
  .tl__step p { font-size: 13.5px; opacity: 1; transform: none; }
  .live { margin-top: 28px; }
}

/* Rev I */
@media (max-width: 760px) {
  .hero__grid--d { grid-template-columns: 1fr; gap: 16px; padding-top: 22px; padding-bottom: 20px; }
  .hero__aside { gap: 16px; }
  .levels--hero { padding-bottom: 40px; }
  .film { padding: 52px 0; }
  .film__grid { grid-template-columns: 1fr; gap: 20px; }
  .film__media { order: -1; }
  .film__text h2 { font-size: 26px; }
  .film__text > p:not(.film__k) { font-size: 15px; }
}

@media (max-width: 640px) { .conn { margin-top: 28px; padding-top: 22px; } .conn__grid { grid-template-columns: 1fr; gap: 8px; } .conn__grid li { padding: 16px; } .conn__head h3 { font-size: 21px; } }
