/* Micronics Systems — landing alineada al tema F5 (caramelo pastel neumórfico del sistema) */
:root {
  --base: #e9e1d7;
  --base-mid: #e4dcd2;
  --base-deep: #dfd6cb;
  --base-top: #f3ece4;
  --text: #3c3630;
  --muted: #6b645c;
  --accent: #9c7860;
  --accent-mid: #b08b74;
  --accent-strong: #7d5e4a;
  --shadow-dark: #cfc6ba;
  --shadow-light: #faf6f0;
  --highlight: #c49a6c;
  --radius: 20px;
  --radius-sm: 14px;
  --font: "DM Sans", system-ui, sans-serif;
  --font-display: "DM Sans", system-ui, sans-serif;
  --font-wordmark: var(--font-display);
  --neo-panel: 14px 14px 32px rgba(190, 180, 168, 0.45), -10px -10px 28px var(--shadow-light),
    inset 1px 1px 0 rgba(255, 252, 248, 0.85);
  --neo-raised: 10px 10px 22px var(--shadow-dark), -8px -8px 20px var(--shadow-light);
  --neo-raised-sm: 6px 6px 14px var(--shadow-dark), -4px -4px 10px var(--shadow-light);
  --neo-inset-soft: inset 4px 4px 8px var(--shadow-dark), inset -3px -3px 8px var(--shadow-light);
  --neo-inset: inset 6px 6px 12px var(--shadow-dark), inset -4px -4px 10px var(--shadow-light);
  --border-soft: rgba(255, 249, 242, 0.75);
  --border-hair: rgba(60, 54, 48, 0.06);
  --logo-m: #b91620;
  --logo-s: #1b6b3c;
  /* Mismo cuerpo que .hero h1 */
  --logo-font-size: calc(clamp(2rem, 5vw, 3.1rem) - 8pt);
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* Fondo: diseño opción AD (imagen assets/fondo.png + bruma + velo cálido) */
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
  isolation: isolate;
  background-color: var(--base);
  background-image: none;
}

body::before {
  content: "";
  position: fixed;
  inset: -5.5vmin;
  z-index: 0;
  background: url("assets/fondo.png") center / cover no-repeat;
  filter: blur(11.5px);
  transform: scale(1.063);
  transform-origin: center center;
  pointer-events: none;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 125% 88% at 50% -2%, rgba(255, 252, 246, 0.38) 0%, transparent 51%),
    linear-gradient(180deg, rgba(240, 233, 225, 0.58) 0%, rgba(233, 225, 215, 0.68) 50%, rgba(223, 214, 203, 0.76) 100%);
}

@media (prefers-reduced-motion: reduce) {
  body::before {
    filter: blur(6.5px);
    transform: scale(1.035);
  }
}

#canvas-3d,
.canvas-fallback,
.gradient-veil {
  display: none !important;
}

.page-wrap {
  position: relative;
  z-index: 1;
}

.container {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 1rem 0;
  background: rgba(240, 233, 225, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-hair);
  box-shadow: 0 8px 24px rgba(190, 180, 168, 0.2);
}

.nav__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.logo {
  text-decoration: none;
  color: var(--text);
  display: inline-flex;
  align-items: center;
}

.logo--wordmark {
  font-family: var(--font-display);
  color: var(--text);
}

.logo--wordmark:hover {
  opacity: 0.92;
}

.logo__mark-wrap {
  display: block;
}

/* Base = .hero h1; micronics −8pt; systems −13pt */
.logo__line1 {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--logo-font-size);
  line-height: 1.12;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.logo__micronics {
  display: inline-block;
  font-size: calc(var(--logo-font-size) - 8pt);
  vertical-align: baseline;
  letter-spacing: inherit;
}

.logo__systems {
  display: inline-block;
  margin-left: 0.28em;
  font-size: calc(var(--logo-font-size) - 13pt);
  font-weight: 400;
  vertical-align: baseline;
  color: #000;
  /* Un poco más junto que micronics (0.06em), sin ir al tracking muy cerrado del inicio */
  letter-spacing: 0.04em;
}

.logo__m {
  color: var(--logo-m);
  font-weight: 700;
}

.logo__body {
  color: var(--text);
  font-weight: 700;
}

.logo__s-end {
  color: var(--logo-s);
  font-weight: 700;
}

/* Pie: 7pt por debajo del header; alineado a la fila con el copyright */
.logo--footer.logo--wordmark .logo__line1 {
  font-size: calc(var(--logo-font-size) - 7pt);
}

.logo--footer.logo--wordmark .logo__micronics {
  font-size: calc(var(--logo-font-size) - 8pt - 7pt);
}

.logo--footer.logo--wordmark .logo__systems {
  font-size: calc(var(--logo-font-size) - 13pt - 7pt);
}

@media (max-width: 380px) {
  .logo__line1 {
    letter-spacing: 0.04em;
  }

  .logo__systems {
    letter-spacing: 0.028em;
  }
}

/* Logo del header más legible en móvil (wordmark Micronics / systems) */
@media (max-width: 720px) {
  :root {
    --logo-font-size: calc(clamp(2.35rem, 6.4vw, 3.15rem) - 6pt);
  }
}

@media (max-width: 480px) {
  :root {
    --logo-font-size: calc(clamp(2.55rem, 7.25vw, 3.25rem) - 5pt);
  }
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav__links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-sm);
  transition: color 0.2s, box-shadow 0.2s;
}

.nav__links a:hover {
  color: var(--text);
  box-shadow: var(--neo-inset-soft);
}

.nav__links a.btn--primary,
.nav__links a.btn--primary:hover {
  color: #fff;
}

.nav__links a.btn--primary:hover {
  box-shadow: 8px 8px 18px rgba(156, 120, 96, 0.42), -4px -4px 12px var(--shadow-light),
    inset 0 2px 0 rgba(255, 255, 255, 0.32);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.62rem 1.2rem;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:active {
  transform: scale(0.98) translateY(1px);
}

.btn--primary {
  background: linear-gradient(145deg, var(--accent-mid), var(--accent));
  color: #fff;
  box-shadow: 6px 6px 14px rgba(156, 120, 96, 0.38), -3px -3px 10px var(--shadow-light),
    inset 0 2px 0 rgba(255, 255, 255, 0.28);
}

.btn--primary:hover {
  box-shadow: 8px 8px 18px rgba(156, 120, 96, 0.42), -4px -4px 12px var(--shadow-light),
    inset 0 2px 0 rgba(255, 255, 255, 0.32);
}

.btn--ghost {
  background: linear-gradient(165deg, var(--base-top) 0%, var(--base) 100%);
  color: var(--text);
  box-shadow: var(--neo-raised-sm);
  border: 1px solid var(--border-soft);
}

.btn--ghost:hover {
  box-shadow: 8px 8px 18px var(--shadow-dark), -6px -6px 14px var(--shadow-light);
}

.btn--ghost:active {
  box-shadow: var(--neo-inset);
}

.btn--large {
  padding: 0.78rem 1.65rem;
  font-size: 1rem;
}

.btn__icon {
  flex-shrink: 0;
}

.btn--whatsapp {
  background: linear-gradient(145deg, #2fe06d, #25d366);
  color: #fff;
  box-shadow: 6px 6px 14px rgba(37, 211, 102, 0.35), -3px -3px 10px var(--shadow-light),
    inset 0 2px 0 rgba(255, 255, 255, 0.25);
}

.btn--whatsapp:hover {
  box-shadow: 8px 8px 18px rgba(37, 211, 102, 0.42), -4px -4px 12px var(--shadow-light),
    inset 0 2px 0 rgba(255, 255, 255, 0.3);
}

@media (max-width: 720px) {
  .nav__links a:not(.btn) {
    display: none;
  }
}

/* Hero */
.hero {
  padding: clamp(2.75rem, 10vw, 5.5rem) 0 clamp(3rem, 8vw, 5rem);
  text-align: center;
}

.hero__badge {
  display: inline-block;
  padding: 0.4rem 0.95rem;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b4f3d;
  background: linear-gradient(145deg, var(--base-top), var(--base));
  border: 1px solid rgba(156, 120, 96, 0.22);
  box-shadow: var(--neo-raised-sm), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.1rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin: 0 auto 1.25rem;
  max-width: 18ch;
  color: var(--text);
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(120deg, #4a3f36 0%, var(--accent) 45%, var(--highlight) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__lead {
  font-size: 1.02rem;
  color: var(--muted);
  max-width: 38rem;
  margin: 0 auto 2rem;
  line-height: 1.65;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: center;
  margin-bottom: 2.5rem;
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  max-width: 520px;
  margin: 0 auto;
}

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

.stat {
  padding: 1.1rem 1rem;
  border-radius: var(--radius);
  background: linear-gradient(165deg, var(--base-top) 0%, var(--base) 55%, var(--base-deep) 100%);
  box-shadow: var(--neo-panel);
  border: 1px solid var(--border-soft);
}

.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--accent-strong);
}

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

/* Sections */
section {
  padding: clamp(3rem, 7vw, 4.5rem) 0;
}

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

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3.2vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
  background: linear-gradient(120deg, #4a3f36 0%, var(--accent) 50%, var(--highlight) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 1.02rem;
}

/* Features */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.feature {
  padding: 1.5rem;
  border-radius: var(--radius);
  background: linear-gradient(165deg, var(--base-top) 0%, var(--base) 55%, #ded4c9 100%);
  box-shadow: var(--neo-panel);
  border: 1px solid var(--border-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature:hover {
  transform: translateY(-2px);
  box-shadow: 16px 16px 36px rgba(190, 180, 168, 0.5), -10px -10px 30px var(--shadow-light),
    inset 1px 1px 0 rgba(255, 252, 248, 0.9);
}

.feature__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: var(--accent-strong);
  background: var(--base);
  box-shadow: var(--neo-inset);
}

.feature h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin: 0 0 0.5rem;
  color: var(--text);
}

.feature p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.55;
}

/* Pricing */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.15rem;
  align-items: stretch;
}

@media (max-width: 1024px) {
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

.plan {
  position: relative;
  padding: 1.65rem 1.4rem;
  border-radius: var(--radius);
  background: linear-gradient(165deg, var(--base-top) 0%, var(--base) 55%, #ded4c9 100%);
  box-shadow: var(--neo-panel);
  border: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
}

.plan--featured {
  background: linear-gradient(165deg, #f6efe8 0%, var(--base) 50%, #d8cfc4 100%);
  border: 1px solid rgba(156, 120, 96, 0.35);
  box-shadow: 16px 16px 38px rgba(190, 180, 168, 0.55), -10px -10px 30px var(--shadow-light),
    inset 0 0 0 1px rgba(156, 120, 96, 0.12);
  transform: scale(1.02);
  z-index: 2;
}

@media (max-width: 1024px) {
  .plan--featured {
    transform: none;
  }
}

.plan__tag {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.28rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  background: linear-gradient(145deg, var(--accent-mid), var(--accent));
  color: #fff;
  box-shadow: 4px 4px 12px rgba(156, 120, 96, 0.45), -2px -2px 8px var(--shadow-light);
}

.plan h3 {
  font-family: var(--font-display);
  font-size: 1.12rem;
  margin: 0 0 0.35rem;
  color: var(--text);
}

.plan__contracts {
  font-size: 1.85rem;
  font-weight: 800;
  font-family: var(--font-display);
  letter-spacing: -0.03em;
  color: var(--accent-strong);
  margin: 0 0 0.15rem;
}

.plan__contracts small {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  margin-top: 0.25rem;
  text-transform: none;
  letter-spacing: 0;
}

.plan__price {
  font-size: 0.92rem;
  color: var(--muted);
  margin: 0 0 1.2rem;
}

.plan__price strong {
  color: var(--accent-strong);
  font-size: 1.25rem;
  font-weight: 700;
}

.plan ul {
  list-style: none;
  margin: 0 0 1.4rem;
  padding: 0;
  flex: 1;
}

.plan li {
  position: relative;
  padding-left: 1.3rem;
  margin-bottom: 0.6rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.plan li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--accent-mid), var(--accent));
  box-shadow: 2px 2px 4px rgba(156, 120, 96, 0.35);
}

.plan .btn {
  width: 100%;
  margin-top: auto;
}

.plan .btn--ghost {
  background: var(--base);
}

.pricing-note {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.85rem;
  color: var(--muted);
}

/* CTA band */
.cta-band {
  margin: 2rem 0 0;
  padding: clamp(2.25rem, 5vw, 3.25rem);
  border-radius: calc(var(--radius) + 4px);
  text-align: center;
  background: linear-gradient(165deg, #f3ece4 0%, #eadfd4 45%, #e0d5c9 100%);
  box-shadow: var(--neo-panel);
  border: 1px solid var(--border-soft);
}

.cta-band h2 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.8vw, 1.8rem);
  margin: 0 0 0.75rem;
  color: var(--text);
}

.cta-band p {
  margin: 0 0 1.5rem;
  color: var(--muted);
  max-width: 32rem;
  margin-left: auto;
  margin-right: auto;
}

.cta-band__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: center;
  align-items: center;
}

/* Modal contacto (envío por servidor, sin mailto) */
.contact-modal {
  padding: 0;
  margin: auto;
  max-width: calc(100vw - 1.5rem);
  width: min(26rem, 100%);
  border: none;
  background: transparent;
  box-shadow: none;
}

.contact-modal::backdrop {
  background: rgba(60, 54, 48, 0.38);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.contact-modal__panel {
  position: relative;
  padding: 1.5rem 1.35rem 1.35rem;
  border-radius: var(--radius);
  background: linear-gradient(165deg, #f3ece4 0%, #e8dfd4 55%, #dfd4c8 100%);
  box-shadow: var(--neo-panel);
  border: 1px solid var(--border-soft);
}

.contact-modal__close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1.35rem;
  line-height: 1;
  color: var(--muted);
  background: linear-gradient(165deg, var(--base-top), var(--base));
  box-shadow: var(--neo-raised-sm);
  cursor: pointer;
  transition: color 0.15s ease, box-shadow 0.15s ease;
}

.contact-modal__close:hover {
  color: var(--text);
  box-shadow: var(--neo-inset-soft);
}

.contact-modal__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 2.25rem 0.35rem 0;
  color: var(--text);
}

.contact-modal__lead {
  margin: 0 0 0.75rem;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.45;
}

.contact-modal__plan {
  margin: 0 0 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-strong);
}

.contact-modal__msg {
  margin: 0 0 0.85rem;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  line-height: 1.4;
}

.contact-modal__msg--error {
  color: #5c2a2a;
  background: rgba(185, 22, 32, 0.12);
  border: 1px solid rgba(185, 22, 32, 0.2);
}

.contact-modal__msg--ok {
  color: #2d4a32;
  background: rgba(27, 107, 60, 0.12);
  border: 1px solid rgba(27, 107, 60, 0.22);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  text-align: left;
}

.contact-form__label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}

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

.contact-form__input,
.contact-form__textarea {
  width: 100%;
  padding: 0.55rem 0.75rem;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(156, 120, 96, 0.22);
  background: linear-gradient(165deg, var(--base-top) 0%, var(--base) 100%);
  box-shadow: var(--neo-inset-soft);
  resize: vertical;
  min-height: 2.5rem;
}

.contact-form__textarea {
  min-height: 6rem;
}

.contact-form__input:focus,
.contact-form__textarea:focus {
  outline: 2px solid rgba(156, 120, 96, 0.45);
  outline-offset: 1px;
}

.contact-form__submit {
  margin-top: 0.35rem;
  width: 100%;
}

.contact-form__submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* Botón flotante WhatsApp */
.wa-fab {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right, 0px));
  bottom: max(1.25rem, env(safe-area-inset-bottom, 0px));
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #2fe06d, #25d366);
  box-shadow: 6px 8px 20px rgba(37, 211, 102, 0.45), -2px -2px 12px rgba(255, 255, 255, 0.5);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wa-fab:hover {
  transform: scale(1.06);
  box-shadow: 8px 10px 24px rgba(37, 211, 102, 0.5), -2px -2px 14px rgba(255, 255, 255, 0.55);
}

.wa-fab:active {
  transform: scale(0.98);
}

@media (prefers-reduced-motion: reduce) {
  .wa-fab {
    transition: none;
  }

  .wa-fab:hover {
    transform: none;
  }
}

/* Footer */
.footer {
  padding: 2.25rem 0;
  border-top: 1px solid var(--border-hair);
  margin-top: 1.5rem;
  background: linear-gradient(180deg, transparent, rgba(222, 184, 150, 0.08));
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.footer__brand {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.65rem 1rem;
}

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

.footer a {
  color: var(--accent-strong);
  font-weight: 600;
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
  color: var(--accent);
}
