html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus,
.form-control:focus, .form-select:focus, .form-check-input:focus {
  border-color: var(--fm-primary);
  box-shadow: 0 0 0 0.2rem rgba(11, 121, 131, 0.18);
}

html {
  position: relative;
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  margin-bottom: 0;
  background: #f7fbfb;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: #1c2b2d;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .display-4, .display-5, .display-6 {
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #10262a;
}

.lead { color: #4a6165; }
.text-muted { color: #64797c !important; }

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* ── Brand palette ────────────────────────────────────────────── */
:root {
  --fm-primary: #0b7983;
  --fm-primary-dark: #075a62;
  --fm-primary-light: #e4f3f4;
  --fm-accent: #16a34a;
  --fm-warn: #b45309;

  /* Point Bootstrap's own link/button colours at the brand palette, so nothing
     falls back to default Bootstrap blue alongside the brand teal. */
  --bs-link-color: var(--fm-primary);
  --bs-link-color-rgb: 11, 121, 131;
  --bs-link-hover-color: var(--fm-primary-dark);
  --bs-link-hover-color-rgb: 7, 90, 98;
}

.btn-primary {
  --bs-btn-bg: var(--fm-primary);
  --bs-btn-border-color: var(--fm-primary);
  --bs-btn-hover-bg: var(--fm-primary-dark);
  --bs-btn-hover-border-color: var(--fm-primary-dark);
  --bs-btn-active-bg: var(--fm-primary-dark);
  --bs-btn-active-border-color: var(--fm-primary-dark);
  --bs-btn-disabled-bg: var(--fm-primary);
  --bs-btn-disabled-border-color: var(--fm-primary);
}

.btn-outline-primary {
  --bs-btn-color: var(--fm-primary);
  --bs-btn-border-color: var(--fm-primary);
  --bs-btn-hover-bg: var(--fm-primary);
  --bs-btn-hover-border-color: var(--fm-primary);
  --bs-btn-active-bg: var(--fm-primary);
  --bs-btn-active-border-color: var(--fm-primary);
}

/* ── Forms ────────────────────────────────────────────────────── */
.form-control, .form-select {
  border-color: #dce3ec;
}

.input-group-text {
  background: var(--fm-primary-light);
  border-color: #dce3ec;
  color: var(--fm-primary);
  font-weight: 600;
}

/* Invite/building codes read better spaced out and forced to caps — but the
   placeholder must stay in normal case, otherwise the hint itself shouts. */
.fm-code-input {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}

.fm-code-input::placeholder {
  text-transform: none;
  letter-spacing: normal;
  font-weight: 400;
}

.fm-invite-code {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0.25em;
  color: var(--fm-primary);
  background: var(--fm-primary-light);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  word-break: break-all;
}

/* ── Auth cards ───────────────────────────────────────────────── */
.fm-auth-card {
  border-radius: 1.25rem;
  box-shadow: 0 1rem 2.5rem rgba(11, 121, 131, 0.09);
}

/* ── Navbar ───────────────────────────────────────────────────── */
/* Sticky + translucent so content scrolls under it rather than past a hard
   white band, which makes the page feel taller than it is. */
.fm-navbar {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: rgba(255, 255, 255, 0.82) !important;
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid rgba(11, 121, 131, 0.08);
  margin-bottom: 2.5rem;
}

.fm-navbar .navbar-brand {
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  color: var(--fm-primary) !important;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.fm-nav-links a {
  color: var(--fm-text-muted, #5b6b6c);
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  transition: color 0.15s ease;
}

.fm-nav-links a:hover { color: var(--fm-primary); }

.fm-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 0.65rem;
  background: linear-gradient(135deg, var(--fm-primary), #12a0ad);
  font-size: 1rem;
  box-shadow: 0 4px 12px rgba(11, 121, 131, 0.28);
}

.btn {
  border-radius: 0.6rem;
  font-weight: 600;
}

.btn-lg { border-radius: 0.75rem; padding: 0.8rem 1.5rem; }

.btn-primary {
  background-image: linear-gradient(135deg, #0d8792, var(--fm-primary));
  border: none;
  box-shadow: 0 6px 16px rgba(11, 121, 131, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(11, 121, 131, 0.34);
}

/* ── Hero ─────────────────────────────────────────────────────── */
/* Layered radial "mesh" tints over a soft base — reads richer than a flat
   linear gradient while staying light enough for dark text. */
.hero {
  position: relative;
  overflow: hidden;
  border-radius: 1.75rem;
  padding: 5rem 1.5rem 5.5rem;
  background:
    radial-gradient(60% 55% at 12% 18%, rgba(11, 121, 131, 0.16), transparent 60%),
    radial-gradient(55% 50% at 88% 12%, rgba(22, 163, 74, 0.13), transparent 62%),
    radial-gradient(65% 60% at 70% 95%, rgba(18, 160, 173, 0.14), transparent 60%),
    linear-gradient(-45deg, #e9f6f6, #f5fcfc, #eaf8f1, #e9f6f6);
  background-size: auto, auto, auto, 300% 300%;
  animation: gradientShift 14s ease infinite;
  border: 1px solid rgba(11, 121, 131, 0.1);
}

.hero h1 {
  font-size: clamp(2.1rem, 5.2vw, 3.4rem);
  line-height: 1.1;
}

/* Little trust strip under the hero CTAs */
.hero-trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.5rem;
  margin-top: 2rem;
  color: #4a6165;
  font-size: 0.82rem;
  font-weight: 600;
}

.hero-trust span { display: inline-flex; align-items: center; gap: 0.35rem; }

@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.hero-badge {
  display: inline-block;
  background: #fff;
  border: 1px solid rgba(11, 121, 131, 0.15);
  color: var(--fm-primary);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  padding: 0.35rem 0.9rem;
  border-radius: 50rem;
  box-shadow: 0 2px 8px rgba(11, 121, 131, 0.08);
}

.hero-float {
  position: absolute;
  font-size: 2.5rem;
  opacity: 0.5;
  animation: floaty 6s ease-in-out infinite;
  pointer-events: none;
}

.hero-float.f1 { top: 8%;  left: 6%;  animation-delay: 0s; }
.hero-float.f2 { top: 65%; left: 10%; animation-delay: 1.2s; font-size: 2rem; }
.hero-float.f3 { top: 15%; right: 8%; animation-delay: 0.6s; }
.hero-float.f4 { top: 60%; right: 6%; animation-delay: 1.8s; font-size: 2rem; }

@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-18px) rotate(6deg); }
}

.btn-pulse {
  animation: pulseGlow 2.4s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(11, 121, 131, 0.35); }
  50%      { box-shadow: 0 0 0 10px rgba(11, 121, 131, 0); }
}

/* ── Section headings ─────────────────────────────────────────── */
.section-eyebrow {
  color: var(--fm-primary);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ── Feature cards ────────────────────────────────────────────── */
.feature-icon {
  font-size: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  border-radius: 1rem;
  background: var(--fm-primary-light);
}

.feature-card {
  position: relative;
  overflow: hidden;
  border: 1px solid #e6eeee;
  border-radius: 1.25rem;
  padding: 2rem 1.35rem 1.75rem;
  height: 100%;
  background: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

/* Coloured hairline that fills in on hover — gives each card its own identity
   without tinting the whole surface. */
.feature-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--fm-primary);
  opacity: 0.55;
  transition: opacity 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-6px);
  border-color: transparent;
  box-shadow: 0 1.25rem 2.5rem rgba(11, 121, 131, 0.14);
}

.feature-card:hover::before { opacity: 1; }

.feature-card.accent-green::before  { background: #16a34a; }
.feature-card.accent-amber::before  { background: #f59e0b; }
.feature-card.accent-purple::before { background: #7c3aed; }

.feature-card.accent-green  .feature-icon { background: #e7f7ee; }
.feature-card.accent-amber  .feature-icon { background: #fef3c7; }
.feature-card.accent-purple .feature-icon { background: #ede9fe; }

/* Problems We Solve — old-way vs. FlatsMate comparison cards */
.compare-card {
  border: 1px solid #e6eeee;
  border-radius: 1.25rem;
  padding: 2rem 1.75rem 1.75rem;
  height: 100%;
  background: #fff;
  text-align: left;
}

.compare-icon {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
  text-align: center;
}

.compare-card h5 {
  text-align: center;
  margin-bottom: 1.25rem;
}

.compare-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.compare-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.5rem 0;
  color: var(--fm-text-muted, #5b6b6c);
  font-size: 0.95rem;
}

.compare-mark {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  margin-top: 0.1rem;
}

.mark-x     { background: #fee2e2; color: #dc2626; }
.mark-check { background: #e7f7ee; color: #16a34a; }

.compare-card-solution {
  border-color: var(--fm-primary-light);
  box-shadow: 0 1.25rem 2.5rem rgba(11, 121, 131, 0.1);
}

.feature-photo {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 1rem;
  display: block;
}

/* ── How it works ─────────────────────────────────────────────── */
.step-circle {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background: var(--fm-primary);
  color: #fff;
  font-weight: 800;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  box-shadow: 0 6px 16px rgba(11, 121, 131, 0.25);
}

.how-it-works-col {
  position: relative;
}

.how-it-works-col:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 1.6rem;
  left: 60%;
  width: 80%;
  border-top: 2px dashed #bcdcdf;
  display: none;
}

@media (min-width: 768px) {
  .how-it-works-col:not(:last-child)::after {
    display: block;
  }
}

/* ── Plan scroll strip (homepage teaser — full catalog is too wide to
   wrap in rows, so it scrolls horizontally instead) ────────────────── */
/* "One building or many" band — subtly tinted so it reads as its own
   statement rather than another row of feature cards. */
.scale-band {
  background: linear-gradient(180deg, #f2fbfb 0%, #ffffff 100%);
  border: 1px solid #e6eeee;
  border-radius: 1.35rem;
  padding: 2.25rem 1.5rem;
}

@media (max-width: 575.98px) {
  .scale-band { padding: 1.5rem 1rem; }
}

.plan-scroll-row {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  padding: 1.75rem 0.25rem 1.25rem;
  margin: 1.5rem 0;
  -webkit-overflow-scrolling: touch;
}

.plan-scroll-row::-webkit-scrollbar {
  height: 8px;
}
.plan-scroll-row::-webkit-scrollbar-thumb {
  background: #cfe3e4;
  border-radius: 999px;
}

.plan-scroll-item {
  flex: 0 0 auto;
  width: 260px;
  scroll-snap-align: start;
}

/* ── Plan cards ───────────────────────────────────────────────── */
.plan-card {
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  height: 100%;
  position: relative;
  border-radius: 1.35rem;
  border: 1px solid #e6eeee;
  background: #fff;
}

.plan-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 1.5rem 2.75rem rgba(11, 121, 131, 0.16);
}

.plan-card.free-trial {
  border: 2px solid var(--fm-accent);
  background: linear-gradient(180deg, #f3fbf6 0%, #fff 45%);
}

/* The recommended plan sits slightly proud of the others on desktop so the eye
   lands on it first. */
.plan-card.popular {
  border: 2px solid var(--fm-primary);
  background: linear-gradient(180deg, #eefafa 0%, #fff 45%);
  box-shadow: 0 1.25rem 2.5rem rgba(11, 121, 131, 0.16);
}

@media (min-width: 768px) {
  .plan-card.popular { transform: scale(1.045); }
  .plan-card.popular:hover { transform: scale(1.045) translateY(-8px); }
}

.plan-card .display-6 {
  background: linear-gradient(135deg, #0d8792, var(--fm-primary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.plan-ribbon {
  position: absolute;
  top: -0.8rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0.3rem 0.8rem;
  border-radius: 50rem;
  white-space: nowrap;
}

.plan-feature-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
  text-align: left;
  font-size: 0.85rem;
  color: #495057;
}

.plan-feature-list li {
  padding: 0.2rem 0;
}

.plan-feature-list li.checked::before {
  content: "✓";
  color: var(--fm-accent);
  font-weight: 700;
  margin-right: 0.5rem;
}

/* ── Step indicator (wizard) ──────────────────────────────────── */
.fm-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.fm-stepper .fm-step {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #adb5bd;
  font-size: 0.8rem;
  font-weight: 600;
}

.fm-stepper .fm-step .dot {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: #e9ecef;
  color: #868e96;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  transition: all 0.2s ease;
}

.fm-stepper .fm-step.active .dot,
.fm-stepper .fm-step.done .dot {
  background: var(--fm-primary);
  color: #fff;
}

.fm-stepper .fm-step.active {
  color: var(--fm-primary);
}

.fm-stepper .fm-line {
  width: 1.5rem;
  height: 2px;
  background: #e9ecef;
}

/* ── OTP input ────────────────────────────────────────────────── */
.otp-input {
  letter-spacing: 0.5rem;
  font-size: 1.5rem;
  text-align: center;
}

/* ── Success page ─────────────────────────────────────────────── */
.success-emoji {
  font-size: 4.5rem;
  display: inline-block;
  animation: bounceIn 0.8s ease;
}

@keyframes bounceIn {
  0%   { transform: scale(0.3); opacity: 0; }
  50%  { transform: scale(1.08); }
  100% { transform: scale(1); opacity: 1; }
}

.next-steps-list {
  text-align: left;
  list-style: none;
  padding: 0;
}

.next-steps-list li {
  display: flex;
  gap: 0.75rem;
  padding: 0.5rem 0;
}

.next-steps-list .num {
  flex: none;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--fm-primary-light);
  color: var(--fm-primary);
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── FAQ ──────────────────────────────────────────────────────── */
.accordion-button:not(.collapsed) {
  background: var(--fm-primary-light);
  color: var(--fm-primary-dark);
}

/* ── Footer ───────────────────────────────────────────────────── */
.fm-footer {
  background:
    radial-gradient(70% 120% at 8% 0%, rgba(18, 160, 173, 0.28), transparent 60%),
    #08333a;
  color: rgba(255, 255, 255, 0.72);
}

.fm-footer a {
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  transition: color 0.15s ease;
}

.fm-footer a:hover { color: #fff; text-decoration: underline; }

.fm-footer-brand { color: #fff; font-weight: 800; letter-spacing: -0.02em; }
.fm-footer-head  { color: #fff; font-weight: 700; font-size: 0.85rem;
                   text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.75rem; }
.fm-footer-links li { margin-bottom: 0.4rem; }
.fm-footer-rule  { border-color: rgba(255, 255, 255, 0.14); }
.fm-footer-fine  { color: rgba(255, 255, 255, 0.55); }

.fm-footer-badges { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.fm-chip {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.3rem 0.7rem;
  border-radius: 50rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.9);
}

/* ── Section rhythm ───────────────────────────────────────────── */
.fm-section { padding-top: 4.5rem; }

.section-eyebrow + h2 { margin-top: 0.35rem; }
