/* TrackPoint — Industrial Precision Design System */
:root {
  --primary: #7b0100;
  --primary-dark: #520100;
  --primary-soft: #ffdad4;
  --charcoal: #111827;
  --slate: #1e293b;
  --whatsapp: #059669;
  --whatsapp-bright: #25d366;
  --whatsapp-hover: #047857;
  --surface: #f7f9fb;
  --surface-low: #f2f4f6;
  --surface-high: #e6e8ea;
  --surface-variant: #e0e3e5;
  --white: #ffffff;
  --text: #191c1e;
  --text-muted: #575e70;
  --outline: #e2e8f0;
  --radius: 0.25rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --container: 1440px;
  --gutter: 20px;
  --font-display: "Montserrat", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 24px rgba(17, 24, 39, 0.08);
  --header-h: 64px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Typography */
.h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0;
}

.h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 1.875rem);
  line-height: 1.2;
  margin: 0;
}

.h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.2;
  margin: 0;
}

.label-caps {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.33;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.body-lg {
  font-size: 1.125rem;
  line-height: 1.55;
}

.body-sm {
  font-size: 0.875rem;
  line-height: 1.4;
  font-weight: 500;
}

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

.text-primary {
  color: var(--primary);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-lg);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.97);
}

.btn-whatsapp {
  background: var(--whatsapp);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}

.btn-whatsapp:hover {
  background: var(--whatsapp-hover);
}

.btn-secondary {
  background: var(--surface-high);
  color: var(--text);
  border-color: var(--surface-variant);
}

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

.btn-primary {
  background: var(--primary);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-block {
  width: 100%;
}

.icon {
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
}

.icon-lg {
  width: 2rem;
  height: 2rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(247, 249, 251, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--surface-variant);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 1rem;
}

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

.brand img {
  height: 40px;
  width: auto;
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 1.25rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.header-cta {
  display: none;
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--surface-variant);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--text);
  cursor: pointer;
}

.nav-mobile {
  display: none;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem var(--gutter) 1.25rem;
  background: var(--white);
  border-bottom: 1px solid var(--surface-variant);
}

.nav-mobile.is-open {
  display: flex;
}

.nav-mobile .nav-link {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--surface-variant);
}

.nav-mobile .btn {
  margin-top: 0.5rem;
}

@media (min-width: 768px) {
  .nav-desktop,
  .header-cta {
    display: flex;
  }

  .menu-toggle {
    display: none;
  }

  .nav-mobile {
    display: none !important;
  }
}

/* Hero */
.hero {
  position: relative;
  padding: 2.5rem 0 4rem;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 10% 20%, rgba(123, 1, 0, 0.08), transparent 55%),
    radial-gradient(ellipse 70% 50% at 90% 10%, rgba(30, 41, 59, 0.06), transparent 50%),
    linear-gradient(135deg, var(--white) 0%, var(--surface-low) 100%);
  z-index: -1;
}

.hero-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 2.5rem;
  }
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 0.5rem;
}

@media (min-width: 640px) {
  .hero-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

/* Dashboard mockup */
.mockup {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border: 1px solid var(--surface-variant);
  border-top: 4px solid var(--primary);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  padding: 1rem;
  max-width: 32rem;
  margin-inline: auto;
  animation: float-in 0.8s ease both;
}

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

.mockup-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--surface-variant);
}

.mockup-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary);
}

.badge-online {
  background: rgba(176, 45, 31, 0.1);
  color: #b02d1f;
  padding: 0.25rem 0.5rem;
  border-radius: 0.125rem;
}

.mockup-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.stat-box {
  background: var(--surface);
  border: 1px solid var(--surface-variant);
  border-radius: var(--radius);
  padding: 0.5rem 0.75rem;
}

.stat-box strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 0.25rem;
}

.tropas {
  border: 1px solid var(--surface-variant);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.tropas-label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
}

.tropa-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--surface-variant);
  font-size: 0.875rem;
  font-weight: 600;
}

.tropa-row:last-child {
  border-bottom: 0;
}

.tropa-row span:last-child {
  font-weight: 500;
  color: var(--text-muted);
}

/* Sections */
.section {
  padding: 2.5rem 0;
}

.section-alt {
  background: var(--surface-low);
}

.section-head {
  text-align: center;
  max-width: 40rem;
  margin: 0 auto 2.5rem;
}

.section-head p {
  margin: 1rem 0 0;
}

/* Solutions strip */
.solutions {
  display: grid;
  gap: 1rem;
}

@media (min-width: 768px) {
  .solutions {
    grid-template-columns: repeat(3, 1fr);
  }
}

.solution-item {
  background: var(--white);
  border: 1px solid var(--outline);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

.solution-item h3 {
  font-size: 1rem;
  margin: 0 0 0.5rem;
}

.solution-item p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Modules */
.modules-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 768px) {
  .modules-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.module-card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--surface-variant);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}

.module-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--surface-variant);
  transition: background 0.2s ease;
}

.module-card:hover {
  box-shadow: var(--shadow-md);
}

.module-card:hover::before {
  background: var(--primary);
}

.module-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: var(--radius-lg);
  background: var(--surface-low);
  color: var(--primary);
  margin-bottom: 1rem;
}

.module-card h3 {
  margin-bottom: 0.5rem;
}

.module-card p {
  margin: 0;
  color: var(--text-muted);
}

/* FAQ */
.faq-list {
  max-width: 48rem;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-item {
  background: var(--white);
  border: 1px solid var(--surface-variant);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 1rem 1.25rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  color: var(--primary);
  font-size: 1.25rem;
  font-weight: 700;
  flex-shrink: 0;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item p {
  margin: 0;
  padding: 0 1.25rem 1.25rem;
  color: var(--text-muted);
}

/* Contact */
.contact-wrap {
  max-width: 56rem;
  margin-inline: auto;
  display: grid;
  background: var(--white);
  border: 1px solid var(--surface-variant);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

@media (min-width: 768px) {
  .contact-wrap {
    grid-template-columns: 2fr 3fr;
  }
}

.contact-aside {
  background: var(--charcoal);
  color: var(--white);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
}

.contact-aside p {
  color: #99a4bb;
  margin: 0.75rem 0 0;
}

.contact-perks {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.perk {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
}

.perk svg {
  color: var(--primary-soft);
  flex-shrink: 0;
}

.contact-form {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.field label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--text);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--surface-variant);
  border-radius: var(--radius);
  padding: 0.625rem 0.75rem;
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: inset 0 0 0 1px var(--primary);
}

.field textarea {
  min-height: 96px;
  resize: vertical;
}

.field-row {
  display: grid;
  gap: 1rem;
}

@media (min-width: 640px) {
  .field-row {
    grid-template-columns: 1fr 1fr;
  }
}

/* Footer */
.site-footer {
  background: var(--charcoal);
  color: #99a4bb;
  padding: 2.5rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #2f3a4d;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr auto;
    align-items: start;
  }
}

.footer-brand img {
  height: 56px;
  width: auto;
  margin-bottom: 0.75rem;
}

.footer-brand p {
  margin: 0;
  max-width: 22rem;
  font-size: 0.875rem;
  line-height: 1.5;
}

.footer-col h4 {
  margin: 0 0 0.75rem;
  color: var(--white);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

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

.afip-badge img {
  height: 48px;
  width: auto;
  border: 0;
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.5rem;
  font-size: 0.875rem;
  text-align: center;
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    text-align: left;
  }
}

.footer-bottom a:hover {
  color: var(--white);
}

/* Floating WhatsApp */
.fab-whatsapp {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 60;
  width: 56px;
  height: 56px;
  border-radius: 9999px;
  background: var(--whatsapp-bright);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
  transition: transform 0.15s ease, background 0.15s ease;
}

.fab-whatsapp:hover {
  transform: scale(1.06);
  background: var(--whatsapp);
}

.fab-whatsapp svg {
  width: 28px;
  height: 28px;
}

/* Motion */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.55s ease, transform 0.55s ease;
  }

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

/* Demo modal */
body.modal-open {
  overflow: hidden;
}

.modal[hidden] {
  display: none !important;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.65);
}

.modal-dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 28rem);
  background: var(--white);
  border: 1px solid var(--surface-variant);
  border-radius: var(--radius-xl);
  border-top: 4px solid var(--primary);
  box-shadow: var(--shadow-md);
  padding: 1.5rem;
  animation: float-in 0.25s ease both;
}

.modal-dialog .h3 {
  margin-bottom: 0.35rem;
}

.modal-dialog > .text-muted {
  margin: 0 0 1.25rem;
}

.modal-close {
  position: absolute;
  top: 0.65rem;
  right: 0.75rem;
  width: 2rem;
  height: 2rem;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

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

.modal-options {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.modal-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  width: 100%;
  text-align: left;
  padding: 0.85rem 1rem;
  border: 1px solid var(--surface-variant);
  border-radius: var(--radius-lg);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.modal-option strong {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--text);
}

.modal-option span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.modal-option:hover {
  border-color: var(--primary);
  background: var(--white);
}
