:root {
  --rf-blue: #1A4FED;
  --rf-blue-hover: #1240C8;
  --text-dark: #1A1A1A;
  --text-muted: #4A4A4A;
  --gold: #FFD447;
  --hero-gradient: linear-gradient(135deg, #9C4DC8 0%, #C44E8C 35%, #EE7059 65%, #F4A24D 100%);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
[hidden] { display: none !important; }

html {
  min-height: 100%;
  background: linear-gradient(160deg, #FFFFFF 0%, #F0F9FF 25%, #E0F2FE 55%, #BAE6FD 100%);
  background-attachment: fixed;
}

body {
  font-family: 'Outfit', system-ui, -apple-system, Segoe UI, sans-serif;
  color: var(--text-dark);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
}

/* ---------- Background ---------- */
.bg-water {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.bg-blob {
  position: absolute;
  border-radius: 50%;
}
.bg-blob--1 {
  width: 60vmax; height: 60vmax; top: -20%; left: -20%;
  background: radial-gradient(circle, rgba(125,211,252,0.42) 0%, rgba(125,211,252,0) 65%);
  animation: blob-a 18s ease-in-out infinite;
}
.bg-blob--2 {
  width: 50vmax; height: 50vmax; top: 30%; right: -20%;
  background: radial-gradient(circle, rgba(56,189,248,0.32) 0%, rgba(56,189,248,0) 65%);
  animation: blob-b 22s ease-in-out infinite;
}
.bg-blob--3 {
  width: 55vmax; height: 55vmax; bottom: -25%; left: 15%;
  background: radial-gradient(circle, rgba(186,230,253,0.45) 0%, rgba(186,230,253,0) 65%);
  animation: blob-a 20s ease-in-out infinite reverse;
}
@keyframes blob-a { 0%,100%{transform:translate(0,0) scale(1);} 50%{transform:translate(22vw,16vh) scale(1.07);} }
@keyframes blob-b { 0%,100%{transform:translate(0,0) scale(1);} 50%{transform:translate(-18vw,20vh) scale(0.95);} }
@media (prefers-reduced-motion: reduce) { .bg-blob { animation: none; } }

/* ---------- Layout ---------- */
.page {
  max-width: 1040px;
  margin: 0 auto;
  padding: 28px 24px 80px;
}
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}
.back-button {
  display: inline-block;
  background: var(--rf-blue);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  padding: 10px 22px;
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(26,79,237,0.28), 0 2px 4px rgba(26,79,237,0.18);
  transition: background 120ms ease, transform 120ms ease;
}
.back-button:hover { background: var(--rf-blue-hover); transform: translateY(-1px); }
.brand img {
  width: 44px; height: 44px; border-radius: 11px; display: block;
  box-shadow: 0 4px 12px rgba(50,90,130,0.18);
}

/* ---------- Hero (FLO Time deck theme) ---------- */
.hero {
  position: relative;
  background: radial-gradient(130% 100% at 50% -15%, #2C5580 0%, #1F3D5C 55%, #17304A 100%);
  border-radius: 26px;
  padding: 36px 40px 40px;
  color: #fff;
  text-align: center;
  overflow: hidden;
  box-shadow: 0 24px 48px rgba(31,61,92,0.3), 0 8px 16px rgba(0,0,0,0.08);
}
.hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 8px;
  background: linear-gradient(90deg, #4A90D9 0 46%, #52BFA5 46% 64%, #DCE8E3 64% 77%, #E9B44C 77% 100%);
}
.hero-eyebrow {
  margin: 0 0 8px;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  text-shadow: none;
}
.hero-title {
  font-family: 'Bowlby One SC', 'Bowlby One', serif;
  font-weight: 400;
  font-size: clamp(44px, 8vw, 84px);
  line-height: 0.95;
  margin: 0 0 10px;
  letter-spacing: 0.02em;
  text-shadow: 0.045em 0.05em 0 #3B6FB5;
}
.hero-sub {
  margin: 0 auto;
  max-width: 560px;
  font-size: clamp(15px, 1.9vw, 19px);
  font-weight: 500;
}
.hero-sub strong { color: var(--gold); font-weight: 800; }

/* Kit progress */
.kit-progress {
  max-width: 460px;
  margin: 22px auto 0;
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.45);
  border-radius: 16px;
  padding: 12px 18px 14px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  text-shadow: none;
}
.kit-progress-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
  font-size: 13.5px;
}
.kit-progress-label {
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.kit-progress-count strong { font-size: 17px; color: var(--gold); }
.kit-progress-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.3);
  overflow: hidden;
}
.kit-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), #fff);
  transition: width 400ms cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

/* Kit complete banner */
.kit-complete {
  margin-top: 16px;
  padding: 14px 20px;
  border-radius: 16px;
  text-align: center;
  font-size: 16px;
  background: rgba(255,212,71,0.25);
  border: 1.5px solid rgba(201,162,39,0.5);
  color: #6b5200;
}

/* ---------- Send Calendar banner ---------- */
.calendar-banner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 18px;
  padding: 16px 24px 20px;
  border-radius: 18px;
  text-decoration: none;
  color: #ffffff;
  background: #1F3D5C;
  overflow: hidden;
  box-shadow:
    0 14px 32px rgba(31, 61, 92, 0.28),
    0 4px 8px rgba(0, 0, 0, 0.08);
  transition: transform 140ms ease, box-shadow 140ms ease;
}
.calendar-banner::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 6px;
  background: linear-gradient(90deg, #4A90D9 0 46%, #52BFA5 46% 64%, #DCE8E3 64% 77%, #E9B44C 77% 100%);
}
.calendar-banner:hover,
.calendar-banner:focus-visible {
  transform: translateY(-2px);
  outline: none;
  box-shadow:
    0 20px 40px rgba(31, 61, 92, 0.36),
    0 6px 12px rgba(0, 0, 0, 0.1);
}
.calendar-banner-icon {
  font-size: 32px;
  line-height: 1;
  flex-shrink: 0;
}
.calendar-banner-text {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
}
.calendar-banner-title {
  font-family: 'Bowlby One SC', 'Bowlby One', serif;
  font-weight: 400;
  font-size: clamp(19px, 2.6vw, 24px);
  letter-spacing: 0.01em;
  line-height: 1.1;
}
.calendar-banner-sub {
  font-size: 13.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 2px;
}
.calendar-banner-sub strong,
.calendar-banner-title em {
  color: #E9B44C;
  font-style: normal;
}
.calendar-banner-arrow {
  flex-shrink: 0;
  font-size: 24px;
  color: #E9B44C;
  transition: transform 160ms ease;
}
.calendar-banner:hover .calendar-banner-arrow,
.calendar-banner:focus-visible .calendar-banner-arrow {
  transform: translateX(4px);
}

/* ---------- Disclaimer ---------- */
.kit-disclaimer {
  margin-top: 18px;
  padding: 0 4px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-muted);
}
.kit-disclaimer p {
  margin: 0;
}
.kit-disclaimer-title {
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #1F3D5C;
  margin-bottom: 6px !important;
}
.kit-disclaimer strong {
  color: var(--text-dark);
}

/* ---------- Kit grid ---------- */
.kit-grid {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.kit-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.7);
  border-top: 5px solid var(--accent);
  border-radius: 20px;
  padding: 20px 22px 18px;
  background: rgba(255,255,255,0.62);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 12px 32px rgba(40,80,130,0.10), 0 4px 8px rgba(40,80,130,0.05);
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.kit-card:hover, .kit-card:focus-visible {
  transform: translateY(-4px);
  outline: none;
  box-shadow: 0 20px 44px rgba(40,80,130,0.18), 0 6px 12px rgba(40,80,130,0.08);
}
.kit-card-num {
  position: absolute;
  top: 14px;
  right: 18px;
  font-family: 'Bowlby One SC', 'Bowlby One', serif;
  font-size: 26px;
  color: var(--accent);
  opacity: 0.22;
}
.kit-card-icon { font-size: 34px; line-height: 1; margin-bottom: 10px; }
.kit-card-title {
  font-family: 'Bowlby One SC', 'Bowlby One', serif;
  font-weight: 400;
  font-size: 18px;
  line-height: 1.15;
  color: var(--text-dark);
  margin-bottom: 4px;
}
.kit-card-tagline {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.kit-card-cta {
  margin-top: auto;
  font-weight: 700;
  font-size: 14px;
  color: var(--accent);
}
.kit-card-stamp {
  display: none;
  position: absolute;
  top: -10px;
  left: 14px;
  background: #0E8F62;
  color: #fff;
  font-weight: 800;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 11px;
  border-radius: 999px;
  box-shadow: 0 4px 10px rgba(14,143,98,0.4);
  transform: rotate(-2deg);
}
.kit-card.is-collected { border-color: rgba(14,143,98,0.35); }
.kit-card.is-collected .kit-card-stamp { display: inline-block; }

/* ---------- Email modal ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(10, 25, 55, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.email-window {
  width: 100%;
  max-width: 640px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 40px 90px rgba(0,0,0,0.4);
  animation: email-in 240ms cubic-bezier(0.2, 0.9, 0.3, 1.15);
}
@keyframes email-in {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.email-chrome {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #14213D;
  color: #fff;
  padding: 12px 16px;
}
.email-dots { display: inline-flex; gap: 6px; }
.email-dots i {
  width: 11px; height: 11px; border-radius: 50%;
}
.email-dots i:nth-child(1) { background: #FF5F57; }
.email-dots i:nth-child(2) { background: #FEBC2E; }
.email-dots i:nth-child(3) { background: #28C840; }
.email-chrome-title {
  flex: 1 1 auto;
  font-weight: 700;
  font-size: 14.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.email-close {
  background: transparent;
  border: 0;
  color: rgba(255,255,255,0.8);
  font-size: 16px;
  cursor: pointer;
  padding: 4px 6px;
}
.email-close:hover { color: #fff; }
.email-fields {
  border-bottom: 1px solid #E8ECF3;
  padding: 10px 20px;
  font-size: 14.5px;
}
.email-field { padding: 4px 0; }
.email-field-label { color: var(--text-muted); font-weight: 600; margin-right: 6px; }
#email-subject { font-weight: 700; }
.email-body {
  padding: 18px 20px;
  font-size: 15px;
  line-height: 1.6;
  overflow-y: auto;
  flex: 1 1 auto;
}
.email-token {
  display: inline-block;
  background: rgba(26,79,237,0.1);
  border: 1px dashed rgba(26,79,237,0.45);
  color: var(--rf-blue);
  font-weight: 700;
  font-size: 0.92em;
  padding: 0 6px;
  border-radius: 7px;
  white-space: nowrap;
}
.email-token--insert {
  background: rgba(200,16,46,0.08);
  border-color: rgba(200,16,46,0.45);
  color: #C8102E;
  white-space: normal;
}
.email-preview {
  color: var(--text-muted);
  font-style: italic;
}
.email-actions {
  border-top: 1px solid #E8ECF3;
  background: #F7F9FC;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.email-hint { font-size: 12.5px; color: var(--text-muted); }
.email-buttons { display: flex; gap: 10px; margin-left: auto; }
.copy-btn {
  font-family: inherit;
  font-weight: 700;
  font-size: 15px;
  border: 0;
  cursor: pointer;
  background: var(--rf-blue);
  color: #fff;
  padding: 11px 20px;
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(26,79,237,0.28);
  transition: background 120ms ease, transform 120ms ease;
}
.copy-btn:hover { background: var(--rf-blue-hover); transform: translateY(-1px); }
.copy-btn--ghost {
  background: transparent;
  color: var(--rf-blue);
  border: 1.5px solid rgba(26,79,237,0.4);
  box-shadow: none;
}
.copy-btn--ghost:hover { background: rgba(26,79,237,0.08); }

/* ---------- Confetti ---------- */
.confetti {
  position: fixed;
  z-index: 200;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  pointer-events: none;
  animation: confetti-fly 1s cubic-bezier(0.2, 0.8, 0.4, 1) forwards;
}
@keyframes confetti-fly {
  from { opacity: 1; transform: translate(0, 0) rotate(0); }
  to { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--rot)); }
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid rgba(40,80,130,0.12);
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}
.site-footer a { color: var(--rf-blue); text-decoration: none; font-weight: 600; }

/* ---------- Mobile ---------- */
@media (max-width: 680px) {
  .page { padding: 18px 16px 60px; }
  .hero { padding: 24px 20px 22px; border-radius: 20px; }
  .kit-grid { grid-template-columns: 1fr; gap: 14px; }
  .email-window { max-height: 92vh; border-radius: 16px; }
  .email-hint { display: none; }
  .email-buttons { margin: 0 auto; }
}
