/* =========================================================
   OtreDev — estilos
   Dirección visual: oscura, sobria, técnica. Bordes finos en
   lugar de sombras, esquinas rectas, una sola tipografía.
   ========================================================= */

:root {
  --bg: #121212;
  --surface: #191919;
  --surface-2: #1e1e1e;
  --border-solid: #313131;

  --text: #ffffff;
  --text-2: rgba(255, 255, 255, 0.6);
  --text-3: rgba(255, 255, 255, 0.4);
  --line: rgba(255, 255, 255, 0.1);
  --line-soft: rgba(255, 255, 255, 0.06);

  --lavender: #caccfd;
  --periwinkle: #a1b5fe;
  --coral: #f86567;

  --font: "Outfit", Arial, sans-serif;

  --container: 1200px;
  --nav-h: 64px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 24px); }

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 24px;
  font-weight: 300;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Grano leve: solo en el header, el hero de la página de inicio y los footers.
   Motas finas de alto contraste a baja opacidad (se ven sobre el negro sin lavarlo). */
:root {
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 3.2 0 0 0 -1.25'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.nav::after, .hero::after, .footer::after {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 3;
  opacity: 0.075;
  background-image: var(--grain);
  background-size: 200px 200px;
}
.hero, .footer { position: relative; }
/* El canvas del hero queda por encima del grano (sin textura) */
.hero__visual { z-index: 4; }

img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
ul, ol { list-style: none; }
[hidden] { display: none !important; }

::selection { background: var(--lavender); color: #121212; }
:focus-visible { outline: 1px solid var(--periwinkle); outline-offset: 3px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 32px; }

.icon {
  width: 1em; height: 1em;
  fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0;
}

/* ---------- Tipografía ---------- */
h1, h2, h3, h4 { font-weight: 400; color: var(--text); }

.h1 {
  font-size: clamp(2.6rem, 6.2vw, 5rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  font-weight: 400;
}
.h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.75rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 500;
}
.lead { color: var(--text-2); font-size: 1.125rem; line-height: 1.6; max-width: 620px; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }

.label {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.8125rem; letter-spacing: 0.04em;
  color: var(--text-3);
}
.label::before { content: ""; width: 6px; height: 6px; background: var(--periwinkle); }
.label--coral::before { background: var(--coral); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 0.9375rem; font-weight: 400; line-height: 1.2;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.btn .icon { transition: transform 0.25s var(--ease); }
.btn:hover .icon { transform: translateX(3px); }
.btn--primary { background: rgba(255, 255, 255, 0.9); color: #121212; }
.btn--primary:hover { background: #fff; }
.btn--ghost { border: 1px solid var(--line); color: var(--text); }
.btn--ghost:hover { border-color: rgba(255, 255, 255, 0.28); }
.btn--sm { padding: 8px 14px; font-size: 0.875rem; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--text); font-size: 0.9375rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 4px;
  transition: border-color 0.2s;
}
.link-arrow:hover { border-color: var(--text-2); }
.link-arrow .icon { transition: transform 0.25s var(--ease); }
.link-arrow:hover .icon { transform: translateX(3px); }

/* ---------- Navegación ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--nav-h);
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s;
}
.nav.is-scrolled, .nav.is-open {
  background: rgba(18, 18, 18, 0.82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-color: var(--line-soft);
}
.nav__inner { height: 100%; display: flex; align-items: center; gap: 40px; }

.brand { font-size: 1.25rem; font-weight: 400; letter-spacing: -0.02em; color: var(--text); display: inline-flex; align-items: center; gap: 10px; }
.brand__mark { width: 10px; height: 10px; border: 1.5px solid var(--lavender); }

.nav__menu { display: flex; align-items: center; gap: 28px; flex: 1; }
.nav__link {
  font-size: 0.9375rem; color: var(--text-2);
  display: inline-flex; align-items: center; gap: 6px;
  transition: color 0.2s;
}
.nav__link:hover, .nav__link.is-active, .dropdown.is-open > .nav__link { color: var(--text); }
.nav__link .icon { width: 12px; height: 12px; transition: transform 0.25s var(--ease); }
.dropdown.is-open > .nav__link .icon { transform: rotate(180deg); }
.nav__cta { margin-left: auto; }

.nav__right { display: flex; align-items: center; gap: 16px; }

/* Desplegable de servicios */
.dropdown { position: relative; }
.dropdown__panel {
  position: absolute; top: calc(100% + 20px); left: -20px;
  width: 340px;
  background: var(--surface);
  border: 1px solid var(--border-solid);
  padding: 8px;
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity 0.2s, transform 0.2s var(--ease), visibility 0.2s;
}
.dropdown__panel::before { content: ""; position: absolute; inset: -22px 0 100% 0; } /* puente para el hover */
.dropdown.is-open .dropdown__panel { opacity: 1; visibility: visible; transform: none; }
.dropdown__item { display: block; padding: 12px 14px; transition: background 0.15s; }
.dropdown__item:hover, .dropdown__item:focus-visible { background: var(--surface-2); }
.dropdown__item strong { display: flex; align-items: center; gap: 10px; font-weight: 400; color: var(--text); }
.dropdown__item strong i { width: 6px; height: 6px; background: var(--periwinkle); }
.dropdown__item:nth-child(2) strong i { background: var(--lavender); }
.dropdown__item:nth-child(3) strong i { background: var(--coral); }
.dropdown__item > span { display: block; margin: 2px 0 0 16px; font-size: 0.875rem; line-height: 1.45; color: var(--text-2); }

.lang { display: flex; font-size: 0.8125rem; }
.lang__btn { padding: 4px 6px; color: var(--text-3); transition: color 0.2s; }
.lang__btn.is-active, .lang__btn:hover { color: var(--text); }

.nav__toggle {
  display: none; width: 40px; height: 40px; position: relative;
  border: 1px solid rgba(255, 255, 255, 0.22);
  transition: border-color 0.2s, background 0.2s;
}
.nav__toggle:hover, .nav.is-open .nav__toggle { border-color: var(--periwinkle); background: rgba(161, 181, 254, 0.12); }
.nav__toggle span { position: absolute; left: 11px; right: 11px; height: 2px; background: var(--text-3); transition: transform 0.3s var(--ease); }
.nav__toggle span:first-child { top: 14px; }
.nav__toggle span:last-child { top: 22px; }
.nav.is-open .nav__toggle span:first-child { transform: translateY(4px) rotate(45deg); }
.nav.is-open .nav__toggle span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* ---------- Secciones ---------- */
.section { padding: 160px 0 0; }
.section__head { display: grid; gap: 20px; margin-bottom: 64px; }
.section__head--row { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.section__head--row > div { display: grid; gap: 20px; }

/* ---------- Hero ---------- */
.hero { padding: calc(var(--nav-h) + 120px) 0 0; }
.hero__copy { display: grid; gap: 28px; max-width: 920px; }
.hero__copy .lead { max-width: 560px; }
.hero__actions { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; margin-top: 8px; }
.hero__visual {
  position: relative;
  margin-top: 96px;
  aspect-ratio: 21 / 9;
  border: 1px solid var(--line);
  background: #0f0f0f;
  overflow: hidden;
}
.hero__visual canvas { width: 100%; height: 100%; }
.hero__meta {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; justify-content: space-between; gap: 16px;
  padding: 16px 20px;
  font-size: 0.75rem; letter-spacing: 0.06em; color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.hero__meta b { font-weight: 400; color: var(--text-2); }

.stack {
  display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: center;
  padding: 28px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 0.875rem; color: var(--text-3);
}
.stack span:first-child { color: var(--text-2); margin-right: 8px; }

/* ---------- Servicios (productos) ---------- */
.products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.product { display: flex; flex-direction: column; }
.product__visual {
  aspect-ratio: 4 / 3;
  background: var(--surface);
  border: 1px solid var(--border-solid);
  display: grid; place-items: center;
  overflow: hidden;
}
.product__visual svg { width: 78%; height: auto; }
.product__body { padding: 24px 0 0; display: grid; gap: 10px; }
.product__body h3 { font-size: 1.1875rem; line-height: 1.3; font-weight: 400; }
.product__body p { color: var(--text-2); }
.product__list { display: grid; gap: 6px; margin-top: 6px; font-size: 0.875rem; color: var(--text-3); }
.product__list li { padding-left: 16px; position: relative; }
.product__list li::before { content: ""; position: absolute; left: 0; top: 11px; width: 6px; height: 1px; background: var(--text-3); }
.product__body .link-arrow { justify-self: start; margin-top: 14px; }

/* Ilustraciones de producto: monocromas con acento frío */
.viz { fill: none; stroke: rgba(255, 255, 255, 0.28); stroke-width: 1; }
.viz .fill { fill: rgba(255, 255, 255, 0.06); stroke: none; }
.viz .hi { stroke: var(--periwinkle); }
.viz .hi-fill { fill: var(--periwinkle); stroke: none; }
.viz .lav { stroke: var(--lavender); }
.viz .coral { fill: var(--coral); stroke: none; }
.viz .txt { fill: rgba(255, 255, 255, 0.5); stroke: none; }

/* ---------- Franja de declaración ---------- */
.statement {
  position: relative;
  margin-top: 160px;
  min-height: 560px;
  display: grid; place-items: center;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  overflow: hidden;
  background: #0e0e0e;
}
.statement canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.statement::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse 50% 60% at 50% 50%, rgba(14, 14, 14, 0.85), transparent 75%);
}
.statement__text {
  position: relative; z-index: 1;
  max-width: 880px; padding: 0 32px;
  text-align: center;
  font-size: clamp(1.8rem, 4vw, 3rem); line-height: 1.15; letter-spacing: -0.02em; font-weight: 400;
}
.statement__text span { display: block; color: var(--text-3); }

.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; padding-top: 72px; }
.pillar { border-top: 1px solid var(--line); padding-top: 20px; display: grid; gap: 8px; align-content: start; }
.pillar h3 { font-size: 1.125rem; font-weight: 400; }
.pillar p { color: var(--text-2); font-size: 0.9375rem; }
.pillar__n { font-size: 0.75rem; color: var(--text-3); font-variant-numeric: tabular-nums; }

/* ---------- Proceso ---------- */
.steps {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line); border-left: 1px solid var(--line);
}
.step { padding: 32px 28px 40px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; gap: 10px; align-content: start; transition: background 0.25s; }
.step:hover { background: rgba(255, 255, 255, 0.015); }
.step__n { font-size: 0.8125rem; color: var(--periwinkle); font-variant-numeric: tabular-nums; margin-bottom: 28px; }
.step h3 { font-size: 1.1875rem; font-weight: 400; }
.step p { color: var(--text-2); font-size: 0.9375rem; }

/* ---------- Trabajo (estilo "papers") ---------- */
.papers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.paper__open {
  width: 100%; height: 100%; text-align: left;
  display: flex; flex-direction: column; gap: 12px;
  padding: 28px;
  min-height: 250px;
  background: var(--surface);
  border: 1px solid var(--border-solid);
  transition: border-color 0.25s, background 0.25s;
}
.paper__open:hover { border-color: rgba(255, 255, 255, 0.24); background: #1b1b1b; }
.paper__meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 0.8125rem; color: var(--text-3); }
.paper__kind { display: inline-flex; align-items: center; gap: 8px; }
.paper__kind::before { content: ""; width: 6px; height: 6px; background: var(--periwinkle); }
.paper__kind--client::before { background: var(--coral); }
.paper__open h3 { font-size: 1.1875rem; line-height: 1.3; font-weight: 400; margin-top: 20px; }
.paper__open p { color: var(--text-2); font-size: 0.9375rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.paper__more { margin-top: auto; padding-top: 16px; display: inline-flex; align-items: center; gap: 8px; font-size: 0.875rem; color: var(--text-2); transition: color 0.2s; }
.paper__more .icon { transition: transform 0.25s var(--ease); }
.paper__open:hover .paper__more { color: var(--text); }
.paper__open:hover .paper__more .icon { transform: translateX(3px); }

/* ---------- Fundador ---------- */
.founder { display: grid; grid-template-columns: 5fr 7fr; gap: 80px; align-items: start; }
.founder__photo { position: relative; border: 1px solid var(--border-solid); background: var(--surface); }
.founder__photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; filter: grayscale(40%); }
.founder__caption { display: flex; justify-content: space-between; padding: 14px 16px; font-size: 0.8125rem; color: var(--text-3); border-top: 1px solid var(--border-solid); }
.founder__body { display: grid; gap: 20px; padding-top: 8px; }
.founder__body p { color: var(--text-2); max-width: 600px; }
.founder__role { color: var(--text-3) !important; margin-top: -8px; }
.founder__tags, .tags { display: flex; flex-wrap: wrap; gap: 8px; }
.founder__tags span, .tags span { font-size: 0.8125rem; color: var(--text-2); border: 1px solid var(--line); padding: 4px 10px; }
.founder__links { display: flex; gap: 24px; flex-wrap: wrap; padding-top: 8px; }
.icon-link { display: inline-flex; align-items: center; gap: 8px; font-size: 0.9375rem; color: var(--text-2); transition: color 0.2s; }
.icon-link:hover { color: var(--text); }

/* ---------- FAQ ---------- */
.faq { display: grid; grid-template-columns: 4fr 8fr; gap: 64px; align-items: start; }
.faq__list { border-top: 1px solid var(--line); }
.faq__list details { border-bottom: 1px solid var(--line); }
.faq__list summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 22px 0; font-size: 1.0625rem; font-weight: 400;
}
.faq__list summary::-webkit-details-marker { display: none; }
.faq__list summary::after { content: "+"; font-size: 1.25rem; color: var(--text-3); transition: transform 0.3s var(--ease); }
.faq__list details[open] summary::after { transform: rotate(45deg); }
.faq__list details p { color: var(--text-2); padding: 0 48px 24px 0; }

/* ---------- Contacto (bloque CTA) ---------- */
.contact {
  border: 1px solid var(--border-solid);
  background: var(--surface);
  padding: 72px 64px;
  display: grid; grid-template-columns: 7fr 5fr; gap: 64px; align-items: end;
}
.contact__copy { display: grid; gap: 20px; }
.contact__copy .btn { justify-self: start; margin-top: 12px; }
.channels { display: grid; border-top: 1px solid var(--line); }
.channel {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 0; border-bottom: 1px solid var(--line);
  transition: color 0.2s;
}
.channel span { display: grid; }
.channel strong { font-weight: 400; }
.channel small { font-size: 0.8125rem; color: var(--text-3); }
.channel .icon { color: var(--text-3); transition: transform 0.25s var(--ease), color 0.2s; }
.channel:hover .icon { transform: translate(2px, -2px); color: var(--text); }

/* ---------- Footer ---------- */
.footer { margin-top: 160px; border-top: 1px solid var(--line-soft); padding: 96px 0 40px; }
.footer__top { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; padding-bottom: 80px; }
.footer__quote { font-size: clamp(2rem, 4.6vw, 3.5rem); line-height: 1.08; letter-spacing: -0.02em; font-weight: 400; max-width: 760px; }
.footer__quote span { color: var(--text-3); }
.socials { display: flex; gap: 8px; }
.socials a {
  width: 40px; height: 40px; display: grid; place-items: center;
  border: 1px solid var(--line); color: var(--text-2);
  transition: color 0.2s, border-color 0.2s;
}
.socials a:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.28); }
.socials .icon { width: 18px; height: 18px; }
.footer__cols {
  display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 32px;
  padding: 48px 0; border-top: 1px solid var(--line-soft);
}
.footer__brand p { color: var(--text-3); font-size: 0.875rem; max-width: 260px; margin-top: 14px; }
.footer__cols h4 { font-size: 0.8125rem; font-weight: 400; color: var(--text-3); margin-bottom: 16px; }
.footer__cols a, .footer__cols button { display: block; text-align: left; font-size: 0.9375rem; color: var(--text-2); padding: 4px 0; transition: color 0.2s; }
.footer__cols a:hover, .footer__cols button:hover { color: var(--text); }
.footer__bottom {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding-top: 28px; border-top: 1px solid var(--line-soft);
  font-size: 0.8125rem; color: var(--text-3);
}
.footer__bottom nav { display: flex; gap: 20px; }
.footer__bottom a:hover { color: var(--text-2); }

/* ---------- Modal de contacto paso a paso ---------- */
.ask { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 24px; }
.ask__backdrop { position: absolute; inset: 0; background: rgba(8, 8, 8, 0.78); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; transition: opacity 0.3s; }
.ask__panel {
  position: relative; width: 100%; max-width: 680px; min-height: 440px;
  background: var(--surface); border: 1px solid var(--border-solid);
  display: flex; flex-direction: column;
  opacity: 0; transform: translateY(12px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}
.ask.is-open .ask__backdrop { opacity: 1; }
.ask.is-open .ask__panel { opacity: 1; transform: none; }
.ask__progress { height: 1px; background: var(--line); }
.ask__progress i { display: block; height: 100%; background: var(--periwinkle); width: 0; transition: width 0.4s var(--ease); }
.ask__head { display: flex; justify-content: space-between; align-items: center; padding: 18px 24px; font-size: 0.8125rem; color: var(--text-3); font-variant-numeric: tabular-nums; }
.ask__close { width: 32px; height: 32px; display: grid; place-items: center; color: var(--text-2); margin-right: -8px; }
.ask__close:hover { color: var(--text); }
.ask__body { flex: 1; padding: 24px 48px 16px; display: flex; flex-direction: column; justify-content: center; }
.ask__step { display: grid; gap: 22px; animation: askIn 0.4s var(--ease); }
@keyframes askIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.ask__q { font-size: clamp(1.5rem, 3.4vw, 2rem); line-height: 1.2; letter-spacing: -0.02em; font-weight: 400; }
.ask__q small { display: block; font-size: 1rem; letter-spacing: 0; color: var(--text-2); margin-top: 10px; line-height: 1.5; }
.ask__input {
  width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--line);
  padding: 10px 0 12px; font-size: 1.375rem; font-weight: 300; color: var(--text);
  outline: none; resize: none; transition: border-color 0.2s;
}
.ask__input::placeholder { color: rgba(255, 255, 255, 0.22); }
.ask__input:focus { border-color: var(--periwinkle); }
.ask__input.has-error { border-color: var(--coral); }
.ask__error { font-size: 0.875rem; color: var(--coral); min-height: 20px; }
.ask__choices { display: grid; gap: 8px; }
.ask__choice {
  display: flex; align-items: center; gap: 14px; text-align: left;
  padding: 14px 16px; border: 1px solid var(--line);
  transition: border-color 0.2s, background 0.2s;
}
.ask__choice:hover { border-color: rgba(255, 255, 255, 0.24); }
.ask__choice.is-selected { border-color: var(--periwinkle); background: rgba(161, 181, 254, 0.06); }
.ask__choice kbd { font: inherit; font-size: 0.75rem; width: 22px; height: 22px; display: grid; place-items: center; border: 1px solid var(--line); color: var(--text-3); }
.ask__choice.is-selected kbd { border-color: var(--periwinkle); color: var(--periwinkle); }
.ask__review { display: grid; border-top: 1px solid var(--line); }
.ask__review div { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 0.9375rem; }
.ask__review dt { color: var(--text-3); }
.ask__review dd { color: var(--text); white-space: pre-wrap; word-break: break-word; max-height: 96px; overflow: auto; }
.ask__foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 48px 32px; }
.ask__hint { font-size: 0.8125rem; color: var(--text-3); }
.ask__hint b { font-weight: 400; color: var(--text-2); }
.ask__nav { display: flex; gap: 10px; margin-left: auto; }

/* ---------- Portafolio ---------- */
.page-hero { padding: calc(var(--nav-h) + 96px) 0 0; }
.page-hero .container { display: grid; gap: 24px; }
.back-link { display: inline-flex; align-items: center; gap: 8px; font-size: 0.875rem; color: var(--text-3); transition: color 0.2s; justify-self: start; }
.back-link:hover { color: var(--text); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
.filter { display: inline-flex; gap: 8px; align-items: center; padding: 8px 14px; border: 1px solid var(--line); font-size: 0.875rem; color: var(--text-2); transition: color 0.2s, border-color 0.2s; }
.filter:hover { color: var(--text); }
.filter.is-active { color: var(--text); border-color: var(--periwinkle); }
.filter__n { font-style: normal; color: var(--text-3); font-variant-numeric: tabular-nums; }
.section--tight { padding-top: 56px; }

.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.project__open {
  display: flex; flex-direction: column; width: 100%; height: 100%; text-align: left;
  background: var(--surface); border: 1px solid var(--border-solid);
  transition: border-color 0.25s;
}
.project__open:hover { border-color: rgba(255, 255, 255, 0.24); }
.project__thumb { position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-bottom: 1px solid var(--border-solid); }
.project__thumb > img, .modal__thumb > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; z-index: 1; filter: saturate(0.35) brightness(0.85); transition: filter 0.4s, transform 0.6s var(--ease); }
.project__open:hover .project__thumb > img { filter: saturate(0.8) brightness(0.95); transform: scale(1.02); }
.project__thumb .mock { filter: saturate(0.35); }
.project__badge {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 10px; font-size: 0.75rem; color: var(--text-2);
  background: rgba(18, 18, 18, 0.85); border: 1px solid var(--line);
}
.project__badge::before { content: ""; width: 5px; height: 5px; background: var(--periwinkle); }
.project__badge--client::before { background: var(--coral); }
.project__body { padding: 24px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.project__type { font-size: 0.8125rem; color: var(--text-3); }
.project__body h3 { font-size: 1.1875rem; font-weight: 400; }
.project__body p { color: var(--text-2); font-size: 0.9375rem; }
.project__more { margin-top: auto; padding-top: 12px; display: inline-flex; align-items: center; gap: 8px; font-size: 0.875rem; color: var(--text-2); }
.project__open:hover .project__more { color: var(--text); }

.cta-band {
  display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap;
  border: 1px solid var(--border-solid); background: var(--surface); padding: 48px;
}
.cta-band h2 { font-size: clamp(1.5rem, 2.8vw, 2rem); font-weight: 500; letter-spacing: -0.02em; }
.cta-band p { color: var(--text-2); margin-top: 8px; }

/* Modal de proyecto */
.modal { position: fixed; inset: 0; z-index: 110; display: grid; place-items: center; padding: 24px; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(8, 8, 8, 0.78); backdrop-filter: blur(6px); opacity: 0; transition: opacity 0.25s; }
.modal__panel {
  position: relative; width: 100%; max-width: 920px; max-height: calc(100vh - 48px); overflow: auto;
  background: var(--surface); border: 1px solid var(--border-solid);
  opacity: 0; transform: translateY(12px); transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.modal.is-open .modal__backdrop { opacity: 1; }
.modal.is-open .modal__panel { opacity: 1; transform: none; }
.modal__close { position: absolute; top: 12px; right: 12px; z-index: 3; width: 36px; height: 36px; display: grid; place-items: center; background: rgba(18, 18, 18, 0.85); border: 1px solid var(--line); color: var(--text-2); }
.modal__close:hover { color: var(--text); }
.modal__thumb { position: relative; aspect-ratio: 16 / 7; overflow: hidden; border-bottom: 1px solid var(--border-solid); }
.modal__thumb > img { filter: saturate(0.6) brightness(0.9); }
.modal__content { padding: 40px 48px 48px; display: grid; gap: 16px; }
.modal__content h2 { font-size: 2rem; font-weight: 500; letter-spacing: -0.02em; }
.modal__content h4 { font-size: 0.8125rem; font-weight: 400; color: var(--text-3); margin-bottom: 8px; }
.modal__content p { color: var(--text-2); }
.modal__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 8px 0; }
.modal__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

/* ---------- Aparición al hacer scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .ask__step { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .products, .papers, .projects { grid-template-columns: repeat(2, 1fr); }
  .pillars { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .footer__cols { grid-template-columns: repeat(2, 1fr); }
  .footer__brand { grid-column: 1 / -1; }
  .contact { grid-template-columns: 1fr; padding: 56px 40px; }
}

@media (max-width: 900px) {
  .nav__toggle { display: block; }
  .nav__menu {
    position: fixed; top: var(--nav-h); left: 0; right: 0; height: calc(100vh - var(--nav-h));
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 16px 32px 40px;
    background: var(--bg);
    border-top: 1px solid var(--line-soft);
    overflow-y: auto;
    opacity: 0; visibility: hidden; transition: opacity 0.25s, visibility 0.25s;
  }
  .nav.is-open .nav__menu { opacity: 1; visibility: visible; }
  .nav__menu > .nav__link, .dropdown > .nav__link { padding: 18px 0; border-bottom: 1px solid var(--line-soft); font-size: 1.125rem; color: var(--text); justify-content: space-between; width: 100%; }
  .dropdown__panel { position: static; width: auto; opacity: 1; visibility: visible; transform: none; border: 0; background: transparent; padding: 0 0 8px; display: none; }
  .dropdown.is-open .dropdown__panel { display: block; }
  .dropdown__item { padding: 12px 0; }
  .nav__menu .nav__cta { margin: 28px 0 0; align-self: flex-start; }
  .nav__right { gap: 8px; margin-left: auto; }

  .section { padding-top: 112px; }
  .founder, .faq { grid-template-columns: 1fr; gap: 40px; }
  .founder__photo { max-width: 420px; }
  .statement { min-height: 440px; margin-top: 112px; }
  .modal__cols { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .nav__menu { padding: 8px 16px 32px; }
  .hero { padding-top: calc(var(--nav-h) + 72px); }
  .hero__visual { aspect-ratio: 4 / 3; margin-top: 64px; }
  .hero__meta span:nth-child(2) { display: none; }
  .products, .papers, .projects, .pillars, .steps { grid-template-columns: 1fr; }
  .section__head { margin-bottom: 40px; }
  .contact { padding: 40px 20px; }
  .cta-band { padding: 32px 20px; }
  .footer { margin-top: 112px; padding-top: 72px; }
  .footer__top { padding-bottom: 56px; }
  .ask { padding: 0; place-items: stretch; }
  .ask__panel { max-width: none; min-height: 100%; border: 0; }
  .ask__body { padding: 24px 20px 16px; }
  .ask__foot { padding: 16px 20px 28px; }
  .ask__hint { display: none; }
  .ask__review div { grid-template-columns: 1fr; gap: 2px; }
  .modal { padding: 0; }
  .modal__panel { max-height: 100vh; height: 100%; border: 0; }
  .modal__content { padding: 28px 20px 36px; }
}

/* =========================================================
   Miniaturas de proyectos dibujadas con CSS
   (se usan cuando un proyecto no tiene imagen)
   ========================================================= */
.mock {
  --c1: #8b7bff; --c2: #22d3ee;
  position: relative; width: 100%; height: 100%;
  padding: 22px 22px 0;
  background:
    radial-gradient(90% 90% at 100% 0%, color-mix(in srgb, var(--c2) 35%, transparent), transparent 60%),
    radial-gradient(90% 90% at 0% 100%, color-mix(in srgb, var(--c1) 45%, transparent), transparent 60%),
    #161616;
  display: flex; flex-direction: column;
}
.mock__bar {
  display: flex; gap: 5px; padding: 9px 11px;
  background: #1f1f1f; border-radius: 10px 10px 0 0;
  border: 1px solid rgba(255, 255, 255, 0.08); border-bottom: 0;
}
.mock__bar i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, 0.2); }
.mock__bar + div {
  flex: 1; background: #121212;
  border: 1px solid rgba(255, 255, 255, 0.08); border-bottom: 0;
  padding: 14px;
}
.mock i, .mock b, .mock em, .mock span { display: block; }
.mock b { height: 10px; width: 55%; border-radius: 5px; background: rgba(255, 255, 255, 0.75); }
.mock em { height: 6px; width: 80%; border-radius: 3px; background: rgba(255, 255, 255, 0.18); margin-top: 8px; }
.mock em.short, .mock i.short { width: 50%; }
.mock .m-btn { width: 64px; height: 18px; border-radius: 6px; margin-top: 12px; background: linear-gradient(90deg, var(--c1), var(--c2)); }

.mock__dash { display: grid; grid-template-columns: 34px 1fr; gap: 12px; padding: 0 !important; }
.mock__dash .m-side { border-right: 1px solid rgba(255, 255, 255, 0.06); background: rgba(255, 255, 255, 0.02); }
.mock__dash .m-main { padding: 12px 12px 0 0; display: flex; flex-direction: column; gap: 10px; }
.m-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.m-kpis i { height: 30px; border-radius: 7px; background: rgba(255, 255, 255, 0.05); border-top: 2px solid var(--c1); }
.m-kpis i:nth-child(2) { border-color: var(--c2); }
.m-area {
  flex: 1; border-radius: 8px 8px 0 0; background:
    linear-gradient(180deg, color-mix(in srgb, var(--c1) 40%, transparent), transparent);
  clip-path: polygon(0 80%, 15% 60%, 30% 70%, 48% 35%, 62% 48%, 80% 18%, 100% 8%, 100% 100%, 0 100%);
}

.mock__landing { text-align: center; display: flex; flex-direction: column; align-items: center; }
.mock__landing b { width: 60%; margin-top: 6px; }
.mock__landing em { width: 70%; }
.mock__landing em.short { width: 45%; }
.m-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; margin-top: 16px; }
.m-cards i { height: 44px; border-radius: 7px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.06); }

.mock__phones { flex: 1; position: relative; display: flex; justify-content: center; align-items: flex-end; }
.m-phone {
  position: relative; z-index: 2;
  width: 38%; height: 100%; padding: 12px 10px;
  border-radius: 18px 18px 0 0; background: #121212;
  border: 3px solid #262b3a; border-bottom: 0;
  display: flex; flex-direction: column; gap: 7px;
}
.m-phone i { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.2); }
.m-phone .m-img { height: 45%; border-radius: 10px; background: linear-gradient(135deg, var(--c1), var(--c2)); }
.m-phone .m-btn { width: 100%; }
.m-phone--back { position: absolute; z-index: 1; left: 50%; transform: translateX(8%) rotate(8deg); height: 88%; opacity: 0.55; }

.mock__site { display: flex; flex-direction: column; gap: 14px; }
.m-nav { display: flex; gap: 8px; justify-content: flex-end; }
.m-nav i { width: 28px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.2); }
.m-hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 14px; align-items: center; }
.m-hero .m-img { height: 76px; border-radius: 10px; background: linear-gradient(135deg, var(--c1), var(--c2)); opacity: 0.85; }

.mock__admin { display: flex; flex-direction: column; gap: 12px; }
.m-top { display: flex; justify-content: space-between; align-items: center; }
.m-top b { width: 35%; }
.m-top .m-btn { margin: 0; }
.m-table { display: grid; gap: 6px; }
.m-table > div { display: grid; grid-template-columns: 18px 1fr 0.7fr 40px; gap: 10px; align-items: center; padding: 7px 8px; border-radius: 6px; background: rgba(255, 255, 255, 0.03); }
.m-table i { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.18); }
.m-table i:first-child { width: 18px; height: 18px; border-radius: 50%; background: color-mix(in srgb, var(--c1) 50%, #333); }
.m-table span { height: 12px; border-radius: 6px; background: color-mix(in srgb, var(--c2) 35%, transparent); }

.mock__saas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; align-items: center; align-content: center; }
.m-plan { padding: 12px 10px; border-radius: 9px; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.07); display: flex; flex-direction: column; gap: 7px; }
.m-plan b { width: 60%; height: 8px; }
.m-plan i { height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.16); }
.m-plan .m-btn { width: 100%; height: 14px; margin-top: 6px; background: rgba(255, 255, 255, 0.1); }
.m-plan--hi { padding-top: 22px; border-color: var(--c1); background: color-mix(in srgb, var(--c1) 12%, transparent); }
.m-plan--hi .m-btn { background: linear-gradient(90deg, var(--c1), var(--c2)); }

/* --- Maquetas nuevas --- */
.mock__chart { position: relative; display: flex; flex-direction: column; padding: 14px 14px 8px !important; }
.m-candles { position: relative; flex: 1; display: flex; align-items: stretch; justify-content: space-between; gap: 4px; }
.m-candles i { position: relative; flex: 1; }
.m-candles i::before {
  content: ""; position: absolute; left: 50%; width: 1px; transform: translateX(-50%);
  bottom: calc(var(--lo) - 8%); top: calc(100% - var(--hi) - 6%); background: currentColor; opacity: 0.7;
}
.m-candles i::after {
  content: ""; position: absolute; left: 15%; right: 15%; border-radius: 2px;
  bottom: var(--lo); top: calc(100% - var(--hi)); background: currentColor;
}
.m-candles i.up { color: #34d399; }
.m-candles i.dn { color: #f87171; }
.m-ma {
  position: absolute; left: 14px; right: 14px; top: 14px; bottom: 30px; pointer-events: none;
  background: linear-gradient(transparent, transparent);
  border-bottom: 0;
  mask: none;
}
.m-ma::before {
  content: ""; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0 62 C15 58 25 55 35 48 S60 38 70 30 S90 18 100 14' fill='none' stroke='%23fbbf24' stroke-width='1.5' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
.m-axis { display: flex; justify-content: space-between; padding-top: 8px; border-top: 1px solid rgba(255, 255, 255, 0.08); margin-top: 6px; }
.m-axis i { width: 26px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.15); }

.mock__number { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.mock__number strong {
  font-family: var(--font-display); font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; letter-spacing: -0.02em;
  background: linear-gradient(90deg, var(--c1), var(--c2)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.mock__number .m-btn { width: 90px; margin-top: 6px; }
.m-chips { display: flex; gap: 6px; margin-top: 14px; }
.m-chips i { width: 34px; height: 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); }

.mock__short { display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.m-input { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 9px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); }
.m-input em { flex: 1; margin: 0; width: auto; }
.m-input .m-btn { margin: 0; width: 60px; }
.m-result { font-size: 0.7rem; color: rgba(255, 255, 255, 0.55); padding: 8px 10px; border-radius: 8px; background: color-mix(in srgb, var(--c1) 14%, transparent); border: 1px dashed color-mix(in srgb, var(--c1) 60%, transparent); white-space: nowrap; overflow: hidden; }
.m-result span, .m-result b { display: inline !important; }
.m-result b { height: auto; width: auto; background: none; color: #fff; border-radius: 0; }

.mock__board {
  flex: 1; position: relative; margin: -22px -22px 0; padding: 18px;
  background: radial-gradient(120% 100% at 50% 0%, #2b4a3a, #16261d);
  border-bottom: 10px solid #6b4a2b; display: flex; align-items: center; justify-content: center;
}
.mock__board svg { width: 78%; fill: none; stroke: rgba(255, 255, 255, 0.85); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.mock__board svg circle { stroke: var(--c2); }
.mock__board svg path:last-child { stroke: var(--c1); }
.m-tools { position: absolute; left: 12px; top: 12px; display: grid; gap: 6px; }
.m-tools i { width: 16px; height: 16px; border-radius: 5px; background: rgba(255, 255, 255, 0.18); }
.m-tools i:first-child { background: var(--c1); }

.mock__game {
  flex: 1; position: relative; margin: -22px -22px 0;
  background: linear-gradient(180deg, #1b1740, #0f1a2a);
  overflow: hidden;
}
.mock__game .p {
  position: absolute; left: var(--x); top: var(--y); width: 22%; height: 7px; border-radius: 4px;
  background: #34d399; box-shadow: 0 0 12px rgba(52, 211, 153, 0.5);
}
.mock__game .p.mv { background: #38bdf8; box-shadow: 0 0 12px rgba(56, 189, 248, 0.5); }
.mock__game .p.br { background: #a16207; box-shadow: none; }
.mock__game .hero-dot {
  position: absolute; left: 38%; top: 34%; width: 22px; height: 22px; border-radius: 7px;
  background: var(--c1); box-shadow: 0 0 20px color-mix(in srgb, var(--c1) 70%, transparent);
}
.mock__game b {
  position: absolute; right: 14px; top: 12px; width: auto; height: auto; background: none;
  font-family: var(--font-display); font-weight: 800; color: rgba(255, 255, 255, 0.85); font-size: 1rem;
}

.mock__links { flex: 1; display: flex; justify-content: center; align-items: flex-end; }
.mock__links .m-phone {
  width: 44%; height: 100%; padding: 16px 12px 0; border-radius: 18px 18px 0 0;
  background: linear-gradient(180deg, color-mix(in srgb, var(--c1) 30%, #121212), #10131b 70%);
  border: 3px solid #262b3a; border-bottom: 0;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
}
.mock__links .m-avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--c1), var(--c2)); }
.mock__links b { width: 50%; height: 7px; margin-bottom: 4px; }
.mock__links span { width: 100%; height: 16px; border-radius: 6px; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.08); }

@media (max-width: 860px) {
  .nav__right { gap: 8px; }
}

/* Maqueta libro de sudoku (UniqueNumber) */
.mock__book {
  flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 3px;
  margin: 0 6% 0; padding: 0; perspective: 800px;
}
.mock__book .m-page {
  background: #f5f1e8; border-radius: 6px 2px 0 0; padding: 10% 9% 0;
  display: flex; flex-direction: column; align-items: center; gap: 7%;
  box-shadow: inset -8px 0 14px -10px rgba(0, 0, 0, 0.35);
}
.mock__book .m-page--r { border-radius: 2px 6px 0 0; box-shadow: inset 8px 0 14px -10px rgba(0, 0, 0, 0.35); position: relative; }
.mock__book b { width: 60%; height: 7px; border-radius: 3px; background: #2b2b3a; }
.mock__book em { width: 30%; height: 4px; margin: 0; background: rgba(0, 0, 0, 0.25); }
.m-grid {
  width: 88%; aspect-ratio: 1; display: grid; grid-template-columns: repeat(9, 1fr);
  border: 2px solid #2b2b3a; background: #2b2b3a; gap: 1px;
}
.m-grid i {
  background: #fff; display: grid !important; place-items: center;
  font-style: normal; font-weight: 700; font-size: clamp(5px, 0.7vw, 9px); color: #2b2b3a; line-height: 1;
}
.m-grid i:nth-child(9n + 3), .m-grid i:nth-child(9n + 6) { box-shadow: 1px 0 0 #2b2b3a; }
.m-grid i:nth-child(n + 19):nth-child(-n + 27), .m-grid i:nth-child(n + 46):nth-child(-n + 54) { box-shadow: 0 1px 0 #2b2b3a; }
.mock__book .m-sudi {
  width: 30%; aspect-ratio: 1; border-radius: 50%; margin-top: 6%;
  background: radial-gradient(circle at 35% 40%, #fff 0 8%, transparent 9%), radial-gradient(circle at 65% 40%, #fff 0 8%, transparent 9%), var(--c1);
}
.mock__book .m-bubble {
  width: 70%; height: 16%; border-radius: 10px; background: #fff; border: 2px solid #2b2b3a; position: relative;
}
.mock__book .m-bubble::after {
  content: ""; position: absolute; left: 20%; top: -7px; width: 10px; height: 10px; background: #fff;
  border-left: 2px solid #2b2b3a; border-top: 2px solid #2b2b3a; transform: rotate(45deg);
}
.mock__book .m-mini { width: 80%; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.mock__book .m-mini i { aspect-ratio: 1; border: 1.5px solid #2b2b3a; background: repeating-linear-gradient(0deg, transparent 0 32%, rgba(0,0,0,.35) 32% 34%), repeating-linear-gradient(90deg, transparent 0 32%, rgba(0,0,0,.35) 32% 34%), #fff; }
.mock { isolation: isolate; }
.project__thumb > img, .modal__thumb > img { z-index: 1; }
.footer--slim { margin-top: 48px; padding-top: 0; border-top: 0; }
.ask__choices--grid { grid-template-columns: repeat(2, 1fr); }
.ask__ok { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--periwinkle); color: var(--periwinkle); }
.ask__ok .icon { width: 18px; height: 18px; }
.ask.is-done .ask__progress i { background: var(--lavender); }
@media (max-width: 640px) { .ask__choices--grid { grid-template-columns: 1fr; } }


/* =========================================================
   Toque sutil de color
   ========================================================= */
body {
  background:
    radial-gradient(1100px 620px at 88% -8%, rgba(161, 181, 254, 0.08), transparent 62%),
    radial-gradient(900px 520px at -12% 34%, rgba(202, 204, 253, 0.045), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
.label { color: rgba(202, 204, 253, 0.72); }
.link-arrow { border-color: rgba(161, 181, 254, 0.35); }
.link-arrow:hover { border-color: var(--periwinkle); }
.hero__visual { background: linear-gradient(180deg, #0f0f10 0%, #10121a 100%); border-color: rgba(161, 181, 254, 0.14); }
.statement { background: #0e0f14; }
.statement::after { background: radial-gradient(ellipse 50% 60% at 50% 50%, rgba(14, 15, 20, 0.85), transparent 75%); }
.statement__text span, .footer__quote span { color: rgba(202, 204, 253, 0.6); }
.paper__open:hover, .project__open:hover { border-color: rgba(161, 181, 254, 0.38); }
.product__visual { background: linear-gradient(160deg, #1b1c22 0%, #191919 60%); }
.step:hover { background: rgba(161, 181, 254, 0.035); }
.founder__photo, .contact { border-color: rgba(161, 181, 254, 0.18); }
.contact { background: linear-gradient(150deg, #1b1c24 0%, #191919 55%); }



/* =========================================================
   Trayectoria del fundador
   ========================================================= */
.cv { border-top: 1px solid var(--line); margin-top: 4px; }
.cv li {
  display: grid; grid-template-columns: 84px 1fr; column-gap: 20px;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.cv span { grid-row: span 2; font-size: 0.8125rem; color: var(--text-3); font-variant-numeric: tabular-nums; padding-top: 2px; }
.cv strong { font-weight: 400; color: var(--text); }
.cv em { font-style: normal; font-size: 0.875rem; color: var(--text-2); }
.founder__certs { font-size: 0.8125rem; color: var(--text-3) !important; }


/* =========================================================
   Galería circular de proyectos (gira con el scroll)
   ========================================================= */
.cg { --cw: 300px; --ch: 400px; position: relative; height: 280vh; margin-top: -14vh; }
.cg__sticky {
  position: sticky; top: 0; height: 100vh; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14%, #000 86%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 14%, #000 86%, transparent 100%);
}
.cg__stage { position: absolute; inset: 0; perspective: 2000px; display: grid; place-items: center; }
.cg__ring { position: relative; width: var(--cw); height: var(--ch); transform-style: preserve-3d; will-change: transform; }
.cg__card { position: absolute; inset: 0; will-change: transform, opacity; }
.cg__card button {
  position: relative; display: block; width: 100%; height: 100%; text-align: left;
  overflow: hidden; background: var(--surface); border: 1px solid var(--border-solid);
  transition: border-color 0.25s;
}
.cg__card button:hover { border-color: rgba(161, 181, 254, 0.5); }
.cg__media { position: absolute; inset: 0; }
.cg__media > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; z-index: 1; transition: transform 0.6s var(--ease); }
.cg__card button:hover .cg__media > img { transform: scale(1.04); }
.cg__media::after {
  content: ""; position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(180deg, rgba(10, 10, 12, 0) 28%, rgba(10, 10, 12, 0.78) 56%, rgba(10, 10, 12, 0.97) 100%);
}
.cg__info { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; padding: 20px; display: grid; gap: 6px; }
.cg__kind { display: inline-flex; align-items: center; gap: 8px; font-size: 0.75rem; color: var(--text-2); }
.cg__kind::before { content: ""; width: 6px; height: 6px; background: var(--periwinkle); }
.cg__kind--client::before { background: var(--coral); }
.cg__info h3 { font-size: 1.25rem; line-height: 1.2; font-weight: 400; color: #fff; }
.cg__info p { font-size: 0.875rem; color: var(--text-2); }
.cg__hint {
  position: absolute; left: 0; right: 0; bottom: 40px;
  display: flex; justify-content: center; align-items: center; gap: 8px;
  font-size: 0.8125rem; color: var(--text-3); letter-spacing: 0.02em;
}
.cg__hint .icon { animation: cgNudge 2s var(--ease) infinite; }
@keyframes cgNudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }

@media (max-width: 640px) {
  .cg { --cw: 68vw; --ch: 92vw; height: 260vh; margin-top: -12vh; }
  .cg__sticky { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 4%, #000 96%, transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 4%, #000 96%, transparent 100%); }
  .cg__stage { perspective: 1400px; }
  .cg__info { padding: 18px; }
  .cg__info h3 { font-size: 1.1875rem; }
  .cg__info p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 0.8125rem; }
}
@media (prefers-reduced-motion: reduce) { .cg__hint .icon { animation: none; } }

/* =========================================================
   Subrayado animado con degradado (header y .link-arrow)
   ========================================================= */
.nav__link, .link-arrow { position: relative; }
.link-arrow { border-bottom: 0; }
.nav__link::after, .link-arrow::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #feca57, #2f8fe0, #ff6b6b);
  transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.nav__link:hover::after, .nav__link.is-active::after, .dropdown.is-open > .nav__link::after,
.link-arrow:hover::after, .link-arrow:focus-visible::after { width: 100%; }
/* En el menú móvil el subrayado va pegado a la línea divisoria */
@media (max-width: 900px) {
  .nav__menu > .nav__link::after, .dropdown > .nav__link::after { bottom: -1px; }
}

/* La galería sube sobre el encabezado de "Recent work": que no bloquee sus clics */
#proyectos .section__head { position: relative; z-index: 2; }
.cg__sticky, .cg__stage, .cg__ring { pointer-events: none; }


/* =========================================================
   Tema prisma: shaders, bordes, texto y progreso
   ========================================================= */
@property --prism-a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
:root {
  --prism: linear-gradient(90deg, #feca57, #2f8fe0, #ff6b6b);
  --prism-conic: conic-gradient(from var(--prism-a), #feca57, #2f8fe0, #ff6b6b, #a1b5fe, #feca57);
}
@keyframes prismSpin { to { --prism-a: 360deg; } }

/* Barra de progreso de lectura */
.prism-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60;
  background: var(--prism); transform-origin: 0 50%; transform: scaleX(0);
  pointer-events: none;
}

/* Marca: cuadrado con borde prisma girando */
.brand__mark {
  border: 0; position: relative; background: var(--prism-conic);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  padding: 1.5px; animation: prismSpin 6s linear infinite;
}
.label::before { background: var(--prism-conic); animation: prismSpin 5s linear infinite; }

/* Titulares con un ligero borde cromático (luz atravesando un prisma) */
.h1, .h2, .statement__text, .footer__quote, .cta-band h2 {
  text-shadow: -0.6px 0 rgba(254, 202, 87, 0.35), 0.6px 0 rgba(255, 107, 107, 0.35);
}
@keyframes prismIn {
  from { text-shadow: -12px 0 rgba(254, 202, 87, 0.65), 12px 0 rgba(255, 107, 107, 0.65), 0 0 18px rgba(47, 143, 224, 0.25); filter: blur(3px); }
  to { text-shadow: -0.6px 0 rgba(254, 202, 87, 0.35), 0.6px 0 rgba(255, 107, 107, 0.35), 0 0 0 rgba(47, 143, 224, 0); filter: blur(0); }
}
.h1.reveal.is-visible, .h2.reveal.is-visible, .reveal.is-visible .h2, .statement__text.is-visible, .footer__quote {
  animation: prismIn 3s var(--ease) both;
}
/* Aparición al hacer scroll con un desenfoque que se enfoca */
.reveal { filter: blur(4px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease), filter 0.9s var(--ease); }
.reveal.is-visible { filter: none; }

/* Borde prisma al pasar el mouse sobre tarjetas */
.product__visual, .step, .contact, .founder__photo, .paper__open, .project__open, .cg__card button, .cta-band { position: relative; }
.product__visual::before, .step::before, .contact::before, .founder__photo::before,
.paper__open::before, .project__open::before, .cg__card button::before {
  content: ""; position: absolute; inset: 0; z-index: 5; pointer-events: none;
  padding: 1px; background: var(--prism-conic);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity 0.35s;
  animation: prismSpin 4s linear infinite; animation-play-state: paused;
}
.product:hover .product__visual::before, .step:hover::before, .contact:hover::before, .founder__photo:hover::before,
.paper__open:hover::before, .project__open:hover::before, .cg__card button:hover::before {
  opacity: 1; animation-play-state: running;
}

/* Botón principal: halo cromático */
.btn--primary { transition: background 0.2s, box-shadow 0.35s var(--ease); }
.btn--primary:hover { box-shadow: -4px 0 16px -6px rgba(254, 202, 87, 0.7), 4px 0 16px -6px rgba(255, 107, 107, 0.7), 0 6px 18px -10px rgba(47, 143, 224, 0.6); }

/* Barra del formulario paso a paso */
.ask__progress i, .ask.is-done .ask__progress i { background: var(--prism); }

/* Sección CTA: el shader ocupa todo el ancho y la tarjeta flota encima */
.cta-section {
  position: relative; isolation: isolate; overflow: hidden;
  margin-top: 120px; padding: 140px 0;
  min-height: 78vh; display: grid; align-items: center;
}
.cta-section canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 22%, #000 78%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 22%, #000 78%, transparent 100%);
}
.cta-band {
  position: relative; overflow: visible;
  max-width: 780px; margin: 0 auto; min-height: 0;
  padding: 72px 56px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px;
  text-align: center;
  background: rgba(12, 12, 14, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.22);
}
.cta-band::after { /* marco interior doble */
  content: ""; position: absolute; inset: 9px; pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.14); background: none;
}
.cta-band h2 {
  color: #fff; font-size: clamp(2.2rem, 5vw, 3.75rem); line-height: 1.05; max-width: 640px; margin: 0 auto;
  text-shadow: 0 0 30px rgba(0, 0, 0, 0.55), -0.6px 0 rgba(254, 202, 87, 0.35), 0.6px 0 rgba(255, 107, 107, 0.35);
}
.cta-band p { color: rgba(255, 255, 255, 0.75); margin: 14px auto 0; max-width: 520px; text-shadow: 0 0 18px rgba(0, 0, 0, 0.7); }
.cta-band .btn--primary { position: relative; z-index: 1; padding: 14px 22px; }
@media (max-width: 640px) {
  .cta-section { padding: 96px 0; min-height: 70vh; }
  .cta-band { padding: 48px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .brand__mark, .label::before { animation: none; }
  .h1.reveal.is-visible, .h2.reveal.is-visible, .reveal.is-visible .h2, .statement__text.is-visible, .footer__quote { animation: none; }
  .reveal { filter: none; }
}
/* Legibilidad del texto inferior del hero sobre el shader */
.hero__meta { background: linear-gradient(180deg, transparent, rgba(12, 12, 14, 0.85)); padding-top: 40px; }

/* Hero visual a sangre: ocupa todo el ancho de la pantalla */
.hero__visual {
  width: 100vw; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw);
  aspect-ratio: auto; height: min(68vh, 620px);
  border-left: 0; border-right: 0;
  border-color: rgba(255, 255, 255, 0.06);
  background: #0e0f12;
}
.hero__meta { padding-left: max(16px, calc((100vw - var(--container)) / 2 + 32px)); padding-right: max(16px, calc((100vw - var(--container)) / 2 + 32px)); }
@media (max-width: 640px) { .hero__visual { height: 60vh; } }
.statement { min-height: 640px; }

/* =========================================================
   Formulario de contacto en un solo modal
   ========================================================= */
.ask__panel { max-width: 640px; min-height: 0; padding: 40px 40px 32px; max-height: calc(100vh - 48px); overflow-y: auto; }
.ask__close { position: absolute; top: 14px; right: 14px; margin: 0; z-index: 2; }
.ask__form { display: grid; gap: 22px; }
.ask__head { display: grid; gap: 8px; padding-right: 32px; }
.ask__title { font-size: clamp(1.5rem, 3vw, 1.875rem); line-height: 1.2; letter-spacing: -0.02em; font-weight: 400; }
.ask__sub { color: var(--text-2); font-size: 0.9375rem; }
.ask__row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.ask__field { display: grid; gap: 6px; }
.ask__field > span { font-size: 0.8125rem; color: var(--text-3); }
.ask__panel .ask__input { font-size: 1.0625rem; padding: 8px 0 10px; }
.ask__panel textarea.ask__input { resize: vertical; min-height: 96px; line-height: 1.5; }
.ask__error { font-style: normal; font-size: 0.8125rem; color: var(--coral); min-height: 0; }
.ask__error:empty { display: none; }
.ask__chips { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 4px; }
.ask__chip {
  padding: 8px 14px; border: 1px solid var(--line); font-size: 0.875rem; color: var(--text-2);
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.ask__chip:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.24); }
.ask__chip.is-selected { color: var(--text); border-color: var(--periwinkle); background: rgba(161, 181, 254, 0.08); }
.ask__panel .ask__foot { padding: 6px 0 0; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.ask__panel .ask__hint { display: block; font-size: 0.8125rem; color: var(--text-3); }
.ask__done { display: grid; justify-items: start; gap: 16px; padding: 24px 0 8px; animation: askIn 0.4s var(--ease); }
.ask__done .btn { margin-top: 8px; }
/* línea prisma arriba del modal */
.ask__panel::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--prism); }
@media (max-width: 640px) {
  .ask__panel { padding: 56px 20px 28px; max-height: none; }
  .ask__row { grid-template-columns: 1fr; }
}


/* =========================================================
   Logo: marco con apertura en perspectiva (favicon en img/brand/).
   La marca usa la forma del logo como máscara y el mismo
   degradado del logo y del favicon (img/brand/favicon.svg).
   ========================================================= */
.brand__mark {
  display: inline-block; vertical-align: -2px; flex-shrink: 0;
  width: 18px; height: 18px; padding: 0; border: 0;
  background: linear-gradient(to bottom right, #feca57 0%, #a1b5fe 30%, #2f8fe0 55%, #ff6b6b 100%);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath fill-rule='evenodd' d='M0 0H100V100H0ZM26 27L26 73L86 85L86 15Z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath fill-rule='evenodd' d='M0 0H100V100H0ZM26 27L26 73L86 85L86 15Z'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask-composite: source-over; mask-composite: add;
  animation: none;
}
