/* =========================================================
   KO Grades — Hoja de estilos
   Paleta: verde #74F000 sobre fondo #0D1115
   Tipografía: Outfit (Google Fonts)
   ========================================================= */

:root {
  --bg: #0D1115;
  --bg-2: #10151A;
  --green: #74F000;
  --green-soft: rgba(116, 240, 0, .55);
  --white: #FFFFFF;
  --text: #E7EAEE;
  --muted: #A9B0B8;
  --line: rgba(255, 255, 255, .09);
  --radius: 6px;
  --container: 1200px;
  --gutter: clamp(20px, 4.5vw, 64px);
  --font: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.text-green { color: var(--green); }

/* ---------- Iconos de línea ---------- */
.icon {
  width: 18px; height: 18px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- Eyebrow (etiqueta pequeña verde) ---------- */
.eyebrow {
  display: flex; align-items: center; gap: 22px;
  color: var(--green);
  font-size: 11px; font-weight: 600;
  letter-spacing: .26em; text-transform: uppercase;
  margin-bottom: 14px;
}
.eyebrow::before {
  content: ""; width: 42px; height: 2px; background: var(--green); flex: none;
}
.eyebrow--stacked { flex-direction: column; align-items: flex-start; gap: 18px; }
.eyebrow--stacked::before { width: 42px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 14px;
  height: 50px; padding: 0 30px;
  border-radius: 999px;
  font-family: var(--font); font-size: 15px; font-weight: 500;
  border: 1.5px solid transparent;
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn--sm { height: 42px; padding: 0 24px; font-size: 14px; gap: 12px; }
.btn--green { background: var(--green); color: #0D1115; font-weight: 600; }
.btn--green:hover { box-shadow: 0 8px 28px rgba(116, 240, 0, .28); }
.btn--outline-green { border-color: var(--green); color: var(--green); }
.btn--outline-green:hover { background: var(--green); color: #0D1115; }
.btn--outline-white { border-color: rgba(255, 255, 255, .85); color: var(--white); }
.btn--outline-white:hover { background: var(--white); color: #0D1115; }
.btn--outline-white .icon { fill: none; }

/* =========================================================
   HEADER
   ========================================================= */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(13, 17, 21, .92);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header__inner { display: flex; align-items: center; height: 108px; gap: 32px; }

.logo { display: flex; align-items: center; gap: 4px; flex: none; }
.logo__icon { width: 72px; height: auto; }
.logo__text {
  font-size: 31px; font-weight: 500; color: var(--white);
  letter-spacing: -.02em; line-height: 1;
}
.logo__text strong { font-weight: 700; }

.nav { display: flex; align-items: center; gap: clamp(24px, 3.6vw, 52px); margin: 0 auto; }
.nav__link {
  position: relative; font-size: 14px; font-weight: 400; color: var(--text);
  padding: 14px 0; transition: color .2s;
}
.nav__link::after {
  content: ""; position: absolute; left: -14px; right: -14px; bottom: 0;
  height: 2px; background: var(--green);
  transform: scaleX(0); transition: transform .3s var(--ease);
}
.nav__link:hover { color: var(--white); }
.nav__link.is-active::after, .nav__link:hover::after { transform: scaleX(1); }

.menu-toggle { display: none; }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  min-height: clamp(480px, 37vw, 600px);
  display: flex; align-items: center;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.hero__inner { position: relative; z-index: 2; pointer-events: none; }
.hero__content { max-width: 600px; padding: 64px 0; pointer-events: auto; }
.hero__title {
  font-size: clamp(36px, 3.9vw, 56px);
  font-weight: 500; line-height: 1.07; letter-spacing: -.02em;
  color: var(--white);
  margin: 0 0 24px;
}
.hero__lead { font-size: clamp(16px, 1.25vw, 18px); color: var(--text); max-width: 420px; margin-bottom: 30px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero__visual {
  position: absolute; z-index: 1;
  top: 0; bottom: 0; right: 0;
  width: 59%;
  display: flex; align-items: center; justify-content: flex-end;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14%);
          mask-image: linear-gradient(90deg, transparent 0, #000 14%);
}

/* ----- Comparador antes / después ----- */
.compare {
  position: relative;
  height: 100%;
  aspect-ratio: 604 / 378;
  flex: none;
  user-select: none; -webkit-user-select: none;
  touch-action: pan-y;
  cursor: ew-resize;
}
.compare__img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: fill; pointer-events: none;
}
/* Mientras no exista el frame "antes" real, se simula con un look plano tipo LOG */
.compare__before.is-placeholder { filter: saturate(.55) contrast(.82) brightness(1.06) sepia(.05); }

.compare__line { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.compare__line line { stroke: #fff; stroke-width: 2; vector-effect: non-scaling-stroke; }

.compare__handle {
  position: absolute; width: 34px; height: 34px; margin: -17px 0 0 -17px;
  border-radius: 50%; border: 2px solid #fff;
  background: rgba(13, 17, 21, .35);
  backdrop-filter: blur(2px);
  cursor: ew-resize; padding: 0;
  display: grid; place-items: center;
  transition: transform .2s var(--ease);
}
.compare__handle:hover, .compare.is-dragging .compare__handle { transform: scale(1.12); }
.compare__handle span, .compare__handle span::before, .compare__handle span::after {
  width: 3px; height: 3px; background: #fff; border-radius: 50%; display: block;
}
.compare__handle span { position: relative; }
.compare__handle span::before, .compare__handle span::after { content: ""; position: absolute; top: 0; }
.compare__handle span::before { left: -7px; }
.compare__handle span::after { left: 7px; }
.compare__handle:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }

.compare__tag {
  position: absolute;
  font-size: clamp(8px, .72vw, 10px); font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: #fff; background: rgba(13, 17, 21, .78);
  padding: .55em .9em; border-radius: 2px;
  transform: translateY(-100%);
  pointer-events: none;
}
.compare__tag--after { transform: translate(-100%, -100%); }

/* =========================================================
   SECCIONES
   ========================================================= */
.section { padding: clamp(56px, 6vw, 84px) 0; border-bottom: 1px solid var(--line); }
.section__title {
  font-size: clamp(28px, 2.6vw, 36px);
  font-weight: 400; line-height: 1.18; letter-spacing: -.01em;
  color: var(--white);
}
.section__head { margin-bottom: 34px; }
.section__head--row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.section__head--row .eyebrow { padding-left: 0; }
.works .eyebrow::before { width: 42px; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 14px; font-weight: 500; color: var(--white);
  padding-bottom: 4px; white-space: nowrap;
}
.link-arrow .icon { color: var(--green); transition: transform .25s var(--ease); }
.link-arrow:hover .icon { transform: translateX(4px); }

/* ----- Trabajos ----- */
.works__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.card {
  position: relative; display: block; overflow: hidden;
  aspect-ratio: 215 / 236;
  border-radius: 3px; background: var(--bg-2);
}
.card img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease), filter .4s; }
.card::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 52%, rgba(8, 11, 14, .82) 100%);
  pointer-events: none;
}
.card:hover img { transform: scale(1.05); }
.card__info { position: absolute; left: 18px; right: 18px; bottom: 16px; z-index: 2; display: flex; flex-direction: column; gap: 4px; }
.card__title { font-size: clamp(15px, 1.3vw, 18px); font-weight: 500; color: var(--white); letter-spacing: -.01em; }
.card__tag { font-size: 12px; color: var(--text); }

/* ----- Servicios ----- */
.services__head {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start;
  margin-bottom: 40px;
}
.services__intro { font-size: 15px; color: var(--text); max-width: 400px; padding-top: 34px; line-height: 1.6; }
.services__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.service { padding: 0 32px; border-left: 1px solid var(--line); }
.service:first-child { border-left: 0; padding-left: 8px; }
.service__icon {
  width: 52px; height: 52px; margin-bottom: 22px;
  fill: none; stroke: var(--green); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}
.service__title { font-size: 18px; font-weight: 500; color: var(--white); margin-bottom: 8px; letter-spacing: -.01em; }
.service__text { font-size: 14px; color: var(--muted); line-height: 1.45; }

/* ----- Sobre nosotros ----- */
.about {
  display: grid; grid-template-columns: 50% 50%;
  border-bottom: 1px solid var(--line);
  padding-top: 28px;
}
.about__media { overflow: hidden; border-radius: 0 10px 0 0; min-height: 320px; }
.about__media img { width: 100%; height: 100%; object-fit: cover; }
.about__content {
  padding: clamp(28px, 3vw, 44px) var(--gutter) clamp(28px, 3vw, 44px) clamp(28px, 3vw, 32px);
  max-width: 680px;
  align-self: center;
}
.about__text { font-size: 15px; color: var(--text); line-height: 1.6; margin: 18px 0 26px; max-width: 520px; }

/* =========================================================
   FOOTER
   ========================================================= */
.footer__band { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.footer__lens {
  position: absolute; right: 9%; top: 0; height: 100%; width: auto; max-width: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 25%, #000 75%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 25%, #000 75%, transparent 100%);
  opacity: .95;
}
.footer__inner {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  min-height: clamp(180px, 15vw, 220px);
  padding-top: 32px; padding-bottom: 32px;
}
.footer__title { font-size: clamp(26px, 2.6vw, 36px); font-weight: 500; color: var(--white); letter-spacing: -.01em; margin-bottom: 18px; }
.footer__tags { font-size: 11px; font-weight: 500; letter-spacing: .24em; text-transform: uppercase; color: var(--text); }
.footer__tags span { margin: 0 14px; color: var(--muted); }

.scroll-indicator { display: flex; flex-direction: column; align-items: center; gap: 10px; align-self: stretch; justify-content: center; }
.scroll-indicator__label { font-size: 9px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--text); }
.scroll-indicator__track { position: relative; width: 1.5px; height: 64px; background: rgba(255, 255, 255, .35); }
.scroll-indicator__dot {
  position: absolute; left: 50%; top: 20px; width: 11px; height: 11px; margin-left: -5.5px;
  border: 1.5px solid var(--green); border-radius: 50%; background: var(--bg);
  animation: scrollDot 2.4s var(--ease) infinite;
}
@keyframes scrollDot { 0%, 100% { top: 14px; } 50% { top: 40px; } }

.footer__bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  padding-top: 22px; padding-bottom: 26px;
}
.footer__contact { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 28px; }
.footer__contact a { font-size: 13px; color: var(--muted); transition: color .2s; }
.footer__contact a:hover { color: var(--green); }
.footer__copy { font-size: 12px; color: #6E7680; }

/* ---------- Animación de entrada ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1080px) {
  .header__inner { height: 84px; }
  .logo__icon { width: 56px; }
  .logo__text { font-size: 26px; }
  .services__grid { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
  .service:nth-child(3) { border-left: 0; padding-left: 8px; }
}

@media (max-width: 900px) {
  /* Menú móvil */
  .menu-toggle {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 44px; margin-left: auto;
    background: none; border: 0; cursor: pointer; padding: 10px;
  }
  .menu-toggle span { display: block; height: 2px; background: #fff; border-radius: 2px; transition: transform .3s, opacity .3s; }
  .menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .nav {
    position: fixed; top: 84px; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 24px;
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .25s, transform .25s, visibility .25s;
  }
  .nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .nav__link { font-size: 18px; padding: 14px 0; width: 100%; border-bottom: 1px solid var(--line); }
  .nav__link::after { display: none; }
  .nav__link.is-active { color: var(--green); }
  .header__cta { display: none; }

  /* Hero apilado */
  .hero { flex-direction: column; align-items: stretch; min-height: 0; }
  .hero__content { max-width: none; padding: 48px 0 32px; }
  .hero__visual {
    position: relative; width: 100%; height: auto;
    -webkit-mask-image: none; mask-image: none;
  }
  .compare { width: 100%; height: auto; }

  .section__head--row { flex-direction: column; align-items: flex-start; }
  .works__grid { grid-template-columns: repeat(2, 1fr); }
  .services__head { grid-template-columns: 1fr; gap: 16px; }
  .services__intro { padding-top: 0; }
  .about { grid-template-columns: 1fr; padding-top: 0; }
  .about__media { border-radius: 0; aspect-ratio: 505 / 242; min-height: 0; }
  .about__content { padding: 44px var(--gutter); max-width: none; }
  .section__title br, .about .section__title br { display: none; }
  .footer__lens { right: -30%; opacity: .45; }
}

@media (max-width: 560px) {
  .hero__actions .btn { width: 100%; }
  .services__grid { grid-template-columns: 1fr; }
  .service, .service:first-child, .service:nth-child(3) { border-left: 0; padding: 0 0 28px; border-bottom: 1px solid var(--line); }
  .service:last-child { border-bottom: 0; padding-bottom: 0; }
  .service__text br { display: none; }
  .works__grid { gap: 10px; }
  .card__info { left: 12px; bottom: 12px; }
  .footer__tags span { margin: 0 8px; }
  .scroll-indicator { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
