:root {
  --bg: #0d0f0d;
  --bg-alt: #141714;
  --card: #1a1e1a;
  --text: #eaeaea;
  --text-muted: #a8b0a8;
  --green: #82be0a;
  --green-dark: #5a8c00;
  --border: #2a2f2a;
  --accent: var(--green);
  --accent-dark: var(--green-dark);
  --teralog: #f2820f;
  --teralog-dark: #c66a0c;
  --terarec: #e2222e;
  --terarec-dark: #b81b26;
  --teracontact: #0f64dc;
  --teracontact-dark: #0c4fb0;
  --unify: #2f8fd6;
  --unify-dark: #1f6fae;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', Helvetica, Arial, sans-serif;
  line-height: 1.6;
}

#bg-network {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 15, 13, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0;
}

.brand-logo {
  display: flex;
  align-items: center;
}

.brand-logo img {
  height: 138px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

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

.nav-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #25d366;
  box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-whatsapp .icon-whatsapp {
  width: 19px;
  height: 19px;
  fill: #ffffff;
}

.nav-whatsapp:hover {
  transform: translateY(-2px) scale(1.06);
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.45);
}

.nav-links > li {
  position: relative;
}

.has-dropdown > a::after {
  content: '▾';
  margin-left: 0.3rem;
  font-size: 0.75em;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  min-width: 260px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.5rem;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.has-dropdown:hover .dropdown-menu,
.has-dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dropdown-menu li a {
  display: block;
  padding: 0.6rem 0.8rem;
  border-radius: 6px;
  font-size: 0.92rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.dropdown-menu li a:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.btn {
  display: inline-block;
  padding: 0.7rem 1.6rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--green);
  color: #06210f;
}

.btn-primary:hover {
  background: var(--green-dark);
  transform: translateY(-2px);
}

.btn-outline {
  border-color: var(--green);
  color: var(--green);
}

.btn-disabled {
  background: var(--card);
  color: var(--text-muted);
  border-color: var(--border);
  cursor: not-allowed;
  pointer-events: none;
}

.download-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2.2rem;
  text-align: center;
  max-width: 540px;
  margin: 0 auto;
}

.download-card .contact-form {
  text-align: left;
  background: transparent;
  border: none;
  padding: 0;
}

.version-badge {
  display: inline-block;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.download-note {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-top: 1rem;
}

.btn-outline:hover {
  background: rgba(130, 190, 10, 0.1);
}

.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.icon-whatsapp {
  width: 1.2em;
  height: 1.2em;
  flex-shrink: 0;
  fill: currentColor;
}

.link-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}

.link-whatsapp .icon-whatsapp {
  width: 1.05em;
  height: 1.05em;
}

.icon-email {
  width: 1.05em;
  height: 1.05em;
  flex-shrink: 0;
  fill: currentColor;
}

.link-email {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}

.contact-hq {
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hq-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  vertical-align: middle;
}

.hq-stars {
  display: flex;
  gap: 3px;
}

.hq-stars .star {
  width: 9px;
  height: 9px;
  fill: #ffd54a;
  filter: drop-shadow(0 0 2px rgba(255, 213, 74, 0.85));
  animation: star-twinkle 2.2s ease-in-out infinite;
}

.hq-stars .star-2 {
  animation-delay: 0.7s;
}

@keyframes star-twinkle {
  0%, 100% { opacity: 0.5; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
}

.flag-es {
  width: 26px;
  height: auto;
  display: block;
  border-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.country-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0.4rem 0 1.1rem;
}

.country-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}

.country-link:hover {
  border-color: var(--green);
  transform: translateY(-2px);
}

.flag-icon {
  width: 20px;
  height: 15px;
  border-radius: 2px;
  display: inline-block;
  vertical-align: middle;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  transition: border-color 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

.lang-switch:hover {
  border-color: var(--green);
  color: var(--text);
}


/* Hero */
.hero {
  padding: 6rem 0 5rem;
  text-align: center;
  background: radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 60%);
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 1.2rem;
}

.hero h1 span {
  color: var(--accent);
}

.hero p {
  max-width: 640px;
  margin: 0 auto 2.2rem;
  color: var(--text-muted);
  font-size: 1.1rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-rotator {
  position: relative;
  max-width: 620px;
  margin: 0 auto 2.2rem;
  min-height: 170px;
}

.rotator-slide {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  animation: rotatorFade 0.5s ease;
}

.rotator-slide.active {
  display: flex;
}

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

.rotator-logo {
  height: 88px;
  width: auto;
  object-fit: contain;
  transform-origin: bottom center;
}

.rotator-slide.active .rotator-logo {
  animation: logoRise 1.1s ease forwards;
}

@keyframes logoRise {
  0% { transform: scale(0.55); opacity: 0; }
  70% { transform: scale(2.15); opacity: 1; }
  100% { transform: scale(2); opacity: 1; }
}

.rotator-logo--banner {
  height: 82px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.rotator-text {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 560px;
}

.rotator-text strong {
  color: var(--text);
}

.rotator-dots {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 1.3rem;
}

.rotator-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: none;
  background: var(--border);
  cursor: pointer;
  padding: 0;
  transition: background 0.2s ease, transform 0.2s ease;
}

.rotator-dot.active {
  background: var(--green);
  transform: scale(1.3);
}

.breadcrumb {
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: var(--accent);
}

/* Sections */
section {
  padding: 5rem 0;
}

.section-title {
  text-align: center;
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  font-weight: 700;
  margin-bottom: 0.8rem;
  letter-spacing: -0.02em;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 3rem;
}

/* Products / Feature grid */
.products {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.75rem;
}

.product-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2.2rem 1.8rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.product-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.product-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
}

.product-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.6rem;
}

.product-card p {
  color: var(--text-muted);
  font-size: 0.98rem;
  margin-bottom: 1.4rem;
}

.product-card a {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.92rem;
}

.card-links {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.card-logo {
  display: block;
  width: 100%;
  max-width: 220px;
  height: auto;
  margin: 0 auto 1.4rem;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.model-photo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 140px;
  background: #f4f5f4;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 1.2rem;
  padding: 1rem;
}

.model-photo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.model-specs {
  list-style: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 0 0 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.model-specs li::before {
  content: '•';
  color: var(--accent);
  margin-right: 0.5rem;
}

/* Contact */
.contact-section {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 2.5rem;
  max-width: 900px;
  margin: 0 auto;
  align-items: start;
}

.contact-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.9rem;
}

.contact-info a {
  color: var(--accent);
  font-weight: 600;
}

.contact-info a.btn-whatsapp {
  background: var(--green);
  color: #06210f;
}

.contact-info a.btn-whatsapp:hover {
  background: var(--green-dark);
  transform: translateY(-2px);
}

.contact-info p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.8rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.8rem 1rem;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
}

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

.contact-form button {
  align-self: flex-start;
}

.form-narrow {
  max-width: 620px;
  margin: 0 auto;
}

.form-msg {
  margin-top: 1rem;
  padding: 0.9rem 1.1rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
}

.form-msg.success {
  background: color-mix(in srgb, var(--green) 14%, transparent);
  color: var(--green);
  border: 1px solid color-mix(in srgb, var(--green) 30%, transparent);
}

.form-msg.error {
  background: rgba(230, 90, 90, 0.12);
  color: #e65a5a;
  border: 1px solid rgba(230, 90, 90, 0.3);
}

@media (max-width: 700px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

/* Mission */
.mission {
  text-align: center;
}

.mission p {
  max-width: 700px;
  margin: 0 auto;
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* Specs list */
.specs-list {
  max-width: 780px;
  margin: 0 auto;
  list-style: none;
  display: grid;
  gap: 0.9rem;
}

.specs-list li {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.3rem;
  display: flex;
  gap: 0.8rem;
  align-items: baseline;
}

.specs-list li::before {
  content: '✓';
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
}

/* FAQ */
.faq-list {
  max-width: 760px;
  margin: 0 auto;
}

details {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.1rem 1.4rem;
  margin-bottom: 0.9rem;
}

summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: '+';
  float: right;
  color: var(--accent);
  font-size: 1.2rem;
}

details[open] summary::after {
  content: '−';
}

details p {
  margin-top: 0.9rem;
  color: var(--text-muted);
}

/* CTA band */
.cta-band {
  background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 14%, var(--bg)), var(--bg));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.cta-band h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin-bottom: 1.2rem;
}

/* Footer */
footer {
  padding: 3.5rem 0 2rem;
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.footer-col h4 {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: var(--accent);
}

.footer-col p, .footer-col a {
  color: var(--text-muted);
  font-size: 0.92rem;
  display: block;
  margin-bottom: 0.5rem;
}

.footer-col a:hover {
  color: var(--text);
}

.footer-col a.link-whatsapp,
.footer-col a.link-email {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}

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

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

/* AI chat widget */
.ai-widget {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 200;
}

.ai-toggle {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: none;
  background: var(--green);
  color: #06210f;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s ease, background 0.2s ease;
}

.ai-toggle svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.ai-toggle:hover {
  background: var(--green-dark);
  transform: translateY(-2px);
}

.ai-panel {
  position: absolute;
  right: 0;
  bottom: 72px;
  width: 320px;
  max-width: calc(100vw - 2rem);
  height: 440px;
  max-height: 70vh;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ai-panel[hidden] {
  display: none;
}

.ai-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  background: var(--bg-alt);
}

.ai-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

.ai-close:hover {
  color: var(--text);
}

.ai-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.ai-msg {
  max-width: 82%;
  padding: 0.55rem 0.8rem;
  border-radius: 10px;
  font-size: 0.9rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

.ai-msg-bot {
  align-self: flex-start;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text);
}

.ai-msg-user {
  align-self: flex-end;
  background: var(--green);
  color: #06210f;
}

.ai-msg-loading {
  color: var(--text-muted);
  font-style: italic;
}

.ai-form {
  display: flex;
  gap: 0.5rem;
  padding: 0.8rem;
  border-top: 1px solid var(--border);
}

.ai-input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
}

.ai-input:focus {
  outline: none;
  border-color: var(--green);
}

.ai-send {
  width: 40px;
  border-radius: 8px;
  border: none;
  background: var(--green);
  color: #06210f;
  font-size: 1.1rem;
  cursor: pointer;
}

.ai-send:hover {
  background: var(--green-dark);
}

@media (max-width: 480px) {
  .ai-widget {
    right: 1rem;
    bottom: 1rem;
  }

  .ai-panel {
    width: calc(100vw - 2rem);
  }
}
