/* Home hero phone mockup (index.html only). Screen colours follow give.rapidfeedback.net form.css / chrome.css. */

.rfd {
  width: 300px;
  max-width: 100%;
  margin: 48px auto 0;
  text-align: center;
}

/* ── Phone frame (fixed size, so nothing shifts) ── */
.rfd-phone {
  position: relative;
  width: 264px;
  height: 548px;
  margin: 0 auto;
  padding: 9px;
  border-radius: 42px;
  background: #0b1220;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14), 0 2px 0 1px rgba(255, 255, 255, 0.06) inset, 0 30px 60px rgba(2, 8, 23, 0.5);
}

.rfd-island {
  position: absolute;
  z-index: 3;
  top: 17px;
  left: 50%;
  width: 72px;
  height: 20px;
  margin-left: -36px;
  border-radius: 12px;
  background: #0b1220;
}

.rfd-screen {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 33px;
  background: #fff;
  color: #0f172a;
  text-align: left;
  font-size: 11px;
  line-height: 1.45;
}

.rfd-status {
  position: relative;
  z-index: 2;
  height: 36px;
  padding: 11px 20px 0 26px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  background: #fff;
}

.rfd-status svg { fill: currentColor; margin-top: 3px; }

.rfd-scr {
  position: absolute;
  top: 36px;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateX(18px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.rfd[data-step="1"] .rfd-mail,
.rfd[data-step="2"] .rfd-give,
.rfd[data-step="3"] .rfd-thanks,
.rfd[data-step="4"] .rfd-thanks {
  opacity: 1;
  transform: none;
}

.rfd b, .rfd i { font-style: normal; }

/* Tap ripple */
.rfd-row-new, .rfd-link, .rfd-opt-pick, .rfd-btn, .rfd-review, .rfd-btn-note { position: relative; }

.rfd-row-new::after, .rfd-link::after, .rfd-opt-pick::after, .rfd-btn::after, .rfd-review::after, .rfd-btn-note::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.28);
  opacity: 0;
  pointer-events: none;
}

.b-s1t .rfd-row-new::after,
.b-s1l .rfd-link::after,
.b-s2t .rfd-opt-pick::after,
.b-s2s .rfd-btn::after,
.b-s3t .rfd-review::after,
.b-s4t .rfd-btn-note::after { animation: rfd-tap 0.6s ease-out; }

@keyframes rfd-tap {
  0% { opacity: 1; transform: scale(0.3); }
  100% { opacity: 0; transform: scale(1.8); }
}

/* ── 1. Email ── */
.rfd-inbox { padding: 4px 14px 0; }

.rfd-inbox-title { font-size: 21px; font-weight: 800; letter-spacing: -0.02em; }

.rfd-search { height: 24px; margin: 6px 0 8px; border-radius: 8px; background: #eef1f5; }

.rfd-row {
  display: flex;
  gap: 9px;
  padding: 9px 0;
  border-bottom: 1px solid #edf0f4;
}

.rfd-avatar {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 28px;
  text-align: center;
}

.rfd-row-new .rfd-avatar, .rfd-from .rfd-avatar { background: #0f766e; }

.rfd-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }

.rfd-row-top { display: flex; justify-content: space-between; gap: 6px; }

.rfd-row-top b {
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rfd-row-top b::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  margin: 0 5px 1px 0;
  border-radius: 50%;
  background: #2563eb;
}

.rfd-row-top i { color: #2563eb; font-size: 10px; font-weight: 600; }

.rfd-row-subj, .rfd-row-prev {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rfd-row-subj { font-weight: 600; font-size: 10.5px; }
.rfd-row-prev { color: #64748b; font-size: 10.5px; }

.rfd-row-new {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
  overflow: hidden;
  border-bottom-width: 0;
  transition: max-height 0.5s ease, padding 0.5s ease, opacity 0.4s ease 0.15s;
}

.b-s1a .rfd-row-new {
  max-height: 70px;
  padding-top: 9px;
  padding-bottom: 9px;
  opacity: 1;
  border-bottom-width: 1px;
  overflow: visible;
}

.rfd-bar { display: block; height: 7px; margin: 3px 0; border-radius: 4px; background: #eef1f5; }
.rfd-bar:first-child { width: 55%; background: #e2e8f0; }
.rfd-bar-short { width: 75%; }

.rfd-open {
  position: absolute;
  inset: 0;
  padding: 4px 16px 0;
  background: #fff;
  transform: translateX(100%);
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.b-s1o .rfd-open { transform: none; }

.rfd-back { color: #2563eb; font-size: 12px; font-weight: 500; margin-bottom: 8px; }

.rfd-subj { font-size: 15px; font-weight: 700; line-height: 1.3; letter-spacing: -0.01em; margin-bottom: 10px; }

.rfd-from { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.rfd-from span:last-child { display: flex; flex-direction: column; line-height: 1.3; }
.rfd-from i { color: #64748b; font-size: 10px; }

.rfd-body p { margin-bottom: 9px; font-size: 11.5px; color: #1e293b; }

.rfd-link {
  color: #2563eb;
  text-decoration: underline;
  border-radius: 3px;
  transition: background 0.2s;
}

.b-s1l .rfd-link { background: rgba(37, 99, 235, 0.12); }

/* ── 2–4. give. pages ── */
.rfd-nav {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 34px;
  padding: 0 12px;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
}

.rfd-nav img { width: 18px; height: 18px; }
.rfd-nav b { font-size: 10.5px; font-weight: 800; color: #0c1e4a; white-space: nowrap; }

.rfd-nav span {
  margin-left: auto;
  max-width: 48%;
  font-size: 9.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rfd-stage {
  position: absolute;
  top: 34px;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 14px 12px;
  background: linear-gradient(150deg, #05112a 0%, #1e3a8a 55%, #1d4ed8 100%);
}

.rfd-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px 13px 14px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
}

.rfd-card-title { font-size: 14px; font-weight: 800; line-height: 1.3; letter-spacing: -0.02em; margin-bottom: 14px; }

.rfd-opt {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  margin-bottom: 6px;
  border: 1px solid #cdd1db;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  color: #1a1a2e;
  transition: border-color 0.15s, background 0.15s;
}

.rfd-opt span {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #cdd1db;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.b-s2g .rfd-opt-pick { border-color: #4a6cf7; background: #f0f3ff; }
.b-s2g .rfd-opt-pick span { border-color: #4a6cf7; background: #4a6cf7; box-shadow: inset 0 0 0 2px #fff; }

.rfd-btn {
  margin-top: 12px;
  padding: 10px;
  border-radius: 8px;
  background: #2563eb;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  transition: background 0.15s;
}

.b-s2s .rfd-btn { background: #1d4ed8; }

.rfd-legal { margin-top: 12px; text-align: center; font-size: 9.5px; color: rgba(255, 255, 255, 0.72); }

.rfd-card-center { text-align: center; padding-top: 14px; }

.rfd-check {
  width: 36px;
  height: 36px;
  margin: 0 auto 10px;
  border-radius: 50%;
  background: #dcfce7;
  color: #15803d;
  font-size: 18px;
  line-height: 36px;
}

.rfd-ty-title { font-size: 14px; font-weight: 600; color: #1a1a2e; margin-bottom: 6px; }
.rfd-ty-msg { font-size: 11px; color: #3a3f52; line-height: 1.55; margin-bottom: 12px; }

.rfd-review {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 6px;
  background: #15803d;
  color: #fff;
  font-size: 11.5px;
  font-weight: 600;
}

.b-s3t .rfd-review { background: #166534; }

.rfd-note {
  position: relative;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
  text-align: left;
  min-height: 120px;
}

.rfd-note-label { font-size: 10.5px; font-weight: 500; color: #3a3f52; margin-bottom: 5px; line-height: 1.35; }
.rfd-note-label i { color: #8892a4; font-size: 10px; }

.rfd-textarea {
  height: 50px;
  padding: 5px 7px;
  border: 1px solid #cdd1db;
  border-radius: 6px;
  font-size: 10.5px;
  line-height: 1.4;
  color: #1a1a2e;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.b-s4f .rfd-textarea { border-color: #4a6cf7; box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.12); }

.rfd-typed::after {
  content: '';
  display: inline-block;
  width: 1px;
  height: 11px;
  margin-left: 1px;
  vertical-align: -1px;
  background: #4a6cf7;
  opacity: 0;
}

.b-s4f .rfd-typed::after { opacity: 1; animation: rfd-blink 1s steps(1) infinite; }

@keyframes rfd-blink { 50% { opacity: 0; } }

.rfd-btn-note {
  margin-top: 8px;
  padding: 7px;
  border: 1px solid #cdd1db;
  border-radius: 8px;
  color: #1d4ed8;
  font-size: 11.5px;
  font-weight: 600;
  text-align: center;
}

.b-s4t .rfd-btn-note { background: #eff6ff; border-color: #2563eb; }

.rfd-note-form, .rfd-note-sent { transition: opacity 0.35s ease; }

.rfd-note-sent {
  position: absolute;
  top: 44px;
  left: 0;
  right: 0;
  opacity: 0;
  font-size: 11px;
  color: #64748b;
  text-align: center;
}

.b-s4d .rfd-note-form { opacity: 0; }
.b-s4d .rfd-note-sent { opacity: 1; }

/* ── Caption and controls ── */
/* Positioned so it paints above the phone's drop shadow. */
.rfd-caption { position: relative; margin-top: 16px; }

/* All four captions share one grid cell, so the box is always as tall as the longest one. */
.rfd-steps {
  display: grid;
  margin-top: 16px;
  list-style: none;
  text-align: left;
}

.rfd-steps li {
  grid-area: 1 / 1;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.98rem;
  line-height: 1.5;
  color: #fff;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.rfd[data-step="1"] .rfd-steps li:nth-child(1),
.rfd[data-step="2"] .rfd-steps li:nth-child(2),
.rfd[data-step="3"] .rfd-steps li:nth-child(3),
.rfd[data-step="4"] .rfd-steps li:nth-child(4) {
  opacity: 1;
  transform: none;
}

.rfd-num {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--gold, #f59e0b);
  color: #05112a;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 24px;
  text-align: center;
}

.rfd-controls {
  display: flex;
  justify-content: center;
  gap: 8px;
  visibility: hidden;
}

.rfd.is-ready .rfd-controls { visibility: visible; }

.rfd-dot, .rfd-pause {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  font: 600 0.8rem/1 inherit;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.rfd-dot:hover, .rfd-pause:hover { border-color: #fff; color: #fff; }

.rfd-dot[aria-current] { background: #fff; border-color: #fff; color: #1e3a8a; }

.rfd-pause { margin-left: 6px; display: inline-flex; align-items: center; justify-content: center; }
.rfd-pause svg { fill: currentColor; }
.rfd-i-play { display: none; }
.rfd.is-paused .rfd-i-pause { display: none; }
.rfd.is-paused .rfd-i-play { display: inline; }

.rfd-dot:focus-visible, .rfd-pause:focus-visible { outline: 2px solid var(--gold, #f59e0b); outline-offset: 2px; }

/* ── Hero CTA (two lines, one link) ── */
.hero-cta {
  flex-direction: column;
  gap: 2px;
  padding: 12px 32px;
  line-height: 1.3;
}

.hero-cta-sub {
  font-size: 0.8rem;
  font-weight: 500;
  opacity: 0.88;
}

/* ── Hero layout ── */
@media (max-width: 640px) {
  .hero-split { padding-top: 36px; padding-bottom: 48px; }
  .hero-split .hero-eyebrow { margin-bottom: 18px; }
  .hero-split h1 { margin-bottom: 16px; }
  .hero-split .hero-sub { margin-bottom: 16px; }
  .hero-split .rfd { margin-top: 32px; }
}

@media (min-width: 960px) {
  .hero-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    column-gap: 64px;
    align-items: start;
    text-align: left;
    padding: 56px max(24px, calc((100vw - 1080px) / 2 + 24px)) 56px;
  }

  .hero-split h1 { font-size: clamp(2.4rem, 4.4vw, 3.4rem); }
  .hero-split .hero-sub { margin-left: 0; margin-right: 0; }
  .hero-split .rfd { margin: 0; }

  /* As tall as .rfd-phone, so the copy centres on the phone rather than on phone plus captions. */
  .hero-split .hero-copy {
    min-height: 548px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
  }
}

/* Reduced motion: no autoplay or movement; every caption is listed and the steps buttons switch the screen. */
@media (prefers-reduced-motion: reduce) {
  .rfd *, .rfd *::before, .rfd *::after { transition: none !important; animation: none !important; }
  .rfd-steps { gap: 10px; }
  .rfd-steps li { grid-area: auto; opacity: 0.6; transform: none; }
  .rfd-pause { display: none; }
}
