/* NetDrive Mobile launch — popup (Tier 1) + sticky banner (Tier 2). */

:root {
  --ml-ink:      #0d3047;
  --ml-ink-2:    #1c4a6e;
  --ml-accent:   #ffc800;
  --ml-accent-2: #e0b000;
  --ml-paper:    #ffffff;
  --ml-soft:     #f4f6fa;
  --ml-muted:    #6c757d;
}

/* ─────────────────────────── Tier 2: sticky banner ─────────────────────────── */

.ml-banner {
  position: relative;
  display: none;                 /* JS toggles to flex when not dismissed */
  align-items: center;
  gap: 12px;
  padding: 10px 44px 10px 16px;
  background: linear-gradient(90deg, #0d3047 0%, #1c4a6e 60%, #25775c 100%);
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  line-height: 1.3;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.ml-banner:hover { color: #fff; }
.ml-banner.is-visible { display: flex; }

.ml-banner__icon {
  font-size: 18px;
  color: var(--ml-accent);
  flex-shrink: 0;
}
.ml-banner__text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ml-banner__text strong { font-weight: 700; color: #fff; }
.ml-banner__cta {
  flex-shrink: 0;
  font-weight: 600;
  color: var(--ml-accent);
  white-space: nowrap;
}
.ml-banner__cta i { margin-left: 4px; font-size: 11px; }
.ml-banner__close {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, 0.7);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.15s, color 0.15s;
}
.ml-banner__close:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }

@media (max-width: 560px) {
  .ml-banner { font-size: 12px; padding: 8px 40px 8px 12px; gap: 8px; }
  .ml-banner__text strong + br,
  .ml-banner__text { white-space: normal; }
}

/* ─────────────────────────── Tier 1: full popup ─────────────────────────── */

.ml-popup {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;                       /* JS toggles to flex when first visit */
  align-items: center;
  align-items: safe center;            /* falls back to flex-start when card > viewport, so top doesn't clip */
  justify-content: center;
  overflow-y: auto;                    /* container scrolls when card taller than viewport — no inner-card scrollbar */
  padding: 16px;
  font-family: 'Montserrat', sans-serif;
}
.ml-popup.is-visible { display: flex; }

.ml-popup__backdrop {
  position: fixed;                     /* stays put while container scrolls — backdrop always covers viewport */
  inset: 0;
  background: rgba(13, 48, 71, 0.78);
  backdrop-filter: blur(2px);
}
.ml-popup__card {
  position: relative;
  width: min(960px, 100%);
  background: var(--ml-paper);
  border-radius: 24px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.38), 0 8px 24px rgba(13, 48, 71, 0.12);
  padding: 44px 44px 28px;
  animation: ml-pop 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes ml-pop {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to   { opacity: 1; transform: scale(1)    translateY(0); }
}

.ml-popup__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0;
  background: var(--ml-soft);
  color: var(--ml-ink);
  cursor: pointer;
  font-size: 16px;
  transition: background 0.15s, transform 0.15s;
  z-index: 2;
}
.ml-popup__close:hover { background: #e6ebf3; transform: rotate(90deg); }

.ml-popup__header { text-align: center; margin-bottom: 36px; }
.ml-popup__logo {
  height: 32px;
  width: auto;
  margin-bottom: 22px;
  /* logo PNG already has correct brand colors — no filter needed */
}
.ml-popup__title {
  font-size: 32px;
  font-weight: 700;
  color: var(--ml-ink);
  margin: 0 0 12px;
  letter-spacing: -0.015em;
  line-height: 1.15;
}
.ml-popup__subtitle {
  font-size: 17px;
  color: var(--ml-ink-soft);
  margin: 0;
  font-weight: 400;
}

/* fan-stack: side phones recede, center phone steps forward */
.ml-popup__phones {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0;
  margin: 0 0 48px;
  padding: 0 8px;
}
.ml-popup__phone {
  flex: 0 0 32%;
  max-width: 32%;
  margin: 0;
  text-align: center;
  transition: transform 0.25s ease;
}
.ml-popup__phone img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0;                         /* device frame already has rounded corners */
  filter: drop-shadow(0 14px 26px rgba(13, 48, 71, 0.18));
  background: transparent;
}
.ml-popup__phone figcaption {
  display: flex;
  flex-direction: row;
  align-items: center;          /* visual vertical center — natural for single-line captions */
  justify-content: center;
  gap: 5px;
  margin-top: 18px;
  padding: 0 4px;
  font-size: 12px;
  color: var(--ml-ink-2);
  font-weight: 500;
  line-height: 1.4;
  opacity: 0.55;
  transition: opacity 0.25s, font-size 0.25s, font-weight 0.25s;
}
.ml-popup__phone-icon {
  flex-shrink: 0;
  font-size: 13px;
  line-height: 1;
  color: var(--ml-ink-soft);
  transition: color 0.25s, font-size 0.25s;
}
.ml-popup__phone:nth-child(1) {              /* left */
  transform: scale(0.86) translateY(8px);
  margin-right: -3%;
  z-index: 1;
}
.ml-popup__phone:nth-child(2) {              /* center — hero */
  transform: scale(1.08);
  z-index: 2;
  position: relative;
}
.ml-popup__phone:nth-child(2) figcaption {
  opacity: 1;
  font-size: 14px;
  font-weight: 600;
  color: var(--ml-ink);
}
.ml-popup__phone:nth-child(2) .ml-popup__phone-icon {
  font-size: 15px;
  color: var(--ml-accent);              /* brand gold accent on the hero phone */
}
.ml-popup__phone:nth-child(3) {              /* right */
  transform: scale(0.86) translateY(8px);
  margin-left: -3%;
  z-index: 1;
}

.ml-popup__stores {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 0 0 28px;
}
.ml-popup__store {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  background: var(--ml-ink);
  color: #fff;
  border-radius: 16px;
  text-decoration: none;
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1),
              background 0.18s, box-shadow 0.18s;
  box-shadow: 0 4px 12px rgba(13, 48, 71, 0.08);
}
.ml-popup__store:hover {
  transform: translateY(-3px);
  background: var(--ml-ink-2);
  color: #fff;
  box-shadow: 0 12px 28px rgba(13, 48, 71, 0.22);
}
.ml-popup__store-icon { font-size: 32px; }
.ml-popup__store-text { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.ml-popup__store-text small {
  font-size: 11px;
  opacity: 0.78;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 2px;
}
.ml-popup__store-text strong { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.ml-popup__store-qr {
  width: 130px;
  height: 130px;
  background: #fff;
  border-radius: 8px;
  padding: 6px;
  image-rendering: pixelated;   /* keep QR module edges crisp when downscaled — critical for camera scan */
  flex-shrink: 0;
}

.ml-popup__footer {
  text-align: center;
  padding-top: 4px;
}
.ml-popup__dismiss-7d {
  background: transparent;
  border: 0;
  color: var(--ml-muted);
  font-size: 13px;
  cursor: pointer;
  padding: 8px 16px;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: rgba(108, 117, 125, 0.35);
  transition: color 0.15s, text-decoration-color 0.15s;
}
.ml-popup__dismiss-7d:hover {
  color: var(--ml-ink);
  text-decoration-color: var(--ml-ink);
}

/* Short-viewport / laptop mode — compact spacing for ~800–880px tall windows.
   Phone width drops 32% → 28%; QR stays at 130px for camera-scan reliability.
   The actual scroll behavior is handled by .ml-popup container (always),
   this block only adjusts sizes — it doesn't touch overflow rules. */
@media (max-height: 880px) {
  .ml-popup__card { padding: 26px 36px 18px; }
  .ml-popup__header { margin-bottom: 20px; }
  .ml-popup__logo { height: 26px; margin-bottom: 12px; }
  .ml-popup__title { font-size: 26px; margin-bottom: 6px; }
  .ml-popup__subtitle { font-size: 15px; }
  .ml-popup__phones { margin-bottom: 26px; }
  .ml-popup__phone { flex: 0 0 28%; max-width: 28%; }
  .ml-popup__phone figcaption { margin-top: 12px; font-size: 11px; gap: 4px; }
  .ml-popup__phone:nth-child(2) figcaption { font-size: 13px; }
  .ml-popup__phone-icon { font-size: 12px; }
  .ml-popup__phone:nth-child(2) .ml-popup__phone-icon { font-size: 14px; }
  .ml-popup__stores { margin-bottom: 16px; gap: 14px; }
  .ml-popup__store { padding: 12px 18px; gap: 14px; }
  .ml-popup__store-icon { font-size: 28px; }
  .ml-popup__store-text strong { font-size: 16px; }
  .ml-popup__dismiss-7d { font-size: 12px; padding: 6px 14px; }
}

/* Tablet & smaller — collapse to single phone + stacked stores, hide QR */
@media (max-width: 760px) {
  .ml-popup__card { padding: 28px 22px 20px; border-radius: 18px; }
  .ml-popup__header { margin-bottom: 24px; }
  .ml-popup__logo { height: 28px; margin-bottom: 16px; }
  .ml-popup__title { font-size: 24px; }
  .ml-popup__subtitle { font-size: 15px; }
  .ml-popup__phones { display: block; max-width: 240px; margin: 0 auto 32px; padding: 0; }
  .ml-popup__phone { flex: none; max-width: none; margin: 0 !important; transform: none !important; }
  .ml-popup__phone:not(:first-child) { display: none; }    /* show only home screen on mobile */
  .ml-popup__phone figcaption { opacity: 1; font-size: 14px; font-weight: 600; color: var(--ml-ink); margin-top: 14px; }
  .ml-popup__phone-icon { font-size: 15px; color: var(--ml-accent); }
  .ml-popup__stores { grid-template-columns: 1fr; gap: 12px; margin-bottom: 20px; }
  .ml-popup__store-qr { display: none; }                   /* tap the button directly */
  .ml-popup__store { grid-template-columns: auto 1fr; padding: 16px 20px; }
  .ml-popup__store-icon { font-size: 28px; }
}
