/* ── Yappie shared design system ── */

/* ── Variables ── */
:root {
  --bg:         #0F0E17;
  --bg2:        #141320;
  --bg-card:    #1A1928;
  --accent:     #00E676;
  --accent-h:   #33EF8D;
  --secondary:  #F25F4C;
  --tertiary:   #E53170;
  --border-d:   rgba(255,255,255,0.08);
  --text-head:  #FFFFFE;
  --text-muted: #A7A9BE;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; }

/* ── Typography ── */
.display {
  font-family: 'Montserrat', sans-serif;
  letter-spacing: -0.03em;
}
.heading-ui {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* ── Section backgrounds ── */
.dk  { background: var(--bg);  color: var(--text-head); }
.dk2 { background: var(--bg2); color: var(--text-head); }

/* ── Grid bg ── */
.grid-bg {
  background-image:
    linear-gradient(rgba(0,230,118,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,230,118,.05) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 12px 24px; border-radius: 8px;
  font-size: 14px; font-weight: 600;
  text-decoration: none; cursor: pointer;
  border: none;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  transition: background .15s, transform .15s, opacity .15s, box-shadow .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--accent);
  color: #0F0E17;
}
.btn-primary:hover {
  background: var(--accent-h);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,230,118,0.25);
}
.btn-secondary {
  background: var(--bg);
  color: var(--text-head);
  border: 1px solid var(--accent);
}
.btn-secondary:hover {
  background: rgba(0,230,118,0.06);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-d);
}
.btn-ghost:hover { color: var(--text-head); border-color: rgba(255,255,255,.25); }

/* ── Badge ── */
.badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(0,230,118,.08);
  border: 1px solid rgba(0,230,118,.2);
  color: var(--accent); border-radius: 20px;
  padding: 3px 12px; font-size: 12px; font-weight: 600;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  letter-spacing: .04em; text-transform: uppercase;
}
.badge-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  animation: pulseDot 2s ease-in-out infinite;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .5; transform: scale(1.4); }
}

/* ── Dark card ── */
.dcard {
  background: var(--bg-card);
  border: 1px solid var(--border-d);
  border-radius: 12px;
  transition: border-color .2s;
}
.dcard:hover { border-color: rgba(0,230,118,.2); }

/* ── Light card ── */
.lcard {
  background: #fff;
  border: 1px solid #e8eaed;
  border-radius: 14px;
  transition: box-shadow .2s, transform .2s;
}
.lcard:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,.08);
  transform: translateY(-2px);
}

/* ── Glow blob ── */
.glow {
  pointer-events: none; position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,230,118,.1) 0%, transparent 70%);
}

/* ── Separator ── */
.sep   { border-top: 1px solid var(--border-d); }
.sep-l { border-top: 1px solid #e8eaed; }

/* ── Nav link ── */
.nav-link {
  font-size: 14px; color: var(--text-muted); text-decoration: none;
  transition: color .15s;
}
.nav-link:hover { color: var(--text-head); }

/* ── Feature icon ── */
.ficon {
  width: 42px; height: 42px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,230,118,.1); flex-shrink: 0;
}

/* ── Reveal on scroll ── */
.reveal {
  opacity: 0; transform: translateY(22px);
  transition: opacity .55s ease, transform .55s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-thumb { background: #2A2938; border-radius: 3px; }

/* ── Lang toggle ── */
.lang-toggle {
  display: flex; align-items: center; gap: 2px;
  background: rgba(255,255,255,0.06); border-radius: 6px;
  padding: 2px; flex-shrink: 0;
}
.lang-btn {
  padding: 4px 10px; border-radius: 5px;
  font-size: 11px; font-weight: 700;
  color: rgba(255,255,255,0.35); cursor: pointer;
  border: none; background: none;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  transition: color .15s, background .15s; letter-spacing: .04em;
}
.lang-btn:hover { color: rgba(255,255,255,0.7); }
.lang-btn.active { color: var(--accent); background: rgba(0,230,118,0.12); }

/* ── Legal pages ── */
.legal-content {
  max-width: 4xl;
  margin: 0 auto;
  padding: 60px 24px;
}
.legal-content h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: #FFFFFE;
  margin-top: 40px;
  margin-bottom: 16px;
}
.legal-content h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #FFFFFE;
  margin-top: 24px;
  margin-bottom: 12px;
}
.legal-content p {
  margin-bottom: 14px;
  line-height: 1.7;
  color: var(--text-muted);
}
.legal-content ul {
  margin-bottom: 16px;
  padding-left: 20px;
}
.legal-content li {
  margin-bottom: 8px;
  line-height: 1.6;
}

/* ── Base ── */
html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text-muted);
  margin: 0;
  overflow-x: hidden;
  line-height: 1.5;
}

/* ── Engine float animations ── */
@keyframes fl1 {
  0%,100% { transform: translate(0,0); }
  33%      { transform: translate(5px,-13px); }
  66%      { transform: translate(-7px,-7px); }
}
@keyframes fl2 {
  0%,100% { transform: translate(0,0); }
  33%      { transform: translate(-6px,-10px); }
  66%      { transform: translate(4px,-16px); }
}
@keyframes fl3 {
  0%,100% { transform: translate(0,0); }
  33%      { transform: translate(8px,-8px); }
  66%      { transform: translate(-4px,-14px); }
}
@keyframes fl4 {
  0%,100% { transform: translate(0,0); }
  33%      { transform: translate(-5px,-12px); }
  66%      { transform: translate(6px,-6px); }
}
@keyframes fl5 {
  0%,100% { transform: translate(0,0); }
  33%      { transform: translate(3px,-15px); }
  66%      { transform: translate(-8px,-5px); }
}
.fl1 { animation: fl1 6s ease-in-out infinite; }
.fl2 { animation: fl2 7.5s ease-in-out infinite .6s; }
.fl3 { animation: fl3 8s ease-in-out infinite 1.1s; }
.fl4 { animation: fl4 6.8s ease-in-out infinite 1.7s; }
.fl5 { animation: fl5 7.2s ease-in-out infinite .3s; }

/* ── Pricing card ── */
.pcard {
  background: var(--bg-card);
  border: 1px solid var(--border-d);
  border-radius: 16px; padding: 28px 28px 32px;
  transition: transform .2s, border-color .2s;
}
.pcard:hover { transform: translateY(-4px); border-color: rgba(0,230,118,.3); }
.pcard.featured {
  background: rgba(0,230,118,.05);
  border-color: rgba(0,230,118,.3);
}

/* ── Dashboard mockup ── */
.mockup {
  background: var(--bg-card);
  border: 1px solid var(--border-d);
  border-radius: 14px; overflow: hidden;
}
.mockup-bar {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-d);
  display: flex; align-items: center; gap: 6px;
}
.mockup-dot {
  width: 10px; height: 10px; border-radius: 50%; opacity: .6;
}

/* ── Table (dark) ── */
.ctable { width: 100%; border-collapse: collapse; }
.ctable th {
  padding: 12px 18px; font-size: 13px; font-weight: 700;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-d);
  text-align: left;
  text-transform: uppercase; letter-spacing: .05em;
  background: var(--bg-card);
}
.ctable td {
  padding: 13px 18px; font-size: 13.5px; color: var(--text-muted);
  border-bottom: 1px solid var(--border-d);
}
.ctable tr:last-child td { border-bottom: none; }
.ctable tbody tr:hover td { background: rgba(255,255,255,.02); }

/* ── Progress bar ── */
.progress-wrap {
  width: 90px; height: 4px; border-radius: 3px;
  background: rgba(255,255,255,.08);
}
.progress-fill { height: 100%; border-radius: 3px; }

/* ── AI Index Popup ── */
.idx-popup {
  position: fixed;
  bottom: 28px;
  right: -430px;
  z-index: 999;
  width: 380px;
  background: var(--bg2);
  border: 1px solid rgba(0,230,118,0.28);
  border-radius: 22px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(0,230,118,0.06),
    0 0 50px rgba(0,230,118,0.07),
    0 40px 100px rgba(0,0,0,0.65),
    0 12px 32px rgba(0,0,0,0.4);
  transition: right 0.65s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.idx-popup.show { right: 28px; }
.idx-popup.hide {
  right: -430px;
  transition: right 0.4s cubic-bezier(0.55, 0, 1, 0.45);
}

.idx-popup-close {
  position: absolute;
  top: 13px; right: 13px;
  z-index: 10;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(15,14,23,0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.14);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: rgba(255,255,255,0.55);
  transition: background 0.15s, color 0.15s, transform 0.15s;
}
.idx-popup-close:hover { background: rgba(15,14,23,0.85); color: #fff; transform: scale(1.1); }
.idx-popup-close:active { transform: scale(0.93); }

.idx-popup-img {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #08070f;
}
.idx-popup-img img {
  width: 100%;
  display: block;
  transform: scale(1.01);
}
.idx-popup-img::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 70px;
  background: linear-gradient(to top, var(--bg2) 0%, transparent 100%);
  pointer-events: none;
}

.idx-popup-content {
  padding: 2px 22px 22px;
}
.idx-popup-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 21px;
  font-weight: 800;
  color: #FFFFFE;
  line-height: 1.18;
  letter-spacing: -0.035em;
  margin-bottom: 18px;
}
.idx-popup-title em {
  font-style: normal;
  background: linear-gradient(125deg, var(--accent) 0%, #5EFAAA 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.idx-popup-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 22px;
  border-radius: 12px;
  background: var(--accent);
  color: #0a0a12;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  border: none;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
}
.idx-popup-cta::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.18) 50%, transparent 100%);
  transform: translateX(-100%);
  transition: transform 0.55s;
}
.idx-popup-cta:hover {
  background: var(--accent-h);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,230,118,0.38);
}
.idx-popup-cta:hover::after { transform: translateX(100%); }
.idx-popup-cta:active { transform: translateY(0); }
.idx-popup-cta:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.idx-popup-dismiss {
  text-align: center;
}
.idx-popup-dismiss button {
  background: none;
  border: none;
  color: rgba(167,169,190,0.45);
  font-size: 11.5px;
  cursor: pointer;
  transition: color 0.15s;
  font-family: inherit;
  padding: 4px 8px;
}
.idx-popup-dismiss button:hover { color: rgba(167,169,190,0.85); }

@media (max-width: 480px) {
  .idx-popup { width: calc(100% - 24px); bottom: 12px; right: -110%; }
  .idx-popup.show { right: 12px; }
}

/* ── Ticker ── */
@keyframes tickUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.tick { animation: tickUp .6s ease forwards; }
