/* Fire RMS FY28 build-program dialog on the homepage (markup at the end of index.html, behaviour in
   fire-rms-offer.js). Extends styles-v2.css: its tokens, Sora/Inter and the riq-btn buttons.
   The glass is the point of the effect: a frosted panel over the dimmed, blurred page, so the hero stays
   visible behind the question instead of being replaced by it. */

.riq-offer {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-primary);
  width: min(560px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  overflow: visible;
}
.riq-offer::backdrop {
  background: rgba(10, 22, 40, 0.42);
  -webkit-backdrop-filter: blur(6px) saturate(1.15);
  backdrop-filter: blur(6px) saturate(1.15);
  opacity: 0;
  transition: opacity var(--dur-med) var(--ease);
}
.riq-offer.is-in::backdrop { opacity: 1; }

.riq-offer__panel {
  position: relative;
  max-height: calc(100dvh - 32px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: clamp(22px, 4.2vw, 36px);
  border-radius: 26px;
  background:
    radial-gradient(120% 70% at 0% 0%, rgba(0, 183, 255, 0.12), transparent 60%),
    linear-gradient(165deg, rgba(255, 255, 255, 0.94), rgba(247, 250, 252, 0.86));   /* reads even where the blur is not rendered */
  -webkit-backdrop-filter: blur(28px) saturate(1.7);
  backdrop-filter: blur(28px) saturate(1.7);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: 0 30px 70px rgba(10, 22, 40, 0.3), 0 8px 18px rgba(10, 22, 40, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  opacity: 0;
  transform: translateY(14px) scale(0.98);
  filter: blur(6px);
  transition: opacity var(--dur-med) var(--ease), transform 520ms var(--ease), filter var(--dur-med) var(--ease);
  scrollbar-width: thin;
  scrollbar-color: rgba(10, 22, 40, 0.25) transparent;
}
.riq-offer.is-in .riq-offer__panel { opacity: 1; transform: none; filter: none; }
.riq-offer.is-out .riq-offer__panel { opacity: 0; transform: translateY(8px) scale(0.99); }
.riq-offer ::selection { background: var(--accent-tint-strong); color: var(--text-primary); }

.riq-offer__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.6);
  color: var(--text-secondary);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.riq-offer__close:hover { background: #fff; color: var(--text-primary); }
.riq-offer__close svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.riq-offer__close:focus-visible, .riq-offer__way:focus-visible { outline: 2px solid var(--accent-primary); outline-offset: 3px; }

.riq-offer__logo { display: block; width: 188px; height: auto; margin: 2px 0 clamp(18px, 3vw, 24px); }

.riq-offer__title {
  margin: 0 0 0.6rem;
  max-width: 19ch;
  font: 700 clamp(1.5rem, 3.4vw, 2rem)/1.15 var(--font-display);
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.riq-offer__title:focus { outline: none; }
.riq-offer__price { color: var(--accent-primary-dk); font-weight: 800; }
.riq-offer__lede { margin: 0 0 1.4rem; max-width: 52ch; color: var(--text-secondary); font: 400 1rem/1.6 var(--font-body); }

.riq-offer__actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.riq-offer__actions .riq-btn { min-height: 48px; }

.riq-offer__step[data-offer-step="offer"]:not([hidden]) { animation: riq-offer-step var(--dur-slow) var(--ease) both; }
@keyframes riq-offer-step { from { opacity: 0; transform: translateY(10px); } }

/* Two dates on a rail: the build phase now, the full RMS from FY28. */
.riq-offer__plan { list-style: none; margin: 0 0 1.1rem; padding: 0; display: grid; gap: 0.2rem; }
.riq-offer__plan li {
  position: relative;
  display: grid;
  gap: 0.12rem;
  padding: 0.55rem 0 0.75rem 1.65rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
}
.riq-offer__plan li::before {
  content: "";
  position: absolute;
  left: 0.2rem;
  top: 0.82rem;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--accent-primary);
}
.riq-offer__plan li:first-child::after {
  content: "";
  position: absolute;
  left: calc(0.2rem + 4px);
  top: 1.9rem;
  bottom: -0.6rem;
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(var(--accent-primary), var(--accent-primary-dk));
}
.riq-offer__plan li:last-child::before { background: var(--accent-primary-dk); border-color: var(--accent-primary-dk); }
.riq-offer__when { font: 600 0.82rem/1.3 var(--font-body); color: var(--accent-primary-dk); font-variant-numeric: tabular-nums; }
.riq-offer__plan b { font: 700 1.05rem/1.3 var(--font-display); color: var(--text-primary); }

.riq-offer__promise {
  margin: 0 0 1.4rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: var(--accent-tint);
  border: 1px solid var(--border-accent);
  color: var(--text-primary);
  font-weight: 600;
  line-height: 1.5;
}
.riq-offer__reach { margin: 0 0 0.55rem; font: 700 1rem/1.3 var(--font-display); }
.riq-offer__reach-detail { display: none; }

.riq-offer__ways { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.riq-offer__way {
  display: grid;
  grid-template-columns: 22px auto 1fr;
  align-items: center;
  gap: 0.75rem;
  min-height: 56px;
  padding: 0.7rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.72);
  color: var(--text-primary);
  text-decoration: none;
  transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.riq-offer__way:hover { border-color: var(--accent-primary); background: #fff; color: var(--text-primary); transform: translateY(-1px); }
.riq-offer__way svg { fill: none; stroke: var(--accent-primary-dk); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.riq-offer__way b { font: 700 1rem/1 var(--font-body); }
.riq-offer__way span { justify-self: end; color: var(--text-secondary); font-size: 0.92rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; text-align: right; }

html.riq-offer-open { overflow: hidden; }

/* Phones: a bottom sheet that rises from the bottom edge. */
@media (max-width: 560px) {
  .riq-offer { width: 100vw; margin: auto 0 0; max-height: 92dvh; }
  .riq-offer__panel {
    max-height: 92dvh;
    border-radius: 24px 24px 0 0;
    border-bottom: 0;
    padding: 22px 18px calc(18px + env(safe-area-inset-bottom));
    transform: translateY(40px);
  }
  .riq-offer__logo { width: 150px; margin-bottom: 12px; }
  .riq-offer__title { font-size: 1.5rem; margin-bottom: 0.45rem; }
  .riq-offer__lede { font-size: 0.95rem; margin-bottom: 1rem; }
  .riq-offer__plan { margin-bottom: 0.8rem; }
  .riq-offer__plan li { padding: 0.4rem 0 0.5rem 1.6rem; font-size: 0.9rem; }
  .riq-offer__plan li::before { top: 0.67rem; }
  .riq-offer__plan li:first-child::after { top: 1.75rem; bottom: -0.45rem; }
  .riq-offer__promise { margin-bottom: 1rem; padding: 0.7rem 0.85rem; font-size: 0.95rem; }
  /* Text / Call / Email as three big buttons; the number and address are shown once in the line above. */
  .riq-offer__ways { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .riq-offer__way { grid-template-columns: 1fr; justify-items: center; gap: 0.35rem; min-height: 68px; padding: 0.7rem 0.4rem; }
  .riq-offer__way span { display: none; }
  .riq-offer__reach-detail { display: block; margin-top: 0.2rem; font: 500 0.88rem/1.3 var(--font-body); color: var(--text-secondary); font-variant-numeric: tabular-nums; }
  .riq-offer__actions .riq-btn { flex: 1 1 100%; }
  .riq-offer__way span { font-size: 0.86rem; }
}

@media (prefers-reduced-motion: reduce) {
  .riq-offer__panel, .riq-offer.is-out .riq-offer__panel { transform: none; filter: none; transition: opacity var(--dur-fast) linear; }
  .riq-offer__step[data-offer-step="offer"]:not([hidden]) { animation: none; }
}
