/* ============================================================
   pixels. — design tokens
   Values are taken verbatim from the handoff spec (README.md).
   ============================================================ */
:root {
  --bg: #170824;
  --bg-alt: #1D0B2E;
  --card-solid: #26103D;

  --magenta: #E0218A;
  --blue: #4AA3DF;
  --pink-soft: #F08BC0;
  --blue-soft: #7FBCE8;

  --text: #F4EFF9;
  --text-2: #CBB8DE;
  --body: #DCCDEB;
  --muted: #B9A8CC;
  --faint: #7E6B93;

  --card-bg: rgba(255,255,255,0.04);
  --card-bg-soft: rgba(255,255,255,0.03);
  --card-border: rgba(255,255,255,0.09);
  --card-border-soft: rgba(255,255,255,0.08);
  --divider: rgba(255,255,255,0.1);

  --gradient: linear-gradient(90deg, var(--blue), var(--magenta));
  --gradient-cta: linear-gradient(120deg, #3D7DBB, var(--magenta));

  --sans: 'Manrope', system-ui, sans-serif;
  --display: 'Sora', sans-serif;

  --section-pad: clamp(64px, 10vw, 110px);
  --gutter: clamp(20px, 5vw, 48px);
  --wrap: 1200px;
  --nav-h: 68px;
}

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

html {
  scroll-behavior: smooth;
  /* keep anchored sections clear of the fixed nav */
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--pink-soft); text-decoration: none; }
a:hover { color: var(--magenta); }
img { max-width: 100%; display: block; }
::selection { background: var(--magenta); color: #fff; }

:focus-visible {
  outline: 2px solid var(--pink-soft);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 300;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--card-solid);
  color: var(--text);
  font-weight: 700;
}
.skip-link:focus { left: 16px; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-inline: var(--gutter);
}
.wrap--narrow { max-width: 840px; }

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

/* ============================================================
   buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
  padding: 10px 22px;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.btn--lg { font-size: 16px; padding: 16px 34px; }

.btn--primary { background: var(--gradient); color: #fff; }
.btn--primary:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(224,33,138,0.35);
}

.btn--ghost {
  border: 1px solid rgba(255,255,255,0.25);
  color: var(--text);
}
.btn--ghost:hover { border-color: var(--magenta); color: var(--text); }

.btn--dark { background: var(--bg); color: #fff; }
.btn--dark:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(0,0,0,0.35);
}

/* ============================================================
   nav
   ============================================================ */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: rgba(23,8,36,0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.nav__inner {
  max-width: var(--wrap);
  margin: 0 auto;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-inline: clamp(16px, 4vw, 32px);
}

.logo {
  font-family: var(--display);
  font-weight: 800;
  font-size: 24px;
  letter-spacing: -0.02em;
  display: flex;
  align-items: baseline;
}
.logo:hover { color: inherit; }
.logo--sm { font-size: 22px; }
.logo__dot { color: var(--magenta); }

.nav__links { display: flex; align-items: center; gap: 28px; }
.nav__links a {
  color: var(--text-2);
  font-size: 15px;
  font-weight: 600;
  transition: color .2s;
}
.nav__links a:hover { color: #fff; }

.nav__actions { display: flex; align-items: center; gap: 12px; }

.lang-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.25);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 14px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: border-color .2s;
}
.lang-btn:hover { border-color: var(--magenta); }

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 10px;
}
.burger span {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
}
.burger span:last-child { width: 14px; background: var(--magenta); }

/* ============================================================
   mobile menu
   ============================================================ */
.menu {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(23,8,36,0.97);
  display: flex;
  flex-direction: column;
  padding: 24px;
}
.menu[hidden] { display: none; }

.menu__top { display: flex; justify-content: space-between; align-items: center; }
.menu__close {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.25);
  color: var(--text);
  font-size: 20px;
  cursor: pointer;
}
.menu__links { display: flex; flex-direction: column; gap: 8px; margin-top: 48px; }
.menu__links a {
  color: var(--text);
  font-family: var(--display);
  font-size: 30px;
  font-weight: 700;
  padding: 10px 0;
}
.menu__cta {
  align-self: flex-start;
  margin-top: 24px;
  padding: 16px 36px;
  font-size: 17px;
  color: #fff;
}

/* ============================================================
   hero
   ============================================================ */
.hero { position: relative; overflow: hidden; background: var(--bg); }

.blob {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.blob--a {
  width: 520px; height: 520px;
  top: -140px; left: -140px;
  background: radial-gradient(circle at 35% 35%, rgba(74,163,223,0.45), transparent 65%);
  filter: blur(70px);
  animation: floatA 16s ease-in-out infinite;
}
.blob--b {
  width: 560px; height: 560px;
  bottom: -180px; right: -160px;
  background: radial-gradient(circle at 60% 60%, rgba(224,33,138,0.4), transparent 65%);
  filter: blur(80px);
  animation: floatB 20s ease-in-out infinite;
}
.ring {
  position: absolute;
  width: 300px; height: 300px;
  top: 20%; right: 12%;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.06);
  pointer-events: none;
}

@keyframes floatA { 0%,100% { transform: translate(0,0); } 50% { transform: translate(40px,-50px); } }
@keyframes floatB { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-50px,40px); } }

/* Split hero: copy left, 3D can right. Collapses to a single
   centered column below the nav breakpoint. */
.hero__inner {
  position: relative;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(130px, 20vh, 190px) var(--gutter) clamp(80px, 12vh, 130px);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: clamp(32px, 5vw, 64px);
}
/* min-width:0 — without it a grid track grows to fit the canvas's
   intrinsic width, which feeds back into the renderer's resize. */
.hero__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  min-width: 0;
}

.hero__visual {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.can {
  width: 100%;
  height: clamp(340px, 46vh, 520px);
  border-radius: 24px;
  outline-offset: 6px;
}
/* The renderer sizes the drawing buffer, CSS sizes the box. */
.can canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.can__hint {
  color: var(--faint);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  user-select: none;
}

.badge {
  display: inline-flex;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid rgba(224,33,138,0.4);
  background: rgba(224,33,138,0.08);
  color: var(--pink-soft);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero__title {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(36px, 5.2vw, 60px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.hero__sub {
  margin: 0;
  max-width: 540px;
  color: var(--text-2);
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.6;
  text-wrap: pretty;
}
.hero__ctas {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 8px;
}

/* ============================================================
   sections
   ============================================================ */
.section { background: var(--bg); padding-block: var(--section-pad); }
.section--alt { background: var(--bg-alt); }
.section--cta { padding-top: 0; }

.label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--magenta);
}
.h2 {
  margin: 12px 0 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.section__head { max-width: 640px; }
.section__head .h2 { margin-bottom: 14px; }
.section__sub {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
  text-wrap: pretty;
}

.grid { display: grid; gap: 20px; }
.grid--2        { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); margin-top: 40px; }
.grid--pillars  { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); margin-top: 20px; }
.grid--services { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); margin-top: 44px; }
.grid--logos    { grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 16px; margin-top: 44px; }
.grid--plans    { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); margin-top: 44px; align-items: stretch; }

/* ============================================================
   nosotros
   ============================================================ */
.card {
  border-radius: 24px;
  padding: 32px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
}
/* padding-box/border-box trick: solid fill + gradient stroke */
.card--gradient {
  background:
    linear-gradient(var(--card-solid), var(--card-solid)) padding-box,
    linear-gradient(120deg, rgba(74,163,223,0.8), rgba(224,33,138,0.8)) border-box;
  border: 1px solid transparent;
}
.card__title {
  margin: 0 0 10px;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 700;
}
.card__title--pink { color: var(--pink-soft); }
.card__title--blue { color: var(--blue-soft); }
.card__body { margin: 0; color: var(--body); font-size: 16px; line-height: 1.65; text-wrap: pretty; }

.pillar {
  border-radius: 20px;
  padding: 26px;
  background: var(--card-bg-soft);
  border: 1px solid var(--card-border-soft);
}
.pillar__title { margin: 0 0 8px; font-family: var(--display); font-size: 17px; font-weight: 700; }
.pillar__body  { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.6; }

/* ============================================================
   servicios
   ============================================================ */
.service {
  border-radius: 22px;
  padding: 30px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  transition: transform .3s, border-color .3s;
}
.service:hover { transform: translateY(-5px); border-color: rgba(224,33,138,0.55); }
.service__num {
  font-family: var(--display);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.1em;
}
.service__title { margin: 14px 0 10px; font-family: var(--display); font-size: 21px; font-weight: 700; }
.service__body  { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.6; }

/* ============================================================
   portafolio
   ============================================================ */
.logo-tile {
  aspect-ratio: 1;
  border-radius: 20px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 16px;
  display: grid;
  place-items: center;
}
.logo-tile img { width: 100%; height: 100%; object-fit: contain; }

/* ============================================================
   planes
   ============================================================ */
.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-radius: 24px;
  padding: 30px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
}
.plan--featured {
  background:
    linear-gradient(var(--card-solid), var(--card-solid)) padding-box,
    linear-gradient(135deg, var(--blue), var(--magenta)) border-box;
  border: 1.5px solid transparent;
}
.plan__badge {
  position: absolute;
  top: -12px;
  right: 22px;
  padding: 5px 14px;
  border-radius: 999px;
  background: var(--gradient);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.plan__title { margin: 0; font-family: var(--display); font-size: 20px; font-weight: 700; }
.plan__desc  { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.55; }
.plan__price { font-family: var(--display); font-size: 28px; font-weight: 800; }
.plan__price-note { font-size: 15px; font-weight: 600; color: var(--muted); }

.plan__features {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.plan__features li {
  display: flex;
  gap: 10px;
  align-items: baseline;
  color: var(--body);
  font-size: 14.5px;
  line-height: 1.5;
}
.plan__features li::before {
  content: "—";
  color: var(--magenta);
  font-weight: 800;
  flex-shrink: 0;
}
.plan__cta { margin-top: auto; padding: 13px 24px; font-size: 15px; }

/* ============================================================
   faq
   ============================================================ */
.faq { margin-top: 36px; display: flex; flex-direction: column; }
.faq__item { border-bottom: 1px solid var(--divider); }
.faq__item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 22px 0;
  cursor: pointer;
  font-family: var(--display);
  font-size: 17px;
  font-weight: 600;
  list-style: none;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__mark {
  color: var(--magenta);
  font-size: 22px;
  font-weight: 400;
  flex-shrink: 0;
  transition: transform .25s;
}
.faq__item[open] .faq__mark { transform: rotate(45deg); }
.faq__item p {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.65;
  text-wrap: pretty;
}

/* ============================================================
   cta band
   ============================================================ */
.cta {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  background: var(--gradient-cta);
  padding: clamp(48px, 8vw, 88px) clamp(24px, 6vw, 72px);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.cta__ring { position: absolute; border-radius: 50%; pointer-events: none; }
.cta__ring--lg {
  width: 340px; height: 340px;
  top: -120px; right: -80px;
  border: 1px solid rgba(255,255,255,0.2);
}
.cta__ring--sm {
  width: 220px; height: 220px;
  bottom: -90px; left: -50px;
  border: 1px solid rgba(255,255,255,0.15);
}
.cta__title {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(30px, 5vw, 54px);
  line-height: 1.1;
  color: #fff;
  letter-spacing: -0.01em;
}
.cta__sub {
  margin: 0;
  max-width: 560px;
  color: rgba(255,255,255,0.88);
  font-size: 17px;
  line-height: 1.6;
  text-wrap: pretty;
}
.cta .btn--dark { margin-top: 8px; padding: 16px 36px; }

/* ============================================================
   footer
   ============================================================ */
.footer { background: var(--bg); border-top: 1px solid rgba(255,255,255,0.07); }
.footer__inner {
  padding-block: 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
}
.footer__brand { display: flex; flex-direction: column; gap: 6px; }
.footer__tag { color: var(--muted); font-size: 14px; }
.footer__links { display: flex; gap: 24px; flex-wrap: wrap; align-items: center; }
.footer__links a { color: var(--text-2); font-size: 14px; font-weight: 600; }
.footer__links a:hover { color: #fff; }
.footer__copy { color: var(--faint); font-size: 13px; }

/* ============================================================
   scroll reveal — JS adds .is-revealed once in view
   ============================================================ */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.22,1,.36,1);
  transition-delay: calc(var(--reveal-i, 0) * 0.08s);
}
[data-reveal].is-revealed { opacity: 1; transform: none; }

/* No JS: never leave content invisible. */
.no-js [data-reveal] { opacity: 1; transform: none; }

/* ============================================================
   responsive — 900px is the nav collapse breakpoint.
   Grids reflow on their own via auto-fit/minmax.
   ============================================================ */
@media (max-width: 900px) {
  .nav__links, .nav__cta { display: none; }
  .burger { display: flex; }

  /* stack the hero: copy above the can, everything centered */
  .hero__inner { grid-template-columns: 1fr; text-align: center; }
  .hero__copy { align-items: center; }
  .hero__sub { margin-inline: auto; }
  .hero__ctas { justify-content: center; }
  .can { height: clamp(300px, 42vh, 380px); }
}

@media (min-width: 901px) {
  .menu { display: none !important; }
}

/* ============================================================
   reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .blob--a, .blob--b { animation: none; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .btn, .service, .faq__mark { transition: none; }
  .btn--primary:hover, .btn--dark:hover, .service:hover { transform: none; }
}
