/* ============================================================
   YallAmigo — site design system
   Palette derived from the brand mark: magenta → violet → cyan
   Display: Bricolage Grotesque · Body: Instrument Sans · Mono: IBM Plex Mono
   ============================================================ */

:root {
  --ink: #1a1440;
  --ink-soft: #4c4570;
  --ink-faint: #837da3;
  --paper: #fbfafe;
  --surface: #f4f2fa;
  --card: #ffffff;
  --line: #e7e3f2;
  --magenta: #ce1f72;
  --violet: #6c3bd4;
  --cyan: #0d9ec4;
  --cyan-deep: #0b7f9d;
  --grad: linear-gradient(118deg, #ce1f72 0%, #6c3bd4 52%, #0d9ec4 100%);
  --grad-soft: linear-gradient(118deg, rgba(206, 31, 114, 0.08), rgba(108, 59, 212, 0.08) 52%, rgba(13, 158, 196, 0.08));
  --radius: 18px;
  --radius-lg: 28px;
  --shadow-card: 0 2px 6px rgba(26, 20, 64, 0.05), 0 18px 44px -18px rgba(26, 20, 64, 0.18);
  --font-display: "Bricolage Grotesque", "Instrument Sans", system-ui, sans-serif;
  --font-body: "Instrument Sans", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a { color: var(--cyan-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 820px; margin: 0 auto; padding: 0 24px; }

/* ---------------- Typography ---------------- */

h1, h2, h3 { font-family: var(--font-display); line-height: 1.12; letter-spacing: -0.015em; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--violet);
  display: inline-flex;
  align-items: baseline;
  gap: 0.75em;
  margin-bottom: 18px;
}
.eyebrow .alt { color: var(--ink-faint); }
.eyebrow .alt::before { content: "· "; color: var(--line); }

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ---------------- Nav ---------------- */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  background: rgba(251, 250, 254, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav-brand img { height: 38px; width: auto; }
.nav-brand span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.18rem;
  color: var(--ink);
}
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a {
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.btn-primary { color: #fff; }
.nav-links a.btn-primary:hover { color: #fff; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  padding: 13px 26px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 10px 24px -10px rgba(26, 20, 64, 0.5);
}
.btn-primary:hover { background: #241b56; }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--line);
}
.btn-ghost:hover { border-color: var(--ink-faint); }
.btn-sm { padding: 9px 20px; font-size: 0.9rem; }

.nav-links-always { display: flex !important; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: var(--ink);
}
.nav-mobile { display: none; border-top: 1px solid var(--line); background: var(--paper); }
.nav-mobile.open { display: block; }
.nav-mobile a {
  display: block;
  padding: 14px 24px;
  color: var(--ink-soft);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

/* ---------------- Hero ---------------- */

.hero {
  padding: 150px 0 90px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -240px; right: -180px;
  width: 640px; height: 640px;
  background: radial-gradient(circle, rgba(108, 59, 212, 0.10) 0%, rgba(13, 158, 196, 0.06) 45%, transparent 70%);
  pointer-events: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 64px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.5rem, 5.4vw, 4rem);
  font-weight: 800;
  margin-bottom: 22px;
}
.hero-greeting {
  display: inline-block;
  min-width: 5.2ch;
  color: transparent;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p.lead {
  font-size: 1.18rem;
  color: var(--ink-soft);
  max-width: 34em;
  margin-bottom: 34px;
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 30px; }
.hero-note {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
}

/* Chat demo card */
.chat-demo {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  max-width: 420px;
  justify-self: end;
  width: 100%;
}
.chat-demo-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(rgba(108, 59, 212, 0.04), transparent);
}
.chat-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  flex-shrink: 0;
}
.chat-demo-head .who { font-weight: 600; font-size: 0.98rem; line-height: 1.25; }
.chat-demo-head .status {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--cyan-deep);
  letter-spacing: 0.06em;
}
.chat-body { padding: 22px 20px 26px; display: flex; flex-direction: column; gap: 14px; }
.msg { max-width: 85%; }
.msg .bubble {
  padding: 11px 15px;
  border-radius: 16px;
  font-size: 0.94rem;
  line-height: 1.45;
}
.msg .orig {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-faint);
  margin-top: 6px;
  letter-spacing: 0.03em;
  padding: 0 4px;
}
.msg-out { align-self: flex-end; text-align: right; }
.msg-out .bubble {
  background: var(--ink);
  color: #fff;
  border-bottom-right-radius: 5px;
  text-align: left;
}
.msg-in .bubble {
  background: var(--surface);
  border-bottom-left-radius: 5px;
}
.lang-pill {
  align-self: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--violet);
  background: rgba(108, 59, 212, 0.08);
  border: 1px solid rgba(108, 59, 212, 0.18);
  padding: 4px 12px;
  border-radius: 999px;
}

/* ---------------- Hello marquee ---------------- */

.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--card);
  overflow: hidden;
  padding: 18px 0;
}
.marquee-track {
  display: flex;
  gap: 56px;
  width: max-content;
  animation: marquee 46s linear infinite;
}
.marquee-track span {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink-faint);
  white-space: nowrap;
}
.marquee-track span em {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--violet);
  letter-spacing: 0.1em;
  margin-left: 8px;
  vertical-align: middle;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------------- Sections ---------------- */

.section { padding: 96px 0; }
.section-alt { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 640px; margin-bottom: 56px; }
.section-head h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  font-weight: 700;
  margin-bottom: 14px;
}
.section-head p { color: var(--ink-soft); font-size: 1.08rem; }

/* Bento feature grid */
.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.bento-cell {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.section-alt .bento-cell { background: var(--paper); }
.bento-cell:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); }
.bento-cell.span2 { grid-column: span 2; background: var(--grad-soft); border-color: rgba(108, 59, 212, 0.16); }
.bento-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.bento-cell.span2 .bento-icon { background: var(--grad); }
.bento-cell h3 { font-size: 1.22rem; font-weight: 700; margin-bottom: 8px; }
.bento-cell p { color: var(--ink-soft); font-size: 0.97rem; }

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  counter-reset: step;
}
.step { position: relative; padding-top: 8px; }
.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  color: var(--magenta);
  display: block;
  margin-bottom: 14px;
}
.step::after {
  content: "";
  position: absolute;
  top: 16px; left: 42px; right: -20px;
  height: 1px;
  background: var(--line);
}
.step:last-child::after { display: none; }
.step h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 8px; }
.step p { color: var(--ink-soft); font-size: 0.97rem; }

/* Guest invite feature */
.guest-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.guest-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 30px;
}
.guest-card .link-chip {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  background: var(--surface);
  border: 1px dashed var(--ink-faint);
  border-radius: 10px;
  padding: 12px 16px;
  color: var(--ink-soft);
  overflow-wrap: anywhere;
  margin-bottom: 20px;
}
.guest-card ol { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.guest-card ol li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.guest-card ol li .dot {
  width: 24px; height: 24px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

/* Languages */
.lang-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.lang-tile {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 18px;
  font-weight: 500;
}
.lang-tile .native { color: var(--ink-faint); font-weight: 400; font-size: 0.9rem; }
.lang-tile .code {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-faint);
  letter-spacing: 0.08em;
}

/* CTA */
.cta {
  position: relative;
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 72px 48px;
  text-align: center;
  overflow: hidden;
}
.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 90% at 15% 110%, rgba(206, 31, 114, 0.35), transparent 60%),
    radial-gradient(ellipse 60% 90% at 85% -10%, rgba(13, 158, 196, 0.3), transparent 60%);
  pointer-events: none;
}
.cta > * { position: relative; }
.cta h2 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); font-weight: 800; margin-bottom: 14px; }
.cta p { color: rgba(255, 255, 255, 0.78); font-size: 1.1rem; max-width: 34em; margin: 0 auto 36px; }
.store-badges { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.store-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  color: var(--ink);
  border-radius: 14px;
  padding: 12px 22px;
  text-decoration: none;
  text-align: left;
  transition: transform 0.15s ease;
}
.store-badge:hover { transform: translateY(-2px); text-decoration: none; }
.store-badge svg { width: 26px; height: 26px; flex-shrink: 0; }
.store-badge .small { font-size: 0.68rem; color: var(--ink-faint); line-height: 1.1; }
.store-badge .big { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; line-height: 1.15; }
.store-badge.soon { background: rgba(255, 255, 255, 0.12); color: #fff; cursor: default; }
.store-badge.soon .small { color: rgba(255, 255, 255, 0.6); }
.store-badge.soon:hover { transform: none; }

/* ---------------- Footer ---------------- */

.footer {
  background: var(--card);
  border-top: 1px solid var(--line);
  padding: 56px 0 36px;
  margin-top: 96px;
  color: var(--ink-soft);
  font-size: 0.94rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer-brand img { height: 34px; width: auto; }
.footer-brand span { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; color: var(--ink); }
.footer h4 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 16px;
}
.footer ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer a { color: var(--ink-soft); text-decoration: none; }
.footer a:hover { color: var(--ink); }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--ink-faint);
}

/* ---------------- Doc pages (legal / policies) ---------------- */

.doc-hero {
  padding: 130px 0 40px;
  border-bottom: 1px solid var(--line);
  background: var(--grad-soft);
}
.doc-hero h1 { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 800; margin-bottom: 10px; }
.doc-hero .meta {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ink-faint);
  letter-spacing: 0.05em;
}
.doc { padding: 56px 0 40px; }
.doc section { margin-bottom: 40px; }
.doc h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 44px 0 16px;
  padding-top: 8px;
}
.doc section:first-child h2 { margin-top: 0; }
.doc h3 { font-size: 1.15rem; font-weight: 600; margin: 26px 0 10px; }
.doc p { margin-bottom: 14px; color: var(--ink-soft); }
.doc ul, .doc ol { margin: 0 0 16px 1.4em; color: var(--ink-soft); }
.doc li { margin-bottom: 8px; }
.doc strong { color: var(--ink); font-weight: 600; }
.doc a { color: var(--cyan-deep); }
.callout {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--violet);
  border-radius: 12px;
  padding: 20px 24px;
  margin: 18px 0;
}
.callout p { margin-bottom: 4px; }
.callout p:last-child { margin-bottom: 0; }
.callout-warn { border-left-color: #d97706; background: #fdf7ec; }
.callout-danger { border-left-color: var(--magenta); background: #fdf0f6; }
.doc .table-wrap { overflow-x: auto; margin: 18px 0; border: 1px solid var(--line); border-radius: 12px; }
.doc table { width: 100%; border-collapse: collapse; font-size: 0.92rem; min-width: 480px; }
.doc thead th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  background: var(--surface);
  padding: 12px 16px;
}
.doc tbody td {
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  vertical-align: top;
}

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

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .hero { padding: 120px 0 64px; }
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .chat-demo { justify-self: center; }
  .bento { grid-template-columns: 1fr 1fr; }
  .bento-cell.span2 { grid-column: span 2; }
  .steps { grid-template-columns: 1fr; gap: 32px; }
  .step::after { display: none; }
  .guest-grid { grid-template-columns: 1fr; gap: 40px; }
  .lang-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 560px) {
  .bento { grid-template-columns: 1fr; }
  .bento-cell.span2 { grid-column: span 1; }
  .cta { padding: 56px 24px; }
  .section { padding: 72px 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee-track { animation: none; }
  * { transition: none !important; }
}
