/* ─── VARIABLES GLOBALES DE DISEÑO ─── */
:root {
  --radius: 16px;
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --accent: #00b4d8;          /* Azul cian tecnológico de Notebookst */
  --accent-light: rgba(0, 180, 216, 0.1);
}

/* PALETA POR DEFECTO: MODO OSCURO (PREMIUM) */
document, [data-theme="dark"] {
  --bg: #0b0f19;
  --surface: #111827;
  --surface-card: #1f2937;
  --text: #f9fafb;
  --text-muted: #9ca3af;
  --border: rgba(255, 255, 255, 0.07);
  --input-bg: #0b0f19;
  --btn-nav-bg: rgba(0, 180, 216, 0.1);
}

/* INTERCAMBIO DINÁMICO: MODO CLARO (MINIMALISTA / APPLE STYLE) */
[data-theme="light"] {
  --bg: #fafafa;
  --surface: #ffffff;
  --surface-card: #f3f4f6;
  --text: #0f172a;
  --text-muted: #475569;
  --border: rgba(15, 23, 42, 0.08);
  --input-bg: #f8fafc;
  --btn-nav-bg: rgba(0, 180, 216, 0.08);
}

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

html {
  scroll-behavior: smooth;
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, .logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  letter-spacing: -0.03em;
}

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

/* Animaciones Reveal */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── BOTÓN SELECTOR DE TEMA (THEME TOGGLE) ─── */
#theme-toggle {
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

#theme-toggle:hover {
  background: var(--surface-card);
  border-color: var(--text-muted);
}

/* Control dinámico de los Iconos SVG internos */
[data-theme="dark"] .sun-icon { display: block; }
[data-theme="dark"] .moon-icon { display: none; }

[data-theme="light"] .sun-icon { display: none; }
[data-theme="light"] .moon-icon { display: block; }

/* Contenedor del Navbar derecho */
.nav-right-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Navbar */
#navbar {
  position: sticky;
  top: 0;
  background: var(--bg);
  opacity: 0.96;
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  transition: background-color 0.3s ease;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-size: 1.25rem;
}

.logo-mark {
  background: var(--text);
  color: var(--bg);
  padding: 4px 10px;
  font-size: 0.85rem;
  border-radius: 6px;
  transition: background-color 0.3s, color 0.3s;
}

#navbar-menu {
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 32px;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.95rem;
  transition: var(--transition-smooth);
}

.nav-links a:hover {
  color: var(--text);
}

/* Botones */
.btn-primary, .btn-secondary, .btn-nav {
  display: inline-block;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: var(--radius);
  transition: var(--transition-smooth);
  text-align: center;
}

.btn-primary {
  background: var(--text);
  color: var(--bg);
  padding: 14px 32px;
  font-weight: 600;
}

.btn-primary:hover {
  background: var(--accent);
  color: #0b0f19;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 180, 216, 0.25);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 14px 32px;
}

.btn-secondary:hover {
  background: var(--surface-card);
}

.btn-nav {
  background: var(--btn-nav-bg);
  color: var(--accent);
  padding: 10px 20px;
  font-weight: 600;
}

.btn-nav:hover {
  background: var(--accent);
  color: #0b0f19;
}

.btn-block {
  display: block;
  width: 100%;
}

/* Hamburguesa */
#navbar-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
}

.hamburger-line {
  width: 24px;
  height: 2px;
  background: var(--text);
}

/* Hero */
#hero {
  padding: 160px 0 100px 0;
  text-align: center;
}

.hero-container {
  max-width: 850px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-block;
  background: var(--surface-card);
  border: 1px solid var(--border);
  padding: 6px 16px;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: 50px;
  margin-bottom: 32px;
  color: var(--text-muted);
}

#hero h1 {
  font-size: 4.2rem;
  line-height: 1.05;
  margin-bottom: 28px;
}

.text-gradient {
  color: var(--accent);
  background: linear-gradient(135deg, #00b4d8, #0077b6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub {
  font-size: 1.25rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 44px;
  font-weight: 300;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 20px;
}

/* Secciones Generales */
section {
  padding: 120px 0;
}

.section-header {
  max-width: 650px;
  margin-bottom: 72px;
}

.section-tag {
  color: var(--accent);
  text-transform: uppercase;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 12px;
}

.section-header h2 {
  font-size: 2.6rem;
  margin-bottom: 20px;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.15rem;
  line-height: 1.6;
}

/* Grilla Servicios */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px;
}

.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 48px 36px;
  border-radius: var(--radius);
  transition: var(--transition-smooth);
}

.service-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 180, 216, 0.3);
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.icon-wrapper {
  color: var(--accent);
  margin-bottom: 24px;
  display: inline-block;
}

.service-card h3 {
  font-size: 1.4rem;
  margin-bottom: 16px;
}

.service-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 24px;
}

/* Productos Desarrollados */
.product-featured {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 64px;
  border-radius: var(--radius);
  align-items: center;
}

.product-badge {
  display: inline-block;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 6px;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.product-info h3 {
  font-size: 2.2rem;
  margin-bottom: 16px;
}

.by-brand {
  font-size: 1.1rem;
  color: var(--text-muted);
  font-weight: 300;
}

.product-tagline {
  font-size: 1.25rem;
  color: var(--text);
  font-weight: 600;
  margin-bottom: 14px;
}

.product-desc {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 28px;
}

.product-features-grid {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 32px;
}

.product-features-grid li {
  font-size: 0.95rem;
  color: var(--text-muted);
  position: relative;
  padding-left: 24px;
}

.product-features-grid li::before {
  content: "✦";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.tech-stack-container {
  margin-bottom: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.tech-stack-container .stack-title {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  color: #6b7280;
  font-weight: 600;
  margin-bottom: 12px;
}

/* Notebookst Preview UI Mockup (Se queda oscuro para preservar la fidelidad de la app) */
.mockup-window-notebookst {
  background: #0b0f19;
  border: 1px solid #1e293b;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0,0,0,0.3);
}

.mockup-window-notebookst .mockup-header {
  background: #0f172a;
  padding: 14px 18px;
  border-bottom: 1px solid #1e293b;
  display: flex;
  align-items: center;
}

.mockup-window-notebookst .mockup-header .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
}
.mockup-window-notebookst .mockup-header .dot.red { background: #ff5f56; }
.mockup-window-notebookst .mockup-header .dot.yellow { background: #ffbd2e; }
.mockup-window-notebookst .mockup-header .dot.green { background: #27c93f; }

.mockup-body-preview {
  padding: 36px;
  background-color: #0b0f19;
  color: #f8fafc;
}

.preview-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.preview-logo {
  background: var(--accent);
  color: #0b0f19;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.85rem;
}

.preview-title { font-weight: 600; font-size: 0.95rem; }

.preview-card-list { display: flex; flex-direction: column; gap: 14px; }

.p-card {
  background: #111827;
  border: 1px solid #1e293b;
  padding: 16px 20px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.p-card-title { font-size: 0.9rem; font-weight: 600; }
.p-card-sub { font-size: 0.75rem; color: #6b7280; margin-top: 4px; }
.p-status { position: absolute; right: 20px; top: 50%; transform: translateY(-50%); font-size: 0.7rem; padding: 3px 10px; border-radius: 6px; font-weight: 600; }

.p-card.pending .p-status { background: rgba(234, 179, 8, 0.12); color: #f1c40f; }
.p-card.progress .p-status { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }

.preview-progress-bar {
  margin-top: 8px;
  background: #111827;
  padding: 18px;
  border-radius: 10px;
  border: 1px solid #1e293b;
}

.p-progress-text { display: flex; justify-content: space-between; font-size: 0.8rem; color: #9ca3af; margin-bottom: 10px; }
.p-progress-track { height: 6px; background: #1f2937; border-radius: 10px; overflow: hidden; }
.p-progress-fill { height: 100%; background: var(--accent); border-radius: 10px; }

/* Acerca de */
.about-wrapper {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 80px 40px;
  border-radius: var(--radius);
  text-align: center;
}

.about-content h2 { font-size: 2.4rem; margin-bottom: 24px; }
.about-content p { max-width: 760px; margin: 0 auto; font-size: 1.15rem; line-height: 1.75; color: var(--text-muted); font-weight: 300; }

/* CTA & Formulario */
.cta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.cta-text h2 { font-size: 2.8rem; margin-bottom: 24px; }
.cta-text p { color: var(--text-muted); font-size: 1.15rem; line-height: 1.7; }

.cta-form-container {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 40px;
  border-radius: var(--radius);
}

.lead-form { display: flex; flex-direction: column; gap: 20px; }
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-group label { font-size: 0.85rem; font-weight: 600; text-transform: uppercase; color: var(--text-muted); letter-spacing: 0.03em; }

.form-group input, .form-group select {
  background: var(--input-bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 14px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  transition: var(--transition-smooth);
}

.form-group input:focus, .form-group select:focus {
  outline: none;
  border-color: var(--accent);
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 80px 0 40px 0;
  font-size: 0.9rem;
  background: var(--bg);
}

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

.footer-brand p { color: var(--text-muted); margin-top: 16px; max-width: 320px; line-height: 1.6; }
.footer-links h4 { margin-bottom: 20px; color: var(--text); font-size: 1rem; }
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 12px; }
.footer-links a { text-decoration: none; color: var(--text-muted); transition: var(--transition-smooth); }
.footer-links a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 24px; color: var(--text-muted); }

/* Adaptabilidad Responsiva */
@media (max-width: 968px) {
  .product-featured, .cta-grid { grid-template-columns: 1fr; gap: 48px; }
}

@media (max-width: 768px) {
  #navbar-toggle { display: flex; }

  #navbar-menu {
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    background: var(--bg);
    flex-direction: column;
    padding: 40px 24px;
    gap: 32px;
    border-bottom: 1px solid var(--border);
    display: none;
  }

  #navbar-menu.active { display: flex; }
  .nav-links { flex-direction: column; align-items: center; gap: 20px; }
  #hero h1 { font-size: 2.8rem; }
  .section-header h2 { font-size: 2rem; }
  .product-featured { padding: 32px 24px; }
  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
}