:root {
  --bg: #fef6ec;
  --ink: #2b211b;
  --ink-soft: #83766a;
  --bubble-them: #f4e9da;
  --bubble-you: #3a86ff;
  --bubble-you-ink: #ffffff;
  --accent: #3a86ff;
  --accent-2: #14b8a6;
  --card: #ffffff;
  --radius-lg: 26px;
  --radius-bubble: 20px;
  font-size: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family:
    "Fredoka",
    "Segoe UI",
    system-ui,
    -apple-system,
    sans-serif;
  background: var(--bg);
  color: var(--ink);
  overflow-x: hidden;
  position: relative;
}

main {
  position: relative;
  z-index: 1;
}

/* ---- split hero: welcome (left) + chat (right) ---- */
.split-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4vh;
  max-width: 1180px;
  margin: 0 auto;
  padding: 8vh 6% 12vh;
}

.hero-col {
  max-width: 560px;
  text-align: center;
}
.hero-col h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 16px;
}
.hero-col h1 span {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-col .subtitle {
  color: var(--ink-soft);
  font-size: 1.05rem;
  margin: 0 0 26px;
}
.hero-cta {
  display: inline-block;
  text-decoration: none;
  color: #fff;
  background: var(--accent);
  padding: 13px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 10px 24px -8px rgba(58, 134, 255, 0.45);
  transition: transform 0.15s ease;
}
.hero-cta:hover {
  transform: translateY(-2px);
}

.chat-col {
  display: flex;
  justify-content: center;
  width: 100%;
}

.phone {
  width: 100%;
  max-width: 460px;
  height: min(620px, 74vh);
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 60px -20px rgba(43, 33, 27, 0.25);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(43, 33, 27, 0.06);
}

@media (min-width: 960px) {
  .split-hero {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 6vw;
    min-height: 82vh;
  }
  .hero-col {
    text-align: left;
    flex: 1;
  }
  .chat-col {
    flex: 1;
    justify-content: flex-end;
  }
  .phone {
    height: min(660px, 76vh);
  }
}

@media (min-width: 1280px) {
  .phone {
    height: min(700px, 78vh);
  }
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  border-bottom: 1px solid rgba(43, 33, 27, 0.08);
}

.nav-refresh {
  margin-left: auto;
  width: 38px;
  height: 38px;
  border: none;
  background: transparent;
  color: var(--ink-soft);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}
.nav-refresh.spin {
  animation: spin-once 0.5s ease;
}
@keyframes spin-once {
  to {
    transform: rotate(360deg);
  }
}
.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.chat-header-info {
  display: flex;
  flex-direction: column;
}
.chat-name {
  font-weight: 700;
  font-size: 0.98rem;
}
.chat-status {
  font-size: 0.78rem;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 6px;
}
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #35d07f;
  display: inline-block;
}

.chat-thread {
  padding: 20px 16px 26px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  overflow-y: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.chat-thread::-webkit-scrollbar {
  display: none;
}

.msg-row {
  display: flex;
  opacity: 0;
  transform: translateY(10px) scale(0.98);
  animation: pop-in 0.35s ease forwards;
}
.msg-row.them {
  justify-content: flex-start;
}
.msg-row.you {
  justify-content: flex-end;
}

@keyframes pop-in {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.bubble {
  max-width: 75%;
  padding: 10px 14px;
  border-radius: var(--radius-bubble);
  font-size: 0.94rem;
  line-height: 1.42;
}
.them .bubble {
  background: var(--bubble-them);
  color: var(--ink);
  border-bottom-left-radius: 6px;
}
.you .bubble {
  background: var(--bubble-you);
  color: var(--bubble-you-ink);
  border-bottom-right-radius: 6px;
}

.bubble.img-bubble {
  padding: 6px;
  max-width: 62%;
}
.bubble.img-bubble img {
  display: block;
  width: 100%;
  border-radius: 14px;
}

/* typing indicator */
.typing .bubble {
  background: var(--bubble-them);
  border-bottom-left-radius: 6px;
  padding: 14px 16px;
  display: flex;
  gap: 4px;
  align-items: center;
}
.typing .dot-anim {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink-soft);
  opacity: 0.5;
  animation: bounce 1s infinite ease-in-out;
}
.typing .dot-anim:nth-child(2) {
  animation-delay: 0.15s;
}
.typing .dot-anim:nth-child(3) {
  animation-delay: 0.3s;
}
@keyframes bounce {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  30% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

/* ---- logo strip ---- */
.logo-strip {
  max-width: 1040px;
  margin: 0 auto;
  padding: 4vh 0 12vh;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent,
    black 8%,
    black 92%,
    transparent
  );
  mask-image: linear-gradient(
    90deg,
    transparent,
    black 8%,
    black 92%,
    transparent
  );
}
.logo-strip-label {
  text-align: center;
  color: var(--ink-soft);
  font-size: 1rem;
  letter-spacing: 0.03em;
  margin: 0 0 20px;
}
.logo-track {
  display: flex;
  align-items: center;
  gap: 28px;
  width: max-content;
  animation: logo-scroll 26s linear infinite;
  will-change: transform;
  backface-visibility: hidden;
}
.logo-track img {
  height: 180px;
  width: 180px;
  object-fit: contain;
  background: var(--card);
  border-radius: 24px;
  padding: 18px;
  box-shadow: 0 2px 10px rgba(43, 33, 27, 0.08);
  flex-shrink: 0;
}
@keyframes logo-scroll {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-50%, 0, 0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .logo-track {
    animation: none;
  }
}

/* ---- join ---- */
.join {
  text-align: center;
  padding: 8vh 6% 14vh;
  max-width: 620px;
  margin: 0 auto;
}
.join h2 {
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  margin: 0 0 8px;
}
.join p {
  color: var(--ink-soft);
  margin: 0 0 28px;
}
.join-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn-primary {
  text-decoration: none;
  padding: 13px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 24px -8px rgba(58, 134, 255, 0.45);
}
.btn-primary:hover {
  transform: translateY(-2px);
}

.social-links {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 22px;
}
.social-links a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  transition: color 0.15s ease;
}
.social-links a:hover {
  color: var(--accent);
}

/* ---- meme vault ---- */
.meme-vault {
  max-width: 1100px;
  margin: 0 auto;
  padding: 8vh 6% 14vh;
  text-align: center;
}
.meme-vault h2 {
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  margin: 0 0 8px;
}
.vault-note {
  color: var(--ink-soft);
  font-size: 0.92rem;
  margin: 0 0 30px;
}
.vault-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}
.vault-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: var(--card);
  border-radius: 18px;
  box-shadow: 0 2px 10px rgba(43, 33, 27, 0.08);
}

.site-footer {
  text-align: center;
  padding: 24px 6% 40px;
  color: var(--ink-soft);
  font-size: 0.85rem;
  position: relative;
  z-index: 1;
}

@media (max-width: 767px) {
  .split-hero {
    padding: 6vh 6% 6vh;
    gap: 3vh;
  }
  .logo-strip {
    padding: 3vh 0 8vh;
  }
  .logo-track {
    gap: 20px;
  }
  .logo-track img {
    height: 150px;
    width: 150px;
    padding: 14px;
    border-radius: 20px;
  }
  .join {
    padding: 6vh 6% 10vh;
  }
  .meme-vault {
    padding: 6vh 6% 10vh;
  }
}

@media (max-width: 480px) {
  .bubble {
    max-width: 84%;
  }
  .bubble.img-bubble {
    max-width: 72%;
  }
}
