/*
 * Become a Host — landing page and onboarding flow.
 * Scoped to .host-* classes so nothing here can affect existing pages.
 * Colours and radii follow the tokens already defined in styles.css.
 */

.host-landing,
.host-onboarding {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 20px 64px;
}

/* ---------- Landing: hero ---------- */

.host-hero {
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 48px 0 56px;
}

.host-hero-text {
  flex: 1 1 auto;
  min-width: 0;
}

.host-hero-text h1 {
  font-size: 40px;
  line-height: 1.2;
  font-weight: 700;
  color: var(--text-dark, #111827);
  margin: 0 0 16px;
}

.host-hero-text p {
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-light, #6b7280);
  margin: 0 0 28px;
  max-width: 46ch;
}

.host-hero-art {
  flex: 0 0 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 220px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(41, 124, 57, 0.12) 0%, rgba(41, 124, 57, 0.04) 100%);
}

.host-hero-art i {
  font-size: 92px;
  color: var(--primary-color, #297c39);
}

.host-hero-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 0 0;
  font-size: 14px;
  color: var(--text-light, #6b7280);
}

.host-hero-note--ok {
  color: var(--primary-color, #297c39);
  font-weight: 600;
}

/* ---------- Shared call to action ---------- */

.host-cta-btn {
  display: inline-block;
  padding: 14px 32px;
  border: none;
  border-radius: 10px;
  background: var(--primary-color, #297c39);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.host-cta-btn:hover {
  background: #21642e;
  transform: translateY(-1px);
}

.host-cta-btn:disabled,
.host-cta-btn[aria-disabled="true"] {
  background: #d1d5db;
  color: #6b7280;
  cursor: not-allowed;
  transform: none;
}

/* ---------- Landing: sections ---------- */

.host-section {
  padding: 48px 0;
}

.host-section--muted {
  background: var(--background-light, #f9fafb);
  border-radius: 20px;
  padding: 40px 32px;
}

.host-section h2,
.host-final-cta h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-dark, #111827);
  margin: 0 0 28px;
}

.host-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.host-card {
  padding: 28px 24px;
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 16px;
  background: #fff;
}

.host-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin-bottom: 16px;
  border-radius: 14px;
  background: rgba(41, 124, 57, 0.1);
  color: var(--primary-color, #297c39);
  font-size: 22px;
}

.host-card h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-dark, #111827);
  margin: 0 0 8px;
}

.host-card p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-light, #6b7280);
  margin: 0;
}

/* ---------- Landing: steps ---------- */

.host-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 20px;
}

.host-step {
  display: flex;
  align-items: flex-start;
  gap: 18px;
}

.host-step-number {
  flex: 0 0 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--primary-color, #297c39);
  color: #fff;
  font-weight: 700;
}

.host-step-body h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-dark, #111827);
  margin: 8px 0 6px;
}

.host-step-body h3 i {
  margin-inline-end: 8px;
  color: var(--primary-color, #297c39);
}

.host-step-body p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-light, #6b7280);
  margin: 0;
}

/* ---------- Landing: FAQ ---------- */

.host-faq {
  display: grid;
  gap: 12px;
}

.host-faq-item {
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 12px;
  padding: 16px 20px;
  background: #fff;
}

.host-faq-item summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text-dark, #111827);
  list-style: none;
}

.host-faq-item summary::-webkit-details-marker {
  display: none;
}

.host-faq-item summary::after {
  content: "+";
  float: inline-end;
  color: var(--primary-color, #297c39);
  font-size: 20px;
  line-height: 1;
}

.host-faq-item[open] summary::after {
  content: "\2212";
}

.host-faq-item p {
  margin: 12px 0 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-light, #6b7280);
}

.host-final-cta {
  text-align: center;
  padding: 56px 24px;
  border-radius: 20px;
  background: var(--background-light, #f9fafb);
}

/* ---------- Onboarding: progress ---------- */

.host-onboarding-head {
  padding: 32px 0 24px;
}

.host-onboarding-head h1 {
  font-size: 30px;
  font-weight: 700;
  color: var(--text-dark, #111827);
  margin: 0 0 8px;
}

.host-onboarding-head p {
  font-size: 15px;
  color: var(--text-light, #6b7280);
  margin: 0;
}

.host-progress {
  display: flex;
  gap: 12px;
  margin: 28px 0 32px;
}

.host-progress-item {
  flex: 1 1 0;
  padding-top: 12px;
  border-top: 4px solid var(--border-color, #e5e7eb);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-light, #6b7280);
}

.host-progress-item.is-active {
  border-top-color: var(--primary-color, #297c39);
  color: var(--primary-color, #297c39);
}

.host-progress-item.is-done {
  border-top-color: var(--primary-color, #297c39);
  color: var(--text-dark, #111827);
}

.host-progress-item i {
  margin-inline-end: 6px;
}

/* ---------- Onboarding: panels ---------- */

.host-panel {
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 16px;
  padding: 28px 24px;
  background: #fff;
  margin-bottom: 20px;
}

.host-panel[hidden] {
  display: none;
}

.host-panel h2 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-dark, #111827);
  margin: 0 0 6px;
}

.host-panel-intro {
  font-size: 14px;
  color: var(--text-light, #6b7280);
  margin: 0 0 24px;
}

.host-field {
  margin-bottom: 20px;
}

.host-field label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dark, #111827);
}

.host-field > span {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dark, #111827);
}

.host-field input[type="text"],
.host-field input[type="email"],
.host-field input[type="tel"],
.host-field input[type="file"],
.host-field select,
.host-field textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  background: #fff;
  color: var(--text-dark, #111827);
}

.host-field textarea {
  min-height: 110px;
  resize: vertical;
}

.host-field input:focus,
.host-field select:focus,
.host-field textarea:focus {
  outline: none;
  border-color: var(--primary-color, #297c39);
  box-shadow: 0 0 0 3px rgba(41, 124, 57, 0.1);
}

.host-field-hint {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-light, #6b7280);
}

.host-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}

/* display:grid above would otherwise beat the HTML [hidden] attribute */
.host-field-row[hidden],
#host-bank-iban-wrap[hidden],
#host-bank-local-wrap[hidden],
#host-bank-routing-wrap[hidden],
#host-bank-account-wrap[hidden] {
  display: none !important;
}

/* Space under routing only when that field is visible (CCI/CLABE alone stays level with SWIFT). */
#host-bank-routing-wrap:not([hidden]) + #host-bank-account-wrap {
  margin-top: 14px;
}

.host-doc-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-color, #297c39);
}

.host-doc-status[hidden] {
  display: none !important;
}

/* ---------- Onboarding: agreement ---------- */

.host-agreement-box {
  max-height: 480px;
  overflow-y: auto;
  padding: 20px;
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 12px;
  background: var(--background-light, #f9fafb);
  margin-bottom: 20px;
}

.host-agreement-box h2 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-dark, #111827);
  margin: 0 0 6px;
}

.host-agreement-box .host-agreement-brand,
.host-agreement-box .host-agreement-meta {
  font-size: 13px;
  margin: 0 0 4px;
}

.host-agreement-box .host-agreement-footer {
  margin-top: 12px;
  font-weight: 600;
}

.host-agreement-box h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-dark, #111827);
  margin: 18px 0 6px;
}

.host-agreement-box h3:first-of-type {
  margin-top: 16px;
}

.host-agreement-box p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-light, #6b7280);
  margin: 0 0 10px;
}

.host-agreement-box ul {
  margin: 0 0 12px;
  padding-inline-start: 22px;
}

.host-agreement-box li {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-light, #6b7280);
  margin-bottom: 6px;
}

.host-agreement-placeholder {
  padding: 10px 14px;
  border-radius: 8px;
  background: #fff8e1;
  border: 1px solid #ffe082;
  color: #8d6e00;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
}

.host-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--text-dark, #111827);
  cursor: pointer;
}

.host-checkbox input {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  accent-color: var(--primary-color, #297c39);
}

/* ---------- Onboarding: status banners and feedback ---------- */

.host-status-banner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px 22px;
  border-radius: 14px;
  margin-bottom: 24px;
  font-size: 15px;
  line-height: 1.6;
}

.host-status-banner i {
  font-size: 22px;
  margin-top: 2px;
}

.host-status-banner--pending {
  background: #fff8e1;
  border: 1px solid #ffe082;
  color: #7a5b00;
}

.host-status-banner--approved {
  background: rgba(41, 124, 57, 0.08);
  border: 1px solid rgba(41, 124, 57, 0.3);
  color: #1b5e20;
}

.host-status-banner--rejected {
  background: #ffebee;
  border: 1px solid #ef9a9a;
  color: #b71c1c;
}

.host-form-error {
  display: none;
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #ffebee;
  border: 1px solid #ef9a9a;
  color: #b71c1c;
  font-size: 14px;
  font-weight: 500;
}

.host-form-error.is-visible {
  display: block;
}

.host-panel-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 8px;
}

/* Identity — method picker replaces front/back upload (Airbnb-style) */
.host-id-method-section {
  margin-bottom: 8px;
}

.host-id-method-title {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-dark, #111827);
  margin: 0 0 16px;
}

.host-id-methods {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.host-id-method {
  display: block;
  width: 100%;
  text-align: start;
  padding: 18px 20px;
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  font: inherit;
  color: var(--text-dark, #111827);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.host-id-method:hover:not(.is-soon):not(:disabled) {
  border-color: #9ca3af;
}

.host-id-method.is-selected {
  border: 2px solid var(--text-dark, #111827);
  box-shadow: inset 0 0 0 1px var(--text-dark, #111827);
}

.host-id-method.is-soon,
.host-id-method:disabled {
  opacity: 0.72;
  cursor: not-allowed;
}

.host-id-method-label {
  display: block;
  font-size: 16px;
  font-weight: 600;
}

.host-id-method-note {
  display: block;
  margin-top: 4px;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-light, #6b7280);
}

.host-id-method-badge {
  display: inline-block;
  margin-top: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--background-light, #f3f4f6);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-light, #6b7280);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.host-webcam-block {
  margin-bottom: 20px;
}

.host-webcam-preview-wrap {
  position: relative;
  width: 100%;
  max-width: 520px;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  overflow: hidden;
  background: #111827;
  border: 1px solid var(--border-color, #e5e7eb);
}

.host-webcam-preview-wrap.is-captured {
  border-color: var(--primary-color, #297c39);
  box-shadow: inset 0 0 0 2px var(--primary-color, #297c39);
}

.host-webcam-preview-wrap--small {
  max-width: 360px;
  aspect-ratio: 3 / 2;
  background: var(--background-light, #f9fafb);
}

.host-webcam-preview-wrap--small .host-webcam-video {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.host-webcam-video,
.host-webcam-capture-preview {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #111827;
}

.host-webcam-capture-preview {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.host-webcam-video[hidden],
.host-webcam-capture-preview[hidden],
.host-webcam-empty[hidden],
.host-secondary-btn[hidden] {
  display: none !important;
}

.host-webcam-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.host-webcam-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 16px;
  text-align: center;
  font-size: 14px;
  color: var(--text-light, #6b7280);
}

.host-webcam-preview-wrap--small .host-webcam-capture-preview {
  position: relative;
  z-index: 1;
}

.host-webcam-preview-wrap--small .host-webcam-capture-preview:not([hidden]) + .host-webcam-empty {
  display: none;
}

#host-id-upload-fields,
#host-id-webcam-fields {
  scroll-margin-top: 96px;
}

#host-id-upload-fields[hidden],
#host-id-webcam-fields[hidden] {
  display: none !important;
}

.host-secondary-btn {
  padding: 13px 24px;
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 10px;
  background: #fff;
  color: var(--text-dark, #111827);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.host-secondary-btn:hover {
  background: var(--background-light, #f9fafb);
}

/* The header entry point is styled in includes/header.php so it is available on every page. */

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .host-hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 28px;
    padding: 32px 0 40px;
  }

  .host-hero-text h1 {
    font-size: 30px;
  }

  .host-hero-art {
    flex: 0 0 auto;
    width: 100%;
    height: 160px;
  }

  .host-progress {
    flex-wrap: wrap;
  }

  .host-progress-item {
    flex: 1 1 44%;
  }

  .host-field-row {
    grid-template-columns: 1fr;
  }
}

/* ---------- Motion ----------
 * The .host-anim class is added by an inline script in become-a-host.php only when the browser
 * supports IntersectionObserver, so the page renders fully visible everywhere else. Every rule
 * below is switched off under prefers-reduced-motion at the end of this section.
 */

.host-anim [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.6s var(--jre-ui-motion-ease, cubic-bezier(0.2, 0, 0, 1)),
    transform 0.6s var(--jre-ui-motion-ease, cubic-bezier(0.2, 0, 0, 1));
}

.host-anim [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* Hero art: a slow drifting glow behind a floating house. */

.host-hero-art {
  position: relative;
  overflow: hidden;
}

.host-hero-art::before {
  content: "";
  position: absolute;
  inset: -35%;
  background: radial-gradient(circle at 32% 32%, rgba(41, 124, 57, 0.3), transparent 62%);
  animation: hostGlowDrift 9s ease-in-out infinite;
}

.host-hero-art i {
  position: relative;
  animation: hostFloat 5s ease-in-out infinite;
}

@keyframes hostFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@keyframes hostGlowDrift {
  0%, 100% { transform: rotate(0deg) scale(1); opacity: 0.9; }
  50% { transform: rotate(180deg) scale(1.18); opacity: 0.55; }
}

/* Call to action: shine sweep on hover, and a slow halo on the hero button to pull the eye. */

.host-cta-btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.host-cta-btn::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -40%;
  width: 35%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.38), transparent);
  transform: translateX(-140%);
  pointer-events: none;
}

.host-cta-btn:hover::after {
  animation: hostShine 0.7s ease;
}

.host-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(41, 124, 57, 0.28);
}

.host-cta-btn:active {
  transform: translateY(0) scale(0.985);
}

#host-landing-cta {
  animation: hostHalo 3.2s ease-in-out 1.4s infinite;
}

#host-landing-cta:hover {
  animation-play-state: paused;
}

@keyframes hostShine {
  to { transform: translateX(460%); }
}

@keyframes hostHalo {
  0%, 100% { box-shadow: 0 0 0 0 rgba(41, 124, 57, 0.34); }
  50% { box-shadow: 0 0 0 14px rgba(41, 124, 57, 0); }
}

/* Benefit cards: a bigger entrance than the default reveal, idle icon motion so the row is alive
   before anyone hovers it, then a lift on hover. Each card is offset so they never move in unison. */

.host-anim .host-card[data-reveal] {
  transform: translateY(30px) scale(0.96);
}

.host-anim .host-card[data-reveal].is-visible {
  transform: none;
}

.host-card-icon {
  animation: hostTileGlow 3.6s ease-in-out infinite;
}

.host-card-icon i {
  display: inline-block;
  animation: hostIconBob 3.6s ease-in-out infinite;
}

.host-card:nth-child(2) .host-card-icon,
.host-card:nth-child(2) .host-card-icon i {
  animation-delay: 0.45s;
}

.host-card:nth-child(3) .host-card-icon,
.host-card:nth-child(3) .host-card-icon i {
  animation-delay: 0.9s;
}

@keyframes hostIconBob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  30% { transform: translateY(-5px) rotate(-7deg); }
  60% { transform: translateY(-1px) rotate(5deg); }
}

@keyframes hostTileGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(41, 124, 57, 0.18); }
  55% { box-shadow: 0 0 0 12px rgba(41, 124, 57, 0); }
}

.host-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.host-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(17, 24, 39, 0.1);
  border-color: rgba(41, 124, 57, 0.35);
}

.host-card-icon {
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.host-card:hover .host-card-icon {
  transform: translateY(-2px) scale(1.08);
  background: rgba(41, 124, 57, 0.18);
}

/* Steps: a rail behind the numbers that draws itself when the list scrolls into view. */

.host-steps {
  position: relative;
}

.host-steps::before,
.host-steps::after {
  content: "";
  position: absolute;
  top: 20px;
  bottom: 20px;
  inset-inline-start: 19px;
  width: 2px;
}

.host-steps::before {
  background: var(--border-color, #e5e7eb);
}

.host-steps::after {
  background: var(--primary-color, #297c39);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 1.1s var(--jre-ui-motion-ease, cubic-bezier(0.2, 0, 0, 1)) 0.15s;
}

.host-steps.is-visible::after {
  transform: scaleY(1);
}

.host-step-number {
  position: relative;
  z-index: 1;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.host-step:hover .host-step-number {
  transform: scale(1.1);
  box-shadow: 0 0 0 6px rgba(41, 124, 57, 0.12);
}

/* FAQ: highlight on hover, turn the marker, fade the answer in. */

.host-faq-item {
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.host-faq-item:hover {
  border-color: rgba(41, 124, 57, 0.4);
  box-shadow: 0 6px 18px rgba(17, 24, 39, 0.06);
}

.host-faq-item summary::after {
  transition: transform 0.25s ease;
}

.host-faq-item[open] summary::after {
  transform: rotate(180deg);
}

.host-faq-item[open] p {
  animation: hostAnswerIn 0.32s ease both;
}

@keyframes hostAnswerIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .host-anim [data-reveal],
  .host-anim [data-reveal].is-visible {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .host-hero-art::before,
  .host-hero-art i,
  .host-card-icon,
  .host-card-icon i,
  #host-landing-cta,
  .host-cta-btn:hover::after,
  .host-faq-item[open] p {
    animation: none;
  }

  .host-steps::after {
    transform: scaleY(1);
    transition: none;
  }

  .host-card:hover,
  .host-card:hover .host-card-icon,
  .host-step:hover .host-step-number,
  .host-cta-btn:hover,
  .host-cta-btn:active {
    transform: none;
  }
}
