/* =========================================================
   The Social Crane — estilos
   ========================================================= */
:root {
  --bg: #0a0a12;
  --bg-alt: #0f0f1a;
  --surface: #151522;
  --surface-2: #1c1c2c;
  --border: rgba(255, 255, 255, .08);
  --border-strong: rgba(255, 255, 255, .16);
  --text: #f3f3f8;
  --muted: #a0a0b8;
  --violet: #7c5cff;
  --violet-2: #a48bff;
  --pink: #ff4fa3;
  --lime: #c6f432;
  --radius: 18px;
  --radius-lg: 28px;
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, .6);
  --font-head: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.1; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(2.5rem, 6vw, 4.6rem); font-weight: 700; }
h2 { font-size: clamp(1.9rem, 4vw, 3rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--muted); max-width: 34rem; }

.container { width: min(1180px, 100% - 32px); margin-inline: auto; }
.container--narrow { width: min(780px, 100% - 32px); }

.skip { position: absolute; left: -999px; top: 8px; background: var(--lime); color: #000; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

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

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .95em 1.6em; border-radius: 999px;
  font: 600 1rem/1 var(--font-body); text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: transform .2s, background .2s, border-color .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--lime); color: #0a0a12; box-shadow: 0 10px 30px -10px rgba(198, 244, 50, .55); }
.btn--primary:hover { box-shadow: 0 14px 40px -10px rgba(198, 244, 50, .75); }
.btn--ghost { border-color: var(--border-strong); color: var(--text); background: rgba(255, 255, 255, .03); }
.btn--ghost:hover { border-color: var(--violet-2); background: rgba(124, 92, 255, .1); }
.btn--sm { padding: .7em 1.2em; font-size: .92rem; }
.btn--block { width: 100%; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .55em;
  font: 600 .8rem/1 var(--font-body); letter-spacing: .12em; text-transform: uppercase;
  color: var(--violet-2); margin-bottom: 1.1rem;
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px rgba(198, 244, 50, .2); }
.grad { background: linear-gradient(100deg, var(--violet-2), var(--pink) 60%, #ffb36b); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Cabecera ---------- */
.header {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header-h);
  border-bottom: 1px solid transparent; transition: border-color .3s;
}
/* El desenfoque va en un pseudo-elemento: si estuviera en .header, el menú móvil (position: fixed) quedaría recortado dentro de la cabecera */
.header::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .3s;
  background: rgba(10, 10, 18, .75); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.header.is-scrolled { border-color: var(--border); }
.header.is-scrolled::before { opacity: 1; }
.header__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand img { width: 160px; height: auto; }
.nav { display: flex; align-items: center; gap: 30px; }
.nav a:not(.btn) { text-decoration: none; color: var(--muted); font-weight: 500; font-size: .95rem; transition: color .2s; }
.nav a:not(.btn):hover { color: var(--text); }
.burger { display: none; }
.header__actions { display: flex; align-items: center; gap: 12px; }

/* Selector de idioma */
.lang { display: flex; padding: 3px; border-radius: 999px; border: 1px solid var(--border-strong); background: rgba(255, 255, 255, .03); }
.lang a { padding: 6px 11px; border-radius: 999px; font: 600 .8rem/1 var(--font-body); letter-spacing: .04em; text-decoration: none; color: var(--muted); transition: color .2s, background .2s; }
.lang a:hover { color: var(--text); }
.lang a[aria-current="page"] { background: var(--text); color: var(--bg); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: calc(var(--header-h) + 72px) 0 96px; overflow: hidden; }
.hero__bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(600px 400px at 80% 20%, rgba(124, 92, 255, .35), transparent 70%),
    radial-gradient(500px 380px at 10% 90%, rgba(255, 79, 163, .18), transparent 70%);
}
.hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 75%);
}
.hero__grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin: 32px 0 40px; }
.hero__proof { display: flex; gap: 36px; list-style: none; padding: 0; margin: 0; }
.hero__proof li { display: flex; flex-direction: column; }
.hero__proof strong { font: 700 1.6rem/1.1 var(--font-head); }
.hero__proof span { color: var(--muted); font-size: .9rem; }

.hero__visual { position: relative; padding: 30px 10px; }
.browser {
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius);
  box-shadow: var(--shadow), 0 0 0 1px rgba(124, 92, 255, .15), 0 40px 120px -40px rgba(124, 92, 255, .5);
  overflow: hidden; transform: perspective(1200px) rotateY(-8deg) rotateX(4deg);
}
.browser__bar { display: flex; align-items: center; gap: 6px; padding: 12px 14px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.browser__bar i { width: 10px; height: 10px; border-radius: 50%; background: #3a3a50; }
.browser__bar i:first-child { background: #ff5f57; } .browser__bar i:nth-child(2) { background: #febc2e; } .browser__bar i:nth-child(3) { background: #28c840; }
.browser__bar span { margin-left: 12px; font-size: .78rem; color: var(--muted); background: var(--bg); padding: 4px 12px; border-radius: 999px; }
.browser__body { padding: 22px; display: grid; gap: 14px; }
.sk { border-radius: 8px; background: linear-gradient(90deg, #22223a, #2c2c48, #22223a); background-size: 200% 100%; animation: shimmer 2.4s infinite linear; }
.sk--nav { height: 14px; width: 40%; }
.sk--title { height: 34px; width: 85%; margin-top: 18px; background: linear-gradient(90deg, var(--violet), var(--pink)); opacity: .85; animation: none; }
.sk--line { height: 12px; width: 65%; }
.sk--btn { height: 34px; width: 130px; border-radius: 999px; background: var(--lime); animation: none; }
.sk-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 8px; }
.sk-grid div { height: 78px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
@keyframes shimmer { to { background-position: -200% 0; } }

.chip {
  position: absolute; padding: 10px 16px; border-radius: 999px; font-size: .88rem; font-weight: 600;
  background: rgba(21, 21, 34, .85); border: 1px solid var(--border-strong); backdrop-filter: blur(8px);
  box-shadow: var(--shadow); white-space: nowrap; animation: float 6s ease-in-out infinite;
}
.chip--a { top: 0; left: -10px; }
.chip--b { top: 46%; right: -14px; animation-delay: -2s; }
.chip--c { bottom: 0; left: 18%; animation-delay: -4s; }
@keyframes float { 50% { transform: translateY(-10px); } }

/* ---------- Secciones ---------- */
.section { padding: clamp(72px, 10vw, 120px) 0; }
.section--alt { background: var(--bg-alt); border-block: 1px solid var(--border); }
.section__head { max-width: 680px; margin-bottom: 52px; }

/* Bento */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 32px; transition: border-color .3s, transform .3s;
}
.card:hover { border-color: rgba(124, 92, 255, .45); transform: translateY(-4px); }
.card--wide { grid-column: span 2; background: linear-gradient(140deg, rgba(124, 92, 255, .14), transparent 60%), var(--surface); }
.card__icon { font-size: 1.6rem; width: 54px; height: 54px; display: grid; place-items: center; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); margin-bottom: 22px; }
.card p { color: var(--muted); margin: 0; }

/* Trabajos */
.works {
  --gap: 20px;
  display: flex; gap: var(--gap); overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scrollbar-width: none;
  padding: 10px 2px 6px; margin: -10px -2px 0;
}
.works::-webkit-scrollbar { display: none; }
.work { flex: 0 0 calc((100% - 2 * var(--gap)) / 3); scroll-snap-align: start; text-decoration: none; display: block; border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); border: 1px solid var(--border); transition: border-color .3s, transform .3s; }
.work:hover { border-color: var(--border-strong); transform: translateY(-6px); }
.work__img { overflow: hidden; aspect-ratio: 1; }
.work__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.work:hover .work__img img { transform: scale(1.04); }
.work__meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; }
.work__meta h3 { margin: 0 0 4px; font-size: 1.05rem; }
.work__meta p { margin: 0; color: var(--muted); font-size: .85rem; }
.arrow { width: 36px; height: 36px; flex: none; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--border-strong); transition: background .3s, color .3s; }
.work:hover .arrow { background: var(--lime); color: #000; border-color: var(--lime); }

.works__nav { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.works__nav[hidden] { display: none; }
.works__btn {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); font-size: 1.1rem;
  transition: background .3s, color .3s, border-color .3s, opacity .3s;
}
.works__btn:hover:not(:disabled) { background: var(--lime); color: #000; border-color: var(--lime); }
.works__btn:disabled { opacity: .35; cursor: default; }

/* Fondo con textura y parallax (sección Trabajos) */
.tex { position: relative; overflow: hidden; isolation: isolate; background: linear-gradient(150deg, #1b1536 0%, #12121f 45%, #221329 100%); }
.tex > .container { position: relative; z-index: 1; }
.tex__bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.tex__bg > * { position: absolute; will-change: transform; }
.tex__mesh {
  inset: -30% -10%;
  background:
    radial-gradient(40% 35% at 20% 30%, rgba(124, 92, 255, .40), transparent 70%),
    radial-gradient(35% 30% at 85% 70%, rgba(255, 79, 163, .28), transparent 70%),
    radial-gradient(20% 18% at 70% 15%, rgba(198, 244, 50, .10), transparent 70%);
}
.tex__grain {
  inset: 0; opacity: .22; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.tex__big {
  left: 0; white-space: nowrap; font: 700 clamp(120px, 18vw, 260px)/1 var(--font-head);
  color: transparent; -webkit-text-stroke: 1.5px rgba(255, 255, 255, .07); letter-spacing: -.02em;
}
.tex__big--1 { top: 4%; }
.tex__big--2 { bottom: 2%; left: -60%; }
@media (prefers-reduced-motion: reduce) { .tex__bg > * { transform: none !important; } }

/* Proceso */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: s; }
.step { position: relative; padding: 28px; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--surface); }
.step__n { display: inline-block; font: 700 .85rem/1 var(--font-head); color: var(--lime); padding: 8px 12px; border-radius: 999px; background: rgba(198, 244, 50, .1); margin-bottom: 22px; }
.step p { color: var(--muted); margin: 0; }

/* Precios */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; padding: 36px 32px; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--surface); }
.plan--featured {
  border-color: transparent;
  background: linear-gradient(var(--surface), var(--surface)) padding-box, linear-gradient(140deg, var(--violet), var(--pink)) border-box;
  border: 1.5px solid transparent;
  box-shadow: 0 30px 80px -30px rgba(124, 92, 255, .6);
}
.plan__badge { position: absolute; top: -14px; left: 32px; margin: 0; padding: 6px 14px; border-radius: 999px; background: linear-gradient(90deg, var(--violet), var(--pink)); font-size: .78rem; font-weight: 600; }
.plan__tag { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--violet-2); font-weight: 600; margin-bottom: .6em; }
.plan h3 { font-size: 1.5rem; }
.plan__price { font: 700 3.4rem/1 var(--font-head); margin: 10px 0 14px; letter-spacing: -.03em; }
.plan__price span { font-size: 1.4rem; vertical-align: top; margin-right: 4px; color: var(--muted); }
.plan__desc { color: var(--muted); min-height: 3.2em; }
.plan__list { list-style: none; padding: 20px 0 0; margin: 0 0 28px; border-top: 1px solid var(--border); display: grid; gap: 12px; flex: 1; }
.plan__list li { display: flex; gap: 10px; align-items: flex-start; }
.plan__list li::before { content: "✓"; color: var(--lime); font-weight: 700; flex: none; }
.plan__list li.plus { font-weight: 600; }
.plan__list li.plus::before { content: "+"; }

/* FAQ */
.faq { display: grid; gap: 12px; }
.faq details { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); transition: border-color .3s; }
.faq details[open] { border-color: rgba(124, 92, 255, .45); }
.faq summary { list-style: none; cursor: pointer; padding: 22px 26px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.5rem; line-height: 1; color: var(--violet-2); transition: transform .3s; flex: none; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 26px 22px; margin: 0; color: var(--muted); }

/* Contacto */
.contact { display: grid; grid-template-columns: 1fr 1.1fr; gap: 64px; align-items: start; }
.contact__list { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 14px; }
.contact__list li { display: flex; align-items: center; gap: 12px; }
.contact__list li[hidden] { display: none; }
.contact__list span { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.contact__list a { text-decoration: none; font-weight: 500; }
.contact__list a:hover { color: var(--lime); }

.form { display: grid; gap: 16px; padding: 32px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form label { display: grid; gap: 8px; font-size: .9rem; font-weight: 500; }
.form em { color: var(--muted); font-style: normal; font-weight: 400; }
.form input, .form select, .form textarea {
  width: 100%; padding: 14px 16px; border-radius: 12px; font: inherit; font-size: 1rem; color: var(--text);
  background: var(--bg); border: 1px solid var(--border-strong); transition: border-color .2s, box-shadow .2s;
}
.form select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 4px rgba(124, 92, 255, .2); }
.form textarea { resize: vertical; }
.form .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; color: var(--muted); }
.form .check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--lime); flex: none; }
.hp { position: absolute; left: -9999px; }
.form__status { margin: 0; min-height: 1.4em; font-size: .92rem; }
.form__status.ok { color: var(--lime); }
.form__status.err { color: #ff8a8a; }

/* Páginas legales */
.legal { padding: calc(var(--header-h) + 56px) 0 80px; }
.legal h1 { font-size: clamp(2rem, 5vw, 3rem); }
.legal h2 { font-size: 1.25rem; margin-top: 2.2em; }
.legal p { color: var(--muted); }
.legal strong { color: var(--text); }
.legal a { color: var(--violet-2); }

/* Pie */
.footer { padding: 40px 0; border-top: 1px solid var(--border); }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; color: var(--muted); font-size: .9rem; }
.footer p { margin: 0; }
.footer nav { display: flex; gap: 22px; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--text); }

/* WhatsApp flotante */
.wa-float { position: fixed; right: 20px; bottom: 20px; z-index: 40; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: #25d366; color: #fff; box-shadow: 0 12px 30px -8px rgba(37, 211, 102, .6); transition: transform .2s; }
.wa-float:hover { transform: scale(1.08); }
.wa-float[hidden] { display: none; }

/* Animación de aparición */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__visual { max-width: 560px; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .works { --gap: 16px; }
  .plans { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; }
  .contact { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 820px) {
  .work { flex-basis: calc((100% - var(--gap)) / 2); }
  .burger {
    display: grid; place-content: center; gap: 6px; width: 46px; height: 46px; border-radius: 12px;
    background: var(--surface); border: 1px solid var(--border-strong); cursor: pointer; z-index: 60;
  }
  .burger span { display: block; width: 20px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .3s; }
  .burger[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
  .burger[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }
  .nav {
    position: fixed; inset: 0; flex-direction: column; justify-content: center; gap: 28px;
    background: rgba(10, 10, 18, .97); backdrop-filter: blur(10px);
    opacity: 0; pointer-events: none; transition: opacity .3s;
  }
  .nav.is-open { opacity: 1; pointer-events: auto; }
  .nav a:not(.btn) { font: 600 1.6rem/1 var(--font-head); color: var(--text); }
  .bento { grid-template-columns: 1fr; }
  .card--wide { grid-column: auto; }
}

@media (max-width: 600px) {
  .brand img { width: 130px; }
  .header__actions > .btn { display: none; }
  .hero { padding: calc(var(--header-h) + 40px) 0 72px; }
  .hero__ctas .btn { flex: 1 1 100%; }
  .hero__proof { gap: 22px; }
  .hero__proof strong { font-size: 1.3rem; }
  .hero__visual { padding: 24px 0; }
  .browser { transform: none; }
  .chip { font-size: .78rem; padding: 8px 12px; }
  .chip--a { left: 0; } .chip--b { right: 0; }
  .steps { grid-template-columns: 1fr; }
  .work { flex-basis: 84%; }
  .form { padding: 22px; }
  .form__row { grid-template-columns: 1fr; }
  .card, .plan { padding: 26px; }
  .footer__inner { flex-direction: column; text-align: center; }
}

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