/*
 * ICE CUBE v2 – /mobile (Mobilalkalmazás). Owner: mobile-page group.
 * DESIGN.md §10.6 (live frame), §12.4 (blueprint). Port of showcase/mobile/index.html: its frame,
 * scaling and bridge stay; type, colour and components come from the site. Tokens only – dark mode
 * follows from the tokens. Every rule is scoped to .page--mobile.
 */

/* ------------------------------------------------------------------ hero */
.page--mobile .mobile-hero {
  position: relative; isolation: isolate; overflow-x: clip;
  padding: 28px 0 clamp(64px, 7vw, 112px);
  background: var(--hero-gradient); color: var(--on-navy); --ring: var(--focus-on-navy);
}
.page--mobile .mobile-hero__mtn {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: -1;
  width: 100%; height: clamp(160px, 15vw, 220px); pointer-events: none;
}
.page--mobile .mobile-hero__grid { display: grid; grid-template-columns: minmax(0, 1fr); }
.page--mobile .mobile-hero__intro { order: 1; }
.page--mobile .mobile-hero__device { order: 2; display: flex; justify-content: center; min-width: 0; margin-top: 32px; }
.page--mobile .mobile-hero__rest { order: 3; padding-top: 36px; }
.page--mobile .mobile-hero__title { color: var(--on-navy); max-width: 13em; }
.page--mobile .mobile-hero__lead { margin-top: 20px; color: var(--on-navy-2); }

@media (min-width: 1024px) {
  .page--mobile .mobile-hero { padding-top: 10px; }
  .page--mobile .mobile-hero__grid {
    grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: auto 1fr; column-gap: 24px;
  }
  .page--mobile .mobile-hero__intro { grid-column: 1 / 7; grid-row: 1; padding-top: clamp(24px, 4.5vh, 56px); }
  .page--mobile .mobile-hero__rest { grid-column: 1 / 7; grid-row: 2; padding-top: 32px; }
  /* The phone stays in view under the sticky header while the bullets are used. */
  .page--mobile .mobile-hero__device {
    grid-column: 7 / 13; grid-row: 1 / 3; align-self: start; margin-top: 0;
    position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--header-h) + 10px);
  }
}

/* Feature selector: the owner's six must-haves (h4), then the extra screens (body size). */
.page--mobile .app-feats__label { margin-bottom: 10px; font-size: var(--fs-label); line-height: var(--lh-label); font-weight: 600; color: var(--on-navy-2); }
.page--mobile .app-feats__list { border-top: 1px solid var(--navy-line); }
.page--mobile .app-feats__list > li { border-bottom: 1px solid var(--navy-line); }
.page--mobile .app-feat {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 12px;
  width: 100%; min-height: 52px; padding: 12px 12px 12px 20px;
  color: var(--on-navy-2); text-align: left;
  transition: background-color var(--dur-fast) var(--ease-standard), color var(--dur-fast) var(--ease-standard);
}
.page--mobile .app-feat::before {
  content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: var(--radius-xs);
  background: var(--sky); transform: scaleY(0); transition: transform var(--dur-base) var(--ease-standard);
}
.page--mobile .app-feat:hover { background: var(--hover-on-navy); color: var(--on-navy); }
.page--mobile .app-feat[aria-pressed="true"] { background: var(--hover-on-navy); color: var(--on-navy); }
.page--mobile .app-feat[aria-pressed="true"]::before { transform: scaleY(1); }
.page--mobile .app-feat:focus-visible { outline-offset: -2px; }
.page--mobile .app-feat__title { font-family: var(--font-ui); font-size: var(--fs-h4); line-height: var(--lh-h4); font-weight: 700; }
.page--mobile .app-feat > .icon {
  color: var(--sky-soft); opacity: 0; transform: translateX(-6px);
  transition: opacity var(--dur-fast) var(--ease-standard), transform var(--dur-base) var(--ease-standard);
}
.page--mobile .app-feat:hover > .icon,
.page--mobile .app-feat[aria-pressed="true"] > .icon { opacity: 1; transform: none; }
/* The active bullet opens one line of detail (0fr → 1fr). */
.page--mobile .app-feat__more { grid-column: 1 / -1; display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--dur-slow) var(--ease-standard); }
.page--mobile .app-feat__more > span { min-height: 0; overflow: hidden; }
.page--mobile .app-feat__more > span > span { display: block; padding-top: 4px; font-size: var(--fs-body); line-height: 1.45; font-weight: 400; color: var(--on-navy-2); }
.page--mobile .app-feat[aria-pressed="true"] .app-feat__more { grid-template-rows: 1fr; }

.page--mobile .app-feats__also { display: flex; flex-wrap: wrap; align-items: center; column-gap: 18px; margin-top: 10px; color: var(--on-navy-2); }
.page--mobile .app-feats__also-label { font-weight: 500; }
@media (max-width: 479px) { .page--mobile .app-feats__also-label { flex-basis: 100%; padding-top: 6px; } }
.page--mobile .app-mini {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0;
  font-weight: 600; color: var(--on-navy-2);
  text-decoration: underline; text-decoration-color: var(--navy-line); text-decoration-thickness: 2px; text-underline-offset: 6px;
  transition: color var(--dur-fast) var(--ease-standard), text-decoration-color var(--dur-fast) var(--ease-standard);
}
.page--mobile .app-mini:hover { color: var(--on-navy); text-decoration-color: var(--on-navy-2); }
.page--mobile .app-mini[aria-pressed="true"] { color: var(--on-navy); text-decoration-color: var(--sky); }

.page--mobile .mobile-hero__stores { margin-top: 28px; }
.page--mobile .store-note { margin-top: 10px; max-width: 44ch; font-size: var(--fs-caption); line-height: var(--lh-caption); font-weight: 500; color: var(--text-3); }
.page--mobile .mobile-hero .store-note { color: var(--on-navy-2); }

.page--mobile .mobile-hero__hint { display: flex; align-items: center; gap: 10px; margin-top: 20px; color: var(--on-navy-2); font-weight: 500; }
.page--mobile .live-dot { flex: none; width: 9px; height: 9px; border-radius: var(--radius-round); background: var(--on-navy-2); opacity: 0.5; }
.page--mobile .mobile-hero[data-phone="live"] .live-dot { background: var(--sky-soft); opacity: 1; box-shadow: 0 0 0 4px var(--navy-line); }

/* ------------------------------------------------------------------ the device (§10.6) */
/* Unscaled geometry: screen 402 × 874, black bezel 8, titanium band 4 → body 426 × 898; the buttons
 * stick out 3 px on each side → a 432 × 898 box. mobile.js sets --s (1:1 at 1440 × 1000). */
.page--mobile .phone-stage { --s: 0.8; position: relative; flex: none; width: calc(432px * var(--s)); height: calc(898px * var(--s)); }
@media (max-width: 479px) { .page--mobile .phone-stage { --s: 0.74; } }
.page--mobile .phone { position: absolute; left: 0; top: 0; width: 432px; height: 898px; transform: scale(var(--s)); transform-origin: 0 0; }
.page--mobile .phone__frame {
  position: absolute; inset: 0 3px; padding: var(--phone-titanium-band); border-radius: var(--radius-phone-body);
  background: linear-gradient(158deg, var(--phone-titanium-edge-light) 0%, var(--phone-titanium-light) 8%, var(--phone-titanium-base) 24%,
    var(--phone-titanium-light) 42%, var(--phone-titanium-shade) 62%, var(--phone-titanium-base) 80%, var(--phone-titanium-edge-light) 100%);
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--phone-titanium-edge-light) 75%, transparent),
    inset 0 0 0 2px color-mix(in srgb, var(--phone-bezel) 14%, transparent),
    0 0 0 1px color-mix(in srgb, var(--navy-ink) 30%, transparent),
    var(--phone-shadow);
}
.page--mobile .phone__glass {
  position: relative; height: 100%; padding: var(--phone-black-bezel);
  border-radius: calc(var(--radius-phone-body) - var(--phone-titanium-band)); background: var(--phone-bezel);
}
/* The faint edge highlight on the glass (§10.1: no glare beyond it). */
.page--mobile .phone__glass::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(130deg, color-mix(in srgb, var(--phone-titanium-edge-light) 10%, transparent), transparent 30%);
}
.page--mobile .phone__screen {
  position: relative; z-index: 1; width: var(--phone-screen-w); height: var(--phone-screen-h);
  border-radius: var(--radius-phone-screen); overflow: hidden; clip-path: inset(0 round var(--radius-phone-screen));
  isolation: isolate; background: var(--navy-deep);
}
.page--mobile .phone__screen > iframe { display: block; width: var(--phone-screen-w); height: var(--phone-screen-h); max-width: none; border: 0; }
.page--mobile .phone__btn {
  position: absolute; width: 4px;
  background: linear-gradient(90deg, var(--phone-titanium-shade), var(--phone-titanium-light) 50%, var(--phone-titanium-button));
}
.page--mobile .phone__btn--l { left: 0; border-radius: 2px 0 0 2px; }
.page--mobile .phone__btn--r { right: 0; border-radius: 0 2px 2px 0; background: linear-gradient(90deg, var(--phone-titanium-button), var(--phone-titanium-light) 50%, var(--phone-titanium-shade)); }
.page--mobile .phone__btn--action { top: 170px; height: 32px; }
.page--mobile .phone__btn--up { top: 230px; height: 62px; }
.page--mobile .phone__btn--down { top: 306px; height: 62px; }
.page--mobile .phone__btn--side { top: 250px; height: 98px; }
.page--mobile .phone__btn--cam { top: 560px; right: 1px; width: 3px; height: 56px; background: linear-gradient(90deg, var(--phone-titanium-shade), var(--phone-bezel)); }

/* Splash: shown while the app loads, and the calm fallback when it is missing (§10.6). */
.page--mobile .splash {
  position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column;
  background: var(--hero-gradient); color: var(--on-navy);
  transition: opacity calc(var(--dur-slow) * 2) var(--ease-standard), visibility 0s linear calc(var(--dur-slow) * 2);
}
.page--mobile .splash.is-gone { opacity: 0; visibility: hidden; }
.page--mobile .splash__bar { position: relative; flex: none; display: flex; align-items: center; justify-content: space-between; height: 54px; padding: 6px 30px 0 50px; }
.page--mobile .splash__time { font-family: var(--font-ui); font-size: 17px; line-height: 1; font-weight: 600; font-variant-numeric: tabular-nums; }
.page--mobile .splash__island { position: absolute; left: 50%; top: 11px; width: 125px; height: 37px; margin-left: -62.5px; border-radius: var(--radius-round); background: var(--phone-bezel); }
.page--mobile .splash__icons { display: flex; align-items: center; gap: 6px; }
.page--mobile .splash__icons svg { width: auto; height: 12px; fill: currentColor; }
.page--mobile .splash__center { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 40px 150px; text-align: center; }
.page--mobile .splash__logo { width: 160px; height: auto; }
.page--mobile .splash__name { margin-top: 20px; font-family: var(--font-display); font-size: 32px; line-height: 1; font-weight: 800; font-stretch: 75%; letter-spacing: -0.005em; }
.page--mobile .splash__loader { display: flex; gap: 9px; height: 8px; margin-top: 28px; }
.page--mobile .splash__loader i { width: 8px; height: 8px; border-radius: var(--radius-round); background: var(--on-navy-2); animation: mobile-dots 1.3s ease-in-out infinite both; }
.page--mobile .splash__loader i:nth-child(2) { animation-delay: 0.18s; }
.page--mobile .splash__loader i:nth-child(3) { animation-delay: 0.36s; }
@keyframes mobile-dots { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }
.page--mobile .splash__msg { display: none; max-width: 270px; margin-top: 24px; font-size: 17px; line-height: 1.45; font-weight: 500; color: var(--on-navy-2); }
.page--mobile .splash[data-state="calm"] .splash__loader { display: none; }
.page--mobile .splash[data-state="calm"] .splash__msg { display: block; }
.page--mobile .splash__route { position: absolute; z-index: 1; left: 30px; right: 30px; bottom: 186px; text-align: center; }
.page--mobile .splash__route span { display: block; }
.page--mobile .splash__route-k { font-size: 14px; line-height: 1.3; font-weight: 500; color: var(--on-navy-2); }
.page--mobile .splash__route-t { margin-top: 6px; font-family: var(--font-display); font-size: 24px; line-height: 1.15; font-weight: 700; font-stretch: 87.5%; }
.page--mobile .splash__mtn { position: absolute; left: 0; bottom: 0; width: 100%; height: 170px; }
.page--mobile .splash__home { position: absolute; z-index: 1; left: 50%; bottom: 8px; width: 140px; height: 5px; margin-left: -70px; border-radius: var(--radius-round); background: var(--on-navy); }

/* ------------------------------------------------------------------ features */
.page--mobile .app-feature__grid { display: grid; gap: 40px; align-items: center; }
.page--mobile .app-feature__copy { order: -1; }
.page--mobile .app-feature__copy > * + * { margin-top: 16px; }
.page--mobile .app-feature__copy h2 { max-width: 13em; }
.page--mobile .app-feature__aside { color: var(--text-2); }
.page--mobile .app-feature__see { margin-top: 20px; }
.page--mobile .app-feature .mockup--phone img { max-height: min(600px, 70vh); }
@media (min-width: 1024px) {
  .page--mobile .app-feature__grid { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; }
  .page--mobile .app-feature__copy { order: 0; grid-column: 7 / 13; grid-row: 1; }
  .page--mobile .app-feature__media { grid-column: 1 / 6; grid-row: 1; }
  .page--mobile .app-feature--flip .app-feature__copy { grid-column: 1 / 7; }
  .page--mobile .app-feature--flip .app-feature__media { grid-column: 8 / 13; }
  .page--mobile .app-feature .mockup--phone img { max-height: 600px; }
}

/* Order statuses: the same labels as the app and the account page (§5.6). */
.page--mobile .status-line { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 28px; font-size: var(--fs-body-s); line-height: 1.3; font-weight: 600; color: var(--text-2); }
.page--mobile .status-line__step { display: inline-flex; align-items: center; gap: 8px; }
.page--mobile .status-line__step::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: var(--radius-round); background: var(--blue); }
.page--mobile .status-line__step.is-current { color: var(--text); }
.page--mobile .status-line__step.is-current::before { background: var(--sky); box-shadow: 0 0 0 3px var(--ice-soft); }
.page--mobile .status-line__step.is-current ~ .status-line__step { color: var(--text-3); }
.page--mobile .status-line__step.is-current ~ .status-line__step::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line-2); }
.page--mobile .status-line__note { margin-top: 10px; font-size: var(--fs-caption); line-height: var(--lh-caption); font-weight: 500; color: var(--text-3); }

/* ------------------------------------------------------------------ getting started */
.page--mobile .app-start__grid { display: grid; gap: 40px; align-items: center; }
.page--mobile .app-start__copy > .lead { margin-top: 16px; }
.page--mobile .start-route { position: relative; display: grid; gap: 28px; margin-top: 36px; padding-left: 34px; }
/* A Méretvonal-style line: 1.5 px, a dot per stop, an end tick. */
.page--mobile .start-route::before { content: ""; position: absolute; left: 4.25px; top: 10px; bottom: 4px; width: 1.5px; background: var(--blue); }
.page--mobile .start-route::after { content: ""; position: absolute; left: -2px; bottom: 4px; width: 14px; height: 1.5px; background: var(--blue); }
.page--mobile .start-route__stop { position: relative; }
.page--mobile .start-route__stop::before { content: ""; position: absolute; left: -34px; top: 7px; width: 10px; height: 10px; border-radius: var(--radius-round); background: var(--blue); }
.page--mobile .start-route__text { margin-top: 6px; max-width: 46ch; color: var(--text-2); }
.page--mobile .app-start__media .mockup--group img { max-width: min(100%, 503px); }
@media (min-width: 1024px) {
  .page--mobile .app-start__grid { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; }
  .page--mobile .app-start__copy { grid-column: 1 / 7; }
  .page--mobile .app-start__media { grid-column: 7 / 13; }
}

/* ------------------------------------------------------------------ FAQ */
.page--mobile .app-faq__grid { display: grid; gap: 32px; }
.page--mobile .app-faq__intro > .lead { margin-top: 16px; }
.page--mobile .app-faq__phone { margin-top: 28px; }
.page--mobile .app-faq__mail { margin-top: 6px; font-size: 18px; font-weight: 600; }
@media (min-width: 1024px) {
  .page--mobile .app-faq__grid { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; align-items: start; }
  .page--mobile .app-faq__intro { grid-column: 1 / 6; }
  .page--mobile .app-faq__list { grid-column: 6 / 13; }
}

/* ------------------------------------------------------------------ closing (the mascot moment, 240 px) */
.page--mobile .app-closing__media { --mascot-h: 240px; display: flex; justify-content: center; }
.page--mobile .app-closing__stores { margin-top: 28px; }
@media (min-width: 1024px) {
  .page--mobile .app-closing__media { align-self: end; }
}
