/* ================================================
   NEXUM STUDIO — Landing Page
   Font: Plus Jakarta Sans
   Palette: #000 / #111 / #1a1a1a / #333 / #888 / #e5e5e5 / #f5f5f5 / #fff
   Skills: UI/UX Pro Max — Flat Design, B2B SaaS
================================================ */

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* --- Tokens --- */
:root {
  --black:      #000000;
  --dark:       #111111;
  --dark-2:     #1a1a1a;
  --grey-dark:  #333333;
  --grey:       #888888;
  --grey-light: #e5e5e5;
  --off-white:  #f5f5f5;
  --white:      #ffffff;

  --font: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --radius:    4px;
  --radius-lg: 10px;
  --ease:      200ms ease;
  --ease-slow: 300ms ease;

  --max-w:      1180px;
  --section-py: clamp(80px, 10vw, 136px);
}

/* --- Base --- */
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--dark);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a   { text-decoration: none; color: inherit; }
ul  { list-style: none; }

/* --- Container --- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 64px);
}

/* --- Shared typography --- */
.label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 10px;
}

.section-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: var(--dark);
  margin-bottom: 14px;
}

.section-sub {
  font-size: 17px;
  color: var(--grey);
  max-width: 540px;
  line-height: 1.6;
}

.body-text {
  font-size: 16px;
  line-height: 1.75;
  color: var(--grey-dark);
  max-width: 50ch;
  margin-bottom: 14px;
}

.body-text--muted {
  font-size: 14px;
  color: var(--grey);
  font-style: italic;
  margin-bottom: 32px;
}

.section-header { margin-bottom: clamp(40px, 6vw, 72px); }
.section        { padding: var(--section-py) 0; }

/* ================================================
   BUTTONS
================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 2px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--ease), color var(--ease), border-color var(--ease);
  white-space: nowrap;
  min-height: 48px;
}

.btn--black { background: var(--black); color: var(--white); border-color: var(--black); }
.btn--black:hover { background: var(--dark-2); border-color: var(--dark-2); }

.btn--white { background: var(--white); color: var(--black); border-color: var(--white); }
.btn--white:hover { background: var(--off-white); }

.btn--full { width: 100%; justify-content: center; }

.btn:focus-visible { outline: 2px solid var(--black); outline-offset: 3px; }
.btn:disabled      { opacity: 0.6; cursor: not-allowed; }

/* ================================================
   NAV
================================================ */
.nav {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 200;
  padding: 20px 0;
  transition: background var(--ease-slow), padding var(--ease-slow), box-shadow var(--ease-slow);
}

.nav--scrolled {
  background: rgba(245, 245, 245, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 13px 0;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

.nav__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 64px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav__logo-link { display: flex; align-items: center; }
.nav__logo      { height: 60px; width: auto; display: block; }

/* --- Nav links --- */
.nav__links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav__links a {
  font-size: 14px;
  font-weight: 500;
  color: rgba(17, 17, 17, 0.7);
  transition: color var(--ease);
}
.nav__links a:hover { color: var(--black); }

/* CTA pill */
.nav__cta {
  padding: 9px 20px;
  background: var(--black);
  color: var(--white) !important;
  border-radius: var(--radius);
  font-weight: 600 !important;
  line-height: 1;
  min-height: 40px;
  display: flex;
  align-items: center;
}
.nav__cta:hover { background: var(--dark-2) !important; }

/* Hamburger */
.nav__toggle {
  display: none;
  background: none;
  border: none;
  color: var(--black);
  cursor: pointer;
  padding: 4px;
  z-index: 201;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}
.nav__toggle .icon-close    { display: none; }
.nav__toggle[aria-expanded="true"] .icon-menu  { display: none; }
.nav__toggle[aria-expanded="true"] .icon-close { display: block; }

/* ================================================
   HERO
================================================ */
.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--off-white);
  margin: 0;
  padding: 160px 0 100px;
  overflow: hidden;
}

.hero__container {
  width: 100%;
}

.hero__split {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 60px;
  align-items: center;
  width: 100%;
}

.hero__left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero__eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(17, 17, 17, 0.45);
  margin-bottom: 16px;
}

.hero__title {
  font-size: clamp(36px, 4vw, 52px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--black);
  margin-bottom: 20px;
  text-align: left;
}

.hero__sub {
  font-size: clamp(16px, 1.8vw, 18px);
  font-weight: 400;
  color: rgba(17, 17, 17, 0.6);
  line-height: 1.55;
  margin-bottom: 36px;
  text-align: left;
}

.hero__actions {
  display: flex;
  margin-bottom: 48px;
}

.hero__btn {
  background: var(--black) !important;
  color: var(--white) !important;
  border-color: var(--black) !important;
  border-radius: 50px !important;
  padding: 14px 32px !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  transition: background var(--ease), border-color var(--ease) !important;
}

.hero__btn:hover {
  background: var(--dark-2) !important;
  border-color: var(--dark-2) !important;
}

/* Stats section */
.hero__stats {
  display: flex;
  align-items: center;
  gap: 28px;
}

.hero__stat-divider {
  width: 1px;
  height: 36px;
  background: rgba(0, 0, 0, 0.08);
}

.hero__stat-item {
  display: flex;
  flex-direction: column;
}

.hero__stat-val {
  font-size: clamp(28px, 3.2vw, 34px);
  font-weight: 700;
  color: var(--black);
  line-height: 1;
}

.hero__stat-label {
  font-size: 12px;
  color: var(--grey);
  font-weight: 500;
  margin-top: 4px;
}

/* Right Side Layout */
.hero__right {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.hero__visual-container {
  width: 100%;
  max-width: 880px;
  position: relative;
}

.hero__illustration {
  width: 100%;
  height: auto;
  display: block;
  animation: heroFadeIn 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
  transform: scale(0.96) translateY(12px);
}

@keyframes heroFadeIn {
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .hero {
    padding: 130px 0 60px;
  }
  
  .hero__split {
    grid-template-columns: 1fr;
    gap: 48px;
    text-align: center;
  }
  
  .hero__left {
    align-items: center;
  }
  
  .hero__title {
    text-align: center;
  }
  
  .hero__sub {
    text-align: center;
  }
  
  .hero__actions {
    justify-content: center;
  }
  
  .hero__stats {
    justify-content: center;
  }
  
  .hero__visual-container {
    max-width: 480px;
    margin: 0 auto;
  }
}

/* ================================================
   SERVICIOS
================================================ */
.servicios {
  background: var(--off-white);
  margin: 0;
  border: none;
  box-shadow: none;
  outline: none;
}

.servicios__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}

.service-card {
  background: var(--white);
  padding: clamp(28px, 4vw, 48px) clamp(24px, 3vw, 36px);
  position: relative;
  overflow: hidden;
  transition: background var(--ease);
}

.service-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 3px;
  background: var(--black);
  transition: width var(--ease-slow);
}

.service-card:hover              { background: var(--off-white); }
.service-card:hover::after       { width: 100%; }

.service-card__icon {
  width: 48px; height: 48px;
  background: var(--off-white);
  border: 1px solid var(--grey-light);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
  transition: background var(--ease), color var(--ease), border-color var(--ease);
}

.service-card:hover .service-card__icon {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}

.service-card__title {
  font-size: 17px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 10px;
  line-height: 1.3;
}

.service-card__desc {
  font-size: 14px;
  color: var(--grey);
  line-height: 1.7;
}

/* ================================================
   PROCESO
================================================ */
.proceso { background: var(--white); }

.proceso__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
}

.proceso-step {
  padding: clamp(28px, 3.5vw, 44px) clamp(20px, 2.5vw, 32px);
  background: var(--off-white);
  position: relative;
  overflow: hidden;
  transition: background var(--ease);
}

/* Número grande decorativo */
.proceso-step__num {
  font-size: clamp(52px, 6vw, 80px);
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--grey-light);
  line-height: 1;
  margin-bottom: 16px;
  transition: color var(--ease-slow);
}

.proceso-step:hover                 { background: var(--black); }
.proceso-step:hover .proceso-step__num   { color: rgba(255,255,255,0.08); }
.proceso-step:hover .proceso-step__icon  { color: var(--white); }
.proceso-step:hover .proceso-step__title { color: var(--white); }
.proceso-step:hover .proceso-step__desc  { color: rgba(255,255,255,0.55); }

.proceso-step__icon {
  color: var(--grey-dark);
  margin-bottom: 14px;
  transition: color var(--ease);
}

.proceso-step__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 8px;
  transition: color var(--ease);
}

.proceso-step__desc {
  font-size: 13px;
  color: var(--grey);
  line-height: 1.65;
  transition: color var(--ease);
}

/* ================================================
   CASO DE ÉXITO
================================================ */
.caso { background: var(--off-white); }

.caso__card {
  border: 1px solid var(--grey-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--white);
}

.caso__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(24px, 4vw, 44px);
  border-bottom: 1px solid var(--grey-light);
}

.caso__company  { font-size: 20px; font-weight: 700; color: var(--dark); margin-bottom: 8px; }
.caso__challenge { font-size: 15px; color: var(--grey); max-width: 560px; line-height: 1.65; }

.caso__badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--dark);
  background: var(--off-white);
  border: 1px solid var(--grey-light);
  padding: 7px 14px;
  border-radius: 99px;
  white-space: nowrap;
  flex-shrink: 0;
}

.caso__solution {
  padding: clamp(20px, 3vw, 32px) clamp(24px, 4vw, 44px);
  border-bottom: 1px solid var(--grey-light);
  background: var(--off-white);
  font-size: 15px;
  color: var(--grey-dark);
  line-height: 1.7;
}

.caso__metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: clamp(24px, 4vw, 44px);
  gap: 32px;
}

.metric--center {
  border-left: 1px solid var(--grey-light);
  border-right: 1px solid var(--grey-light);
  padding: 0 32px;
}

.metric          { display: flex; flex-direction: column; gap: 4px; }
.metric__value   { font-size: clamp(36px, 4.5vw, 52px); font-weight: 700; letter-spacing: -0.04em; color: var(--dark); line-height: 1; }
.metric__label   { font-size: 14px; font-weight: 600; color: var(--dark); margin-top: 6px; }
.metric__before  { font-size: 12px; color: var(--grey); }

/* ================================================
   FAQ
================================================ */
.faq { background: var(--white); }

.faq__list {
  max-width: 760px;
  border-top: 1px solid var(--grey-light);
}

.faq__item {
  border-bottom: 1px solid var(--grey-light);
}

.faq__question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 600;
  color: var(--dark);
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: color var(--ease);
}

.faq__question:hover { color: var(--black); }

.faq__question:focus-visible {
  outline: 2px solid var(--black);
  outline-offset: 2px;
  border-radius: 2px;
}

.faq__chevron {
  flex-shrink: 0;
  color: var(--grey);
  transition: transform var(--ease-slow), color var(--ease);
}

.faq__question[aria-expanded="true"] .faq__chevron {
  transform: rotate(180deg);
  color: var(--dark);
}

.faq__answer {
  padding: 0 0 22px;
  font-size: 15px;
  color: var(--grey-dark);
  line-height: 1.7;
  max-width: 640px;
}

.faq__answer p { line-height: 1.7; }

/* ================================================
   CONTACTO
================================================ */
.contacto { background: var(--off-white); }

.contacto__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 8vw, 96px);
  align-items: flex-start;
}

.contacto__points {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 32px;
}

.contacto__points li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--grey-dark);
}

.form {
  background: var(--white);
  border: 1px solid var(--grey-light);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 44px);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form__group  { display: flex; flex-direction: column; gap: 5px; }

.form__label  { font-size: 13px; font-weight: 600; color: var(--dark); }
.form__label span { color: var(--grey); font-weight: 400; }

.form__input {
  font-family: var(--font);
  font-size: 15px;
  color: var(--dark);
  background: var(--off-white);
  border: 1px solid var(--grey-light);
  border-radius: var(--radius);
  padding: 12px 14px;
  width: 100%;
  outline: none;
  transition: border-color var(--ease), background var(--ease);
  min-height: 48px;
}

.form__input::placeholder { color: var(--grey); }
.form__input:focus        { border-color: var(--black); background: var(--white); }
.form__input--error       { border-color: #c00 !important; }

.form__textarea { resize: vertical; min-height: 116px; line-height: 1.6; }

.form__error {
  font-size: 12px;
  color: #c00;
  min-height: 15px;
  line-height: 1.4;
}

.form__success {
  font-size: 14px;
  font-weight: 500;
  color: var(--dark);
  text-align: center;
  padding: 14px;
  background: var(--off-white);
  border: 1px solid var(--grey-light);
  border-radius: var(--radius);
}

/* ================================================
   FOOTER
================================================ */
.footer { background: var(--dark); padding: clamp(52px, 7vw, 88px) 0 32px; }

.footer__inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  margin-bottom: 28px;
}

.footer__logo    { height: 32px; width: auto; margin-bottom: 10px; filter: brightness(0) invert(1); }
.footer__tagline { font-size: 13px; color: rgba(255,255,255,0.3); font-style: italic; }

.footer__nav { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; }

.footer__nav a {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.45);
  transition: color var(--ease);
}
.footer__nav a:hover { color: var(--white); }

.footer__bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.footer__bottom p,
.footer__bottom a { font-size: 13px; color: rgba(255,255,255,0.28); }
.footer__bottom a { transition: color var(--ease); }
.footer__bottom a:hover { color: rgba(255,255,255,0.65); }

/* ================================================
   RESPONSIVE — ≤ 1024px
================================================ */
@media (max-width: 1024px) {
  .proceso__grid { grid-template-columns: repeat(2, 1fr); }
}

/* ================================================
   RESPONSIVE — ≤ 900px
================================================ */
@media (max-width: 900px) {
  .servicios__grid { grid-template-columns: 1fr; gap: 2px; }
}

/* ================================================
   RESPONSIVE — ≤ 860px (mobile & tablet)
================================================ */
@media (max-width: 860px) {
  .nav__toggle { display: flex; }

  .nav__toggle[aria-expanded="true"] {
    color: var(--white) !important;
  }

  .nav__links {
    position: fixed;
    inset: 0;
    background: var(--black);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 36px;
    display: none;
    z-index: 200;
  }
  .nav__links.nav__links--open { display: flex; }
  .nav__links a:not(.nav__cta) { font-size: 22px !important; color: var(--white) !important; }
  .nav__links .nav__cta {
    background: var(--white) !important;
    color: var(--black) !important;
    padding: 14px 36px !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    justify-content: center;
    align-items: center;
  }

  .br-desktop { display: none; }

  .proceso__grid { grid-template-columns: 1fr; }

  .caso__top     { flex-direction: column; }
  .caso__metrics { grid-template-columns: 1fr; gap: 28px; }
  .metric--center {
    border: none;
    padding: 28px 0;
    border-top: 1px solid var(--grey-light);
    border-bottom: 1px solid var(--grey-light);
  }

  .contacto__grid { grid-template-columns: 1fr; }

  .footer__inner  { flex-direction: column; gap: 20px; }
  .footer__bottom { flex-direction: column; gap: 6px; }
}

/* ================================================
   REDUCED MOTION
================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html          { scroll-behavior: auto; }
  .hero__scroll { animation: none; }
}