/* =====================================================
   JoFi Landing — main.css
   Aesthetic: Dark editorial · Gold accent · Kinetic type
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:opsz,wght@9..40,300;400;600;700&display=swap');

/* ── Tokens ── */
:root {
  --gold:      #FFCC00;
  --gold-dim:  #CC9F00;
  --orange:    #FF8800;
  --bg:        #0e0e0e;
  --bg-card:   #161616;
  --bg-raised: #1f1f1f;
  --border:    rgba(255,255,255,0.07);
  --text:      #F0EDE6;
  --muted:     #6B6762;
  --danger:    #FF4D4D;
  --green:     #28C76F;

  --font-display: 'DM Serif Display', serif;
  --font-body:    'DM Sans', sans-serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;

  --shadow-gold: 0 0 40px rgba(255,204,0,0.15);
  --shadow-card: 0 8px 32px rgba(0,0,0,0.5);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a  { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ── Noise texture overlay ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1000;
  opacity: 0.5;
}

/* ── Layout ── */
.container {
  width: min(1180px, 92vw);
  margin-inline: auto;
}

section { position: relative; }

/* ── Typography ── */
h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; }
h1 { font-size: clamp(2.8rem, 7vw, 5.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3.2rem); }
h3 { font-size: 1.35rem; }

.gold { color: var(--gold); }
.italic { font-style: italic; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: opacity .18s, transform .12s, box-shadow .18s;
  white-space: nowrap;
}
.btn:hover  { opacity: .9; transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--orange));
  color: #0e0e0e;
  box-shadow: 0 4px 24px rgba(255,204,0,0.3);
}
.btn-primary:hover { box-shadow: 0 8px 36px rgba(255,204,0,0.45); }

.btn-outline {
  background: transparent;
  color: var(--gold);
  border: 1.5px solid var(--gold);
}
.btn-outline:hover { background: rgba(255,204,0,.08); }

.btn-ghost {
  background: rgba(255,255,255,.06);
  color: var(--text);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover { background: rgba(255,255,255,.1); }

/* ── NAV ── */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 900;
  padding: 18px 0;
  transition: background .3s, backdrop-filter .3s, padding .3s;
}
#nav.scrolled {
  background: rgba(14,14,14,.85);
  backdrop-filter: blur(16px);
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}
.nav-logo img { width: 32px; border-radius: 8px; }
.nav-logo .logo-word { color: var(--gold); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
}
.nav-links a { transition: color .15s; }
.nav-links a:hover { color: var(--text); }

.nav-cta { flex-shrink: 0; }

@media (max-width: 720px) {
  .nav-links { display: none; }
}

/* ── HERO ── */
#hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,204,0,.1);
  border: 1px solid rgba(255,204,0,.25);
  border-radius: 100px;
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 28px;
}
.hero-eyebrow .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--gold);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.75); }
}

.hero-title { margin-bottom: 24px; letter-spacing: -0.03em; }
.hero-title em {
  font-style: italic;
  color: var(--gold);
  position: relative;
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 480px;
  line-height: 1.7;
  margin-bottom: 40px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.hero-trust {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--muted);
}

/* Mock Chrome extension popup */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.hero-visual::before {
  content: '';
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,204,0,.12) 0%, transparent 70%);
  pointer-events: none;
}

.ext-mock {
  width: 300px;
  background: #1a1a1a;
  border-radius: 16px;
  box-shadow: var(--shadow-card), var(--shadow-gold);
  overflow: hidden;
  border: 1px solid var(--border);
  /* transform idle manejado por JS en initMockTilt */
}

.ext-topbar {
  background: #111;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #2a2a2a;
}
.ext-topbar img { width: 20px; border-radius: 5px; }
.ext-topbar span { font-size: 13px; font-weight: 700; color: var(--gold); font-family: var(--font-body); }
.ext-topbar .ext-v { margin-left: auto; font-size: 10px; color: #444; font-family: var(--font-body); }

.ext-body { padding: 14px; display: flex; flex-direction: column; gap: 10px; }

.ext-profile {
  background: #222;
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.ext-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--gold);
  color: #111;
  font-size: 15px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  flex-shrink: 0;
}
.ext-info { flex: 1; min-width: 0; }
.ext-name { font-size: 12px; font-weight: 700; color: #fff; font-family: var(--font-body); }
.ext-email { font-size: 10px; color: #555; font-family: var(--font-body); }
.ext-tokens { text-align: right; }
.ext-tokens-val { font-size: 17px; font-weight: 800; color: var(--gold); line-height: 1; font-family: var(--font-body); }
.ext-tokens-sub { font-size: 9px; color: #555; font-family: var(--font-body); }

.ext-btn-launch {
  background: var(--gold);
  color: #111;
  border: none;
  border-radius: 10px;
  padding: 10px;
  font-size: 13px;
  font-weight: 800;
  width: 100%;
  cursor: pointer;
  font-family: var(--font-body);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.ext-pack {
  background: #222;
  border-radius: 10px;
  padding: 10px 12px;
}
.ext-pack-title { font-size: 10px; color: #555; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px; font-family: var(--font-body); }
.ext-cards { display: flex; gap: 6px; }
.ext-card {
  flex: 1;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  padding: 7px 8px;
  font-family: var(--font-body);
}
.ext-card.selected { border-color: var(--gold); }
.ext-card-label { font-size: 10px; color: #ccc; font-weight: 700; letter-spacing: 0.03em; }
.ext-card-price  { font-size: 12px; color: var(--gold); font-weight: 800; margin-top: 4px; }

/* ── BACKGROUND decorativo del hero ── */
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: -1;
}
.hero-bg-line {
  position: absolute;
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(255,204,0,.15), transparent);
  top: 0; bottom: 0;
}
.hero-bg-line:nth-child(1) { left: 20%; animation: lineFloat 8s ease-in-out infinite; }
.hero-bg-line:nth-child(2) { left: 50%; animation: lineFloat 10s ease-in-out infinite reverse; }
.hero-bg-line:nth-child(3) { left: 78%; animation: lineFloat 7s ease-in-out infinite; }

@keyframes lineFloat {
  0%, 100% { opacity: .3; }
  50%       { opacity: .8; }
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
}

/* ── HOW IT WORKS ── */
#how {
  padding: 120px 0;
}

.section-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold);
  margin-bottom: 16px;
  /* Reserva altura fija para que el typewriter no haga layout shift */
  display: block;
  min-height: 1.2em;
  overflow: hidden;
  white-space: nowrap;
}

.section-title { margin-bottom: 16px; }
.section-sub {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 560px;
  margin-bottom: 64px;
  line-height: 1.7;
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.step {
  background: var(--bg-card);
  padding: 36px 32px;
  position: relative;
  /* Sin transition en background — repaint caro dentro de overflow:hidden+border-radius */
}

/* Hover via pseudo-elemento: opacity es composite-only, sin repaint del clip */
.step::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--bg-raised);
  opacity: 0;
  transition: opacity .18s ease;
  pointer-events: none;
  z-index: 0;
}
.step:hover::after { opacity: 1; }

/* El contenido del step debe quedar sobre el pseudo */
.step > * { position: relative; z-index: 1; }

.step-num {
  font-family: var(--font-display);
  font-size: 3.5rem;
  color: rgba(255,204,0,.12);
  line-height: 1;
  margin-bottom: 20px;
  font-style: italic;
}
.step-icon {
  font-size: 2rem;
  margin-bottom: 16px;
}
.step h3 { margin-bottom: 10px; font-family: var(--font-body); font-size: 1.05rem; font-weight: 700; }
.step p  { font-size: 0.9rem; color: var(--muted); line-height: 1.6; }

/* ── FEATURES ── */
#features {
  padding: 120px 0;
  background: var(--bg-card);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 64px;
}

.feature-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.feature-card:hover {
  border-color: rgba(255,204,0,.35);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.4), var(--shadow-gold);
}

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: rgba(255,204,0,.1);
  border: 1px solid rgba(255,204,0,.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 20px;
}
.feature-card h3 { margin-bottom: 10px; font-family: var(--font-body); font-weight: 700; }
.feature-card p  { font-size: 0.9rem; color: var(--muted); line-height: 1.6; }

/* ── PRICING ── */
#pricing {
  padding: 120px 0;
}

.pricing-header { text-align: center; margin-bottom: 64px; }
.pricing-header .section-label { justify-content: center; display: flex; }
.pricing-header h2  { margin-bottom: 14px; }
.pricing-header p   { color: var(--muted); font-size: 1.05rem; max-width: 480px; margin-inline: auto; }

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  max-width: 900px;
  margin-inline: auto;
}

.price-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  transition: transform .2s, box-shadow .2s;
}
.price-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); }

.price-card.featured {
  border-color: var(--gold);
  background: linear-gradient(160deg, #1c1900 0%, var(--bg-card) 60%);
  box-shadow: var(--shadow-gold);
}

.price-badge {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--gold), var(--orange));
  color: #111;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 5px 14px;
  border-radius: 100px;
  white-space: nowrap;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.price-name {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.price-amount {
  font-family: var(--font-display);
  font-size: 3rem;
  line-height: 1;
  color: var(--text);
}
.price-amount sup { font-size: 1.2rem; vertical-align: super; font-family: var(--font-body); color: var(--muted); }
.price-amount .currency { font-size: 1rem; font-family: var(--font-body); color: var(--muted); margin-left: 4px; }

.price-qty {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.5;
}
.price-qty strong { color: var(--text); }

.price-perks {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.price-perk {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--muted);
}
.price-perk::before {
  content: '✓';
  color: var(--gold);
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 1px;
}

.price-card .btn { width: 100%; justify-content: center; }

/* ── FREE BADGE ── */
.free-note {
  text-align: center;
  margin-top: 40px;
  background: rgba(40,199,111,.08);
  border: 1px solid rgba(40,199,111,.2);
  border-radius: var(--radius-md);
  padding: 20px 28px;
  max-width: 500px;
  margin-inline: auto;
}
.free-note p { color: var(--green); font-weight: 600; font-size: 0.95rem; }
.free-note span { color: var(--muted); font-size: 0.85rem; }

/* ── SITES ── */
#sites {
  padding: 100px 0;
  background: var(--bg-card);
}

.sites-scroller {
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent 0%, black 12%, black 88%, transparent 100%);
  margin-top: 48px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.sites-track {
  display: flex;
  gap: 14px;
  animation: scrollSites 32s linear infinite;
  width: max-content;
}
.sites-track.reverse {
  animation: scrollSitesReverse 28s linear infinite;
}
.sites-track:hover { animation-play-state: paused; }
@keyframes scrollSites {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@keyframes scrollSitesReverse {
  from { transform: translateX(-50%); }
  to   { transform: translateX(0); }
}
.site-pill {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 9px 18px 9px 12px;
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  transition: border-color .2s, color .2s;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.site-pill:hover { border-color: var(--gold); color: var(--gold); }
.site-pill svg { flex-shrink: 0; opacity: 0.7; }

/* ── FAQ ── */
#faq { padding: 120px 0; }

.faq-list {
  max-width: 740px;
  margin-inline: auto;
  margin-top: 64px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.faq-item {
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.faq-q {
  width: 100%;
  background: var(--bg-card);
  color: var(--text);
  border: none;
  padding: 20px 24px;
  text-align: left;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  transition: background .15s;
}
.faq-q:hover { background: var(--bg-raised); }
.faq-q .faq-icon {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--muted);
  transition: transform .25s, border-color .2s, color .2s;
}
.faq-item.open .faq-icon { transform: rotate(45deg); border-color: var(--gold); color: var(--gold); }

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease;
  background: var(--bg-card);
}
.faq-a-inner {
  padding: 0 24px 22px;
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.7;
  border-top: 1px solid var(--border);
}
.faq-item.open .faq-a { max-height: 400px; }

/* ── CTA ── */
#cta {
  padding: 120px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
#cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 60% at 50% 100%, rgba(255,204,0,.10) 0%, transparent 70%);
  pointer-events: none;
}
#cta h2 { margin-bottom: 20px; }
#cta p  { color: var(--muted); font-size: 1.1rem; max-width: 520px; margin-inline: auto 0; margin-bottom: 40px; margin-left: auto; }
.cta-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── FOOTER ── */
#footer {
  padding: 60px 0 40px;
  border-top: 1px solid var(--border);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  flex-wrap: wrap;
}
.footer-brand p {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 10px;
  max-width: 260px;
  line-height: 1.6;
}
.footer-links {
  display: flex;
  gap: 60px;
  flex-wrap: wrap;
}
.footer-col h4 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 14px;
  font-weight: 700;
}
.footer-col li { margin-bottom: 10px; }
.footer-col a {
  font-size: 0.88rem;
  color: var(--muted);
  transition: color .15s;
}
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--muted);
}

/* ── ANIMATIONS ── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .65s ease, transform .65s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  .steps { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }
}