/* bynico.tech · web · rebrand 2026, concepto 35A "Bento nocturno"
   Paleta 16A Orquídea de noche · Outfit + Inter + JetBrains Mono
   Rejilla bento: 4 columnas (escritorio) · 2 (tableta y móvil)
   Motion: curva de firma (0.4,0,0.2,1) · 160 / 420 / 800 ms */

:root {
  --berenjena: #1A1023;
  --noche: #120A17;
  --ciruela: #2C1C3A;
  --mora: #4A3658;
  --lavanda: #B9A9C4;
  --violeta-gris: #5E4E69;
  --crema: #FBF5F0;
  --blanco: #FFFDFB;
  --bruma: #F1E4EC;
  --orq: #C15897;
  --orq-osc: #9E3F78;
  --lima: #D9F26B;

  --f-display: "Outfit", system-ui, sans-serif;
  --f-body: "Inter", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.05, 0.7, 0.1, 1);
  --t-quick: 160ms;
  --t-std: 420ms;
  --t-slow: 800ms;

  --maxw: 1280px;
  --pad: clamp(16px, 4vw, 80px);
  --gap: 16px;
  --row: 200px;
  --radius: 24px;
  --cell-pad: clamp(22px, 2.4vw, 36px);
  --header-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); interpolate-size: allow-keywords; }
body {
  margin: 0;
  background: var(--berenjena);
  color: var(--crema);
  font-family: var(--f-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 700; text-wrap: balance; }
ul, ol { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }

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

.skip {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--lima); color: var(--berenjena); padding: 10px 16px; border-radius: 10px; font-weight: 700;
}
.skip:focus { top: 16px; }

/* ── Tipos ─────────────────────────────────── */
.kicker {
  font: 500 0.75rem/1.2 var(--f-mono);
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--sub);
}
.h2 {
  font-family: var(--f-display);
  font-size: clamp(1.75rem, 2.6vw, 2.4rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin-top: 12px;
}
.h3 {
  font-family: var(--f-display);
  font-size: clamp(1.5rem, 2.1vw, 2rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-top: 10px;
}
.cell__lead { margin-top: 12px; color: var(--sub); max-width: 34em; }

/* ── Botones ───────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px;
  border-radius: 999px;
  font: 700 1rem/1 var(--f-body);
  text-decoration: none;
  transition: background-color var(--t-quick) var(--ease), color var(--t-quick) var(--ease), transform 120ms var(--ease);
}
.btn:active { transform: scale(0.97); }
.btn--sm { min-height: 44px; padding: 0 20px; font-size: 0.94rem; }
.btn--lime { background: var(--lima); color: var(--berenjena); }
.btn--lime:hover { background: #E6F78F; }
.btn--dark { background: var(--berenjena); color: var(--crema); }
.btn--dark:hover { background: var(--ciruela); }

.link {
  color: var(--crema); font-weight: 500; text-decoration: underline;
  text-underline-offset: 5px; text-decoration-thickness: 1px; text-decoration-color: var(--orq);
  transition: color var(--t-quick) var(--ease);
}
.link:hover { color: var(--lima); }

/* ── Logo ──────────────────────────────────── */
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--crema); --dot: var(--orq); }
.logo__mark { width: 26px; height: 31px; }
.logo__word { font: 700 1.45rem/1 var(--f-display); letter-spacing: -0.01em; }
.logo__word b { color: var(--orq); }
.logo__word i { font-style: normal; font-weight: 400; color: var(--lavanda); }

/* ── Cabecera ──────────────────────────────── */
.top {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 32px;
  height: var(--header-h);
  padding: 0 max(var(--pad), calc((100% - var(--maxw)) / 2));
  background: rgb(26 16 35 / 0.84);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-std) var(--ease);
}
.top.is-scrolled { border-bottom-color: rgb(74 54 88 / 0.7); }
.top__nav { display: flex; gap: 28px; margin-left: auto; font-size: 0.94rem; }
.top__nav a { text-decoration: none; color: var(--lavanda); transition: color var(--t-quick) var(--ease); }
.top__nav a:hover { color: var(--crema); }

/* ── Rejilla bento ─────────────────────────── */
.bento {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: minmax(var(--row), auto);
  gap: var(--gap);
  max-width: calc(var(--maxw) + 2 * var(--pad));
  margin: 0 auto;
  padding: 16px var(--pad) 48px;
  grid-template-areas:
    "hero  hero  chat  mark"
    "hero  hero  chat  cta"
    "prob  prob  prob  prob"
    "web   autom fit   fit"
    "menui menui alm   alm"
    "menui menui mob   mob"
    "proc  proc  proc  close"
    "faq   faq   faq   faq";
}
.cell--hero  { grid-area: hero; }
.cell--chat  { grid-area: chat; }
.cell--mark  { grid-area: mark; }
.cell--cta   { grid-area: cta; }
.cell--prob  { grid-area: prob; }
.cell--web   { grid-area: web; }
.cell--auto  { grid-area: autom; } /* "auto" es palabra reservada en grid-area */
.cell--fit   { grid-area: fit; }
.cell--menui { grid-area: menui; }
.cell--alm   { grid-area: alm; }
.cell--mob   { grid-area: mob; }
.cell--proc  { grid-area: proc; }
.cell--close { grid-area: close; }
.cell--faq   { grid-area: faq; }

.cell {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  padding: var(--cell-pad);
  border-radius: var(--radius);
  background: var(--bg); color: var(--ink);
}
/* Tonos de celda */
.tone-plum   { --bg: var(--ciruela); --ink: var(--crema); --sub: var(--lavanda); --ac: var(--orq); --line: rgb(74 54 88 / 0.9); }
.tone-cream  { --bg: var(--crema); --ink: var(--berenjena); --sub: var(--violeta-gris); --ac: var(--orq-osc); --line: #E6DAD9; }
.tone-orchid { --bg: var(--orq); --ink: var(--berenjena); --sub: var(--berenjena); --ac: var(--crema); --line: var(--orq-osc); }
.tone-lime   { --bg: var(--lima); --ink: var(--berenjena); --sub: var(--berenjena); --ac: var(--berenjena); --line: #B9CF52; }

/* Entrada de las celdas al hacer scroll */
.js .cell { opacity: 0; transform: translateY(24px); transition: opacity var(--t-slow) var(--ease-out), transform var(--t-slow) var(--ease-out); }
.js .cell.is-in { opacity: 1; transform: none; }

/* ── Hero ──────────────────────────────────── */
.cell--hero { justify-content: space-between; gap: 24px; }
.hero__title {
  font-family: var(--f-display);
  font-size: clamp(2.6rem, 4.9vw, 4.9rem);
  line-height: 1;
  letter-spacing: -0.025em;
  margin-top: auto;
}
.hero__line { display: block; }
.hero__title em { font-style: normal; color: var(--orq); }
.hero__lead { max-width: 32em; color: var(--lavanda); font-size: 1.08rem; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }

.js .hero__line, .js .hero__lead, .js .hero__actions {
  opacity: 0; transform: translateY(18px);
  transition: opacity var(--t-slow) var(--ease-out), transform var(--t-slow) var(--ease-out);
}
.js .hero__line:nth-child(2) { transition-delay: 90ms; }
.js .hero__line:nth-child(3) { transition-delay: 180ms; }
.js .hero__lead { transition-delay: 300ms; }
.js .hero__actions { transition-delay: 420ms; }
.is-ready .hero__line, .is-ready .hero__lead, .is-ready .hero__actions { opacity: 1; transform: none; }

/* ── Chat (celda crema) ────────────────────── */
.cell--chat { padding: 0; }
.chat { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.chat__head {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 18px 14px;
  background: var(--berenjena); color: var(--crema);
}
.chat__avatar {
  display: grid; place-items: center; flex: none;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--ciruela); --dot: var(--orq); color: var(--crema);
}
.chat__avatar svg { width: 17px; height: 20px; }
.chat__name { font-weight: 700; font-size: 0.98rem; line-height: 1.2; }
.chat__status { font: 400 0.74rem/1.4 var(--f-mono); color: var(--lima); }
.chat__status span { display: inline-block; min-width: 1ch; }
.chat__status .bump { animation: bump var(--t-std) var(--ease); }
@keyframes bump { 40% { transform: translateY(-3px); color: var(--crema); } }

.chat__body {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 8px;
  padding: 14px 12px 12px;
  overflow: hidden;
}
.chat__caption { padding: 0 16px 14px; font: 400 0.72rem/1.4 var(--f-mono); color: var(--violeta-gris); }
.msg {
  position: relative;
  max-width: 86%;
  padding: 8px 12px 6px;
  border-radius: 16px;
  font-size: 0.88rem; line-height: 1.4;
}
.msg time { display: block; margin-top: 2px; text-align: right; font: 400 0.64rem/1 var(--f-mono); opacity: 0.65; }
.msg--in { align-self: flex-start; background: var(--blanco); color: var(--berenjena); border: 1px solid #E8DDE2; border-bottom-left-radius: 4px; }
.msg--out { align-self: flex-end; background: var(--bruma); color: var(--berenjena); border-bottom-right-radius: 4px; font-weight: 500; }
.ticks { font-weight: 400; color: var(--violeta-gris); transition: color var(--t-std) var(--ease) 500ms; }
.msg--out.is-shown .ticks { color: var(--orq-osc); }

.msg--typing {
  align-self: flex-end; display: flex; gap: 4px;
  padding: 12px 14px; background: var(--bruma); border-bottom-right-radius: 4px;
}
.msg--typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--orq-osc); animation: dot 1.1s ease-in-out infinite; }
.msg--typing i:nth-child(2) { animation-delay: 0.15s; }
.msg--typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes dot { 0%, 60%, 100% { transform: translateY(0); opacity: 0.45; } 30% { transform: translateY(-4px); opacity: 1; } }

.js .msg { display: none; }
.js .msg.is-shown { display: block; animation: msg-in var(--t-std) var(--ease-out) both; }
.js .msg--typing.is-shown { display: flex; }
.msg--out.is-shown { transform-origin: bottom right; }
.msg--in.is-shown { transform-origin: bottom left; }
@keyframes msg-in { from { opacity: 0; transform: translateY(12px) scale(0.96); } }

/* ── Marca (orquídea) ──────────────────────── */
.cell--mark { align-items: center; justify-content: center; --dot: var(--crema); color: var(--berenjena); }
.mark__b { width: 34%; max-width: 110px; aspect-ratio: 380 / 450; height: auto; margin-bottom: 18px; }
.mark__b .b-dot, .mark__b use { transform-box: fill-box; }
.mark__motto { position: absolute; left: var(--cell-pad); bottom: 18px; font: 600 0.98rem/1.2 var(--f-display); }

/* ── Contacto rápido (lima) ────────────────── */
.cell--cta { justify-content: space-between; gap: 12px; }
.cta__title { font: 700 clamp(1.8rem, 2.4vw, 2.3rem)/1 var(--f-display); letter-spacing: -0.015em; }
.cta__text { font-size: 0.9rem; line-height: 1.45; }
.cell--cta .btn { align-self: flex-start; }

/* ── Problemas ─────────────────────────────── */
.cell--prob {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 0 48px; align-content: start;
}
.cell--prob > :not(.problems) { grid-column: 1; }
.cell--prob .problems { grid-column: 2; grid-row: 1 / span 4; }
.problems { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 28px; }
.pb__problem { font: 600 1.06rem/1.3 var(--f-display); transition: color var(--t-std) var(--ease); }
.pb__problem s {
  text-decoration: none;
  background: linear-gradient(var(--orq), var(--orq)) left 58% / 0% 2px no-repeat;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  transition: background-size var(--t-slow) var(--ease);
}
.pb__fix { display: flex; gap: 10px; align-items: flex-start; margin-top: 8px; color: var(--lavanda); font-size: 0.9rem; line-height: 1.5; }
.check { flex: none; position: relative; width: 20px; height: 20px; margin-top: 1px; border-radius: 50%; background: var(--lima); }
.check::after {
  content: ""; position: absolute; left: 7px; top: 3.5px; width: 5px; height: 10px;
  border: solid var(--berenjena); border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.pb.is-solved .pb__problem { color: var(--lavanda); }
.pb.is-solved .pb__problem s { background-size: 100% 2px; }
.js .pb .pb__fix { opacity: 0; transform: translateY(6px); transition: opacity var(--t-std) var(--ease) 160ms, transform var(--t-std) var(--ease) 160ms; }
.js .pb.is-solved .pb__fix { opacity: 1; transform: none; }
.cell--prob .btn { justify-self: start; align-self: end; margin-top: 24px; }

/* ── Servicios ─────────────────────────────── */
.bullets { display: grid; gap: 8px; margin-top: auto; padding-top: 20px; font-size: 0.92rem; color: var(--crema); }
.bullets li { position: relative; padding-left: 18px; line-height: 1.4; }
.bullets li::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 7px; height: 7px; border-radius: 50%; background: var(--ac); }

/* ── ¿Encaja? (crema) ──────────────────────── */
.cell--fit { justify-content: center; gap: 16px; }
.fit__title { font: 700 clamp(1.4rem, 1.9vw, 1.8rem)/1.1 var(--f-display); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chips li { padding: 8px 16px; border: 1.5px solid var(--berenjena); border-radius: 999px; font-weight: 500; font-size: 0.92rem; }
.fit__note { color: var(--violeta-gris); font-size: 0.92rem; }

/* ── Proyectos ─────────────────────────────── */
.project { gap: 22px; }
.project__media { position: relative; }
.project__desk {
  width: 100%; border-radius: 14px; aspect-ratio: 16 / 10; object-fit: cover; object-position: top;
  box-shadow: 0 20px 40px -24px rgb(0 0 0 / 0.7);
}
.cell--menui .project__media { padding: 0 9% 7% 0; }
.project__phone {
  position: absolute; right: 0; bottom: 0; width: 24%;
  border-radius: 18px; border: 4px solid var(--berenjena);
  box-shadow: 0 20px 34px -16px rgb(0 0 0 / 0.75);
  transition: transform var(--t-std) var(--ease);
}
.project:hover .project__phone { transform: translateY(-8px); }
.project__info { display: flex; flex-direction: column; }
.project__info > p:not(.kicker) { margin-top: 10px; color: var(--lavanda); font-size: 0.94rem; max-width: 34em; }
.project__url {
  align-self: flex-start; margin-top: 14px;
  font: 500 0.82rem/1.4 var(--f-mono); color: var(--orq);
  text-decoration: none; word-break: break-all;
  transition: color var(--t-quick) var(--ease);
}
.project__url:hover { color: var(--lima); }
.cell--menui .project__info { margin-top: auto; }
.project--wide { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: center; gap: 24px; }
.project--wide .project__desk { transition: transform var(--t-std) var(--ease); }
.project--wide:hover .project__desk { transform: translateY(-4px); }

/* ── Proceso ───────────────────────────────── */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin-top: auto; padding-top: 24px; }
.step { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: start; }
.step__n { grid-row: span 2; font: 700 3.2rem/0.85 var(--f-display); color: var(--orq); }
.step__title { font: 700 1.05rem/1.25 var(--f-display); }
.step p { margin-top: 4px; color: var(--lavanda); font-size: 0.86rem; line-height: 1.45; }

/* ── Cierre (orquídea) ─────────────────────── */
.cell--close { justify-content: space-between; gap: 14px; }
.close__title { font: 700 clamp(2rem, 3vw, 2.9rem)/1 var(--f-display); letter-spacing: -0.02em; }
.close__text { font-size: 0.92rem; line-height: 1.45; font-weight: 500; }
.cell--close .btn { align-self: flex-start; min-height: 46px; padding: 0 20px; font-size: 0.92rem; }

/* ── Preguntas ─────────────────────────────── */
.cell--faq { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 24px 48px; align-items: start; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 18px 0;
  cursor: pointer; list-style: none;
  font: 600 1.12rem/1.3 var(--f-display);
  transition: color var(--t-quick) var(--ease);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--lima); }
.faq summary::after {
  content: ""; flex: none; width: 14px; height: 14px; color: var(--orq);
  background:
    linear-gradient(currentColor 0 0) center / 14px 2px no-repeat,
    linear-gradient(currentColor 0 0) center / 2px 14px no-repeat;
  transition: transform var(--t-std) var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 20px; max-width: 40em; color: var(--lavanda); }
.faq details::details-content {
  block-size: 0; overflow: hidden;
  transition: block-size var(--t-std) var(--ease), content-visibility var(--t-std) allow-discrete;
}
.faq details[open]::details-content { block-size: auto; }

/* ── Pie ───────────────────────────────────── */
.foot {
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px 40px;
  max-width: calc(var(--maxw) + 2 * var(--pad)); margin: 0 auto;
  padding: 24px var(--pad) 48px;
  color: var(--lavanda); font-size: 0.94rem;
}
.foot .logo__word { font-size: 1.2rem; }
.foot .logo__mark { width: 22px; height: 26px; }
.foot__motto { font: 600 1rem/1.2 var(--f-display); color: var(--crema); }
.foot__links { display: flex; gap: 24px; margin-left: auto; }
.foot__links a { text-decoration: none; transition: color var(--t-quick) var(--ease); }
.foot__links a:hover { color: var(--lima); }

/* ── Botón flotante (solo móvil) ───────────── */
.float-wa {
  position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 60;
  display: none; align-items: center; gap: 8px;
  min-height: 52px; padding: 0 20px 0 16px; border-radius: 999px;
  background: var(--lima); color: var(--berenjena);
  font-weight: 700; text-decoration: none;
  box-shadow: 0 12px 30px -10px rgb(0 0 0 / 0.7);
  transform: translateY(120%); opacity: 0;
  transition: transform var(--t-std) var(--ease-out), opacity var(--t-std) var(--ease);
}
.float-wa.is-visible { transform: none; opacity: 1; }

/* ── Tableta: 2 columnas ───────────────────── */
@media (max-width: 1100px) {
  .top__nav { display: none; }
  .top__cta { margin-left: auto; }
  .bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: auto;
    grid-template-areas:
      "hero  hero"
      "chat  mark"
      "chat  cta"
      "prob  prob"
      "web   autom"
      "fit   fit"
      "menui menui"
      "alm   alm"
      "mob   mob"
      "proc  proc"
      "close close"
      "faq   faq";
  }
  .cell--hero { min-height: 480px; }
  .cell--chat { min-height: 480px; }
  .cell--mark, .cell--cta { min-height: 232px; }
  .cell--menui .project__media { max-width: 720px; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  .cell--faq { grid-template-columns: 1fr; }
  .cell--prob { display: flex; }
  .cell--prob .problems { margin: 28px 0 0; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cell--prob .btn { align-self: flex-start; }
}
@media (max-width: 820px) {
  .float-wa { display: inline-flex; }
}

/* ── Móvil ─────────────────────────────────── */
@media (max-width: 640px) {
  :root { --gap: 12px; --radius: 22px; --header-h: 64px; }
  .logo__word { font-size: 1.25rem; }
  .top__cta { display: none; }
  .bento {
    padding-top: 8px;
    grid-template-areas:
      "hero  hero"
      "chat  chat"
      "mark  cta"
      "prob  prob"
      "web   web"
      "autom autom"
      "fit   fit"
      "menui menui"
      "alm   alm"
      "mob   mob"
      "proc  proc"
      "close close"
      "faq   faq";
  }
  .cell--hero { min-height: 0; }
  .hero__title { margin-top: 28px; }
  .cell--chat { min-height: 0; height: 470px; }
  .cell--mark, .cell--cta { min-height: 196px; padding: 18px; }
  .mark__motto { left: 18px; font-size: 0.85rem; }
  .cta__title { font-size: 1.6rem; }
  .cta__text { font-size: 0.82rem; }
  .cell--prob .problems { grid-template-columns: 1fr; gap: 18px; }
  .project--wide { grid-template-columns: 1fr; }
  .project--wide .project__media { order: -1; }
  .steps { grid-template-columns: 1fr; gap: 18px; }
  .foot__links { margin-left: 0; }
}

/* ── Movimiento reducido: todo en su estado final ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .cell { opacity: 1; transform: none; }
  .js .hero__line, .js .hero__lead, .js .hero__actions { opacity: 1; transform: none; }
  .js .msg:not(.msg--typing) { display: block; }
  .msg--out .ticks { color: var(--orq-osc); }
  .pb .pb__problem { color: var(--lavanda); }
  .pb .pb__problem s { background-size: 100% 2px; }
  .js .pb .pb__fix { opacity: 1; transform: none; }
}
