/* ==========================================================================
   ORBIsolucion.es — hoja de estilos única
   Dirección: editorial-técnica sobre fondo oscuro. El logo es sintaxis de
   código ({ORBI}), así que las llaves son el motivo estructural del sitio.
   Paleta tomada del propio logo: verde teal + coral, sobre carbón verdoso.
   ========================================================================== */

/* --- Tipografías auto-alojadas (sin peticiones a Google: RGPD) ----------- */
@font-face {
  font-family: 'Fraunces';
  src: url('../fonts/fraunces-latin.woff2') format('woff2');
  font-weight: 300 900; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Fraunces';
  src: url('../fonts/fraunces-latinext.woff2') format('woff2');
  font-weight: 300 900; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Archivo';
  src: url('../fonts/archivo-latin.woff2') format('woff2');
  font-weight: 400 700; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Archivo';
  src: url('../fonts/archivo-latinext.woff2') format('woff2');
  font-weight: 400 700; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('../fonts/jetbrainsmono-latin.woff2') format('woff2');
  font-weight: 400 500; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('../fonts/jetbrainsmono-latinext.woff2') format('woff2');
  font-weight: 400 500; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --- Fichas de diseño --------------------------------------------------- */
:root {
  --ground:      #0a1210;   /* carbón verdoso, base */
  --ground-2:    #0f1a17;   /* elevación */
  --ground-3:    #14231f;
  --rule:        #1f322c;   /* filetes */
  --ink:         #ecebe4;   /* texto principal, blanco cálido */
  --ink-soft:    #9fb0aa;   /* texto secundario */
  --ink-faint:   #61756e;   /* metadatos */
  --green:       #00a37a;   /* verde del logo */
  --green-lit:   #2fdCa6;   /* verde luminoso para acentos sobre oscuro */
  --coral:       #f4544a;   /* coral del logo */

  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --body:    'Archivo', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono:    'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --gutter: clamp(1.25rem, 5vw, 6rem);
  --measure: 62ch;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

/* --- Base -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--body);
  font-size: clamp(1rem, .95rem + .2vw, 1.125rem);
  line-height: 1.65;
  font-synthesis-weight: none;
  overflow-x: hidden;
}

/* Grano + halo: atmósfera, no color plano */
body::before {
  content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.42'/%3E%3C/svg%3E");
  mix-blend-mode: overlay; opacity: .5;
}
body::after {
  content: ''; position: fixed; z-index: 0; pointer-events: none;
  top: -30vh; right: -20vw; width: 80vw; height: 90vh;
  background: radial-gradient(closest-side, rgba(0,163,122,.16), transparent 70%);
  filter: blur(20px);
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--coral); color: #fff; }

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

/* --- Estructura -------------------------------------------------------- */
.shell { position: relative; z-index: 1; }

.wrap {
  width: 100%; max-width: 1440px; margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Rejilla asimétrica: etiqueta estrecha a la izquierda, contenido desplazado */
.band { padding-block: clamp(4.5rem, 11vh, 9rem); position: relative; }
.band + .band { border-top: 1px solid var(--rule); }

.band__grid {
  display: grid; gap: clamp(2rem, 4vw, 4.5rem);
  grid-template-columns: 1fr;
}
@media (min-width: 60rem) {
  .band__grid { grid-template-columns: minmax(11rem, 15rem) minmax(0, 1fr); }
}

/* --- Marcador de sección: {01} ---------------------------------------- */
.marker {
  font-family: var(--mono); font-size: .75rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-faint);
  display: flex; align-items: baseline; gap: .5rem;
  position: sticky; top: 5.5rem; align-self: start;
}
.marker b {
  color: var(--green-lit); font-weight: 500;
}
.marker i {
  font-style: normal; color: var(--coral);
}

/* --- Tipografía display ------------------------------------------------ */
.h-xl, .h-l, .h-m {
  font-family: var(--display);
  font-variation-settings: 'SOFT' 0, 'WONK' 1;
  font-weight: 400; line-height: .95;
  letter-spacing: -.022em; margin: 0;
  text-wrap: balance;
}
.h-xl { font-size: clamp(2.9rem, 9.5vw, 8.5rem); font-variation-settings: 'opsz' 144, 'SOFT' 0, 'WONK' 1; }
.h-l  { font-size: clamp(2.1rem, 5.2vw, 4rem);  font-variation-settings: 'opsz' 96, 'SOFT' 0, 'WONK' 1; }
.h-m  { font-size: clamp(1.35rem, 2.2vw, 1.9rem); font-variation-settings: 'opsz' 48, 'SOFT' 0, 'WONK' 0; line-height: 1.12; }

.lede {
  font-size: clamp(1.1rem, 1rem + .55vw, 1.45rem);
  line-height: 1.5; color: var(--ink-soft);
  max-width: var(--measure); margin: 1.75rem 0 0;
  text-wrap: pretty;
}

/* Llaves como signo de puntuación gráfico */
.brace { color: var(--coral); font-weight: 300; }

/* --- Cabecera ---------------------------------------------------------- */
.top {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px) saturate(140%);
  background: color-mix(in srgb, var(--ground) 82%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.top[data-stuck='true'] { border-bottom-color: var(--rule); }
.top__in {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; padding-block: 1rem;
}
.brand { display: flex; align-items: center; gap: .7rem; }
.brand img { width: clamp(7.5rem, 12vw, 9.5rem); }

.nav { display: none; gap: clamp(1.1rem, 2.2vw, 2.2rem); align-items: center; }
@media (min-width: 52rem) { .nav { display: flex; } }
.nav a {
  font-family: var(--mono); font-size: .78rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-soft);
  padding-block: .4rem; position: relative;
  transition: color .25s var(--ease);
}
.nav a::after {
  content: ''; position: absolute; left: 0; right: 100%; bottom: 0;
  height: 1px; background: var(--green-lit);
  transition: right .35s var(--ease);
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after { right: 0; }

/* --- Botones ----------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: .65rem;
  font-family: var(--mono); font-size: .8rem; letter-spacing: .1em;
  text-transform: uppercase; font-weight: 500;
  padding: .95rem 1.6rem; border: 1px solid var(--green);
  color: var(--ink); background: transparent; cursor: pointer;
  position: relative; overflow: hidden; isolation: isolate;
  transition: color .3s var(--ease), border-color .3s var(--ease);
}
.btn::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: var(--green); transform: translateY(101%);
  transition: transform .42s var(--ease);
}
.btn:hover { color: #04120d; border-color: var(--green); }
.btn:hover::before { transform: translateY(0); }
.btn--coral { border-color: var(--coral); }
.btn--coral::before { background: var(--coral); }
.btn--coral:hover { color: #fff; }

/* --- Portada ----------------------------------------------------------- */
.hero { padding-block: clamp(4rem, 14vh, 11rem) clamp(3.5rem, 9vh, 7rem); }
.hero__kicker {
  font-family: var(--mono); font-size: .78rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--ink-faint); margin: 0 0 clamp(1.5rem,4vh,2.75rem);
}
.hero__kicker span { color: var(--green-lit); }
.hero h1 .l2 { display: block; padding-left: clamp(0rem, 8vw, 7rem); }
.hero h1 em {
  font-style: normal; color: var(--green-lit);
}
.hero__foot {
  margin-top: clamp(2.5rem, 6vh, 4.5rem);
  display: flex; flex-wrap: wrap; gap: 1rem 1.25rem; align-items: center;
}
.hero__stats {
  margin-top: clamp(3rem, 8vh, 5.5rem);
  display: grid; gap: 1px; background: var(--rule);
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  border: 1px solid var(--rule);
}
.hero__stats div { background: var(--ground); padding: 1.35rem 1.25rem; }
.hero__stats dt {
  font-family: var(--mono); font-size: .7rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-faint);
}
.hero__stats dd {
  margin: .45rem 0 0; font-family: var(--display); font-size: 1.9rem;
  font-variation-settings: 'opsz' 48, 'WONK' 1; line-height: 1;
}

/* --- Servicios: lista numerada, no tarjetas --------------------------- */
.svc { border-top: 1px solid var(--rule); }
.svc__row {
  display: grid; gap: .4rem 2rem; padding-block: clamp(1.6rem, 3.5vh, 2.4rem);
  border-bottom: 1px solid var(--rule);
  grid-template-columns: 1fr;
  transition: padding-left .4s var(--ease);
}
@media (min-width: 48rem) {
  .svc__row { grid-template-columns: 3.5rem minmax(10rem, 18rem) minmax(0, 1fr); align-items: baseline; }
  .svc__row:hover { padding-left: .9rem; }
}
.svc__n {
  font-family: var(--mono); font-size: .8rem; color: var(--coral);
  letter-spacing: .06em;
}
.svc__row h3 {
  font-family: var(--display); font-size: clamp(1.3rem, 2.4vw, 1.85rem);
  font-variation-settings: 'opsz' 48, 'WONK' 1; font-weight: 400;
  line-height: 1.1; margin: 0; letter-spacing: -.015em;
  transition: color .3s var(--ease);
}
.svc__row:hover h3 { color: var(--green-lit); }
.svc__row p { margin: 0; color: var(--ink-soft); max-width: 48ch; }

/* --- Enfoque: mosaico con densidad controlada ------------------------- */
.grid-vals {
  display: grid; gap: 1px; background: var(--rule);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  border: 1px solid var(--rule);
}
.val {
  background: var(--ground); padding: clamp(1.5rem, 3vw, 2.1rem);
  position: relative; transition: background .35s var(--ease);
}
.val:hover { background: var(--ground-2); }
.val__tag {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--coral); margin: 0 0 .9rem;
}
.val h3 {
  font-family: var(--display); font-weight: 400; margin: 0 0 .6rem;
  font-size: 1.3rem; font-variation-settings: 'opsz' 36, 'WONK' 1;
  line-height: 1.15;
}
.val p { margin: 0; color: var(--ink-soft); font-size: .95rem; }

/* --- Trabajo: lista editorial con imagen al pasar el cursor ----------- */
.work { position: relative; }
.work__list { border-top: 1px solid var(--rule); }
.work__item {
  display: grid; grid-template-columns: 2.75rem 1fr auto; gap: .35rem 1.25rem;
  align-items: baseline; padding-block: clamp(1.5rem, 3.2vh, 2.3rem);
  border-bottom: 1px solid var(--rule); cursor: default;
  transition: padding-left .45s var(--ease), border-color .3s var(--ease);
}
@media (hover: hover) and (min-width: 60rem) {
  .work__item:hover { padding-left: 1.1rem; border-bottom-color: var(--green); }
}
.work__n { font-family: var(--mono); font-size: .78rem; color: var(--ink-faint); }
.work__item:hover .work__n { color: var(--coral); }
.work__name {
  font-family: var(--display); font-size: clamp(1.5rem, 4vw, 2.9rem);
  font-variation-settings: 'opsz' 96, 'WONK' 1; font-weight: 400;
  line-height: 1.05; margin: 0; letter-spacing: -.02em;
  transition: color .3s var(--ease);
}
.work__item:hover .work__name { color: var(--green-lit); }
.work__tags {
  grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: .4rem .55rem;
  margin: .55rem 0 0; padding: 0; list-style: none;
}
.work__tags li {
  font-family: var(--mono); font-size: .66rem; letter-spacing: .09em;
  text-transform: uppercase; color: var(--ink-faint);
  border: 1px solid var(--rule); padding: .22rem .55rem;
}
.work__desc {
  grid-column: 2 / -1; margin: .9rem 0 0; color: var(--ink-soft);
  max-width: 68ch; font-size: .95rem;
}
/* miniatura embebida: única vía en móvil/táctil */
.work__shot { grid-column: 1 / -1; margin-top: 1.1rem; border: 1px solid var(--rule); }
@media (hover: hover) and (min-width: 60rem) {
  .work__shot { display: none; }
}

/* panel flotante que sigue al cursor (solo escritorio con hover) */
.peek {
  position: fixed; top: 0; left: 0; z-index: 40; width: min(30vw, 27rem);
  pointer-events: none; opacity: 0; transform: translate3d(0,0,0) scale(.96);
  transition: opacity .3s var(--ease), transform .5s var(--ease);
  border: 1px solid var(--green); box-shadow: 0 30px 70px -20px rgba(0,0,0,.8);
  display: none;
}
@media (hover: hover) and (min-width: 60rem) { .peek { display: block; } }
.peek[data-on='true'] { opacity: 1; }
.peek img { width: 100%; }

/* --- Equipo ------------------------------------------------------------ */
.team {
  display: grid; gap: clamp(1.75rem, 3.5vw, 2.75rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
}
.person figure { margin: 0; overflow: hidden; border: 1px solid var(--rule); }
.person img {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  filter: grayscale(1) contrast(1.05);
  transition: filter .6s var(--ease), transform .8s var(--ease);
}
.person:hover img { filter: grayscale(0) contrast(1); transform: scale(1.03); }
.person h3 {
  font-family: var(--display); font-weight: 400; margin: 1.1rem 0 .2rem;
  font-size: clamp(1.25rem, 2.1vw, 1.6rem);
  font-variation-settings: 'opsz' 48, 'WONK' 1; line-height: 1.1;
}
.person__role {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .13em;
  text-transform: uppercase; color: var(--coral); margin: 0 0 .8rem;
}
.person__bio { margin: 0; color: var(--ink-soft); font-size: .93rem; }
.person__links { display: flex; gap: .9rem; margin-top: .9rem; padding: 0; list-style: none; }
.person__links a {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-faint);
  border-bottom: 1px solid var(--rule); padding-bottom: .15rem;
  transition: color .25s var(--ease), border-color .25s var(--ease);
}
.person__links a:hover { color: var(--green-lit); border-bottom-color: var(--green-lit); }

/* --- Cita ------------------------------------------------------------- */
.quote {
  margin: clamp(2.75rem, 6vh, 4.25rem) 0 0;
  padding-left: clamp(1.25rem, 3vw, 2.5rem);
  border-left: 2px solid var(--coral);
  max-width: 54ch;
}
.quote blockquote { margin: 0; }
.quote blockquote p {
  font-family: var(--display); font-weight: 300;
  font-size: clamp(1.2rem, 2.4vw, 1.75rem); line-height: 1.35;
  font-variation-settings: 'opsz' 72, 'SOFT' 20, 'WONK' 1;
  margin: 0; color: var(--ink); text-wrap: pretty;
}
.quote blockquote em { font-style: italic; color: var(--green-lit); }
.quote blockquote strong { font-weight: 600; }
.quote figcaption {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .13em;
  text-transform: uppercase; color: var(--ink-faint); margin-top: 1.1rem;
}
.quote figcaption::before { content: '— '; color: var(--coral); }

/* --- Contacto ---------------------------------------------------------- */
.form { display: grid; gap: 1.15rem; max-width: 40rem; margin-top: 2.25rem; }
.field { display: grid; gap: .45rem; }
.field label {
  font-family: var(--mono); font-size: .7rem; letter-spacing: .13em;
  text-transform: uppercase; color: var(--ink-faint);
}
.field input, .field textarea {
  font-family: var(--body); font-size: 1rem; color: var(--ink);
  background: var(--ground-2); border: 1px solid var(--rule);
  padding: .85rem 1rem; width: 100%; border-radius: 0;
  transition: border-color .25s var(--ease), background .25s var(--ease);
}
.field textarea { min-height: 9rem; resize: vertical; }
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--green-lit); background: var(--ground-3);
}
.field input::placeholder, .field textarea::placeholder { color: var(--ink-faint); }
.form__note { font-size: .82rem; color: var(--ink-faint); margin: 0; }
.form__note a { color: var(--ink-soft); text-decoration: underline; text-underline-offset: 2px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.alert {
  border: 1px solid var(--rule); border-left-width: 3px;
  padding: .9rem 1.1rem; font-size: .92rem; margin: 0 0 1.5rem;
}
.alert--ok  { border-left-color: var(--green-lit); color: var(--ink); }
.alert--bad { border-left-color: var(--coral); color: var(--ink); }

.contact__direct {
  margin-top: 2.5rem; padding-top: 1.75rem; border-top: 1px solid var(--rule);
  display: grid; gap: .35rem;
}
.contact__direct dt {
  font-family: var(--mono); font-size: .7rem; letter-spacing: .13em;
  text-transform: uppercase; color: var(--ink-faint);
}
.contact__direct dd { margin: 0 0 1rem; }
.contact__direct a {
  font-family: var(--display); font-size: clamp(1.2rem, 2.4vw, 1.7rem);
  font-variation-settings: 'opsz' 48, 'WONK' 1;
  border-bottom: 1px solid var(--rule); transition: border-color .3s var(--ease), color .3s var(--ease);
}
.contact__direct a:hover { color: var(--green-lit); border-bottom-color: var(--green-lit); }

/* --- Pie -------------------------------------------------------------- */
.foot { border-top: 1px solid var(--rule); padding-block: 3rem 2.5rem; }
.foot__in {
  display: flex; flex-wrap: wrap; gap: 1.5rem 2rem;
  align-items: center; justify-content: space-between;
}
.foot p, .foot a {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .09em;
  color: var(--ink-faint); margin: 0;
}
.foot a:hover { color: var(--ink-soft); }

/* --- Revelado al entrar en pantalla -----------------------------------
   REGLA DE ORO: el contenido es visible por defecto. Solo lo ocultamos
   cuando sabemos que hay JavaScript para volver a mostrarlo (clase .js,
   que pone un script en línea en el <head>). Sin JS, sin bloqueadores o
   si el fichero se abre suelto, la página se lee entera igualmente. */
.rise { opacity: 1; transform: none; }

.js .rise { opacity: 0; transform: translateY(1.6rem); }
.js .rise.seen {
  opacity: 1; transform: none;
  transition: opacity .8s var(--ease), transform .9s var(--ease);
}
@media (prefers-reduced-motion: reduce) {
  .js .rise, .js .rise.seen { opacity: 1; transform: none; transition: none; }
}

/* Entrada escalonada de la portada: mismo criterio */
@keyframes lift { from { opacity: 0; transform: translateY(1.4rem); } to { opacity: 1; transform: none; } }
.hero .stag { opacity: 1; }
.js .hero .stag { opacity: 0; animation: lift .95s var(--ease) forwards; }
.js .hero .stag:nth-child(1) { animation-delay: .06s; }
.js .hero .stag:nth-child(2) { animation-delay: .18s; }
.js .hero .stag:nth-child(3) { animation-delay: .32s; }
.js .hero .stag:nth-child(4) { animation-delay: .44s; }
.js .hero .stag:nth-child(5) { animation-delay: .56s; }
@media (prefers-reduced-motion: reduce) {
  .js .hero .stag { opacity: 1; animation: none; }
}

/* --- Salto de navegación (accesibilidad) ------------------------------ */
.skip {
  position: absolute; left: .75rem; top: -4rem; z-index: 100;
  background: var(--green); color: #04120d; padding: .7rem 1.1rem;
  font-family: var(--mono); font-size: .78rem; text-transform: uppercase;
  transition: top .2s var(--ease);
}
.skip:focus { top: .75rem; }
