/* =============================================================================
   Match House — Link da Bio UI kit
   Mobile-first; designed @ 390×844 (iPhone 14).
   ============================================================================= */

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* ---------- shell ---------- */
.mh-shell {
  width: 390px; min-height: 844px;
  background: var(--mh-paper);
  font-family: var(--font-sans);
  color: var(--mh-navy);
  position: relative;
  overflow: hidden;
  border-radius: 44px;
  box-shadow: var(--shadow-xl);
  /* sit on a soft background when shown in a desktop demo */
}

/* device-frame wrapper for desktop demo */
.mh-stage {
  min-height: 100vh;
  background:
    radial-gradient(60% 80% at 20% 10%, rgba(0,15,144,0.06), transparent 60%),
    radial-gradient(60% 80% at 90% 90%, rgba(0,239,255,0.10), transparent 60%),
    var(--mh-paper);
  padding: 32px 16px 64px;
  display: flex; flex-direction: column; align-items: center; gap: 24px;
}
.mh-stage__intro {
  max-width: 720px; text-align: center;
}
.mh-stage__intro h1 {
  font-size: 32px; line-height: 1.1; letter-spacing: -0.02em; font-weight: 700;
  color: var(--mh-navy); margin: 0 0 8px;
}
.mh-stage__intro p { color: var(--fg-3); margin: 0 0 16px; font-size: 14px; }
.mh-stage__nav {
  display: inline-flex; gap: 4px; background: #fff; border-radius: 999px; padding: 4px;
  box-shadow: var(--shadow-md);
}
.mh-stage__nav button {
  border: none; background: transparent; padding: 8px 16px; border-radius: 999px;
  font: 600 13px/1 var(--font-sans); color: var(--fg-3); cursor: pointer;
  transition: all 200ms var(--ease-out);
}
.mh-stage__nav button.is-active { background: var(--mh-navy); color: #fff; }

/* ---------- status bar ---------- */
.mh-status {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 24px 4px; font-size: 14px; font-weight: 600;
}
.mh-status__icons { display: flex; gap: 6px; }
.mh-status__icons i { font-size: 14px; }

/* ---------- bio screen ---------- */
.mh-bio { padding-bottom: 32px; }
.mh-bio__head {
  display: flex; flex-direction: column; align-items: center; padding: 8px 24px 24px;
  text-align: center;
}
.mh-bio__brand {
  display: flex; align-items: center; gap: 8px; margin-bottom: 22px;
}
.mh-bio__logo { height: 22px; }
.mh-bio__brandtxt { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; color: var(--fg-3); }
.mh-bio__name {
  margin: 14px 0 4px; font-size: 24px; font-weight: 600;
  letter-spacing: -0.01em;
}
.mh-bio__creci { font-size: 12px; color: var(--fg-3); font-weight: 500; }
.mh-bio__desc {
  margin: 12px 0 0; font-size: 14px; line-height: 1.5;
  color: var(--fg-2); max-width: 320px;
}
.mh-bio__stats {
  display: flex; gap: 2px; margin-top: 18px;
  max-width: 100%; box-sizing: border-box;
  background: #fff; border-radius: 999px; padding: 8px 6px;
  box-shadow: var(--shadow-sm);
}

/* ---------- avatar ---------- */
.mh-avatar {
  background: var(--mh-gradient-symbol);
  border-radius: 50%; display: grid; place-items: center;
  color: #fff; font-weight: 700; letter-spacing: -0.01em;
  box-shadow: var(--shadow-md);
  position: relative;
  flex-shrink: 0;
}
.mh-avatar img { width: 60%; height: auto; filter: brightness(0) invert(1); }
.mh-avatar__dot {
  position: absolute; right: 4%; bottom: 4%;
  width: 22%; height: 22%; border-radius: 50%;
  background: var(--mh-cyan); border: 2.5px solid var(--mh-paper);
}

/* ---------- stat chip ---------- */
.mh-stat {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 9px; font-size: 12px; white-space: nowrap;
}
.mh-stat + .mh-stat { border-left: 1px solid var(--border-subtle); }
.mh-stat i { color: var(--mh-cyan); font-size: 13px; }
.mh-stat b { font-weight: 700; color: var(--mh-navy); }
.mh-stat span { color: var(--fg-3); font-weight: 500; }

/* ---------- AI launcher card ---------- */
.mh-ai-card {
  margin: 4px 16px 24px;
  display: block; width: calc(100% - 32px); text-align: left;
  background: var(--mh-gradient-brand);
  color: #fff; padding: 22px 22px 24px;
  border: none; border-radius: var(--radius-xl);
  position: relative; overflow: hidden;
  cursor: pointer;
  transition: transform 200ms var(--ease-out), box-shadow 200ms var(--ease-out);
  box-shadow: var(--shadow-lg);
}
.mh-ai-card:active { transform: scale(0.985); }
.mh-ai-card__glow {
  position: absolute; inset: -40%;
  background: radial-gradient(60% 60% at 70% 60%, rgba(0,239,255,0.5), transparent 60%);
  pointer-events: none;
}
.mh-ai-card__head { display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 1; }
.mh-ai-card__head i { font-size: 16px; opacity: 0.9; }
.mh-ai-card__tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px 5px 8px;
  background: rgba(255,255,255,0.14); backdrop-filter: blur(6px);
  border-radius: 999px; font-size: 11px; font-weight: 600;
}
.mh-ai-card__pulse {
  width: 7px; height: 7px; border-radius: 50%; background: var(--mh-cyan);
  box-shadow: 0 0 0 3px rgba(0,239,255,0.4);
  animation: mh-pulse 1.6s var(--ease-in-out) infinite;
}
@keyframes mh-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(0,239,255,0.4); }
  50%      { box-shadow: 0 0 0 6px rgba(0,239,255,0.1); }
}
.mh-ai-card__title {
  position: relative; z-index: 1;
  font-family: var(--font-display);
  margin: 18px 0 8px; font-size: 26px; line-height: 1.08; font-weight: 800; letter-spacing: -0.02em;
}
.mh-ai-card__sub {
  position: relative; z-index: 1;
  margin: 0; font-size: 13px; line-height: 1.5; color: rgba(255,255,255,0.82);
  max-width: 280px;
}

/* ---------- sections ---------- */
.mh-section { padding: 0 16px 24px; }
.mh-section__head { display: flex; align-items: baseline; justify-content: space-between; padding: 4px 4px 14px; }
.mh-section__head h3, .mh-section__solo {
  font-size: 14px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  margin: 0; color: var(--fg-2);
}
.mh-section__solo { padding: 4px 4px 14px; }
.mh-link {
  background: none; border: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--mh-blue); font-size: 12px; font-weight: 600;
  font-family: var(--font-sans);
}

/* ---------- property card (in feed) ---------- */
.mh-props { display: flex; gap: 12px; overflow-x: auto; padding: 4px 4px 8px; scrollbar-width: none; }
.mh-props::-webkit-scrollbar { display: none; }
.mh-prop {
  flex: 0 0 250px; aspect-ratio: 4/5;
  border: none; padding: 14px;
  border-radius: var(--radius-lg);
  color: #fff; text-align: left;
  display: flex; flex-direction: column; justify-content: space-between;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: transform 200ms var(--ease-out);
  font-family: var(--font-sans);
}
.mh-prop:active { transform: scale(0.98); }
.mh-prop__top { display: flex; justify-content: space-between; align-items: center; }
.mh-prop__top i { font-size: 18px; opacity: 0.9; }
.mh-chip {
  font-size: 10px; font-weight: 600;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(255,255,255,0.18); backdrop-filter: blur(6px);
  letter-spacing: 0.02em;
}
.mh-prop__cover {
  font-size: 96px; font-weight: 900; line-height: 1; letter-spacing: -0.04em;
  align-self: flex-end; opacity: 0.18; margin-bottom: -12px;
}
.mh-prop__body h4 { font-size: 16px; font-weight: 600; line-height: 1.25; margin: 0 0 6px; }
.mh-prop__price { font-size: 18px; font-weight: 700; color: var(--mh-cyan); letter-spacing: -0.01em; }
.mh-prop__meta { display: flex; gap: 10px; font-size: 11px; opacity: 0.86; margin-top: 6px; }
.mh-prop__meta i { font-size: 12px; vertical-align: -1px; margin-right: 2px; }

/* ---------- link row (other links) ---------- */
.mh-links { display: flex; flex-direction: column; gap: 8px; }
.mh-linkrow {
  background: #fff; border: none; cursor: pointer;
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  text-align: left;
  font-family: var(--font-sans);
  transition: transform 150ms var(--ease-out);
}
.mh-linkrow:active { transform: scale(0.99); }
.mh-linkrow__body { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.mh-linkrow__label { font-size: 14px; font-weight: 600; color: var(--mh-navy); }
.mh-linkrow__sub   { font-size: 11px; color: var(--fg-3); }
.mh-linkrow__arrow { color: var(--fg-3); font-size: 14px; }

/* ---------- icon tile ---------- */
.mh-tile {
  border-radius: 22%; display: grid; place-items: center; flex-shrink: 0;
  box-shadow: var(--shadow-xs);
}
.mh-tile--light { background: var(--mh-paper); color: var(--mh-blue); }
.mh-tile--dark  { background: var(--mh-gradient-symbol); color: #fff; }

/* ---------- badge ---------- */
.mh-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 600; letter-spacing: -0.005em;
}
.mh-badge--soft    { background: #fff; color: var(--mh-navy); border: 1px solid var(--border-subtle); }
.mh-badge--primary { background: var(--mh-blue); color: #fff; }
.mh-badge--cyan    { background: var(--mh-cyan); color: var(--mh-navy); }
.mh-badge--dark    { background: var(--mh-navy); color: var(--mh-cyan); }

/* ---------- buttons ---------- */
.mh-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: var(--radius-md); border: none;
  font: 600 14px/1 var(--font-sans); cursor: pointer; letter-spacing: -0.005em;
  transition: all 200ms var(--ease-out);
}
.mh-btn--md i { font-size: 16px; }
.mh-btn--lg { padding: 14px 28px; font-size: 16px; }
.mh-btn--sm { padding: 8px 14px; font-size: 12px; }
.mh-btn--primary { background: var(--mh-blue); color: #fff; }
.mh-btn--primary:active { background: var(--mh-navy); }
.mh-btn--dark    { background: var(--mh-navy); color: #fff; }
.mh-btn--cyan    { background: var(--mh-cyan); color: var(--mh-navy); }
.mh-btn--cyan:hover { box-shadow: var(--shadow-glow); }
.mh-btn--ghost   { background: #fff; color: var(--mh-navy); border: 1px solid var(--border-subtle); }
.mh-btn--link    { background: transparent; color: var(--mh-blue); padding: 6px 0; }
.mh-btn.is-full  { width: 100%; }

/* ---------- chat panel (bottom sheet) ---------- */
.mh-sheet {
  position: absolute; inset: 0;
  background: rgba(0, 7, 62, 0.72);
  z-index: 30;
  opacity: 0; pointer-events: none;
  transition: opacity 300ms var(--ease-out);
}
.mh-sheet.is-open { opacity: 1; pointer-events: auto; }
.mh-sheet__panel {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: var(--mh-paper);
  border-radius: 32px 32px 0 0;
  height: 88%;
  display: flex; flex-direction: column;
  transform: translateY(100%);
  transition: transform 360ms var(--ease-emphasized);
}
.mh-sheet.is-open .mh-sheet__panel { transform: translateY(0); }
.mh-sheet__grab {
  width: 44px; height: 5px; border-radius: 999px;
  background: var(--mh-gray-300);
  margin: 10px auto 4px;
}
.mh-chat__head {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 20px 16px; border-bottom: 1px solid var(--border-subtle);
}
.mh-chat__title { flex: 1; }
.mh-chat__title > div { font-size: 16px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.mh-chat__verified i { color: var(--mh-cyan); font-size: 14px; }
.mh-chat__title small { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--fg-3); font-weight: 500; }
.mh-chat__live { width: 6px; height: 6px; border-radius: 50%; background: var(--mh-cyan); box-shadow: 0 0 0 2px rgba(0,239,255,0.3); }
.mh-chat__close { border: none; background: transparent; padding: 6px; color: var(--mh-navy); cursor: pointer; font-size: 18px; }

.mh-chat__body {
  flex: 1; overflow-y: auto;
  padding: 16px 16px 8px;
  display: flex; flex-direction: column; gap: 10px;
}
.mh-chat__intro {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 14px;
  background: rgba(0, 239, 255, 0.12);
  border-radius: var(--radius-md);
  font-size: 11.5px; line-height: 1.4; color: var(--mh-navy);
  margin-bottom: 8px;
}
.mh-chat__intro i { color: var(--mh-blue); font-size: 14px; margin-top: 2px; flex-shrink: 0; }

.mh-msg { display: flex; gap: 8px; align-items: flex-end; max-width: 88%; animation: mh-msgIn 280ms var(--ease-out); }
@keyframes mh-msgIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.mh-msg--you { align-self: flex-end; flex-direction: row-reverse; }
.mh-msg__bubble { padding: 9px 13px; border-radius: 18px; font-size: 13.5px; line-height: 1.45; }
.mh-msg__bubble--ai  { background: #fff; box-shadow: var(--shadow-sm); border-bottom-left-radius: 6px; color: var(--mh-navy); }
.mh-msg__bubble--you { background: var(--mh-blue); color: #fff; border-bottom-right-radius: 6px; }
.mh-msg__tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; font-weight: 700; color: var(--mh-blue);
  margin-bottom: 4px; letter-spacing: 0.02em;
}
.mh-msg__tag i { font-size: 11px; color: var(--mh-cyan); }

.mh-typing { padding: 12px 14px; background: #fff; border-radius: 18px; border-bottom-left-radius: 6px; box-shadow: var(--shadow-sm); display: inline-flex; gap: 4px; }
.mh-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--mh-cyan); animation: mh-bob 1.2s var(--ease-in-out) infinite; }
.mh-typing span:nth-child(2) { animation-delay: 0.15s; }
.mh-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes mh-bob { 0%,60%,100% { transform: translateY(0); opacity: 0.5; } 30% { transform: translateY(-4px); opacity: 1; } }

.mh-chat__quick {
  display: flex; gap: 8px; overflow-x: auto;
  padding: 10px 16px; border-top: 1px solid var(--border-subtle);
  scrollbar-width: none;
}
.mh-chat__quick::-webkit-scrollbar { display: none; }
.mh-chat__quick button {
  flex-shrink: 0;
  background: #fff; border: 1px solid var(--border-subtle);
  border-radius: 999px; padding: 7px 14px;
  font: 500 12px/1 var(--font-sans); color: var(--mh-navy); cursor: pointer;
}

.mh-chat__composer {
  display: flex; gap: 8px; padding: 12px 16px 20px;
  background: #fff; border-top: 1px solid var(--border-subtle);
}
.mh-chat__composer input {
  flex: 1; border: none; outline: none;
  padding: 10px 14px; border-radius: 999px;
  background: var(--mh-paper); font: 400 14px var(--font-sans); color: var(--mh-navy);
}
.mh-chat__send {
  width: 38px; height: 38px; border-radius: 50%; border: none;
  background: var(--mh-blue); color: #fff; cursor: pointer;
  display: grid; place-items: center; font-size: 16px;
}

/* ---------- property detail ---------- */
.mh-detail { padding-bottom: 24px; }
.mh-detail__hero {
  position: relative;
  height: 360px;
  color: #fff;
  padding: 64px 20px 22px;
  display: flex; flex-direction: column; justify-content: flex-end;
  border-radius: 0 0 32px 32px;
}
.mh-detail__back, .mh-detail__save {
  position: absolute; top: 50px;
  width: 38px; height: 38px; border-radius: 50%; border: none;
  background: rgba(255,255,255,0.18); backdrop-filter: blur(8px);
  color: #fff; cursor: pointer;
  display: grid; place-items: center; font-size: 16px;
}
.mh-detail__back { left: 16px; }
.mh-detail__save { right: 16px; }
.mh-detail__hero-cover {
  position: absolute; right: -10px; top: 50px;
  font-size: 320px; font-weight: 900; line-height: 1; letter-spacing: -0.06em;
  opacity: 0.10; pointer-events: none;
}
.mh-detail__bairro { font-size: 12px; opacity: 0.85; font-weight: 500; letter-spacing: 0.02em; }
.mh-detail__hero-foot h1 { margin: 6px 0 0; font-family: var(--font-display); font-size: 26px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }

.mh-detail__body { padding: 20px; display: flex; flex-direction: column; gap: 18px; }
.mh-detail__match {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: #fff; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-glow);
}
.mh-detail__match > i { color: var(--mh-cyan); font-size: 22px; }
.mh-detail__match-num { font-weight: 700; font-size: 14px; }
.mh-detail__match-sub { font-size: 11px; color: var(--fg-3); margin-top: 2px; }

.mh-detail__price { font-family: var(--font-display); font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
.mh-detail__specs {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  background: #fff; border-radius: var(--radius-lg); padding: 14px;
  box-shadow: var(--shadow-sm);
}
.mh-detail__specs > div { display: flex; flex-direction: column; gap: 4px; align-items: center; font-size: 11px; color: var(--fg-3); }
.mh-detail__specs i { font-size: 18px; color: var(--mh-blue); }
.mh-detail__specs b { font-size: 16px; color: var(--mh-navy); font-weight: 700; }

.mh-detail__tags { display: flex; gap: 6px; flex-wrap: wrap; }
.mh-detail__h3 { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700; color: var(--fg-3); margin: 6px 0 0; }
.mh-detail__copy { font-size: 14px; line-height: 1.55; color: var(--fg-2); margin: 0; }

/* ---------- footer ---------- */
.mh-foot {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 8px 0 16px; opacity: 0.6;
}
.mh-foot img { height: 22px; }
.mh-foot__tag { font-size: 11px; color: var(--fg-3); letter-spacing: 0.01em; font-style: italic; }
