/* mobile-embed.css
   The NPTech Mobile partner pages (/mobile-account, /mobile-shop). Each one
   exists to get someone into a cross-origin iframe run by NRTC, so the page
   gets out of the way: a compact header that keeps the iframe above the
   fold, a switch between the two pages (people constantly mean the other
   one), a frame bar that names the partner host and offers a new-tab
   escape, honest loading and slow-loading states, and help underneath.

   NRTC's own snippet stretches the iframe to the full window with negative
   margins, written for a WordPress theme with no layout of its own. This
   site has one, so the iframe sits in a framed card inside .section-shell —
   and only goes edge to edge on phones, where every pixel helps the app. */

/* --- Compact header ------------------------------------------------------ */
.me-head { padding: clamp(28px, 4vw, 52px) 0 clamp(22px, 3vw, 34px); }
.me-head-grid { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 22px 40px; }
.me-head h1 { font-size: clamp(2rem, 4.2vw, 3.3rem); line-height: 1.06; }
.me-sub { max-width: 58ch; margin-top: 10px; color: var(--ink-soft); font-size: clamp(1rem, 1.3vw, 1.1rem); }

/* Shop / account switch: a segmented control, current page filled. */
.me-switch { display: inline-flex; flex: none; padding: 4px; border: 1px solid var(--rule); border-radius: var(--radius-pill); background: var(--card); }
.me-switch a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; border-radius: var(--radius-pill); color: var(--ink); font-family: var(--font-heading); font-size: .86rem; font-weight: 700; text-decoration: none; white-space: nowrap; transition: background-color .2s ease, color .2s ease; }
.me-switch a:hover { background: var(--surface); }
.me-switch a[aria-current="page"] { background: var(--blue); color: var(--paper); }

/* --- The frame ----------------------------------------------------------- */
.embed-section { padding: 0 0 clamp(36px, 5vw, 60px); }
.embed-frame { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); overflow: hidden; }

/* The bar reads like the top of a browser window: whose page this is, and
   the way out to it. */
.embed-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 20px; padding: 6px 12px 6px 18px; background: var(--soft-white); border-bottom: 1px solid var(--rule); }
.embed-host { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--ink-soft); font-size: .86rem; line-height: 1.4; }
.embed-host strong { color: var(--ink); font-family: var(--font-heading); font-size: .82rem; }
.embed-host-name { margin-left: 4px; }
.embed-lock { flex: none; width: 14px; height: 14px; color: var(--blue); }
.embed-open { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; color: var(--blue-dark); font-family: var(--font-heading); font-size: .84rem; font-weight: 700; text-decoration: none; }
.embed-open:hover { text-decoration: underline; }

.embed-viewport { position: relative; }
.embed-viewport iframe { display: block; width: 100%; border: 0; }

/* Cross-origin iframes sit blank while they load; this sits on top until
   the load event, and turns into an honest fallback if that never comes. */
.embed-loading { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 14px; padding: clamp(64px, 12vw, 140px) 24px 24px; background: var(--card); color: var(--ink-soft); font-family: var(--font-heading); font-size: .92rem; font-weight: 600; text-align: center; transition: opacity .3s ease, visibility .3s; }
.embed-loading.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.embed-spinner { width: 28px; height: 28px; border: 3px solid var(--rule); border-top-color: var(--blue); border-radius: 50%; animation: embed-spin .8s linear infinite; }
@keyframes embed-spin { to { transform: rotate(360deg); } }
.embed-slow { max-width: 40ch; margin: 6px 0 0; color: var(--ink); font-family: var(--font-body); font-size: .95rem; font-weight: 400; line-height: 1.6; }
.embed-slow a { color: var(--blue-dark); font-weight: 600; }

/* Seamless (the shop): no card, no bar, no border. The partner page is
   white, so it sits in a full-width white band and reads as part of the
   page rather than a box within it. */
.embed-section--seamless { padding: clamp(20px, 3vw, 36px) 0 clamp(28px, 4vw, 48px); margin-bottom: clamp(36px, 5vw, 60px); background: var(--card); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.embed-section--seamless .embed-frame { background: transparent; border: 0; border-radius: 0; box-shadow: none; overflow: visible; }

.embed-note { max-width: 70ch; margin-top: 16px; color: var(--ink-soft); font-size: .9rem; line-height: 1.6; }

/* --- Shop extras ----------------------------------------------------------
   The shop is also the page people land on when deciding, so it carries a
   little more than the account page: a photo beside the heading (kept short
   so the zip check stays above the fold), a line right above the zip check
   explaining why it asks for a zip, and the reasons to switch underneath. */
.me-head--photo .me-head-grid { display: grid; grid-template-columns: 1fr minmax(260px, 430px); grid-template-areas: "copy photo" "switch photo"; align-items: end; gap: 18px clamp(32px, 5vw, 72px); }
.me-head--photo .me-head-copy { grid-area: copy; }
.me-head--photo .me-switch { grid-area: switch; justify-self: start; align-self: start; }
.me-head-photo { grid-area: photo; margin: 0; }
.me-head-photo img { display: block; width: 100%; height: clamp(170px, 17vw, 230px); object-fit: cover; border-radius: var(--radius-lg); }

.me-networks { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 36px; margin-bottom: clamp(14px, 2vw, 22px); padding-bottom: 18px; border-bottom: 1px solid var(--rule); }
.me-networks-title { color: var(--ink); font-family: var(--font-heading); font-size: 1.06rem; font-weight: 700; }
.me-networks-hint { margin-top: 4px; color: var(--ink-soft); font-size: .94rem; }
/* "Start over": a text button inline with the hint, so it sits where the
   eye already is when someone wants to change their zip or answers. */
.me-restart { display: inline; min-height: 0; padding: 0; border: 0; background: none; color: var(--blue-dark); font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.me-restart:hover { color: var(--blue-deep); }
/* Leave room for the sticky header when Start over scrolls back up. */
.embed-section { scroll-margin-top: 110px; }

.me-why { padding: clamp(8px, 2vw, 24px) 0 var(--section-y); }
.me-why-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 9%; align-items: start; }
.me-why h2 { max-width: 15ch; font-size: clamp(1.9rem, 3vw, 2.8rem); }
.me-reasons { margin: 0; border-top: 1px solid var(--rule); }
.me-reasons > div { display: grid; grid-template-columns: 210px 1fr; gap: 4px 28px; padding: 22px 0; border-bottom: 1px solid var(--rule); }
.me-reasons dt { font-family: var(--font-heading); font-size: 1.04rem; font-weight: 700; }
.me-reasons dd { margin: 0; color: var(--ink-soft); }

.me-protect { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 72px); align-items: center; margin-top: clamp(56px, 7vw, 96px); }
.me-protect-photo { margin: 0; }
.me-protect-photo img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
.me-protect-copy h2 { max-width: 16ch; font-size: clamp(1.7rem, 2.8vw, 2.5rem); }
.me-protect-copy p { max-width: 46ch; margin: 16px 0 26px; color: var(--ink-soft); font-size: 1.06rem; }

/* Eligibility: a plain row between rules, statement left and link right,
   in the same rule system as the help list below. No box, no accent bar. */
.me-eligible { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px 32px; margin-top: clamp(48px, 6vw, 80px); padding: 22px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.me-eligible p { max-width: 62ch; color: var(--ink-soft); font-size: 1.02rem; }
.me-eligible strong { color: var(--ink); }
.me-eligible .text-link { flex: none; }

@media (max-width: 900px) {
    .me-why-grid, .me-protect { grid-template-columns: 1fr; gap: 28px; }
    .me-why h2 { max-width: none; }
}
@media (max-width: 760px) {
    .me-head--photo .me-head-grid { grid-template-columns: 1fr; grid-template-areas: "copy" "switch"; }
    .me-head-photo { display: none; }
    .me-reasons > div { grid-template-columns: 1fr; }
}

/* --- Help: the contact-band ledger, three across -------------------------- */
.me-help { padding: 0 0 var(--section-y); }
.me-help h2 { margin-bottom: 18px; font-size: clamp(1.5rem, 2.4vw, 2rem); }
.me-help dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; border-top: 1px solid var(--rule); }
.me-help dl > div { padding: 22px 28px 22px 0; border-bottom: 1px solid var(--rule); }
.me-help dl > div + div { padding-left: 28px; border-left: 1px solid var(--rule); }
.me-help dt { margin-bottom: 8px; color: var(--ink-soft); font-family: var(--font-heading); font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.me-help dd { margin: 0; font-family: var(--font-heading); font-size: 1.02rem; font-weight: 700; }
.me-help dd a { color: var(--blue-dark); }
.me-help dd small { display: block; margin-top: 4px; color: var(--ink-soft); font-family: var(--font-body); font-size: .88rem; font-weight: 400; }

@media (max-width: 760px) {
    .me-help dl { grid-template-columns: 1fr; }
    .me-help dl > div, .me-help dl > div + div { padding-left: 0; border-left: 0; }
}

/* Phones: the switch spans the width, and the frame runs edge to edge so
   the partner app gets the whole screen. */
@media (max-width: 640px) {
    .me-switch { display: flex; width: 100%; }
    .me-switch a { flex: 1; justify-content: center; padding: 0 12px; }
    .embed-frame { width: 100vw; margin-left: calc(50% - 50vw); border-right: 0; border-left: 0; border-radius: 0; box-shadow: none; }
    .embed-host-name { display: none; }
    .embed-note { font-size: .86rem; }
}

@media (prefers-reduced-motion: reduce) {
    .embed-spinner { animation: none; }
    .embed-loading, .me-switch a { transition: none; }
}
