/* ═══════════════════════════════════════════════════════════════
   otp.rip — products.css

   The SMS | Email switch (D48) and the Email pane's own components.
   Loaded after home.css / home-extra.css; tokens come from home.css.
   The SMS pane's styles are untouched — this file only ADDS.
   ═══════════════════════════════════════════════════════════════ */

/* ─── Masthead: logo · switch · account ──────────────────────────
   On the landing page the masthead row becomes a three-column grid:
   the supplied logo on the left, the SMS | Email segmented switch in
   the centre, account actions on the right. In-page anchors sit next
   to the switch on wide screens and are hidden below 1100px (they are
   also reachable by scrolling). On phones the switch drops to its own
   full-width row under the logo and buttons. */
.brand-logo img, .otp-brand { display: block; inline-size: 128px; block-size: auto; aspect-ratio: 224 / 64; flex: none; }
@media (max-width: 620px) { .brand-logo img, .otp-brand { inline-size: 112px; } }

.masthead-home .masthead-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "brand switch end";
  align-items: center;
  column-gap: clamp(10px, 2vw, 24px);
}
.masthead-home .brand { grid-area: brand; }
.masthead-home .prodswitch { grid-area: switch; justify-self: center; }
.masthead-home .masthead-nav { grid-area: switch; justify-self: end; margin: 0; display: none; }
.masthead-home .masthead-end { grid-area: end; margin: 0; }
@media (min-width: 1100px) {
  .masthead-home .masthead-row { grid-template-columns: auto 1fr auto auto; grid-template-areas: "brand switch nav end"; }
  .masthead-home .masthead-nav { grid-area: nav; display: flex; }
}
@media (max-width: 720px) {
  .masthead-home .masthead-row {
    grid-template-columns: auto 1fr;
    grid-template-areas: "brand end" "switch switch";
    row-gap: 8px;
    padding-block: 8px 10px;
  }
  .masthead-home .prodswitch { justify-self: stretch; inline-size: 100%; }
}
.masthead-signin { display: none; }
@media (min-width: 520px) { .masthead-signin { display: inline-flex; } }

/* ─── Product switch ────────────────────────────────────────────
   A segmented control with a sliding thumb. The thumb is positioned
   from data-product on the <nav>, so the server-rendered state is right
   before any script runs and the move animates when JS flips it. */
.prodswitch {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 3px;
  inline-size: min(100%, 264px);
  border-radius: 999px;
  background: var(--surface-2, var(--surface-1));
  box-shadow: inset 0 0 0 1px var(--line-soft), 0 1px 2px rgba(0,0,0,.05);
  isolation: isolate;
}
.prodswitch-thumb {
  position: absolute;
  inset-block: 3px;
  inset-inline-start: 3px;
  inline-size: calc(50% - 3px);
  border-radius: 999px;
  background: var(--accent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 86%, #fff) 0%, var(--accent) 100%);
  box-shadow: 0 1px 2px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.16);
  transition: transform 0.42s var(--spring);
  z-index: 0;
}
.prodswitch[data-product="email"] .prodswitch-thumb { transform: translateX(100%); }
[dir="rtl"] .prodswitch[data-product="email"] .prodswitch-thumb { transform: translateX(-100%); }
.prodswitch-opt {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-block-size: 34px;
  padding-inline: 12px;
  border-radius: 999px;
  color: var(--text-2);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.3s var(--ease);
}
.prodswitch-opt:hover { color: var(--text); }
.prodswitch-opt.is-on { color: var(--accent-ink); }
.prodswitch-opt:focus-visible .prodswitch-t { text-decoration: underline; text-underline-offset: 3px; }
.prodswitch-opt:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.prodswitch-ic { inline-size: 14px; block-size: 14px; flex: none; opacity: .9; }
.prodswitch-t { line-height: 1; }
@media (max-width: 430px) {
  .prodswitch-opt { gap: 6px; padding-inline: 8px; }
}

/* ─── Panes ─────────────────────────────────────────────────────
   Both panes exist; `hidden` hides the inactive one (works without JS).
   During a JS switch the leaving pane fades out, the entering pane fades
   in; the container keeps its height so nothing below jumps. */
.product-panes { position: relative; }
.product-pane { transition: opacity 0.26s var(--ease), transform 0.3s var(--ease); }
.product-pane.is-leaving { opacity: 0; transform: translateY(-6px); pointer-events: none; }
.product-pane.is-entering { opacity: 0; transform: translateY(8px); }
.product-pane.is-entering.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .prodswitch-thumb, .product-pane { transition: none; }
}

/* ─── "Coming soon" — a non-button, visibly disabled ───────────── */
.btn.is-soon {
  cursor: not-allowed;
  color: var(--text-3);
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--line);
  border: 0;
  outline: 1.5px dashed var(--line);
  outline-offset: -1.5px;
}
.btn.is-soon:hover { transform: none; background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); color: var(--text-3); }
.btn.is-soon::after { display: none; }

/* ─── Email hero facts: a word instead of a number ─────────────── */
.fact-n-word { font-size: clamp(1.1rem, 1.3vw + 0.7rem, 1.5rem); letter-spacing: -0.01em; }

/* ─── Email replay: address + inbox ─────────────────────────────── */
.rp-address { font-family: var(--mono); font-size: clamp(0.92rem, 2.8vw, 1.1rem); letter-spacing: 0; word-break: break-all; }
.chrome-demo { color: var(--violet); }
.chrome-demo .chrome-live-dot { background: var(--violet); }

.rp-inbox {
  padding: 13px 16px 14px;
  border-radius: var(--r-md);
  background: var(--surface-3);
  box-shadow: inset 0 0 0 1px var(--accent-line);
  border-inline-start: 3px solid var(--accent);
}
.rp-inbox-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rp-inbox-count {
  min-inline-size: 20px; block-size: 20px; padding-inline: 6px;
  display: inline-grid; place-items: center;
  border-radius: 999px; background: var(--accent); color: var(--accent-ink);
  font-size: var(--t-xs); font-weight: 800; font-family: var(--mono);
  transition: opacity 0.3s var(--ease), transform 0.4s var(--spring);
}
.rp-mails { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.rp-mail-empty {
  display: none;
  align-items: center; gap: 10px;
  padding: 12px 12px;
  border-radius: var(--r-sm);
  background: var(--surface-1);
  color: var(--text-3);
  font-size: var(--t-sm);
}
.rp-mail-pulse { inline-size: 8px; block-size: 8px; border-radius: 50%; background: var(--accent); animation: blip 1.6s ease-in-out infinite; flex: none; }
.rp-mail {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  background: var(--surface-1);
  box-shadow: var(--e1);
}
.rp-mail-avatar {
  flex: none; inline-size: 34px; block-size: 34px; display: grid; place-items: center;
  border-radius: 50%; background: var(--accent-wash); box-shadow: inset 0 0 0 1px var(--accent-line);
}
.rp-mail-avatar img { inline-size: 18px; block-size: 18px; }
.rp-mail-body { flex: 1; min-inline-size: 0; display: grid; gap: 2px; }
.rp-mail-top { display: flex; justify-content: space-between; gap: 10px; font-size: var(--t-xs); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }
.rp-mail-subject { font-size: var(--t-sm); font-weight: 650; color: var(--text); }
.rp-mail-preview { font-size: var(--t-sm); color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Live sequence for the inbox: before the message lands the list shows the
   listening row and the count is hidden; on landing the message slides in. */
.replay.is-live .rp-inbox { transition: opacity 0.5s var(--ease), transform 0.5s var(--spring); }
.replay.is-live.rp-select .rp-inbox,
.replay.is-live.rp-issuing .rp-inbox,
.replay.is-live.rp-typing .rp-inbox { opacity: 0; transform: translateY(10px); pointer-events: none; }
.replay.is-live.rp-waiting .rp-mail-empty { display: flex; }
.replay.is-live.rp-waiting .rp-mail,
.replay.is-live.rp-waiting .rp-code-big,
.replay.is-live.rp-waiting .rp-code-copy { display: none; }
.replay.is-live.rp-waiting .rp-inbox-count { opacity: 0; transform: scale(0.6); }
.replay.is-live.rp-waiting .rp-inbox { box-shadow: inset 0 0 0 1px var(--line-soft); border-inline-start-color: var(--line); }
.replay.is-live.rp-landed .rp-mail { animation: land 0.62s var(--spring); }
.replay.is-live.rp-landed .rp-inbox-count { animation: code-pop 0.6s var(--spring) 0.2s backwards; }
.replay.is-live.rp-landed .rp-code-big { animation: code-pop 0.7s var(--spring) 0.25s backwards; }

/* ─── Services marquee (icons instead of flags) ─────────────────── */
.svccard { min-inline-size: 84px; }
.svcmark {
  inline-size: 34px; block-size: 34px; display: grid; place-items: center;
  border-radius: 10px; background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--line-soft);
  transition: transform 0.28s var(--spring), box-shadow 0.28s var(--ease);
}
.svcmark img { inline-size: 22px; block-size: 22px; filter: var(--flag-rest); transition: filter 0.3s var(--ease); }
.flagcard:hover .svcmark, .flagcard.is-touched .svcmark { transform: scale(1.08); box-shadow: inset 0 0 0 1px var(--accent-line); }
.flagcard:hover .svcmark img, .flagcard.is-touched .svcmark img { filter: none; }

/* ─── Pricing tiles with no price ───────────────────────────────── */
.tile-tba { --brand: var(--violet); }
.tile-ic-img img { inline-size: 22px; block-size: 22px; }
.tile-tba-badge {
  padding: 4px 9px; border-radius: 999px;
  background: color-mix(in oklab, var(--violet) 16%, transparent); color: var(--violet);
  font-size: 0.625rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--violet) 40%, transparent);
}
