/* ============================================================
   Notta — Stealth design system
   Dark · glassmorphism · purple→pink gradient
   Ported from the "Stealth" (proposal A) design exploration.
   Shared by index / crear / leer / como-funciona.
============================================================ */

:root {
  /* Brand */
  --accent-1: #a855f7;
  --accent-2: #ec4899;
  --accent: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
  --accent-soft: linear-gradient(135deg, rgba(168,85,247,.2), rgba(236,72,153,.2));

  /* Surface */
  --bg: #0a0613;
  --text: #e8e6f0;
  --muted-85: rgba(232,230,240,.85);
  --muted-75: rgba(232,230,240,.75);
  --muted-65: rgba(232,230,240,.65);
  --muted-60: rgba(232,230,240,.6);
  --muted-55: rgba(232,230,240,.55);
  --muted-50: rgba(232,230,240,.5);
  --muted-40: rgba(232,230,240,.4);
  --muted-35: rgba(232,230,240,.35);

  --line: rgba(255,255,255,.06);
  --line-2: rgba(255,255,255,.08);
  --line-3: rgba(255,255,255,.1);

  --glass: rgba(255,255,255,.03);
  --glass-hover: rgba(168,85,247,.06);
  --green: #10b981;

  /* Type */
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: ui-monospace, 'JetBrains Mono', SFMono-Regular, Menlo, monospace;

  /* Radii */
  --r-sm: 8px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 20px;
  --r-2xl: 24px;
  --r-full: 999px;

  /* Layout */
  --maxw: 1080px;
  --maxw-nav: 1280px;

  --shadow-cta: 0 8px 24px rgba(168,85,247,.4);
  --ease: cubic-bezier(.4, 0, .2, 1);
}

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

html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-feature-settings: "ss01", "cv11";
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  position: relative;
  isolation: isolate;
}

a { color: inherit; }
::selection { background: rgba(168,85,247,.35); color: #fff; }

/* ============================================================
   Animated background — orbs + grid + vignette
============================================================ */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: .55;
  animation: orb-drift 22s var(--ease) infinite;
}
.orb-1 { width: 700px; height: 700px; top: -220px; left: -120px; background: #7c3aed; animation-delay: 0s; }
.orb-2 { width: 600px; height: 600px; top: 30%; right: -160px; background: #ec4899; animation-delay: -7s; }
.orb-3 { width: 500px; height: 500px; top: 75%; left: 25%; background: #6366f1; animation-delay: -13s; }

@keyframes orb-drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(40px, -30px) scale(1.08); }
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 25%, rgba(0,0,0,.7) 30%, transparent 72%);
  mask-image: radial-gradient(ellipse at 50% 25%, rgba(0,0,0,.7) 30%, transparent 72%);
}
.bg-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top, transparent 30%, var(--bg) 80%);
}

/* ============================================================
   Shell
============================================================ */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: 56px; }

/* ---- Nav ---- */
.nav {
  position: relative;
  z-index: 5;
  max-width: var(--maxw-nav);
  margin: 0 auto;
  padding: 24px 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.logo-mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--accent);
  display: grid; place-items: center;
  box-shadow: 0 4px 16px rgba(168,85,247,.5);
  flex-shrink: 0;
}
.logo-dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.logo-text { font-size: 17px; font-weight: 600; letter-spacing: -.02em; }

.nav-links { display: flex; gap: 32px; }
.nav-link {
  color: var(--muted-65);
  font-size: 14px; font-weight: 450; text-decoration: none;
  transition: color .2s var(--ease);
}
.nav-link:hover { color: var(--text); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-weight: 600; cursor: pointer;
  border: none; text-decoration: none; white-space: nowrap;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease), border-color .2s var(--ease);
}
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(168,85,247,.5); }

.btn-cta {
  background: var(--accent);
  color: #fff;
  padding: 11px 22px;
  border-radius: var(--r-md);
  font-size: 14px;
  box-shadow: var(--shadow-cta);
}
.btn-cta:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(168,85,247,.5); }
.btn-cta:active { transform: translateY(0); }
.btn-lg { padding: 18px 32px; font-size: 17px; border-radius: 12px; }

.btn-glass {
  background: rgba(255,255,255,.06);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line-3);
  color: var(--text);
  padding: 10px 18px;
  border-radius: var(--r-md);
  font-size: 14px; font-weight: 500;
}
.btn-glass:hover { border-color: rgba(168,85,247,.4); background: rgba(168,85,247,.1); }

/* ---- Pill / eyebrow ---- */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: var(--r-full);
  background: rgba(255,255,255,.04);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line-2);
  font-size: 13px; color: var(--muted-75);
}
.pill-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }

.eyebrow {
  display: inline-block;
  padding: 4px 10px; border-radius: 6px;
  background: rgba(168,85,247,.12);
  color: #c4b5fd;
  font-family: var(--mono);
  font-size: 12px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase;
  margin-bottom: 20px;
}

/* ---- Text helpers ---- */
.grad { background: var(--accent); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.mono { font-family: var(--mono); }
.center { text-align: center; }

/* ============================================================
   Hero
============================================================ */
.hero { position: relative; z-index: 1; max-width: var(--maxw); margin: 0 auto; padding: 60px 56px 100px; text-align: center; }
.hero h1 {
  font-size: clamp(2.6rem, 8vw, 88px);
  font-weight: 600; letter-spacing: -.04em; line-height: 1.02;
  margin: 24px 0 28px;
}
.hero-sub {
  font-size: clamp(1rem, 2.4vw, 18px); line-height: 1.55;
  color: var(--muted-65); max-width: 540px; margin: 0 auto 48px;
}

/* ---- Composer ---- */
.composer {
  max-width: 720px; margin: 0 auto; text-align: left;
  background: rgba(20,12,40,.55);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  border: 1px solid var(--line-2);
  border-radius: var(--r-xl);
  box-shadow: 0 30px 80px rgba(0,0,0,.5), 0 0 0 1px rgba(168,85,247,.1) inset;
  overflow: hidden;
}
.composer-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; border-bottom: 1px solid var(--line);
}
.composer-dots { display: flex; gap: 6px; }
.composer-dots span { width: 10px; height: 10px; border-radius: 50%; }
.composer-title { font-family: var(--mono); font-size: 12px; color: var(--muted-55); flex: 1; }
.composer-expiry { font-family: var(--mono); font-size: 12px; color: var(--accent-1); }

.composer textarea {
  width: 100%; min-height: 160px; padding: 24px;
  background: transparent; border: none; outline: none; resize: vertical;
  color: var(--text); font-family: inherit; font-size: 15px; line-height: 1.6;
}
.composer textarea::placeholder { color: var(--muted-40); }

.composer-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 18px; border-top: 1px solid var(--line);
  background: rgba(0,0,0,.2);
  flex-wrap: wrap;
}
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  padding: 7px 12px; border-radius: var(--r-sm); font-size: 12px; font-weight: 500;
  background: transparent; border: 1px solid var(--line-2);
  color: var(--muted-60); cursor: pointer; min-height: 32px;
  transition: all .2s var(--ease);
}
.chip:hover { border-color: rgba(168,85,247,.3); color: var(--text); }
.chip.active { background: rgba(168,85,247,.15); border-color: rgba(168,85,247,.4); color: #d8b4fe; }

/* ---- Hero proof ---- */
.proof { display: flex; justify-content: center; align-items: center; gap: 20px; margin-top: 48px; flex-wrap: wrap; }
.proof span.t { font-family: var(--mono); font-size: 13px; color: var(--muted-40); }
.proof .div { width: 4px; height: 4px; border-radius: 50%; background: rgba(232,230,240,.2); }

/* ============================================================
   Generic section
============================================================ */
.section { position: relative; z-index: 1; max-width: var(--maxw); margin: 0 auto; padding: 80px 56px; }
.section-head { text-align: center; margin-bottom: 56px; }
.section-title {
  font-size: clamp(2rem, 5.5vw, 56px);
  font-weight: 600; letter-spacing: -.03em; line-height: 1.05; margin: 0;
}

/* ---- Feature grid ---- */
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feat-card {
  padding: 32px; border-radius: var(--r-lg);
  background: var(--glass);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  transition: transform .25s var(--ease), background .25s var(--ease), border-color .25s var(--ease);
}
.feat-card:hover { background: var(--glass-hover); border-color: rgba(168,85,247,.3); transform: translateY(-4px); }
.feat-icon {
  width: 44px; height: 44px; border-radius: var(--r-md);
  background: var(--accent-soft);
  border: 1px solid rgba(168,85,247,.3);
  display: grid; place-items: center; color: #d8b4fe; margin-bottom: 20px;
}
.feat-card h3 { font-size: 18px; font-weight: 600; letter-spacing: -.01em; margin-bottom: 8px; }
.feat-card p { font-size: 14px; line-height: 1.6; color: var(--muted-60); }

/* ---- Steps ---- */
.steps { display: flex; flex-direction: column; }
.step {
  display: grid; grid-template-columns: 120px 1fr; gap: 32px;
  padding: 32px 0; border-top: 1px solid var(--line); align-items: baseline;
}
.step-num { font-family: var(--mono); font-size: 14px; font-weight: 500; color: var(--accent-1); }
.step h3 { font-size: clamp(1.4rem, 3.5vw, 28px); font-weight: 600; letter-spacing: -.02em; margin-bottom: 8px; }
.step p { font-size: 16px; line-height: 1.55; color: var(--muted-60); max-width: 520px; }

/* ============================================================
   Security strip
============================================================ */
.security { position: relative; z-index: 1; max-width: var(--maxw); margin: 40px auto 0; padding: 0 56px; }
.security-inner {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 64px;
  padding: 56px; border-radius: var(--r-2xl);
  background: var(--glass);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  align-items: center;
}
.security-inner .section-title { font-size: clamp(1.8rem, 4.5vw, 40px); }
.code-row {
  display: flex; align-items: center; gap: 4px; margin-top: 24px; flex-wrap: wrap;
  padding: 14px 18px; border-radius: var(--r-md);
  background: rgba(0,0,0,.4); border: 1px solid var(--line);
}
.code { font-family: var(--mono); font-size: 14px; color: var(--text); }
.code-note { margin-left: 12px; font-size: 12px; color: var(--muted-40); }

.spec-panel {
  display: flex; flex-direction: column;
  padding: 28px; border-radius: var(--r-lg);
  background: rgba(0,0,0,.3); border: 1px solid var(--line);
}
.lock-badge {
  width: 64px; height: 64px; border-radius: var(--r-lg);
  background: var(--accent); display: grid; place-items: center; color: #fff;
  margin-bottom: 24px; box-shadow: 0 12px 32px rgba(168,85,247,.4);
}
.spec-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 0; border-top: 1px solid var(--line); font-size: 13px;
}
.spec-row span { color: var(--muted-65); }
.spec-row b { font-weight: 600; }

/* ============================================================
   Final CTA
============================================================ */
.final-cta {
  position: relative; z-index: 1; text-align: center;
  max-width: var(--maxw); margin: 0 auto; padding: 120px 56px;
  display: flex; flex-direction: column; align-items: center; gap: 32px;
}
.final-cta .section-title { font-size: clamp(2.2rem, 6.5vw, 64px); }

/* ============================================================
   Footer
============================================================ */
.footer {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px;
  max-width: var(--maxw); margin: 0 auto; padding: 48px 56px 64px;
  border-top: 1px solid var(--line);
}
.foot-col { display: flex; flex-direction: column; gap: 10px; }
.foot-head { font-size: 13px; font-weight: 600; color: var(--muted-85); margin-bottom: 6px; }
.foot-link { font-size: 13px; color: var(--muted-50); text-decoration: none; }
.foot-link:hover { color: var(--text); }
.foot-meta { font-size: 12px; color: var(--muted-35); }

/* ============================================================
   App pieces (crear / leer)
============================================================ */
.page { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; padding: 40px 24px 96px; }

.app-head { text-align: center; margin-bottom: 36px; }
.app-head h1 { font-size: clamp(1.9rem, 5vw, 44px); font-weight: 600; letter-spacing: -.03em; line-height: 1.05; }
.app-head p { color: var(--muted-65); font-size: 16px; margin-top: 12px; }

/* Result */
.result-card {
  background: rgba(20,12,40,.45);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  border: 1px solid var(--line-2);
  border-radius: var(--r-xl);
  padding: 40px 32px;
  display: flex; flex-direction: column; align-items: center; gap: 28px;
  box-shadow: 0 30px 80px rgba(0,0,0,.5);
}
.success-icon {
  width: 56px; height: 56px; border-radius: var(--r-lg);
  background: linear-gradient(135deg, #10b981, #059669);
  display: grid; place-items: center; color: #fff;
  box-shadow: 0 8px 24px rgba(16,185,129,.4);
}
.qr-frame { background: #fff; padding: 20px; border-radius: var(--r-lg); box-shadow: 0 12px 40px rgba(0,0,0,.4); }
.qr-frame canvas, .qr-frame img { display: block; width: 200px; height: 200px; }

.link-group {
  display: flex; align-items: stretch; width: 100%;
  background: rgba(0,0,0,.35); border: 1px solid var(--line-2);
  border-radius: var(--r-md); overflow: hidden;
}
.link-group input {
  flex: 1; min-width: 0; padding: 12px 16px;
  background: transparent; border: none; outline: none;
  font-family: var(--mono); font-size: 13px; color: var(--text);
}
.copy-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 12px 18px; border: none; border-left: 1px solid var(--line-2);
  background: rgba(168,85,247,.15); color: #d8b4fe;
  font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  transition: all .2s var(--ease);
}
.copy-btn:hover { background: var(--accent); color: #fff; }
.copy-btn.copied { background: linear-gradient(135deg,#10b981,#059669); color: #fff; }

/* Read */
.note-display {
  position: relative; overflow: hidden;
  background: rgba(20,12,40,.45);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  border: 1px solid var(--line-2);
  border-radius: var(--r-xl);
  padding: 32px;
}
.note-display::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--accent);
}
.note-content { font-size: 16px; line-height: 1.85; white-space: pre-wrap; word-wrap: break-word; color: var(--text); }

.meta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.meta {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: var(--r-full);
  background: var(--glass); border: 1px solid var(--line-2);
  font-size: 13px; color: var(--muted-65);
}
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: var(--r-full);
  background: var(--accent-soft); border: 1px solid rgba(168,85,247,.3);
  color: #d8b4fe; font-size: 12px; font-weight: 600;
}

.cta-banner {
  margin-top: 24px; padding: 24px;
  border-radius: var(--r-lg); background: var(--accent);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-wrap: wrap; position: relative; overflow: hidden;
}
.cta-banner::before { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(255,255,255,.12), transparent); }
.cta-banner p { position: relative; color: rgba(255,255,255,.92); font-size: 15px; }
.cta-banner .btn { position: relative; background: #fff; color: #7c3aed; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.cta-banner .btn:hover { transform: translateY(-2px); }

/* Not available state */
.empty-state {
  text-align: center; padding: 60px 24px;
  display: flex; flex-direction: column; align-items: center; gap: 20px;
}
.empty-icon {
  width: 72px; height: 72px; border-radius: var(--r-xl);
  background: var(--accent-soft); border: 1px solid rgba(168,85,247,.3);
  display: grid; place-items: center; color: #d8b4fe;
}
.empty-state h1 { font-size: clamp(1.6rem, 4.5vw, 32px); font-weight: 600; letter-spacing: -.02em; }
.empty-state p { color: var(--muted-60); max-width: 380px; font-size: 16px; }

/* char count */
.char-count { font-family: var(--mono); font-size: 12px; color: var(--muted-40); }

.hidden { display: none !important; }

/* ============================================================
   Responsive
============================================================ */
@media (max-width: 920px) {
  .security-inner { grid-template-columns: 1fr; gap: 32px; padding: 36px; }
  .footer { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 720px) {
  .wrap, .hero, .section, .security, .final-cta { padding-inline: 24px; }
  .nav { padding: 18px 24px; flex-wrap: wrap; }
  .nav-links { display: none; }
  .feat-grid { grid-template-columns: 1fr; }
  .step { grid-template-columns: 1fr; gap: 8px; }
  .hero { padding-top: 32px; padding-bottom: 64px; }
  .section { padding-block: 56px; }
  .final-cta { padding-block: 80px; }
}
@media (max-width: 480px) {
  .footer { grid-template-columns: 1fr; }
  .link-group { flex-direction: column; }
  .copy-btn { border-left: none; border-top: 1px solid var(--line-2); justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .orb { animation: none; }
  * { scroll-behavior: auto; }
}
