/* =========================================================
   PLUXAR — Landing page
   Paleta oscura premium: negros + azules/violetas profundos
   ========================================================= */

:root {
  /* Fondos */
  --bg:            #07070f;
  --bg-2:          #0b0b1a;
  --surface:       #101026;
  --surface-2:     #16163a;
  --line:          rgba(255, 255, 255, .09);
  --line-strong:   rgba(255, 255, 255, .18);

  /* Acentos */
  --violet:        #7c3aed;
  --violet-soft:   #a78bfa;
  --blue:          #2563eb;
  --cyan:          #22d3ee;
  --grad:          linear-gradient(120deg, #6366f1 0%, #8b5cf6 45%, #22d3ee 100%);

  /* Texto */
  --text:          #f2f2f7;
  --muted:         #a4a4c2;
  --muted-2:       #7b7b9c;

  /* Medidas */
  --radius:        18px;
  --radius-sm:     12px;
  --radius-lg:     28px;
  --container:     1180px;
  --shadow:        0 24px 60px -20px rgba(0, 0, 0, .8);
  --shadow-glow:   0 0 0 1px rgba(139, 92, 246, .28), 0 20px 60px -18px rgba(99, 102, 241, .55);

  --ease:          cubic-bezier(.22, 1, .36, 1);
}

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

* { margin: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: clamp(1rem, .96rem + .2vw, 1.0625rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Halo ambiental de fondo */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(60vw 60vw at 12% -10%, rgba(99, 102, 241, .18), transparent 60%),
    radial-gradient(50vw 50vw at 100% 8%, rgba(34, 211, 238, .10), transparent 60%),
    radial-gradient(70vw 55vw at 50% 105%, rgba(124, 58, 237, .16), transparent 65%);
}

main, .site-header, .footer { position: relative; z-index: 1; }

img {
  display: block;
  max-width: 100%;
  height: auto;
}

h1, h2, h3 {
  font-family: "Sora", "Inter", sans-serif;
  line-height: 1.12;
  letter-spacing: -.02em;
  font-weight: 800;
  text-wrap: balance;
}

p { text-wrap: pretty; }

a { color: inherit; text-decoration: none; }

button, input, textarea { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--violet);
  color: #fff;
  padding: .75rem 1.25rem;
  z-index: 999;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

/* ---------- Layout ---------- */
.container {
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
}

.section { padding: clamp(4.5rem, 9vw, 7.5rem) 0; }

.section--contact {
  background: linear-gradient(180deg, transparent, rgba(16, 16, 38, .75) 30%, transparent);
}

.section__head {
  max-width: 720px;
  margin: 0 auto clamp(2.5rem, 5vw, 4rem);
  text-align: center;
}

.section__title { font-size: clamp(1.9rem, 1.3rem + 2.6vw, 3rem); }

.section__lead {
  margin-top: 1.1rem;
  color: var(--muted);
  font-size: 1.06rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin-bottom: 1rem;
  padding: .4rem .9rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, .04);
  color: var(--violet-soft);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 0 rgba(34, 211, 238, .7);
  animation: pulse 2.2s infinite;
}

@keyframes pulse {
  70%  { box-shadow: 0 0 0 9px rgba(34, 211, 238, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0); }
}

.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .8rem 1.4rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  font-family: "Sora", sans-serif;
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease),
              background-color .25s var(--ease), border-color .25s var(--ease);
}

.btn--lg { padding: 1rem 1.9rem; font-size: 1rem; }
.btn--sm { padding: .55rem 1.1rem; font-size: .875rem; }
.btn--block { width: 100%; }

.btn--primary {
  border-color: transparent;
  background-image: var(--grad);
  color: #0a0a14;
  box-shadow: 0 14px 34px -14px rgba(124, 58, 237, .9);
}

.btn--ghost {
  background: rgba(255, 255, 255, .04);
  color: var(--text);
  backdrop-filter: blur(8px);
}

.btn:hover { transform: translateY(-2px); }
.btn--primary:hover { box-shadow: 0 20px 44px -14px rgba(124, 58, 237, 1); }
.btn--ghost:hover { border-color: var(--violet-soft); background: rgba(139, 92, 246, .14); }
.btn:active { transform: translateY(0); }
.btn[disabled] { opacity: .6; cursor: not-allowed; transform: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background-color .3s var(--ease), border-color .3s var(--ease);
}

.site-header.is-scrolled {
  background: rgba(7, 7, 15, .78);
  backdrop-filter: blur(14px) saturate(160%);
  border-bottom-color: var(--line);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 74px;
}

.logo {
  font-family: "Sora", sans-serif;
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: .18em;
}
.logo--sm { font-size: 1.15rem; }
.logo__dot { color: var(--cyan); }

.nav__list {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
  padding: 0;
}

.nav__link {
  position: relative;
  color: var(--muted);
  font-weight: 500;
  font-size: .96rem;
  transition: color .2s var(--ease);
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background-image: var(--grad);
  transition: width .3s var(--ease);
}

.nav__link:hover { color: var(--text); }
.nav__link:hover::after { width: 100%; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .04);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform .3s var(--ease), opacity .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); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: clamp(3.5rem, 7vw, 6.5rem) 0 clamp(3.5rem, 7vw, 6rem);
  overflow: hidden;
}

.hero__glow {
  position: absolute;
  top: -30%;
  left: 50%;
  width: min(1100px, 120%);
  aspect-ratio: 1;
  translate: -50% 0;
  background: radial-gradient(circle, rgba(124, 58, 237, .28), transparent 62%);
  filter: blur(30px);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
}

.hero__title { font-size: clamp(2.25rem, 1.3rem + 4vw, 3.9rem); }

.hero__subtitle {
  margin-top: 1.4rem;
  max-width: 34rem;
  color: var(--muted);
  font-size: clamp(1.03rem, 1rem + .3vw, 1.18rem);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .9rem;
  margin-top: 2.2rem;
}

.hero__points {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem 1.75rem;
  margin-top: 2.4rem;
  padding: 0;
  list-style: none;
  color: var(--muted-2);
  font-size: .92rem;
}

.hero__points li { display: flex; align-items: center; gap: .5rem; }

.hero__points li::before {
  content: "";
  width: 16px;
  height: 16px;
  flex: none;
  border-radius: 50%;
  background-image: var(--grad);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 6 9 17l-5-5' fill='none' stroke='%23000' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 13px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 6 9 17l-5-5' fill='none' stroke='%23000' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 13px no-repeat;
}

.hero__frame {
  position: relative;
  padding: 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(139, 92, 246, .18), rgba(34, 211, 238, .06));
  box-shadow: var(--shadow);
}

.hero__frame img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: calc(var(--radius-lg) - 10px);
  animation: float 7s ease-in-out infinite;
}

@keyframes float {
  50% { transform: translateY(-10px); }
}

/* ---------- Grid de servicios ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(1.1rem, 2.2vw, 1.75rem);
}

.card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface) 0%, rgba(11, 11, 26, .9) 100%);
  transition: transform .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease);
}

.card:hover {
  transform: translateY(-6px);
  border-color: rgba(139, 92, 246, .45);
  box-shadow: var(--shadow-glow);
}

/* Uniformidad de las imágenes de las tarjetas.
   --focus controla el punto vertical del recorte: 50% centra (por defecto),
   valores menores suben el encuadre para no cortar la parte alta de la foto. */
.card__media {
  --focus: 50%;
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--surface-2);
}

/* Fotos con el elemento clave en la parte alta */
.card__media--top { --focus: 12%; }

/* El robot de "A Medida" sostiene herramientas arriba y abajo: este encuadre
   deja dentro tanto el rodillo como la llave inferior. */
.card__media--herramientas { --focus: 35%; }

.card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(7, 7, 15, .75) 100%);
  pointer-events: none;
}

.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center var(--focus);
  transition: transform .6s var(--ease);
}

.card:hover .card__media img { transform: scale(1.06); }

/* Sin zoom al pasar el ratón: para fotos con texto que el recorte extra cortaría */
.card:hover .card__media--static img { transform: none; }

.card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: .7rem;
  padding: 1.5rem 1.5rem 1.65rem;
}

.card__title { font-size: 1.22rem; font-weight: 700; }

.card__text {
  color: var(--muted);
  font-size: .97rem;
}

.card__link {
  margin-top: auto;
  padding-top: .4rem;
  color: var(--violet-soft);
  font-weight: 600;
  font-size: .92rem;
}

.card__link span {
  display: inline-block;
  transition: transform .25s var(--ease);
}

.card__link:hover span { transform: translateX(5px); }

/* ---------- Banner "Relájate" ---------- */
.relax {
  position: relative;
  display: grid;
  place-items: center;
  min-height: clamp(340px, 52vw, 520px);
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(115deg, #0b0b1a 0%, #241350 55%, #0e2a4d 100%);
}

.relax__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: -2;
}

.relax__overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(7, 7, 15, .94) 0%, rgba(11, 11, 26, .78) 45%, rgba(7, 7, 15, .45) 100%),
    linear-gradient(180deg, var(--bg) 0%, transparent 22%, transparent 78%, var(--bg) 100%);
}

.relax__inner {
  padding: clamp(3rem, 6vw, 5rem) 0;
  text-align: left;
}

.relax__title {
  margin-bottom: 2rem;
  max-width: 18ch;
  font-size: clamp(1.9rem, 1.1rem + 3.4vw, 3.25rem);
}

/* ---------- Contacto ---------- */
.contact {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.contact__list {
  display: grid;
  gap: .85rem;
  margin-top: 2rem;
  padding: 0;
  list-style: none;
  color: var(--muted);
}

.contact__list li {
  display: flex;
  gap: .7rem;
  align-items: baseline;
}

.contact__list li::before {
  content: "";
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background-image: var(--grad);
}

.contact__list strong { color: var(--text); font-weight: 600; }

.form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(170deg, rgba(22, 22, 58, .85), rgba(11, 11, 26, .9));
  box-shadow: var(--shadow);
}

.field { display: flex; flex-direction: column; gap: .45rem; }
.field--full { grid-column: 1 / -1; }

.field label {
  font-size: .84rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--muted);
  text-transform: uppercase;
}

.field input,
.field textarea {
  width: 100%;
  padding: .85rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: rgba(7, 7, 15, .6);
  color: var(--text);
  font-size: .98rem;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background-color .2s var(--ease);
}

.field textarea { resize: vertical; min-height: 120px; }

.field input::placeholder,
.field textarea::placeholder { color: var(--muted-2); }

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--violet-soft);
  background: rgba(7, 7, 15, .85);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, .18);
}

.field.is-invalid input,
.field.is-invalid textarea {
  border-color: #f87171;
  box-shadow: 0 0 0 4px rgba(248, 113, 113, .14);
}

.error {
  min-height: 1em;
  color: #fca5a5;
  font-size: .8rem;
}

.form__foot { gap: .9rem; margin-top: .25rem; }

.form__note {
  color: var(--muted-2);
  font-size: .82rem;
  text-align: center;
}

.form__status {
  grid-column: 1 / -1;
  max-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border-radius: var(--radius-sm);
  font-size: .92rem;
  text-align: center;
  transition: max-height .35s var(--ease), padding .35s var(--ease);
}

.form__status.is-visible {
  max-height: 160px;
  padding: .85rem 1rem;
}

.form__status.is-success {
  border: 1px solid rgba(34, 211, 238, .4);
  background: rgba(34, 211, 238, .12);
  color: #a5f3fc;
}

.form__status.is-error {
  border: 1px solid rgba(248, 113, 113, .4);
  background: rgba(248, 113, 113, .12);
  color: #fca5a5;
}

/* ---------- Footer ---------- */
.footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--line);
  background: rgba(7, 7, 15, .7);
}

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

.footer__nav { display: flex; gap: 1.5rem; }

.footer__nav a {
  color: var(--muted);
  font-size: .93rem;
  transition: color .2s var(--ease);
}
.footer__nav a:hover { color: var(--text); }

.footer__copy {
  width: 100%;
  color: var(--muted-2);
  font-size: .84rem;
}

/* ---------- Fallback si falta un archivo de imagen ---------- */
.is-missing { visibility: hidden; }

.card__media.has-fallback,
.hero__frame.has-fallback {
  background-image: var(--grad);
  background-size: 200% 200%;
  animation: shift 9s ease-in-out infinite;
}

.hero__frame.has-fallback { min-height: 320px; }

@keyframes shift {
  50% { background-position: 100% 50%; }
}

/* ---------- Animaciones de entrada ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}

.reveal--delay { transition-delay: .12s; }

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 980px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__media { order: -1; max-width: 620px; }
  .hero__subtitle { max-width: none; }
  .contact { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  html { scroll-padding-top: 80px; }

  .nav-toggle { display: flex; }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 0;
    padding: 0 1.25rem;
    overflow: hidden;
    background: rgba(7, 7, 15, .97);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid transparent;
    transition: max-height .35s var(--ease), padding .35s var(--ease), border-color .35s var(--ease);
  }

  .nav.is-open {
    max-height: 340px;
    padding: 1.25rem;
    border-bottom-color: var(--line);
  }

  .nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 1.25rem;
  }

  .nav__link { font-size: 1.05rem; }
  .nav__cta { width: 100%; }

  .hero__points { flex-direction: column; gap: .55rem; }
  .relax__title { max-width: none; }
  .form { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .container { width: min(100% - 1.75rem, var(--container)); }
  .hero__actions .btn { width: 100%; }
}

/* ---------- Accesibilidad: menos movimiento ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }

  .reveal { opacity: 1; transform: none; }
}
