/* ============================================================
   Smertec — Landing
   Aligned to the official brand: #D6FF03 lime, #161616 ink,
   #F5F5F5 paper, #808080 gray. Type: Roboto (display) + Inter (body).
   ============================================================ */

:root {
  /* Brand */
  --lime:        #d6ff03;
  --lime-hi:     #e1ff4a;   /* hover */
  --ink:         #161616;
  --ink-2:       #1e1e1e;
  --ink-3:       #2a2a2a;
  --ink-deep:    #0f0f0f;
  --paper:       #f5f5f5;
  --paper-card:  #ffffff;
  --line:        #e3e3e3;
  --gray:        #808080;

  /* Text */
  --on-dark:      #f5f5f5;
  --on-dark-dim:  #ababab;
  --on-light:     #161616;
  --on-light-dim: #555555;
  --on-lime:      #161616;
  --on-lime-dim:  rgba(22, 22, 22, 0.72);
  --danger:       #ff6b5e;

  /* Type */
  --font-display: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body:    "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Spacing (4pt) */
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Layout */
  --container: 1180px;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --section-y: clamp(4.5rem, 9vw, 7.5rem);
  --radius: 18px;
  --radius-sm: 12px;

  /* Motion */
  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html:focus-within { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.62;
  color: var(--on-light);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-display);
  line-height: 1.04;
  letter-spacing: -0.025em;
  font-weight: 700;
}
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
ul { margin: 0; padding: 0; list-style: none; }
strong { font-weight: 700; }

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

[id] { scroll-margin-top: 92px; }

.skip-link {
  position: fixed;
  top: var(--space-sm); left: var(--space-sm);
  transform: translateY(-150%);
  z-index: 100;
  background: var(--lime);
  color: var(--on-lime);
  padding: 0.6rem 1rem;
  border-radius: 10px;
  font-weight: 700;
  transition: transform 0.2s var(--ease);
}
.skip-link:focus { transform: translateY(0); }

:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Eyebrow (brand arrow marker) ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--on-light-dim);
  margin: 0 0 var(--space-lg);
}
.eyebrow__mark {
  display: inline-grid;
  place-items: center;
  width: 30px; height: 30px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--lime);
  flex: none;
}
.eyebrow__mark svg { width: 15px; height: 15px; }
.eyebrow--light { color: var(--lime); }
.eyebrow--light .eyebrow__mark { background: var(--lime); color: var(--ink); }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--lime);
  --btn-fg: var(--on-lime);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1;
  padding: 0.85rem 1.5rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.25s var(--ease),
              background 0.2s var(--ease), color 0.2s var(--ease);
}
.btn--lg { padding: 1.05rem 1.9rem; font-size: 1rem; }
.btn--lime:hover {
  transform: translateY(-2px);
  background: var(--lime-hi);
  box-shadow: 0 14px 34px -12px rgba(214, 255, 3, 0.55);
}
.btn--lime:active { transform: translateY(0); }
.btn--ghost {
  background: transparent;
  color: var(--on-dark);
  border-color: rgba(245, 245, 245, 0.28);
}
.btn--ghost:hover { border-color: var(--lime); color: var(--lime); transform: translateY(-2px); }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  padding-block: 1.1rem;
  transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease), padding 0.3s var(--ease);
}
.site-header[data-scrolled] {
  background: rgba(15, 15, 15, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(245, 245, 245, 0.07);
  padding-block: 0.7rem;
}
.header__inner { display: flex; align-items: center; gap: var(--space-lg); }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--on-dark);
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 1.3rem;
}
.brand__mark { color: var(--lime); flex: none; }
.brand__word { line-height: 1; }

.nav { margin-left: auto; }
.nav__list { display: flex; gap: var(--space-xl); }
.nav__list a {
  color: rgba(245, 245, 245, 0.82);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  padding-block: 0.25rem;
  transition: color 0.2s var(--ease);
}
.nav__list a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 2px;
  background: var(--lime);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}
.nav__list a:hover { color: var(--on-dark); }
.nav__list a:hover::after { transform: scaleX(1); }

.header__cta { padding: 0.7rem 1.25rem; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  margin-left: auto;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  margin-inline: auto;
  background: var(--on-dark);
  transition: transform 0.25s var(--ease), opacity 0.2s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1rem var(--gutter) 1.5rem;
  background: rgba(15, 15, 15, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.mobile-nav[hidden] { display: none; }
.mobile-nav a {
  color: rgba(245, 245, 245, 0.9);
  font-weight: 600;
  padding: 0.85rem 0.25rem;
  border-bottom: 1px solid rgba(245, 245, 245, 0.08);
}
.mobile-nav .btn { margin-top: 0.8rem; border-bottom: 0; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  isolation: isolate;
  color: var(--on-dark);
  background: var(--ink);
  overflow: hidden;
  padding-top: clamp(8rem, 16vh, 11rem);
  padding-bottom: clamp(4rem, 9vw, 7rem);
}
.hero__bg { position: absolute; inset: 0; z-index: -1; }
.hero__bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 78% 10%, #242424 0%, transparent 55%),
    radial-gradient(90% 80% at 10% 112%, #0e0e0e 0%, transparent 60%),
    linear-gradient(180deg, #1e1e1e 0%, var(--ink) 50%, var(--ink-deep) 100%);
}
.hero__topo {
  position: absolute;
  top: 50%; right: -10%;
  transform: translateY(-50%);
  width: min(820px, 80%);
  aspect-ratio: 1;
  opacity: 0.16;
  -webkit-mask-image: radial-gradient(closest-side, #000 52%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 52%, transparent 100%);
}
.hero__glow {
  position: absolute;
  width: 55vw; height: 55vw;
  right: 0; top: -12vw;
  background: radial-gradient(circle, rgba(214, 255, 3, 0.10) 0%, rgba(214, 255, 3, 0.03) 40%, transparent 68%);
  filter: blur(10px);
}
.hero__grain {
  position: absolute;
  inset: 0;
  opacity: 0.5;
  background-image: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.022) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay;
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}
.hero__content { max-width: 42ch; }
.hero__title {
  font-size: clamp(2.9rem, 7.4vw, 5.5rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  margin: 0.4rem 0 1.6rem;
}
.hero__accent { color: var(--lime); }
.hero__lede {
  color: var(--on-dark-dim);
  max-width: 46ch;
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.12rem);
  line-height: 1.68;
}
.hero__lede strong { color: var(--on-dark); font-weight: 600; }
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2.2rem;
}

/* Orchestrated, JS-independent entrance */
@media (prefers-reduced-motion: no-preference) {
  .hero__content > * { animation: heroRise 0.9s var(--ease-out) both; }
  .hero__content > *:nth-child(1) { animation-delay: 0.05s; }
  .hero__content > *:nth-child(2) { animation-delay: 0.13s; }
  .hero__content > *:nth-child(3) { animation-delay: 0.23s; }
  .hero__content > *:nth-child(4) { animation-delay: 0.33s; }
  .scanner { animation: heroRise 1s var(--ease-out) both; animation-delay: 0.42s; }
}
@keyframes heroRise {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Signature: scanner ---------- */
.scanner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  justify-self: center;
}
.scanner__frame {
  position: relative;
  width: min(320px, 70vw);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  padding: 14%;
  background:
    radial-gradient(circle at 50% 40%, rgba(214, 255, 3, 0.08), transparent 70%),
    rgba(245, 245, 245, 0.02);
  border: 1px solid rgba(245, 245, 245, 0.08);
  border-radius: 20px;
  overflow: hidden;
}
.scanner__qr {
  width: 100%; height: 100%;
  color: rgba(245, 245, 245, 0.92);
}
.scanner__qr rect.on { fill: currentColor; }
.scanner__corner {
  position: absolute;
  width: 34px; height: 34px;
  border: 3px solid var(--lime);
}
.scanner__corner--tl { top: 14px; left: 14px; border-right: 0; border-bottom: 0; border-top-left-radius: 8px; }
.scanner__corner--tr { top: 14px; right: 14px; border-left: 0; border-bottom: 0; border-top-right-radius: 8px; }
.scanner__corner--bl { bottom: 14px; left: 14px; border-right: 0; border-top: 0; border-bottom-left-radius: 8px; }
.scanner__corner--br { bottom: 14px; right: 14px; border-left: 0; border-top: 0; border-bottom-right-radius: 8px; }
.scanner__line {
  position: absolute;
  left: 8%; right: 8%;
  height: 2px;
  top: 12%;
  background: linear-gradient(90deg, transparent, var(--lime), transparent);
  box-shadow: 0 0 18px 3px rgba(214, 255, 3, 0.55);
  animation: scan 3.4s var(--ease) infinite;
}
@keyframes scan {
  0%, 100% { top: 12%; opacity: 0.2; }
  10%      { opacity: 1; }
  50%      { top: 86%; opacity: 1; }
  60%      { opacity: 0.2; }
}
.scanner__label {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--on-dark-dim);
}

/* ============================================================
   STATS
   ============================================================ */
.stats {
  background: var(--lime);
  color: var(--on-lime);
  padding-block: clamp(3.5rem, 7vw, 5.5rem);
}
.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
}
.stat { max-width: 26ch; }
.stat__num {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 4.7rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 0.92;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  margin-bottom: 0.7rem;
}
.stat__label {
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--on-lime-dim);
}

/* ============================================================
   SERVICIOS
   ============================================================ */
.services {
  background: var(--paper);
  padding-block: var(--section-y);
}
.services__head {
  max-width: 62ch;
  margin: 0 auto clamp(2.5rem, 5vw, 4rem);
  text-align: center;
}
.services__title {
  font-size: clamp(2.1rem, 4.6vw, 3.3rem);
  font-weight: 700;
  margin-bottom: 1.1rem;
}
.services__intro { color: var(--on-light-dim); }

.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.75rem, 3vw, 2.6rem) clamp(2rem, 5vw, 4rem);
}
.service { max-width: 40ch; }
.service__icon {
  display: inline-grid;
  place-items: center;
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--lime);
  margin-bottom: 1.1rem;
}
.service__icon svg { width: 25px; height: 25px; }
.service__title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin-bottom: 0.55rem;
}
.service__text { color: var(--on-light-dim); font-size: 0.96rem; line-height: 1.55; }

/* ============================================================
   CTA
   ============================================================ */
.cta {
  background: var(--ink-deep);
  color: var(--on-dark);
  padding-block: var(--section-y);
}
.cta__inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 6vw, 4.5rem);
  align-items: center;
}
.cta__title { font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; margin-bottom: 1rem; }
.cta__text { color: var(--on-dark-dim); max-width: 44ch; }

.cta__form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: rgba(245, 245, 245, 0.04);
  border: 1px solid rgba(245, 245, 245, 0.1);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2rem);
}
.cta__field { display: flex; flex-direction: column; gap: 0.45rem; }
.cta__field-label {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--on-dark-dim);
}
.cta__form input {
  font: inherit;
  font-family: var(--font-body);
  color: var(--on-dark);
  background: rgba(245, 245, 245, 0.04);
  border: 1px solid rgba(245, 245, 245, 0.16);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.cta__form input::placeholder { color: rgba(245, 245, 245, 0.4); }
.cta__form input:focus-visible { outline: none; border-color: var(--lime); background: rgba(214, 255, 3, 0.06); }
.cta__note { min-height: 1.2em; font-size: 0.85rem; color: var(--lime); }
.cta__note[data-error] { color: var(--danger); }
/* Honeypot field: off-screen so humans never see it but bots fill it */
.cta__form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; box-shadow: none; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--ink);
  color: var(--on-dark-dim);
  padding-top: clamp(3rem, 6vw, 4.5rem);
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem 2.5rem;
  padding-bottom: 2.5rem;
}
.brand--footer { font-size: 1.15rem; }
.footer__tagline { margin-right: auto; max-width: 34ch; font-size: 0.95rem; color: var(--on-dark-dim); }
.footer__nav { display: flex; gap: 1.75rem; }
.footer__nav a { font-size: 0.92rem; transition: color 0.2s var(--ease); }
.footer__nav a:hover { color: var(--lime); }
.footer__base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  padding-block: 1.5rem;
  border-top: 1px solid rgba(245, 245, 245, 0.08);
  font-size: 0.82rem;
  color: var(--gray);
}

/* ============================================================
   REVEAL ON SCROLL (JS-gated progressive enhancement)
   ============================================================ */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  will-change: opacity, transform;
}
.js [data-reveal].is-visible { opacity: 1; transform: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 960px) {
  .nav, .header__cta { display: none; }
  .nav-toggle { display: flex; }

  .hero__inner { grid-template-columns: 1fr; }
  .hero__content { max-width: none; }
  .scanner__frame { width: min(260px, 64vw); }

  .stats__grid { grid-template-columns: repeat(2, 1fr); gap: 2rem 1.5rem; }
  .services__grid { grid-template-columns: repeat(2, 1fr); }
  .cta__inner { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .stats__grid { grid-template-columns: 1fr 1fr; gap: 1.75rem 1.25rem; }
  .services__grid { grid-template-columns: 1fr; }
  .stat, .service { max-width: none; }
  .footer__inner { flex-direction: column; align-items: flex-start; }
  .footer__tagline { margin-right: 0; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html:focus-within { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
  .scanner__line { display: none; }
}
