/* =======================
   AboutUs.css (complete)
   Fixes mobile overlap with header/nav
   ======================= */

:root {
  --bg: #000;
  --glass: rgba(255, 255, 255, .08);
  --stroke: rgba(255, 255, 255, .14);
  --text: rgba(255, 255, 255, .92);
  --muted: rgba(255, 255, 255, .6);
  --shadow: 0 18px 50px rgba(0, 0, 0, .55);

  /* Reserve space for your top nav so the "phone" never slides under it */
  --nav-h: 64px;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: radial-gradient(1000px 600px at 30% 20%, rgba(255, 255, 255, .06), transparent 60%), #000;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);

  /* IMPORTANT: don't hard-lock the page on mobile */
  overflow-x: hidden;
  overflow-y: auto;
}

/* animated background */
.liquid {
  position: fixed;
  inset: -20%;
  background: radial-gradient(400px 300px at 30% 30%, rgba(255, 255, 255, .08), transparent 60%);
  filter: blur(40px);
  opacity: .5;
  animation: drift 14s ease-in-out infinite alternate;

  /* keep it behind everything */
  z-index: -1;
  pointer-events: none;
}

@keyframes drift {
  from { transform: translate(-2%, -1%) scale(1.02); }
  to   { transform: translate(2%, 1%) scale(1.05); }
}

/* wrapper for the phone card */
.am-wrap {
  /* Use dynamic viewport height so mobile browser bars don't break layout */
  min-height: 100dvh;
  height: auto;

  display: grid;

  /* KEY FIX: don't vertically center (causes header overlap) */
  place-items: start center;

  /* KEY FIX: push content below the header/nav */
  padding: calc(var(--nav-h) + 20px) 20px 20px;
}

/* the "phone" card */
.phone {
  width: min(900px, 100%);

  /* KEY FIX: let height be flexible, cap it to viewport minus nav */
  height: auto;
  max-height: calc(100dvh - var(--nav-h) - 40px);

  border-radius: 28px;
  background: var(--glass);
  border: 1px solid var(--stroke);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);

  overflow: hidden;
  display: flex;
  flex-direction: column;

  /* prevent stacking weirdness */
  position: relative;
  z-index: 1;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px;
  border-bottom: 1px solid var(--stroke);
}

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
}

.title strong { font-size: 14px; }
.title span   { font-size: 12px; color: var(--muted); }

.spacer { flex: 1; }
.chip   { font-size: 12px; color: var(--muted); }

.chat {
  flex: 1;
  padding: 20px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.row { display: flex; margin: 10px 0; }

.bubble {
  max-width: 75%;
  padding: 12px 15px;
  border-radius: 20px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid var(--stroke);
  backdrop-filter: blur(15px);
}

.meta {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 6px;
}

.composer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px;
  border-top: 1px solid var(--stroke);
}

.inputFake {
  flex: 1;
  padding: 10px 15px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  color: var(--muted);
}

.am-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .06);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.bubble a {
  color: rgba(255, 255, 255, .95);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, .4);
  padding-bottom: 1px;
  transition: all .2s ease;
}

.bubble a:hover {
  border-bottom: 1px solid rgba(255, 255, 255, .9);
  opacity: .85;
}

.typingDots { display: flex; gap: 5px; }

.typingDots span {
  width: 6px;
  height: 6px;
  background: rgba(255, 255, 255, .6);
  border-radius: 50%;
  animation: bounce 1s infinite ease-in-out;
}

.typingDots span:nth-child(2) { animation-delay: .15s; }
.typingDots span:nth-child(3) { animation-delay: .3s; }

@keyframes bounce {
  0%, 60%, 100% { transform: translateY(0); }
  30%           { transform: translateY(-4px); }
}

/* Mobile tuning */
@media (max-width: 520px) {
  :root { --nav-h: 72px; } /* give more room if nav wraps */

  .am-wrap {
    padding: calc(var(--nav-h) + 14px) 14px 14px;
  }

  .phone {
    border-radius: 22px;
    max-height: calc(100dvh - var(--nav-h) - 28px);
  }

  .chat { padding: 16px; }
}
