/* ==========================================================================
   Haz Click — sistema visual.
   Tokens, componentes y el hilo/cursor que enlazan el concepto "One Page"
   (una sola página, un solo recorrido) con la propia interfaz.
   ========================================================================== */

:root {
  --ink: #0D110F;
  --surface: #161C19;
  --surface-2: #1E2620;
  --lime: #B8FF4F;
  --lime-dark: #93D93A;
  --ember: #FF6B45;
  --paper: #F4F6F1;
  --muted: #8C978F;
  --hairline: rgba(244, 246, 241, .08);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Manrope', sans-serif;
}

h1, h2, h3, h4, .font-display {
  font-family: 'Bricolage Grotesque', sans-serif;
}

::selection {
  background: var(--lime);
  color: var(--ink);
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb { background: #2a322c; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--lime); }

/* Visible keyboard focus everywhere (quality floor) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- Eyebrow / mono label ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: 'Space Mono', monospace;
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--lime);
  border: 1px solid rgba(184, 255, 79, .3);
  background: rgba(184, 255, 79, .05);
  border-radius: 999px;
  padding: .45rem .9rem;
}

/* ---------- Logo mark (crosshair-in-ring) ---------- */
.logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--lime);
  color: var(--lime);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ---------- Header nav links ---------- */
.nav-link {
  position: relative;
  transition: color .2s ease;
}
.nav-link:hover { color: var(--lime); }
.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 1px;
  background: var(--lime);
  transition: width .2s ease;
}
.nav-link:hover::after { width: 100%; }

.mobile-nav-link {
  padding: .75rem 0;
  border-bottom: 1px solid var(--hairline);
  color: #fff;
}
.mobile-nav-link:last-of-type { border-bottom: none; }

/* ---------- Buttons ---------- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  background: var(--lime);
  color: var(--ink);
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: .9rem;
  padding: .9rem 1.7rem;
  border-radius: 999px;
  transition: background-color .2s ease, transform .2s ease;
}
.btn-primary:hover { background: var(--lime-dark); transform: translateY(-1px); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  color: var(--paper);
  font-weight: 600;
  font-size: .9rem;
  padding-bottom: .3rem;
  border-bottom: 1px solid rgba(244, 246, 241, .25);
  transition: border-color .2s ease, color .2s ease;
}
.btn-ghost:hover { border-color: var(--lime); color: var(--lime); }

/* ---------- Hero blinking caret (echoes a text cursor / click) ---------- */
.caret {
  display: inline-block;
  width: .1em;
  height: .8em;
  background: var(--ember);
  margin-left: .1em;
  vertical-align: -0.05em;
  animation: blink 1.1s steps(2, start) infinite;
}
@keyframes blink { to { opacity: 0; } }

/* ---------- Badges (hero) ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: 'Space Mono', monospace;
  font-size: .74rem;
  letter-spacing: .02em;
  color: var(--muted);
}
.node-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 6px 1px rgba(184, 255, 79, .5);
  flex-shrink: 0;
}

/* ---------- Pills (tech / methodology tags) ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  font-family: 'Space Mono', monospace;
  font-size: .68rem;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--lime);
  background: rgba(184, 255, 79, .06);
  border: 1px solid rgba(184, 255, 79, .25);
  padding: .42rem .85rem;
  border-radius: 6px;
  white-space: nowrap;
}

/* ---------- Service cards ---------- */
.service-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 1rem;
  padding: 2rem;
  transition: border-color .25s ease, transform .25s ease;
}
.service-card:hover {
  border-color: rgba(184, 255, 79, .35);
  transform: translateY(-2px);
}

/* ---------- Methodology steps ---------- */
.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.step-circle {
  position: relative;
  z-index: 1;
  width: 8.5rem;
  height: 8.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 600;
  font-size: .875rem;
  color: var(--ink);
  background: radial-gradient(circle at 30% 30%, #d4ff9c, var(--lime) 70%);
  box-shadow: 0 0 30px rgba(184, 255, 79, .2);
  padding: 1rem;
}

/* ---------- Accordion ---------- */
.accordion-item { border-bottom: 1px solid var(--hairline); }
.accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem .25rem;
  background: none;
  border: none;
  color: var(--paper);
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 500;
  font-size: .95rem;
  text-align: left;
  cursor: pointer;
}
.accordion-trigger:hover { color: var(--lime); }
.accordion-icon {
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(184, 255, 79, .4);
  color: var(--lime);
  font-size: 1.1rem;
  line-height: 1;
  transition: transform .25s ease, background-color .25s ease, color .25s ease;
}
.accordion-trigger[aria-expanded="true"] .accordion-icon {
  transform: rotate(45deg);
  background: var(--lime);
  color: var(--ink);
}

/* Height is animated by JS via inline max-height (see js/script.js).
   A fixed max-height: 0 + overflow: hidden guarantees the panel (including
   its own padding) is fully collapsed, unlike the grid-template-rows: 0fr
   trick, which still reserves space for the panel's padding. */
.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease;
}

/* ---------- Pricing cards ---------- */
.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 1rem;
  padding: 2rem;
  height: 100%;
  transition: transform .25s ease, border-color .25s ease;
}
.plan-card:hover { transform: translateY(-4px); }
.plan-card--featured {
  background: var(--surface-2);
  border-color: rgba(184, 255, 79, .5);
  box-shadow: 0 0 40px rgba(184, 255, 79, .12);
}
.plan-badge {
  position: absolute;
  top: -0.8rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ember);
  color: var(--ink);
  font-family: 'Space Mono', monospace;
  font-size: .68rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-weight: 700;
  padding: .3rem .9rem;
  border-radius: 999px;
}
.plan-feature { display: flex; align-items: flex-start; gap: .6rem; }
.plan-feature::before {
  content: '✓';
  flex-shrink: 0;
  color: var(--lime);
  font-weight: 700;
  margin-top: .05rem;
}
.plan-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: .75rem 1rem;
  border-radius: 999px;
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: .875rem;
  color: var(--lime);
  background: transparent;
  border: 1px solid rgba(184, 255, 79, .4);
  transition: background-color .2s ease, color .2s ease;
}
.plan-cta:hover { background: rgba(184, 255, 79, .1); }
.plan-cta--featured {
  color: var(--ink);
  background: var(--lime);
  border-color: var(--lime);
}
.plan-cta--featured:hover { background: var(--lime-dark); }

/* ---------- Portfolio grid ---------- */
.portfolio-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  gap: .35rem;
  aspect-ratio: 4 / 3;
  padding: 1.25rem;
  border-radius: 1rem;
  background: linear-gradient(155deg, var(--surface), var(--surface-2));
  border: 1px solid var(--hairline);
  overflow: hidden;
  transition: border-color .25s ease, transform .25s ease;
}
.portfolio-item span {
  font-size: .65rem;
  letter-spacing: .12em;
  color: var(--muted);
}
.portfolio-item strong {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--paper);
}
.portfolio-item:hover {
  border-color: rgba(184, 255, 79, .4);
  transform: translateY(-3px);
}
.portfolio-item:hover strong { color: var(--lime); }

/* ---------- Contact form ---------- */
.form-label {
  display: block;
  font-size: .75rem;
  color: var(--muted);
  margin-bottom: .4rem;
}
.form-input {
  width: 100%;
  background: var(--ink);
  border: 1px solid var(--hairline);
  border-radius: .7rem;
  padding: .7rem .9rem;
  font-size: .875rem;
  color: var(--paper);
  outline: none;
  transition: border-color .2s ease;
}
.form-input::placeholder { color: #5c6660; }
.form-input:focus { border-color: var(--lime); }

/* ---------- Floating WhatsApp button ---------- */
.whatsapp-btn {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 40;
  width: 3.25rem;
  height: 3.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--ember);
  color: var(--ink);
  box-shadow: 0 8px 24px rgba(255, 107, 69, .3);
  transition: transform .2s ease, background-color .2s ease;
}
.whatsapp-btn:hover { transform: scale(1.08); }

/* ==========================================================================
   Signature: the "thread" — a single connected line tracing the page,
   with a node per section. It makes the "One Page" pitch literal: one
   continuous path, no detours. Desktop gets the full rail; mobile gets
   a slim top progress bar instead (space-constrained).
   ========================================================================== */

.thread-rail { display: none; }

@media (min-width: 1024px) {
  .thread-rail {
    display: block;
    position: fixed;
    left: 2.25rem;
    top: 50%;
    transform: translateY(-50%);
    height: min(66vh, 540px);
    width: 1px;
    z-index: 40;
  }
}

.thread-track {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 1px;
  background: rgba(244, 246, 241, .12);
}
.thread-fill {
  position: absolute;
  left: 0; top: 0;
  width: 1px;
  height: 0%;
  background: var(--lime);
  box-shadow: 0 0 8px 0 rgba(184, 255, 79, .5);
  transition: height .4s ease;
}
.thread-nodes {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.thread-node {
  position: relative;
  display: flex;
  align-items: center;
  gap: .7rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: .3rem 0;
  margin-left: -4.5px;
}
.thread-node-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ink);
  border: 1.5px solid rgba(244, 246, 241, .3);
  transition: background-color .25s ease, border-color .25s ease, box-shadow .25s ease;
  flex-shrink: 0;
}
.thread-node-label {
  font-family: 'Space Mono', monospace;
  font-size: .65rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity .2s ease, transform .2s ease, color .2s ease;
  white-space: nowrap;
}
.thread-node:hover .thread-node-label,
.thread-node.active .thread-node-label {
  opacity: 1;
  transform: translateX(0);
}
.thread-node.active .thread-node-dot {
  background: var(--lime);
  border-color: var(--lime);
  box-shadow: 0 0 0 3px rgba(184, 255, 79, .15);
}
.thread-node.active .thread-node-label { color: var(--lime); }

/* Mobile substitute: a slim top progress bar */
.thread-progress-mobile {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: rgba(244, 246, 241, .08);
  z-index: 60;
}
.thread-progress-mobile::after {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: var(--progress, 0%);
  background: var(--lime);
}
@media (min-width: 1024px) {
  .thread-progress-mobile { display: none; }
}

/* ==========================================================================
   Custom cursor — a minimal crosshair ring, desktop mouse only.
   ========================================================================== */

#cursor-dot {
  position: fixed;
  top: 0; left: 0;
  width: 20px;
  height: 20px;
  border: 1.5px solid var(--lime);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: left .12s ease-out, top .12s ease-out, width .2s ease, height .2s ease, background-color .2s ease, border-color .2s ease, opacity .2s ease;
  z-index: 999;
  opacity: 0;
}
#cursor-dot.visible { opacity: 1; }
#cursor-dot.hovering { width: 38px; height: 38px; background: rgba(184, 255, 79, .12); }
#cursor-dot.clicking { width: 14px; height: 14px; background: var(--ember); border-color: var(--ember); }

body.custom-cursor,
body.custom-cursor a,
body.custom-cursor button {
  cursor: none;
}

/* ==========================================================================
   Hero preview mockup — the product shown inside the product: a tiny
   browser frame auto-scrolling through the sections of a "one page" site.
   ========================================================================== */

.mockup-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 1rem;
  transform: rotate(-2deg);
  box-shadow: 0 40px 70px -25px rgba(0, 0, 0, .55);
  overflow: hidden;
}
.mockup-chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--hairline);
}
.mockup-chrome span:not(.mockup-url) {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(244, 246, 241, .15);
}
.mockup-url {
  margin-left: 8px;
  font-size: .68rem;
  color: var(--muted);
  background: rgba(244, 246, 241, .05);
  border-radius: 999px;
  padding: 3px 11px;
}
.mockup-viewport {
  height: 320px;
  overflow: hidden;
  position: relative;
  padding: 18px;
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 12%, black 88%, transparent);
  mask-image: linear-gradient(to bottom, transparent, black 12%, black 88%, transparent);
}
.mockup-track {
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: mockup-scroll 16s linear infinite;
}
.mockup-viewport:hover .mockup-track { animation-play-state: paused; }
.mockup-block {
  position: relative;
  height: 64px;
  border-radius: 8px;
  background: var(--surface-2);
  border-left: 2px solid var(--lime);
  display: flex;
  align-items: flex-start;
  padding: 10px 34px 10px 12px;
  flex-shrink: 0;
}
.mockup-block span {
  font-size: .62rem;
  letter-spacing: .12em;
  color: var(--muted);
}
.mockup-block::after {
  content: '';
  position: absolute;
  top: 10px;
  right: 12px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 8px 1px rgba(184, 255, 79, .6);
}
@keyframes mockup-scroll {
  0% { transform: translateY(0); }
  100% { transform: translateY(-50%); }
}
.mockup-caption {
  padding: 12px 18px 16px;
  font-size: .65rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  border-top: 1px solid var(--hairline);
}

/* ---------- Reduced motion: quiet everything down ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .caret { animation: none; opacity: .85; }
  .mockup-track { animation: none; }
  .thread-fill { transition: none; }
  .service-card, .plan-card, .portfolio-item, .btn-primary { transition: none; }
}
