/* NASC IG — tema inspirado en Instagram */
:root {
  --bg-deep: #1a0a1f;
  --bg-card: rgba(28, 14, 36, 0.9);
  --border: rgba(255, 255, 255, 0.1);
  --text-primary: #faf5ff;
  --text-secondary: #d4b8e8;
  --text-muted: #9b7ab0;
  --ig-purple: #833ab4;
  --ig-pink: #e1306c;
  --ig-orange: #f77737;
  --ig-yellow: #fcaf45;
  --gradient-ig: linear-gradient(
    135deg,
    var(--ig-purple) 0%,
    var(--ig-pink) 45%,
    var(--ig-orange) 75%,
    var(--ig-yellow) 100%
  );
  --gradient-btn: linear-gradient(135deg, #c13584, #e1306c, #f77737);
  --shadow-sm: 0 4px 24px rgba(131, 58, 180, 0.2);
  --shadow-md: 0 12px 48px rgba(0, 0, 0, 0.4);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --transition: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  --font: "Outfit", system-ui, sans-serif;
  --font-brand: "Syne", var(--font);
  --container-max: min(100% - 2rem, 44rem);
  --container-pad: clamp(1rem, 4vw, 1.5rem);
  --touch-min: 48px;
  --bp-tablet: 640px;
  --bp-desktop: 1024px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  min-height: 100dvh;
  line-height: 1.55;
  overflow-x: hidden;
}

[hidden] { display: none !important; }

.bg-gradient {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 45% at 50% -15%, rgba(131, 58, 180, 0.35), transparent),
    radial-gradient(ellipse 45% 35% at 100% 30%, rgba(225, 48, 108, 0.2), transparent),
    radial-gradient(ellipse 40% 30% at 0% 70%, rgba(247, 119, 55, 0.15), transparent),
    linear-gradient(180deg, #1a0a1f 0%, #2d1238 45%, #1a0a1f 100%);
  z-index: -2;
}

.bg-noise {
  position: fixed;
  inset: 0;
  opacity: 0.035;
  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.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  z-index: -1;
  pointer-events: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.header {
  position: relative;
  text-align: center;
  padding: calc(clamp(2rem, 6vw, 3.5rem) + env(safe-area-inset-top, 0))
    max(var(--container-pad), env(safe-area-inset-right, 0px))
    1rem
    max(var(--container-pad), env(safe-area-inset-left, 0px));
  animation: fadeDown 0.65s ease-out;
}

.hero-actions {
  position: absolute;
  top: calc(0.65rem + env(safe-area-inset-top, 0px));
  right: max(var(--container-pad), env(safe-area-inset-right, 0px));
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  z-index: 2;
}

.hero-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.65rem;
  height: 2.65rem;
  padding: 0;
  font-size: 1.2rem;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 14px;
  cursor: pointer;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transition:
    transform var(--transition),
    box-shadow var(--transition),
    border-color var(--transition),
    filter var(--transition);
}

.hero-action-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow:
    0 8px 28px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.hero-action-btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.65);
  outline-offset: 2px;
}

.hero-action-btn--faq {
  background: linear-gradient(
    145deg,
    rgba(34, 197, 94, 0.88) 0%,
    rgba(22, 163, 74, 0.82) 100%
  );
}

.hero-action-btn--faq:hover {
  filter: brightness(1.08);
}

.hero-action-btn--features {
  background: linear-gradient(
    145deg,
    rgba(252, 175, 69, 0.92) 0%,
    rgba(247, 119, 55, 0.85) 100%
  );
  color: #1a0a1f;
}

.hero-action-btn--features:hover {
  filter: brightness(1.06);
}

.ig-modal-wrap .modal-backdrop {
  --bs-backdrop-opacity: 0.72;
}

.ig-modal {
  background: rgba(28, 14, 36, 0.96);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(20px);
  color: var(--text-primary);
  box-shadow: var(--shadow-md);
}

.ig-modal .modal-header {
  border-bottom: 1px solid var(--border);
  padding: 1.1rem 1.25rem;
}

.ig-modal .modal-title {
  font-family: var(--font);
  font-weight: 700;
  font-size: 1.1rem;
}

.ig-modal .modal-body {
  padding: 1rem 1.25rem 1.25rem;
}

.ig-modal-item + .ig-modal-item {
  margin-top: 1.1rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--border);
}

.ig-modal-item__title {
  font-size: 0.98rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text-primary);
}

.ig-modal-item__text {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

.ig-modal-item__text strong {
  color: var(--text-secondary);
  font-weight: 600;
}

.ig-modal-wrap .tooltip .tooltip-inner {
  font-family: var(--font);
  font-size: 0.8rem;
  background: rgba(28, 14, 36, 0.95);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
}


.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(48px, 12vw, 58px);
  height: clamp(48px, 12vw, 58px);
  font-size: clamp(1.75rem, 5vw, 2.1rem);
  border-radius: 18px;
  background: linear-gradient(
    90deg,
    var(--ig-purple),
    var(--ig-pink),
    var(--ig-orange),
    var(--ig-yellow),
    var(--ig-pink),
    var(--ig-purple)
  );
  background-size: 300% 100%;
  color: #fff;
  box-shadow: 0 8px 32px rgba(225, 48, 108, 0.35);
  animation: logo-gradient-flow 3.5s linear infinite;
}

.logo-text {
  font-family: var(--font-brand);
  font-size: clamp(2.2rem, 9vw, 3.5rem);
  font-weight: 800;
  letter-spacing: 0.06em;
  background: linear-gradient(
    90deg,
    var(--ig-purple) 0%,
    var(--ig-pink) 18%,
    var(--ig-orange) 36%,
    var(--ig-yellow) 54%,
    var(--ig-pink) 72%,
    var(--ig-purple) 90%,
    var(--ig-pink) 100%
  );
  background-size: 300% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: logo-gradient-flow 3.5s linear infinite;
  filter: drop-shadow(0 0 18px rgba(225, 48, 108, 0.25));
}

.tagline {
  font-size: clamp(1rem, 3.2vw, 1.2rem);
  font-weight: 600;
  color: var(--text-primary);
  max-width: 36rem;
  margin: 0 auto 0.5rem;
  line-height: 1.45;
}

.tagline-sub {
  font-size: clamp(0.85rem, 2.5vw, 0.95rem);
  font-weight: 600;
  color: #ffffff;
  max-width: 34rem;
  margin: 0.75rem auto 0;
  line-height: 1.45;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 max(var(--container-pad), env(safe-area-inset-right, 0px))
    clamp(1.25rem, 3vw, 2rem)
    max(var(--container-pad), env(safe-area-inset-left, 0px));
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}

.search-card {
  padding: clamp(1.25rem, 3vw, 1.75rem);
  margin-bottom: 1.25rem;
  animation: fadeUp 0.55s ease-out 0.1s both;
}

.search-card:focus-within {
  box-shadow: var(--shadow-md);
  border-color: rgba(225, 48, 108, 0.25);
}

.input-label {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.65rem;
  color: #ffffff;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.input-group .btn-primary { width: 100%; }

.input-field {
  position: relative;
  flex: 1;
  min-width: 0;
}

.input-icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.2rem;
  pointer-events: none;
}

.url-input {
  width: 100%;
  min-height: var(--touch-min);
  padding: 0.85rem 1rem 0.85rem 2.65rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.url-input::placeholder { color: var(--text-muted); }

.url-input:focus {
  border-color: rgba(225, 48, 108, 0.5);
  box-shadow: 0 0 0 3px rgba(131, 58, 180, 0.2);
}

.hint {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #ffffff;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: var(--touch-min);
  padding: 0 1.35rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--transition), box-shadow var(--transition), opacity var(--transition);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.btn-primary {
  background: var(--gradient-btn);
  color: #fff;
  box-shadow: 0 4px 24px rgba(225, 48, 108, 0.35);
}

.btn-primary:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(131, 58, 180, 0.4);
}

.btn-loader {
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.alert {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  animation: fadeUp 0.35s ease-out;
}

.alert-error {
  background: rgba(225, 48, 108, 0.15);
  border: 1px solid rgba(225, 48, 108, 0.4);
  color: #fecdd3;
}

.alert-close {
  margin-left: auto;
  background: none;
  border: none;
  color: inherit;
  font-size: 1.35rem;
  cursor: pointer;
  opacity: 0.7;
}

.loader-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2rem;
  margin-bottom: 1rem;
}

.loader-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border);
  border-top-color: var(--ig-pink);
  border-radius: 50%;
  animation: spin 0.85s linear infinite;
}

.loader-text { color: var(--text-secondary); }

.preview-card {
  padding: clamp(1.25rem, 3vw, 1.75rem);
  margin-bottom: 2rem;
  animation: fadeUp 0.5s ease-out;
}

.preview-layout {
  display: grid;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.preview-media {
  position: relative;
  width: min(72vw, 13.5rem);
  max-width: 240px;
  margin-inline: auto;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 9 / 16;
  max-height: min(58vh, 22rem);
  background: #000;
  box-shadow: var(--shadow-md);
}

.preview-body {
  min-width: 0;
}

.preview-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.preview-badge {
  position: absolute;
  bottom: 0.65rem;
  left: 0.65rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--gradient-btn);
  border-radius: 999px;
  color: #fff;
}

.preview-username {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ig-pink);
  margin-bottom: 0.5rem;
}

.preview-description {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 0.85rem;
  overflow-wrap: anywhere;
}

.preview-meta {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.preview-meta li {
  font-size: 0.8rem;
  padding: 0.35rem 0.75rem;
  background: rgba(131, 58, 180, 0.2);
  border: 1px solid rgba(225, 48, 108, 0.25);
  border-radius: 999px;
  color: var(--text-secondary);
}

.download-row {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.btn-download {
  width: 100%;
  background: var(--gradient-btn);
  color: #fff;
  box-shadow: 0 4px 20px rgba(225, 48, 108, 0.3);
}

.btn-download:not(:disabled):hover {
  transform: translateY(-2px);
}

.btn-ghost {
  width: 100%;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  color: var(--text-primary);
  border-color: rgba(225, 48, 108, 0.4);
}

.progress-section {
  margin-top: 1.25rem;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.progress-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--gradient-ig);
  border-radius: 999px;
  transition: width 0.35s ease;
}

.footer {
  text-align: center;
  padding: 1.15rem max(var(--container-pad), env(safe-area-inset-right, 0px))
    calc(1.5rem + env(safe-area-inset-bottom, 0))
    max(var(--container-pad), env(safe-area-inset-left, 0px));
  color: #ffffff;
  font-weight: 600;
  font-size: 0.85rem;
}

.footer__social-title {
  margin: 1rem 0 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.nasc-footer__social {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.nasc-footer__social a {
  font-size: 1.35rem;
  transition: transform var(--transition), filter var(--transition), opacity var(--transition);
}

.nasc-footer__social .social--instagram {
  color: #e1306c;
}

.nasc-footer__social .social--x {
  color: #ffffff;
}

.nasc-footer__social .social--github {
  color: #f0f6fc;
}

.nasc-footer__social .social--tiktok {
  color: #25f4ee;
}

.nasc-footer__social a:hover {
  transform: translateY(-2px);
  filter: brightness(1.15);
}

@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes logo-gradient-flow {
  0% { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* —— Tablet (640px+) —— */
@media (min-width: 640px) {
  :root {
    --container-max: min(100% - 3rem, 46rem);
    --container-pad: clamp(1.25rem, 3vw, 2rem);
  }

  .header {
    padding-bottom: 1.25rem;
  }

  .tagline-sub {
    max-width: 38rem;
  }

  .input-group {
    flex-direction: row;
    align-items: stretch;
  }

  .input-field {
    flex: 1;
    min-width: 0;
  }

  .input-group .btn-primary {
    width: auto;
    flex-shrink: 0;
    min-width: 7.5rem;
  }

  .preview-layout {
    grid-template-columns: minmax(9.5rem, 11.5rem) 1fr;
    align-items: start;
    gap: 1.5rem;
  }

  .preview-media {
    margin-inline: 0;
    width: 100%;
    max-width: none;
    max-height: 20rem;
  }

  .download-row {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .btn-download,
  .btn-ghost {
    width: auto;
    flex: 1;
    min-width: 10rem;
  }

}

/* —— Desktop (1024px+) —— */
@media (min-width: 1024px) {
  :root {
    --container-max: min(100% - 4rem, 54rem);
    --container-pad: 2rem;
  }

  .header {
    padding-top: calc(3.5rem + env(safe-area-inset-top, 0));
    padding-bottom: 1.5rem;
  }

  .logo {
    gap: 1.1rem;
    margin-bottom: 1rem;
  }

  .logo-icon {
    width: 58px;
    height: 58px;
    font-size: 2.1rem;
  }

  .logo-text {
    font-size: 4.25rem;
  }

  .tagline {
    font-size: 1.35rem;
    max-width: 40rem;
  }

  .tagline-sub {
    font-size: 1rem;
    max-width: 38rem;
  }

  .tagline-sub {
    font-size: 0.95rem;
    max-width: 42rem;
  }

  .search-card,
  .preview-card {
    padding: 2rem;
  }

  .preview-layout {
    grid-template-columns: minmax(11rem, 15rem) 1fr;
    gap: 2rem;
    margin-bottom: 1.75rem;
  }

  .preview-media {
    max-height: 26rem;
    border-radius: var(--radius-lg);
  }

  .preview-username {
    font-size: 1.15rem;
  }

  .preview-description {
    font-size: 1rem;
  }

  .footer {
    padding-top: 1.35rem;
    font-size: 0.9rem;
  }
}

/* —— Móvil estrecho —— */
@media (max-width: 380px) {
  .hero-action-btn {
    width: 2.45rem;
    height: 2.45rem;
    font-size: 1.1rem;
    border-radius: 12px;
  }

  .hero-actions {
    gap: 0.4rem;
    top: calc(0.5rem + env(safe-area-inset-top, 0px));
  }

  .logo-text {
    font-size: clamp(2rem, 11vw, 2.45rem);
    letter-spacing: 0.04em;
  }

  .tagline {
    font-size: 0.95rem;
  }

  .tagline-sub {
    font-size: 0.78rem;
  }

  .btn {
    padding-inline: 1rem;
    font-size: 0.95rem;
  }

  .hint {
    font-size: 0.75rem;
  }

  .preview-media {
    width: min(78vw, 12rem);
  }
}

/* —— Tablet apaisado / móvil horizontal —— */
@media (max-height: 500px) and (orientation: landscape) {
  .header {
    padding-top: calc(1rem + env(safe-area-inset-top, 0));
    padding-bottom: 0.5rem;
  }

  .logo {
    margin-bottom: 0.35rem;
  }

  .tagline-sub {
    margin-top: 0.5rem;
    font-size: 0.78rem;
  }

  .preview-media {
    max-height: min(70vh, 14rem);
    width: auto;
  }

  .preview-layout {
    grid-template-columns: minmax(7rem, 9rem) 1fr;
    gap: 1rem;
  }
}

/* WhatsApp flotante */
.nasc-whatsapp-float {
  position: fixed;
  width: 56px;
  height: 56px;
  bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
  right: calc(1.25rem + env(safe-area-inset-right, 0px));
  background: #25d366;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  text-decoration: none;
  z-index: 999;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.45);
  transition: transform 0.2s ease, background 0.2s ease;
}

.nasc-whatsapp-float:hover {
  background: #20ba5a;
  color: #fff;
  transform: scale(1.08);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
