/* Yap landing — light cream theme, Marco-Polo-inspired */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@600;700;800&display=swap');

:root {
  --bg: #FFFFFF;
  --card: #F7F1E0;
  --card-soft: #FBF5E5;
  --text: #1D1B2C;
  --text-muted: #4A4660;
  --text-faint: #8E8AA3;
  --accent: #6C5CE7;
  --accent-hover: #5849d6;
  --accent-soft: rgba(108, 92, 231, 0.10);
  --hairline: rgba(29, 27, 44, 0.08);

  /* Decorative illustration colors (Marco-Polo-style pastels) */
  --hue-yellow: #F4D35E;
  --hue-mint: #95D5B2;
  --hue-coral: #F4A26F;
  --hue-blue: #8FB8DE;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ─── Top navigation ─────────────────────────────────── */

.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1240px;
  margin: 0 auto;
  width: 100%;
  padding: 20px 32px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: block;
  flex-shrink: 0;
  object-fit: cover;
}

.brand-name {
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
  transition: color 0.15s ease;
}

.nav-links a:hover {
  color: var(--text);
}

/* Download CTA — white pill with accent text, subtle border + shadow.
   Hover: smooth scale-up. Press: scale-down. */
.btn-cta {
  position: relative;
  display: inline-block;
  background: #fff;
  color: var(--accent);
  text-decoration: none;
  padding: 10px 24px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 15px;
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
  border: 1.5px solid rgba(108, 92, 231, 0.18);
  box-shadow: 0 2px 8px rgba(108, 92, 231, 0.08);
  transition:
    transform 650ms cubic-bezier(0.33, 1, 0.68, 1),
    box-shadow 650ms cubic-bezier(0.33, 1, 0.68, 1),
    border-color 650ms cubic-bezier(0.33, 1, 0.68, 1);
  will-change: transform;
}

.btn-cta:hover {
  transform: scale(1.03);
  border-color: rgba(108, 92, 231, 0.32);
  box-shadow: 0 8px 20px rgba(108, 92, 231, 0.14), 0 2px 6px rgba(108, 92, 231, 0.10);
  /* Match the base transition on hover so leave-off is just as smooth as enter. */
  transition:
    transform 650ms cubic-bezier(0.33, 1, 0.68, 1),
    box-shadow 650ms cubic-bezier(0.33, 1, 0.68, 1),
    border-color 650ms cubic-bezier(0.33, 1, 0.68, 1);
}

.btn-cta:active {
  transform: scale(0.98);
  box-shadow: 0 2px 6px rgba(108, 92, 231, 0.12);
}

.btn-cta:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.25);
}

/* ─── Hero card (Marco-Polo-style rounded cream rectangle) ── */

main {
  flex: 1;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 16px 32px 48px;
}

.hero-card {
  background: var(--card);
  border-radius: 32px;
  padding: 56px 64px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  min-height: 480px;
}

.hero-text h1 {
  font-size: 56px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -1.2px;
  color: var(--text);
  margin-bottom: 20px;
}

.hero-text .lede {
  font-size: 18px;
  line-height: 1.55;
  color: var(--text-muted);
  margin-bottom: 36px;
  max-width: 480px;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 8px;
}

.app-store-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #000;
  border-radius: 12px;
  padding: 10px 22px;
  text-decoration: none;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.10);
  transition:
    transform 650ms cubic-bezier(0.33, 1, 0.68, 1),
    box-shadow 650ms cubic-bezier(0.33, 1, 0.68, 1);
  will-change: transform;
}

.app-store-badge:hover {
  transform: scale(1.03);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
  transition:
    transform 650ms cubic-bezier(0.33, 1, 0.68, 1),
    box-shadow 650ms cubic-bezier(0.33, 1, 0.68, 1);
}

.app-store-badge:active {
  transform: scale(0.98);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.14);
}

.app-store-badge svg {
  width: 28px;
  height: 28px;
  fill: #fff;
  flex-shrink: 0;
}

.app-store-badge .badge-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.1;
}

.app-store-badge .badge-small {
  font-size: 10px;
  letter-spacing: 0.3px;
  opacity: 0.85;
}

.app-store-badge .badge-large {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.3px;
}

/* ─── Hero illustration (CSS-only, friendly Marco-Polo-style) ── */

.hero-art {
  position: relative;
  height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.art-blob {
  position: absolute;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  filter: drop-shadow(0 12px 32px rgba(29, 27, 44, 0.08));
}

.art-blob.center {
  width: 200px;
  height: 200px;
  background: var(--accent);
  z-index: 3;
  box-shadow: 0 16px 40px rgba(108, 92, 231, 0.32);
}

.art-blob.center img {
  width: 150px;
  height: 150px;
  border-radius: 32px;
}

.art-blob.tl {
  width: 110px;
  height: 110px;
  background: var(--hue-yellow);
  top: 10%;
  left: 10%;
  z-index: 2;
}

.art-blob.tr {
  width: 90px;
  height: 90px;
  background: var(--hue-mint);
  top: 18%;
  right: 8%;
  z-index: 2;
}

.art-blob.bl {
  width: 86px;
  height: 86px;
  background: var(--hue-coral);
  bottom: 14%;
  left: 16%;
  z-index: 2;
}

.art-blob.br {
  width: 100px;
  height: 100px;
  background: var(--hue-blue);
  bottom: 8%;
  right: 16%;
  z-index: 2;
}

.art-dot {
  position: absolute;
  border-radius: 50%;
  z-index: 1;
}

.art-dot.d1 { width: 10px; height: 10px; background: var(--accent); top: 8%; right: 28%; }
.art-dot.d2 { width: 14px; height: 14px; background: var(--hue-coral); top: 38%; left: 0%; }
.art-dot.d3 { width: 8px; height: 8px; background: var(--hue-mint); bottom: 28%; right: 4%; }
.art-dot.d4 { width: 12px; height: 12px; background: var(--accent); bottom: 0%; left: 38%; }
.art-dot.d5 { width: 10px; height: 10px; background: var(--hue-yellow); top: 50%; right: 32%; }

/* Ambient float animations — each blob/dot drifts on its own loop, with
   different durations and offsets so the composition feels alive without
   moving in unison. */
@keyframes drift-a {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50%      { transform: translate3d(0, -10px, 0); }
}
@keyframes drift-b {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50%      { transform: translate3d(7px, -6px, 0); }
}
@keyframes drift-c {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50%      { transform: translate3d(-8px, 8px, 0); }
}
@keyframes drift-d {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50%      { transform: translate3d(5px, 10px, 0); }
}
@keyframes drift-center {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50%      { transform: translate3d(0, -6px, 0); }
}
@keyframes drift-dot {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50%      { transform: translate3d(0, -5px, 0); }
}

/* Subtler keyframe variants for mobile — about half the travel distance so
   the small composition doesn't feel jittery on a phone screen. */
@keyframes drift-a-m   { 0%, 100% { transform: translate3d(0, 0, 0); } 50% { transform: translate3d(0, -4px, 0); } }
@keyframes drift-b-m   { 0%, 100% { transform: translate3d(0, 0, 0); } 50% { transform: translate3d(3px, -3px, 0); } }
@keyframes drift-c-m   { 0%, 100% { transform: translate3d(0, 0, 0); } 50% { transform: translate3d(-3px, 3px, 0); } }
@keyframes drift-d-m   { 0%, 100% { transform: translate3d(0, 0, 0); } 50% { transform: translate3d(2px, 4px, 0); } }
@keyframes drift-center-m { 0%, 100% { transform: translate3d(0, 0, 0); } 50% { transform: translate3d(0, -2px, 0); } }
@keyframes drift-dot-m { 0%, 100% { transform: translate3d(0, 0, 0); } 50% { transform: translate3d(0, -2px, 0); } }

.art-blob.tl     { animation: drift-a 7s   ease-in-out infinite; }
.art-blob.tr     { animation: drift-b 8.5s ease-in-out infinite 0.4s; }
.art-blob.bl     { animation: drift-c 9s   ease-in-out infinite 0.8s; }
.art-blob.br     { animation: drift-d 7.8s ease-in-out infinite 0.2s; }
.art-blob.center { animation: drift-center 6s ease-in-out infinite; }

.art-dot.d1 { animation: drift-dot 4s   ease-in-out infinite; }
.art-dot.d2 { animation: drift-dot 5s   ease-in-out infinite 0.5s; }
.art-dot.d3 { animation: drift-dot 4.5s ease-in-out infinite 1s; }
.art-dot.d4 { animation: drift-dot 5.5s ease-in-out infinite 0.3s; }
.art-dot.d5 { animation: drift-dot 4.2s ease-in-out infinite 1.2s; }

/* Respect users who've requested reduced motion. */
@media (prefers-reduced-motion: reduce) {
  .art-blob,
  .art-dot {
    animation: none !important;
  }
}

/* ─── Below-the-fold sections (optional, tighten later) ───── */

.section-block {
  max-width: 920px;
  margin: 80px auto 0;
  padding: 0 32px;
  text-align: center;
}

.section-block h2 {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.5px;
  color: var(--text);
  margin-bottom: 16px;
}

.section-block p {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
  text-align: left;
}

.feature {
  background: var(--card-soft);
  border-radius: 20px;
  padding: 28px;
}

.feature h3 {
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--text);
}

.feature p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ─── Sub-page header (privacy / terms / support) ─────── */

.page-header {
  text-align: center;
  padding: 32px 0 28px;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 36px;
}

.page-header img.logo {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: block;
  margin: 0 auto 18px;
}

.page-header h1 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
  color: var(--text);
}

.page-header .meta {
  color: var(--text-faint);
  font-size: 13px;
}

.legal-wrap,
.support-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 32px 48px;
}

/* Legal text (privacy / terms) */
.legal {
  color: var(--text-muted);
}

.legal h2 {
  color: var(--text);
  font-size: 18px;
  font-weight: 800;
  margin: 28px 0 12px;
}

.legal h2:first-child {
  margin-top: 0;
}

.legal p {
  margin-bottom: 14px;
  font-size: 15px;
  line-height: 1.65;
}

.legal ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 14px;
}

.legal ul li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 6px;
  font-size: 15px;
  line-height: 1.6;
}

.legal ul li::before {
  content: "·";
  position: absolute;
  left: 6px;
  color: var(--accent);
  font-weight: 700;
}

.legal a {
  color: var(--accent);
  text-decoration: none;
}

.legal a:hover {
  text-decoration: underline;
}

/* Support page */
.support-cta {
  background: var(--card-soft);
  border-radius: 20px;
  padding: 28px;
  margin-bottom: 32px;
  text-align: center;
}

.support-cta p {
  color: var(--text-muted);
  margin-bottom: 18px;
  font-size: 16px;
}

.support-cta strong {
  color: var(--text);
}

.btn-mailto {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  padding: 12px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  transition: background 0.15s ease, transform 0.15s ease;
}

.btn-mailto:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.faq h3 {
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
  margin-top: 24px;
  margin-bottom: 6px;
}

.faq p {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.65;
}

.support-section {
  margin-top: 32px;
}

.support-section h2 {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 12px;
}

.support-section p {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.65;
}

/* 404 */
.notfound {
  text-align: center;
  padding: 80px 32px;
  max-width: 480px;
  margin: 0 auto;
}

.notfound img.logo {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: block;
  margin: 0 auto 24px;
}

.notfound h1 {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.notfound p {
  color: var(--text-muted);
  margin-bottom: 24px;
}

.notfound a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
}

/* ─── Footer ─────────────────────────────────────────── */

footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px 14px;
  padding: 24px 24px 28px;
  color: var(--text-faint);
  font-size: 13px;
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
  border-top: 1px solid var(--hairline);
  margin: 16px auto 0;
  max-width: 1240px;
}

footer a {
  color: var(--text-faint);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s ease;
}

footer a:hover {
  color: var(--text);
}

footer .sep {
  opacity: 0.5;
}

@media (max-width: 540px) {
  footer .sep {
    display: none;
  }
}

/* ─── Responsive ─────────────────────────────────────── */

@media (max-width: 880px) {
  .top-nav {
    padding: 18px 24px;
  }

  .hero-card {
    grid-template-columns: 1fr;
    padding: 56px 32px;
    text-align: center;
    min-height: 0;
  }

  .hero-text {
    order: 1;
  }

  .hero-art {
    order: 2;
    height: 320px;
    margin-top: 16px;
  }

  .hero-text h1 {
    font-size: 42px;
    letter-spacing: -0.8px;
  }

  .hero-text .lede {
    margin-left: auto;
    margin-right: auto;
  }

  .badges {
    justify-content: center;
  }

  .nav-links {
    gap: 18px;
  }

  /* Hide the secondary text links on tablet so only the brand + Download
     button show in the collapsed nav. */
  .nav-links a:not(.btn-cta) {
    display: none;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 540px) {
  .top-nav {
    padding: 14px 18px;
  }

  .brand img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
  }

  .brand-name {
    font-size: 22px;
  }

  .btn-cta {
    padding: 8px 16px;
    font-size: 14px;
  }

  main {
    padding: 28px 16px 32px;
  }

  .hero-card {
    padding: 52px 28px;
    border-radius: 24px;
  }

  .hero-text h1 {
    font-size: 36px;
    letter-spacing: -0.7px;
    line-height: 1.1;
  }

  .hero-text .lede {
    font-size: 17px;
    margin-bottom: 30px;
  }

  .badges {
    margin-top: 6px;
  }

  .app-store-badge {
    padding: 10px 20px;
  }

  .app-store-badge .badge-large {
    font-size: 17px;
  }

  .hero-art {
    height: 220px;
    margin-top: 4px;
  }

  .art-blob.center {
    width: 122px;
    height: 122px;
  }

  .art-blob.center img {
    width: 88px;
    height: 88px;
    border-radius: 22px;
  }

  .art-blob.tl, .art-blob.tr, .art-blob.bl, .art-blob.br {
    width: 46px;
    height: 46px;
  }

  /* Hide most dots on mobile — keep only three for ambient texture (one
     more on the left to balance against the right-leaning d1 + d3). */
  .art-dot.d4,
  .art-dot.d5 {
    display: none;
  }

  .art-dot.d1 { width: 5px; height: 5px; }
  .art-dot.d2 { width: 5px; height: 5px; left: 4%; }
  .art-dot.d3 { width: 4px; height: 4px; }

  /* Slow down + halve the travel distance of every floating element on
     mobile so motion stays gentle on a small screen. */
  .art-blob.tl     { animation: drift-a-m 9s   ease-in-out infinite; }
  .art-blob.tr     { animation: drift-b-m 10.5s ease-in-out infinite 0.4s; }
  .art-blob.bl     { animation: drift-c-m 11s  ease-in-out infinite 0.8s; }
  .art-blob.br     { animation: drift-d-m 9.8s ease-in-out infinite 0.2s; }
  .art-blob.center { animation: drift-center-m 8s ease-in-out infinite; }

  .art-dot.d1 { animation: drift-dot-m 6s   ease-in-out infinite; }
  .art-dot.d2 { animation: drift-dot-m 7s   ease-in-out infinite 0.5s; }
  .art-dot.d3 { animation: drift-dot-m 6.5s ease-in-out infinite 1s; }

  /* Sub-pages — tighten typography on phones */
  .legal-wrap,
  .support-wrap {
    padding: 0 18px 32px;
  }

  .page-header h1 {
    font-size: 26px;
  }

  .page-header img.logo {
    width: 48px;
    height: 48px;
  }

  .legal h2 {
    font-size: 17px;
  }

  .support-cta {
    padding: 22px;
  }

  .notfound h1 {
    font-size: 26px;
  }

  footer {
    padding: 16px 18px 24px;
    font-size: 12px;
    gap: 4px 10px;
    margin-top: 12px;
  }
}
