/* ===========================================================================
   CLIQ — the five "how to use CLIQ" screen pages
   (front-door · easy-access · inner-circle · assistant · co-browse)

   Loaded after styles.css. Holds the navy logo bar, the secondary nav row that
   sits under it on every page, the page hero, the full-width feature rows, and
   the closing CTA + pager. Split out of index.html's inline styles 2026-08-15
   so all five pages share one source.
   =========================================================================== */

/* ---------- Navy logo bar (same chrome as the homepage) ---------- */
.bare-logo { background: var(--cliq-navy); width: 100%; padding: 40px 0 8px; }
.bare-logo-inner { display: flex; align-items: center; width: 100%; margin: 0 auto; padding: 0 var(--space-8); }
.bare-nav-link {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 56px; padding: 12px 24px; border-radius: var(--radius-pill);
  font-family: var(--font-sans); font-weight: 700; font-size: 1.1rem;
  color: #fff; text-decoration: none;
  border: 1.5px solid rgba(255,255,255,.55);
  transition: background var(--dur-normal), border-color var(--dur-normal);
}
.bare-nav-link:hover { background: rgba(255,255,255,.16); border-color: #fff; }
.bare-nav-link:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
/* Phone widths: wrapped label text turns the pill radius into an ellipse —
   use a rounded rect and let the two links share the row (2026-08-16). */
@media (max-width: 640px) {
  .bare-logo-inner { flex-wrap: wrap; row-gap: 10px; }
  .bare-nav-link { border-radius: 18px !important; padding: 10px 14px; font-size: 1rem; }
}

/* ---------- Secondary nav: the five screen pages, on every page ---------- */
.sub-nav { position: sticky; top: 0; z-index: 45; background: #fff; border-bottom: 1.5px solid var(--border-subtle); box-shadow: 0 6px 18px rgba(27,34,84,.05); }
.sub-nav-inner { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; width: 100%; margin: 0 auto; padding: 12px var(--space-8); }
.sub-nav a {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 52px; padding: 8px 18px 8px 12px; border-radius: var(--radius-pill);
  font-family: var(--font-sans); font-weight: 800; font-size: 1.02rem;
  color: var(--navy-800); text-decoration: none; background: var(--navy-050);
  transition: background var(--dur-normal) var(--ease-gentle), color var(--dur-normal) var(--ease-gentle);
}
.sub-nav a:hover { background: var(--violet-050); color: var(--violet-700); }
.sub-nav a:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.sub-nav a[aria-current="page"] { background: var(--violet-050); color: var(--violet-700); box-shadow: inset 0 0 0 2px var(--cliq-violet); }
.sub-nav .sn-ic { flex: none; width: 34px; height: 34px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; }
.sub-nav .sn-ic i { font-size: 19px; }
.sub-nav .sn-home { padding-left: 18px; background: transparent; color: var(--ink-600); }
.sub-nav .sn-home i { font-size: 20px; }
.sub-nav .sn-sep { flex: none; width: 1.5px; height: 30px; background: var(--border-subtle); margin: 0 6px; }
@media (max-width: 900px) {
  .sub-nav { position: static; }
  .sub-nav-inner { padding: 10px var(--space-5); gap: 6px; }
  .sub-nav a { font-size: .96rem; min-height: 46px; padding: 6px 14px 6px 10px; }
  .sub-nav .sn-ic { width: 28px; height: 28px; border-radius: 9px; }
  .sub-nav .sn-ic i { font-size: 16px; }
  .sub-nav .sn-sep { display: none; }
}

/* ---------- Section rhythm (the five pages don't load index.html's inline styles) ---------- */
.sr-section { padding: var(--space-16) 0; }
section[id], header[id] { scroll-margin-top: 120px; }

/* The floating text-size widget site.js injects is not used on these pages. */
.textsize-ctl { display: none; }

/* ---------- Page hero ---------- */
.pg-hero { padding: var(--space-16) 0 var(--space-12); background: var(--navy-050); }
.pg-hero .wrap { max-width: 1320px; }
.pg-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-sans); font-size: var(--fs-caption); font-weight: 800;
  letter-spacing: .14em; text-transform: uppercase;
  color: #0F6E56; background: #E1F5EE; border-radius: 999px; padding: 8px 16px;
}
.pg-eyebrow span { width: 22px; height: 2px; border-radius: 999px; background: currentColor; }
.pg-hero h1 { font-size: clamp(2.2rem, 4vw, 3.4rem); line-height: 1.08; margin: 18px 0 0; color: var(--text-heading); max-width: 26ch; }
.pg-hero .pg-lead { font-size: clamp(1.2rem, 1.9vw, 1.55rem); line-height: 1.5; color: var(--ink-700); max-width: 60ch; margin: 18px 0 0; text-wrap: pretty; }
.pg-jump { display: flex; flex-wrap: wrap; gap: 10px; margin: var(--space-8) 0 0; padding: 0; list-style: none; }
.pg-jump a {
  display: inline-flex; align-items: center; gap: 9px; min-height: 50px;
  padding: 10px 20px; border-radius: var(--radius-pill);
  background: #fff; border: 1.5px solid var(--navy-100);
  font-family: var(--font-sans); font-weight: 800; font-size: 1.02rem;
  color: var(--navy-800); text-decoration: none;
}
.pg-jump a:hover { border-color: var(--cliq-violet); color: var(--violet-700); }
.pg-jump a:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.pg-jump a i { font-size: 19px; color: var(--cliq-violet); }

/* ---------- Feature rows: one screen per row ---------- */
.screens-wrap { max-width: 1320px; }
.way-label { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: .95rem; letter-spacing: .08em; text-transform: uppercase; color: var(--violet-600); background: var(--violet-100); border-radius: var(--radius-pill); padding: 8px 20px; margin-bottom: 18px; }
.way-block { margin-top: calc(var(--space-16) + 26px); scroll-margin-top: 120px; }
.way-block:first-of-type { margin-top: 0; }
.feat-row { display: grid; grid-template-columns: minmax(0,1.7fr) minmax(0,1fr); gap: var(--space-10); align-items: center; }
.feat-row:has(.feat-media:last-child) { grid-template-columns: minmax(0,1fr) minmax(0,1.7fr); }
.feat-screen { width: 100%; border-radius: 18px; overflow: hidden; box-shadow: 0 24px 60px rgba(27,34,84,.18); }
.feat-screen .embed-scale { position: relative; width: 100%; overflow: hidden; }
.feat-media[data-side="left"] { order: -1; }
@media (min-width: 1001px) {
  .feat-row--phone { grid-template-columns: minmax(0,400px) minmax(0,1.6fr); }
  .feat-row--phone:has(.feat-media:last-child) { grid-template-columns: minmax(0,1.6fr) minmax(0,400px); }
}
.feat-row h2 { font-size: clamp(1.9rem, 2.9vw, 2.5rem); margin: 0 0 12px; line-height: 1.1; }
.feat-row .feat-lead { font-size: clamp(1.15rem, 1.7vw, 1.4rem); line-height: 1.55; color: var(--ink-700); margin: 0; text-wrap: pretty; }
.feat-points { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.feat-points li { display: flex; gap: 12px; align-items: flex-start; font-size: 1.12rem; line-height: 1.45; color: var(--ink-700); font-weight: 600; }
.feat-points li i { flex: none; width: 30px; height: 30px; border-radius: 999px; background: var(--teal-050); color: var(--teal-700); display: flex; align-items: center; justify-content: center; font-size: 18px; margin-top: 2px; }
@media (max-width: 1000px) {
  .feat-row, .feat-row:has(.feat-media:last-child) { grid-template-columns: 1fr; gap: var(--space-8); }
  /* Grid blowout: `1fr` is `minmax(auto, 1fr)`, so a track never shrinks below
     its item's automatic minimum size. A .feat-media holding a cropped embed
     reports a min-content of 700px (the .feat-screen max-width below, fed by
     the 1300px iframe inside it), which forced the single column to 700px
     inside a 327px container and scrolled the whole page sideways at 375px.
     min-width:0 lets the track actually track the container. The rows without
     a cropped embed collapsed correctly, which is why this only bit some. */
  .feat-text, .feat-media { min-width: 0; }
  /* Round FD2 (Grace): when the row stacks, the text always comes before its
     image — even in the alternating sections whose .feat-media[data-side=left]
     sits first in the DOM (sign-in, menu). Overrides that order:-1. */
  .feat-text { order: 0 !important; }
  .feat-media { order: 1 !important; }
  .feat-screen { max-width: 700px; margin: 0 auto; }
}

/* ---------- Closing CTA + pager ---------- */
.pg-cta { text-align: center; }
.pg-cta h2 { font-size: clamp(2rem, 3.4vw, 2.8rem); margin: 0; }
.pg-cta p { font-size: clamp(1.15rem, 1.8vw, 1.4rem); line-height: 1.5; color: var(--navy-200); max-width: 54ch; margin: 18px auto 0; }
.pg-cta .btn-row { justify-content: center; margin-top: var(--space-8); gap: 16px; }
.pg-pager { display: flex; align-items: stretch; justify-content: space-between; gap: 16px; flex-wrap: wrap; max-width: 1320px; margin: 0 auto; padding: var(--space-12) var(--space-6); }
.pg-pager a {
  flex: 1 1 320px; display: flex; align-items: center; gap: 18px;
  min-height: 96px; padding: 22px 28px; border-radius: 22px; text-decoration: none;
  background: #fff; border: 2.5px solid var(--navy-100);
  transition: border-color var(--dur-normal) var(--ease-gentle), transform var(--dur-normal) var(--ease-gentle);
}
.pg-pager a:hover { border-color: var(--cliq-violet); transform: translateY(-2px); }
.pg-pager a:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.pg-pager a i { flex: none; font-size: 34px; color: var(--cliq-violet); }
.pg-pager .pp-tx { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pg-pager .pp-tx span { font-size: .95rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-500); }
.pg-pager .pp-tx strong { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; color: var(--text-heading); line-height: 1.2; }
.pg-pager a.pp-next { text-align: right; }
/* A lone forward button (the homepage) must not stretch across the row. */
.pg-pager:has(a:only-child) { justify-content: flex-end; }
.pg-pager:has(a:only-child) a { flex: 0 1 420px; }
.pg-pager a.pp-next .pp-tx { align-items: flex-end; margin-left: auto; }
.pg-pager .pp-count { flex: 0 0 auto; align-self: center; display: flex; align-items: baseline; gap: 7px; white-space: nowrap; font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; letter-spacing: .04em; color: var(--ink-500); padding: 0 8px; }
.pg-pager .pp-count strong { font-size: 1.6rem; font-weight: 700; color: var(--text-heading); line-height: 1; }
@media (max-width: 760px) { .pg-pager .pp-count { order: -1; flex: 1 1 100%; justify-content: center; padding: 0; } }
/* Round FD8 (Grace): when the pager stacks on phones, put "Next page" above
   "Go back to" so the forward flow reads top-to-bottom. (Above 640 the pair
   sits side by side — back left, next right — so the reorder is ≤640 only.) */
@media (max-width: 640px) {
  .pg-pager a.pp-next { order: 0; }
  .pg-pager > a:not(.pp-next) { order: 1; }
}

/* ===========================================================================
   Repo-side additions kept on top of the Claude Design source (2026-08-17).
   Design owns everything above; these three blocks are engineering the design
   file does not carry and must survive every re-mirror:
     1. the mobile embed-crop affordance (site.js data-crop mode)
     2. the inline early-access capture that posts to EA_ENDPOINT
   Ruled by Grace 2026-08-17: mirror Design's content, keep the scaling work
   and the working email capture.
   =========================================================================== */

/* ---------- Mobile embed crops (site.js data-crop mode) ---------- */
.embed-scale.is-cropped::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 34px;
  background: linear-gradient(180deg, rgba(255,255,255,0), rgba(255,255,255,.9));
  pointer-events: none;
}

/* ---------- Inline email capture (CTA bands; shared logic in site.js) ---------- */
.pg-cta .ea-form { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; max-width: 640px; margin: var(--space-8) auto 0; }
.pg-cta .ea-form label { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.pg-cta .ea-input {
  flex: 1 1 280px; min-height: var(--tap-senior);
  border: 2px solid var(--navy-300); border-radius: 16px; padding: 0 20px;
  font-family: var(--font-sans); font-size: 1.2rem; color: var(--navy-800); background: #fff;
}
.pg-cta .ea-input:focus-visible { outline: none; box-shadow: var(--shadow-focus); border-color: var(--cliq-violet); }
.pg-cta .ea-form .btn { flex: 0 0 auto; }
.pg-cta .ea-done {
  display: none; align-items: flex-start; text-align: left; gap: 10px;
  max-width: 640px; margin: 16px auto 0;
  background: var(--teal-050); color: var(--teal-700); border-radius: 14px;
  padding: 14px 16px; font-size: 1.05rem; font-weight: 700; line-height: 1.4;
}
.pg-cta .ea-done[data-show] { display: flex; }
.pg-cta .ea-done a { color: var(--teal-700); }

/* ===========================================================================
   3. Mobile flow pass (2026-08-28) — phone-width chrome for the bare-logo
   pages (index, the five screen pages, partners-alpha). Repo-side
   engineering per the 2026-08-17 rule above: lives BELOW the Design-owned
   zone and must survive every re-mirror. At ≤640px this supersedes the
   stacked-button header treatment earlier in this file (source order wins):
   one slim row — logo + the page's primary CTA — so the headline lands in
   the first viewport. The two secondary header CTAs hide here; every page
   restates them full-size in a .mob-alt-ctas block below its hero.
   =========================================================================== */
/* 641–980px: the nav drops to its own centered row under the logo (moved
   below the Design-owned marker 2026-08-28 so re-mirrors can't wipe it;
   the ≤640 slim row below overrides it on phones). */
@media (max-width: 980px) {
  div.bare-logo { padding: 18px 0 16px; }
  .bare-logo .bare-logo-inner { flex-wrap: wrap; row-gap: 12px; }
  .bare-logo .bare-logo-inner img { height: 48px !important; }
  .bare-logo-inner nav {
    flex-basis: 100%;
    margin-left: 0 !important;
    justify-content: center !important;
  }
}
@media (max-width: 640px) {
  /* Slim header: logo + primary CTA on one row (~58px, was ~2 screens) */
  div.bare-logo { padding: 10px 0; }
  .bare-logo .bare-logo-inner { flex-wrap: nowrap; padding: 0 var(--space-5); }
  .bare-logo .bare-logo-inner img { height: 38px !important; }
  .bare-logo-inner nav {
    flex-basis: auto; flex-direction: row;
    margin-left: auto !important; justify-content: flex-end !important;
    align-items: center !important; gap: 8px !important;
  }
  .bare-logo-inner nav .bare-nav-link:not(:first-child) { display: none; }
  /* Journey pages (front-door + the four screen pages — all have a plain
     <body> with no data-site): the mobile header CTA is "Share with a loved
     one", not the early-user button (Grace 2026-08-28). Hide the first link
     and surface the #share link instead. Index (data-site="index" → "See how
     it works") and partners-alpha (data-site="partners") are excluded. */
  body:not([data-site]) .bare-logo-inner nav .bare-nav-link:first-child { display: none !important; }
  body:not([data-site]) .bare-logo-inner nav .bare-nav-link[href$="#share"] { display: inline-flex !important; }
  /* Round FD5 (Grace): on the journey pages the whole intro header (eyebrow,
     heading, lead, jump-links, restated CTAs) is hidden on phones so the page
     leads straight into its feature sections. Only these five pages carry a
     .pg-hero and a plain <body>; index and partners-alpha are unaffected. */
  body:not([data-site]) .pg-hero { display: none !important; }
  /* Round FD6 (Grace): drop each feature section's subheader paragraph on
     phones — each section becomes just its label/heading, the bullet points,
     and the screen image. (Closing CTA copy is .pg-cta p, not touched.) */
  body:not([data-site]) .feat-lead { display: none !important; }
  /* .bare-logo prefix: index.html re-declares .bare-nav-link in its inline
     <style> (loaded after this sheet), so the mobile pill needs the extra
     specificity to win. */
  .bare-logo .bare-nav-link { min-height: 48px; padding: 8px 14px; font-size: .95rem; border-radius: 16px !important; justify-content: center; white-space: nowrap; }

  /* Chip nav: one horizontally scrollable rail. The cut-off chip at the
     right edge is the scroll affordance; targets stay at the 48px floor. */
  .sub-nav-inner { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .sub-nav-inner::-webkit-scrollbar { display: none; }
  .sub-nav a { flex: none; min-height: 48px; white-space: nowrap; }

  /* Section rhythm: desktop-scale gaps read as dead screens on a phone. */
  .sr-section { padding: var(--space-12) 0; }
  .pg-hero { padding: var(--space-10) 0 var(--space-8); }
  .hero { padding: var(--space-10) 0 var(--space-12); }
  .way-block { margin-top: var(--space-12); }
  .pg-pager { padding: var(--space-8) var(--space-5); }
}
/* DESIGN.md §2 floor: 48px tap targets — the ≤900 rule above sized chips 46px. */
@media (max-width: 900px) {
  .sub-nav a { min-height: 48px; }
}
/* Very small phones: keep the logo + primary CTA on one line. */
@media (max-width: 360px) {
  .bare-logo .bare-logo-inner img { height: 32px !important; }
  .bare-logo .bare-nav-link { font-size: .9rem; padding: 8px 10px; }
}

/* Secondary header CTAs restated below each hero at phone widths only. */
.mob-alt-ctas { display: none; }
@media (max-width: 640px) {
  .mob-alt-ctas { display: flex; margin-top: 16px; }
}

/* Round FD9 (Grace): the "Your home" web screen renders small on phones —
   invite the reader to rotate for a larger view. Desktop shows it large
   already, so the note is phone-only. */
body:not([data-site]) .feat-rotate { display: none; }
@media (max-width: 640px) {
  body:not([data-site]) .feat-rotate {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    margin: 12px 0 0; font-size: 1rem; color: var(--ink-700); text-align: center;
  }
  body:not([data-site]) .feat-rotate i { font-size: 1.3rem; color: var(--teal-700); }
}

/* ── Header account pair — Sign in / Sign up (2026-08-30, Grace) ───────────
   A compact pair at the top-right of every site header, set apart from the
   marketing CTAs by a thin divider. Classes are unique to these 6 headers,
   so the rules are unscoped — they apply on index ([data-site]) and the
   journey pages alike. Links go to the app (cliq-xi.vercel.app). */
.bare-logo-inner nav .hdr-sep {
  width: 1px; height: 30px; flex: none; align-self: center;
  background: rgba(255,255,255,.28); margin: 0 6px;
}
.hdr-auth { display: inline-flex; align-items: center; gap: 8px; }
.hdr-auth-in, .hdr-auth-up {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 16px; border-radius: 12px;
  font-family: 'Nunito Sans', system-ui, sans-serif; font-weight: 700;
  font-size: .95rem; line-height: 1; text-decoration: none; white-space: nowrap;
  transition: background .15s ease, filter .15s ease;
}
.hdr-auth-in { color: #fff; background: transparent; border: 1.5px solid rgba(255,255,255,.55); }
.hdr-auth-in:hover { background: rgba(255,255,255,.14); }
.hdr-auth-in:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.hdr-auth-up { color: #fff; background: var(--violet-700); border: 1.5px solid var(--violet-700); }
.hdr-auth-up:hover { filter: brightness(1.08); }
.hdr-auth-up:focus-visible { outline: none; box-shadow: var(--shadow-focus); }

@media (max-width: 640px) {
  .bare-logo-inner nav .hdr-sep { display: none; }
  .hdr-auth { gap: 6px; }
  .hdr-auth-in, .hdr-auth-up { min-height: 48px; padding: 0 14px; font-size: 1rem; }
}
