/* ============================================
   NEZDEV v3 — Premium Dark
   Trust · Craft · Newsletter · Density
   ============================================ */

:root {
  --primary: #8B5CF6;
  --primary-dark: #6D28D9;
  --primary-light: #A78BFA;
  --primary-dim: rgba(139, 92, 246, 0.08);

  --limpio-a: #00D4A3;
  --limpio-b: #00A878;

  --bg: #09090F;
  --surface: #111118;
  --surface-up: #18181F;
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(139, 92, 246, 0.3);

  --text: #E8E7EF;
  --text-dim: #8B8A9E;
  --text-muted: #55546A;
  --white: #FFFFFF;

  --r: 16px;
  --r-sm: 12px;
  --r-pill: 100px;

  --section-gap: 80px;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4, h5 {
  font-family: 'Outfit', system-ui, sans-serif;
  line-height: 1.15;
  color: var(--white);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Reveal --- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s cubic-bezier(.16,1,.3,1), transform .8s cubic-bezier(.16,1,.3,1);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-d1 { transition-delay: .08s; }
.reveal-d2 { transition-delay: .16s; }
.reveal-d3 { transition-delay: .24s; }
.reveal-d4 { transition-delay: .32s; }

/* --- Section label --- */
.section-label {
  text-align: center;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 40px;
}

/* ========== NAVBAR ========== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 16px 0;
  transition: all .4s ease;
}
.navbar.scrolled {
  background: rgba(9, 9, 15, 0.8);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; }
.nav-brand { display: flex; align-items: center; }
.brand-text {
  font-family: 'Outfit', sans-serif;
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.01em;
}
.brand-bracket { color: var(--primary); font-weight: 400; }
.footer-brand .brand-text { font-size: 1.3rem; }

.nav-links { display: flex; list-style: none; gap: 32px; }
.nav-links a {
  font-size: .88rem; font-weight: 500;
  color: var(--text-dim); letter-spacing: .01em;
  transition: color .3s;
}
.nav-links a:hover { color: var(--white); }

/* Nav dropdown */
.has-dropdown { position: relative; }
.dropdown {
  display: none; position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%); list-style: none;
  background: rgba(17, 17, 24, 0.95);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border); border-radius: var(--r-sm);
  padding: 8px 0; min-width: 160px; margin-top: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,.4);
}
.dropdown::before { content: ''; position: absolute; top: -12px; left: 0; right: 0; height: 12px; }
.has-dropdown:hover .dropdown { display: block; }
.dropdown li a { display: block; padding: 8px 20px; font-size: .85rem !important; white-space: nowrap; }
.dropdown li a:hover { background: rgba(139, 92, 246, 0.08); }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: all .3s; }
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ========== HERO ========== */
.hero {
  min-height: 85vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center; position: relative; overflow: hidden;
  padding: 100px 24px 60px;
}

.hero-glow { position: absolute; width: 600px; height: 600px; top: 50%; left: 50%; transform: translate(-50%, -50%); pointer-events: none; }
.hero-glow .orb { position: absolute; border-radius: 50%; filter: blur(80px); }
.hero-glow .orb-1 { width: 350px; height: 350px; background: rgba(139, 92, 246, 0.15); top: 0; left: 50%; transform: translateX(-50%); animation: orbit-1 12s ease-in-out infinite; }
.hero-glow .orb-2 { width: 250px; height: 250px; background: rgba(109, 40, 217, 0.12); bottom: 20%; right: 10%; animation: orbit-2 15s ease-in-out infinite; }
.hero-glow .orb-3 { width: 200px; height: 200px; background: rgba(0, 212, 163, 0.06); bottom: 10%; left: 15%; animation: orbit-3 18s ease-in-out infinite; }

@keyframes orbit-1 { 0%, 100% { transform: translateX(-50%) translateY(0); } 33% { transform: translateX(-40%) translateY(-30px); } 66% { transform: translateX(-60%) translateY(20px); } }
@keyframes orbit-2 { 0%, 100% { transform: translateX(0) translateY(0); } 50% { transform: translateX(-40px) translateY(-30px); } }
@keyframes orbit-3 { 0%, 100% { transform: translateX(0) translateY(0); } 50% { transform: translateX(30px) translateY(-20px); } }

.hero-content { position: relative; z-index: 1; max-width: 680px; }
.hero h1 { font-size: clamp(2.8rem, 7vw, 4.5rem); font-weight: 700; letter-spacing: -0.03em; margin-bottom: 20px; }
.hero h1 span { font-weight: 300; color: var(--text-dim); }
.hero-sub { font-size: clamp(1rem, 2.2vw, 1.15rem); color: var(--text-dim); max-width: 460px; margin: 0 auto 32px; line-height: 1.7; }

.hero-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; background: var(--primary); color: var(--white);
  border-radius: var(--r-pill); font-weight: 600; font-size: .95rem;
  transition: transform .3s, box-shadow .3s, background .3s;
  box-shadow: 0 0 24px rgba(139, 92, 246, 0.3);
}
.hero-cta:hover { transform: translateY(-2px); box-shadow: 0 0 40px rgba(139, 92, 246, 0.45); background: var(--primary-dark); }
.hero-cta svg { width: 16px; height: 16px; transition: transform .3s; }
.hero-cta:hover svg { transform: translateX(3px); }

/* ========== TRUST BENTO ========== */
.trust-section { padding: 0 0 var(--section-gap); }

.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.trust-cell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 28px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: border-color .4s, box-shadow .4s;
  --glow-x: 50%; --glow-y: 50%;
}
.trust-cell::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(300px circle at var(--glow-x) var(--glow-y), rgba(139, 92, 246, 0.06), transparent 70%);
  opacity: 0; transition: opacity .4s; pointer-events: none;
}
.trust-cell:hover::before { opacity: 1; }
.trust-cell:hover { border-color: var(--border-hover); }

.trust-icon {
  width: 48px; height: 48px; border-radius: var(--r-sm);
  background: var(--primary-dim);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
.trust-icon svg { width: 22px; height: 22px; stroke: var(--primary-light); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.trust-cell h3 { font-size: 1rem; font-weight: 600; margin-bottom: 6px; }
.trust-cell p { font-size: .85rem; color: var(--text-dim); line-height: 1.5; }

/* ========== APPS ========== */
.apps-section { padding: 0 0 var(--section-gap); }

.apps-showcase {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}

.app-card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: 32px;
  position: relative; overflow: hidden;
  transition: border-color .4s, box-shadow .4s, transform .3s;
  --glow-x: 50%; --glow-y: 50%;
}
.app-card::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(400px circle at var(--glow-x) var(--glow-y), rgba(139, 92, 246, 0.06), transparent 70%);
  opacity: 0; transition: opacity .4s; pointer-events: none;
}
.app-card:hover::before { opacity: 1; }
.app-card:hover { border-color: var(--border-hover); box-shadow: 0 0 40px rgba(139, 92, 246, 0.06); transform: translateY(-4px); }

.app-card[data-accent="green"]:hover { border-color: rgba(0, 212, 163, 0.25); box-shadow: 0 0 40px rgba(0, 212, 163, 0.05); }
.app-card[data-accent="green"]::before { background: radial-gradient(400px circle at var(--glow-x) var(--glow-y), rgba(0, 212, 163, 0.05), transparent 70%); }
.app-card[data-accent="green"] .app-card-tagline { color: #00D4A3; }

.app-card[data-accent="blue"]:hover { border-color: rgba(79, 70, 229, 0.3); box-shadow: 0 0 40px rgba(79, 70, 229, 0.06); }
.app-card[data-accent="blue"]::before { background: radial-gradient(400px circle at var(--glow-x) var(--glow-y), rgba(79, 70, 229, 0.06), transparent 70%); }
.app-card[data-accent="blue"] .app-card-tagline { color: #818CF8; }

.app-card[data-accent="red"]:hover { border-color: rgba(229, 62, 62, 0.3); box-shadow: 0 0 40px rgba(229, 62, 62, 0.06); }
.app-card[data-accent="red"]::before { background: radial-gradient(400px circle at var(--glow-x) var(--glow-y), rgba(229, 62, 62, 0.06), transparent 70%); }
.app-card[data-accent="red"] .app-card-tagline { color: #F56565; }

.app-card-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 20px; }
.app-card-icon { width: 64px; height: 64px; border-radius: 16px; box-shadow: 0 4px 16px rgba(0,0,0,.4); }
.app-card-badges { display: flex; gap: 6px; }
.badge {
  font-size: .7rem; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; padding: 4px 10px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  border-radius: var(--r-pill); color: var(--text-muted);
}
.app-card h3 { font-size: 1.5rem; font-weight: 700; margin-bottom: 4px; }
.app-card-tagline { font-size: .9rem; font-weight: 500; margin-bottom: 12px; }
.app-card-desc { font-size: .88rem; color: var(--text-dim); line-height: 1.6; flex: 1; margin-bottom: 20px; }
.app-card-link { font-size: .88rem; font-weight: 600; color: var(--primary-light); transition: color .3s; }
.app-card:hover .app-card-link { color: var(--white); }

/* ========== HOW WE BUILD ========== */
.craft-section { padding: 0 0 var(--section-gap); }

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

.craft-text h2 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 700;
  margin-bottom: 16px;
}
.craft-text > p {
  font-size: 1rem;
  color: var(--text-dim);
  line-height: 1.7;
}

.craft-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.craft-spec {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 20px;
  transition: border-color .3s;
}
.craft-spec:hover { border-color: var(--border-hover); }
.craft-spec-value {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-light);
  margin-bottom: 4px;
}
.craft-spec-label {
  font-size: .8rem;
  color: var(--text-dim);
  line-height: 1.4;
}

/* ========== PHILOSOPHY ========== */
.philosophy { padding: 0 0 var(--section-gap); text-align: center; }

.philosophy-text {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  font-weight: 500;
  line-height: 1.45;
  max-width: 650px;
  margin: 0 auto;
  color: var(--text-muted);
}
.philosophy-text .word { display: inline-block; transition: color .5s ease; }
.philosophy-text .word.lit { color: var(--white); }

/* ========== NEWSLETTER ========== */
.newsletter {
  padding: 0 0 var(--section-gap);
}
.newsletter-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.newsletter-box::before {
  content: '';
  position: absolute;
  top: -100px; left: 50%;
  transform: translateX(-50%);
  width: 400px; height: 400px;
  border-radius: 50%;
  background: rgba(139, 92, 246, 0.06);
  filter: blur(80px);
  pointer-events: none;
}
.newsletter-box h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
  position: relative;
}
.newsletter-box > p {
  font-size: .95rem;
  color: var(--text-dim);
  margin-bottom: 28px;
  position: relative;
}
.newsletter-form {
  display: flex;
  gap: 10px;
  max-width: 440px;
  margin: 0 auto;
  position: relative;
}
.newsletter-form input {
  flex: 1;
  padding: 14px 18px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  color: var(--white);
  font-family: 'Inter', sans-serif;
  font-size: .92rem;
  outline: none;
  transition: border-color .3s, box-shadow .3s;
}
.newsletter-form input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}
.newsletter-form input::placeholder { color: var(--text-muted); }
.newsletter-form button {
  padding: 14px 24px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: var(--r-pill);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: .9rem;
  cursor: pointer;
  transition: background .3s, transform .3s, box-shadow .3s;
  white-space: nowrap;
}
.newsletter-form button:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 0 24px rgba(139, 92, 246, 0.3);
}
.newsletter-note {
  font-size: .75rem;
  color: var(--text-muted);
  margin-top: 14px;
  position: relative;
}

/* Form messages */
.form-message {
  padding: 12px 16px;
  border-radius: var(--r-sm);
  font-size: .9rem;
  margin-bottom: 16px;
  display: none;
  position: relative;
}
.form-message--success {
  display: block;
  background: rgba(0, 212, 163, 0.08);
  border: 1px solid rgba(0, 212, 163, 0.2);
  color: #00D4A3;
}
.form-message--error {
  display: block;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #EF4444;
}

/* ===== TOAST NOTIFICATIONS ===== */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  pointer-events: all;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 22px;
  min-width: 320px;
  max-width: 420px;
  border-radius: var(--r);
  background: rgba(17, 17, 24, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  box-shadow: 0 16px 48px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.03);
  transform: translateX(120%);
  opacity: 0;
  animation: toast-in .5s cubic-bezier(.16,1,.3,1) forwards;
}
.toast.toast-out {
  animation: toast-out .4s cubic-bezier(.7,0,.84,0) forwards;
}
@keyframes toast-in {
  from { transform: translateX(120%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
@keyframes toast-out {
  from { transform: translateX(0); opacity: 1; }
  to   { transform: translateX(120%); opacity: 0; }
}

.toast-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.toast-icon svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}
.toast--success .toast-icon {
  background: rgba(0, 212, 163, 0.12);
}
.toast--success .toast-icon svg { stroke: #00D4A3; }
.toast--success { border-color: rgba(0, 212, 163, 0.15); }

.toast--error .toast-icon {
  background: rgba(239, 68, 68, 0.12);
}
.toast--error .toast-icon svg { stroke: #EF4444; }
.toast--error { border-color: rgba(239, 68, 68, 0.15); }

.toast-body { flex: 1; min-width: 0; }
.toast-title {
  font-family: 'Outfit', sans-serif;
  font-size: .95rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 2px;
}
.toast-desc {
  font-size: .82rem;
  color: var(--text-dim);
  line-height: 1.45;
}

.toast-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  transition: color .2s;
  flex-shrink: 0;
}
.toast-close:hover { color: var(--white); }
.toast-close svg { width: 14px; height: 14px; }

.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  border-radius: 0 0 var(--r) var(--r);
  animation: toast-progress 5s linear forwards;
}
.toast--success .toast-progress { background: rgba(0, 212, 163, 0.4); }
.toast--error .toast-progress { background: rgba(239, 68, 68, 0.4); }

@keyframes toast-progress {
  from { width: 100%; }
  to   { width: 0%; }
}

/* ===== INLINE VALIDATION ===== */
.form-group input.invalid,
.form-group textarea.invalid,
.form-group select.invalid {
  border-color: rgba(239, 68, 68, 0.5);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.08);
}
.form-group input.valid,
.form-group textarea.valid,
.form-group select.valid {
  border-color: rgba(0, 212, 163, 0.3);
}
.form-helper {
  font-size: .75rem;
  margin-top: 4px;
  color: #EF4444;
  display: none;
}
.form-group input.invalid ~ .form-helper,
.form-group textarea.invalid ~ .form-helper,
.form-group select.invalid ~ .form-helper {
  display: block;
}

/* Hide reCAPTCHA badge — disclosed in footer */
.grecaptcha-badge { visibility: hidden !important; }

/* ========== FOOTER ========== */
.footer {
  padding: 60px 0 40px;
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-col-brand .brand-text { margin-bottom: 12px; display: inline-block; }
.footer-col-brand > p {
  font-size: .85rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 260px;
}

.footer-col h4 {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a {
  font-size: .85rem;
  color: var(--text-muted);
  transition: color .3s;
}
.footer-col a:hover { color: var(--white); }

.footer-bottom {
  text-align: center;
  font-size: .75rem;
  color: var(--text-muted);
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
  .craft-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 640px) {
  :root { --section-gap: 60px; }

  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(9, 9, 15, 0.95); backdrop-filter: blur(24px);
    padding: 20px 24px; gap: 16px;
    border-bottom: 1px solid var(--border);
  }
  .nav-links.open .dropdown {
    display: block; position: static; transform: none;
    background: transparent; border: none; box-shadow: none;
    backdrop-filter: none; padding: 4px 0 0 16px; margin-top: 4px; min-width: 0;
  }

  .hero { min-height: 75vh; padding: 90px 20px 40px; }
  .hero h1 { font-size: 2.4rem; }

  .trust-grid { grid-template-columns: 1fr; }
  .apps-showcase { grid-template-columns: 1fr; }
  .craft-specs { grid-template-columns: 1fr; }
  .newsletter-form { flex-direction: column; }
  .newsletter-box { padding: 32px 24px; }

  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
}
