@font-face {
  font-family: "Public Sans";
  src: url("/assets/fonts/public-sans-latin-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f5f3ee;
  --ink: #1a1b19;
  --muted: #5b5a54;
  --tint: rgba(26, 27, 25, 0.07);
  --accent: #2146b5;
  --accent-hover: #17358f;
  --on-accent: #ffffff;

  --gut: clamp(1.25rem, 3vw, 3.75rem);
  --header: 4rem;

  /* ritmo: grupo, bloque, sección (múltiplos de 4 px) */
  --g: 1.5rem;
  --b: clamp(3rem, 6vw, 5rem);
  --s: clamp(6rem, 12vw, 10rem);

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--ink);
  font-family: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 100%;
  font-synthesis: none;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  background: var(--bg);
  font-size: clamp(1.0625rem, 1.04rem + 0.12vw, 1.125rem);
  line-height: 1.5;
  font-weight: 400;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3,
p,
ul,
dl,
dd {
  margin: 0;
  padding: 0;
}

ul {
  list-style: none;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: var(--gut);
  top: -4rem;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 1.25rem;
  border-radius: 10px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
}

.skip:focus {
  top: 0.75rem;
}

/* ---------- grilla ---------- */

.wrap {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: var(--gut);
  padding-inline: var(--gut);
}

@media (min-width: 960px) {
  .wrap {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }
}

/* ---------- header ---------- */

.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  height: var(--header);
  isolation: isolate;
  pointer-events: none;
}

.header::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3.75rem;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(245, 243, 238, 1) 0%,
    rgba(245, 243, 238, 0.97) 12%,
    rgba(245, 243, 238, 0.9) 25%,
    rgba(245, 243, 238, 0.79) 37%,
    rgba(245, 243, 238, 0.65) 50%,
    rgba(245, 243, 238, 0.5) 62%,
    rgba(245, 243, 238, 0.34) 74%,
    rgba(245, 243, 238, 0.19) 85%,
    rgba(245, 243, 238, 0.07) 94%,
    rgba(245, 243, 238, 0) 100%
  );
}

.header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding-inline: var(--gut);
}

.header a {
  pointer-events: auto;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-weight: 760;
  font-size: 1.25rem;
  letter-spacing: -0.045em;
  text-decoration: none;
  white-space: nowrap;
}

.nav {
  display: flex;
  gap: clamp(0.25rem, 1.5vw, 1.5rem);
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding-inline: 0.75rem;
  border-radius: 10px;
  font-weight: 560;
  text-decoration: none;
  transition: background-color 0.2s;
}

.nav a:hover {
  background: var(--tint);
  transition: none;
}

.nav a:last-child {
  margin-right: -0.75rem;
}

@media (max-width: 359px) {
  .wordmark {
    font-size: 1.125rem;
  }
  .nav {
    gap: 0;
  }
  .nav a {
    padding-inline: 0.5rem;
  }
  .nav a:last-child {
    margin-right: -0.5rem;
  }
}

/* ---------- botones y links ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0 1.75rem;
  border-radius: 12px;
  font-weight: 620;
  font-size: 1.0625rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s;
}

.btn--primary {
  background: var(--accent);
  color: var(--on-accent);
}

.btn--primary:hover {
  background: var(--accent-hover);
  transition: none;
}

.btn--quiet {
  background: var(--tint);
  color: var(--ink);
}

.btn--quiet:hover {
  background: rgba(26, 27, 25, 0.12);
  transition: none;
}

.link {
  color: var(--accent);
  font-weight: 560;
  transition: color 0.2s;
}

.link:hover {
  color: var(--accent-hover);
  transition: none;
}

/* ---------- hero ---------- */

.hero {
  padding-top: clamp(9rem, 26svh, 16rem);
  padding-bottom: var(--s);
}

.hero__title {
  word-spacing: 0.06em;
  grid-column: 1 / -1;
  margin-left: -0.04em;
  font-size: clamp(3.25rem, 9.3vw, 10rem);
  font-weight: 760;
  line-height: 0.91;
  letter-spacing: -0.075em;
}

.hero__lead {
  grid-column: 1 / -1;
  margin-top: var(--b);
  max-width: 34rem;
}

.hero__actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: var(--g);
}

@media (max-width: 559px) {
  .hero__actions .btn {
    width: 100%;
  }
}

@media (min-width: 960px) {
  .hero__lead {
    grid-column: 1 / span 6;
  }
  .hero__actions {
    grid-column: 1 / span 6;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(1.25rem);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes rise-title {
  from {
    transform: translateY(1.25rem);
  }
  to {
    transform: none;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .hero__title {
    animation: rise-title 0.8s var(--ease) both;
  }
  .hero__lead,
  .hero__actions {
    animation: rise 0.8s var(--ease) both;
  }
  .hero__lead {
    animation-delay: 0.14s;
  }
  .hero__actions {
    animation-delay: 0.26s;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------- trabajos ---------- */

.group__title {
  grid-column: 1 / -1;
  margin-bottom: var(--b);
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  font-weight: 680;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.group + .group {
  margin-top: var(--s);
}

.rows {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: subgrid;
  row-gap: var(--s);
}

.row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: subgrid;
  row-gap: 2.5rem;
}

.row__media {
  order: -1;
  grid-column: 1 / -1;
}

.row__text {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: var(--b);
}

.row__name {
  font-size: clamp(2.5rem, 5.4vw, 5.25rem);
  font-weight: 760;
  line-height: 0.95;
  letter-spacing: -0.055em;
  margin-left: -0.03em;
}

.row__desc {
  margin-top: var(--g);
  max-width: 34rem;
}

.row__meta {
  display: flex;
  flex-direction: column;
}

.row__meta li:not(:has(a)) {
  padding-block: 0.125rem;
}

.row__meta .muted {
  color: var(--muted);
}

.row__meta a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-weight: 600;
}

@media (min-width: 960px) {
  .row__media {
    order: 0;
    grid-column: 8 / span 5;
    grid-row: 1;
  }
  .row__text {
    grid-column: 1 / span 6;
    grid-row: 1;
  }
}

/* imágenes */

.shot {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  overflow: hidden;
  background: var(--tint);
}

.shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left top;
}

.shot--center img {
  object-position: center;
}

/* proporción propia de la captura: el recorte no parte texto de la interfaz */
.shot--mundo {
  aspect-ratio: 128 / 76;
}

.shot--elap {
  aspect-ratio: 36 / 25;
}

.shot--phones {
  display: flex;
  gap: 0.75rem;
  aspect-ratio: auto;
  overflow: visible;
  background: none;
  border-radius: 0;
}

@media (min-width: 640px) and (max-width: 959px) {
  .shot--phones {
    width: calc(75% - 0.25 * var(--gut));
  }
}

.shot--phones img {
  flex: 1 1 0;
  min-width: 0;
  width: auto;
  height: auto;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 14px 36px rgba(24, 35, 31, 0.08);
}

.cap {
  margin-top: 0.5rem;
  font-size: 0.9375rem;
  line-height: 1.4;
  color: var(--muted);
}

/* ZEN OS: celular y dos recortes de escritorio. En mobile, sólo el celular, recortado. */

.shot--zen {
  aspect-ratio: 4 / 3;
  background: var(--tint);
}

.shot--zen .zen__phone {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left top;
}

.zen__desk {
  display: none;
}

@media (min-width: 640px) {
  .shot--zen {
    display: grid;
    grid-template-columns: 30% minmax(0, 1fr);
    column-gap: 0.75rem;
    aspect-ratio: 3 / 2;
    overflow: visible;
    background: none;
    border-radius: 0;
  }
  .shot--zen .zen__phone {
    border-radius: 16px;
    object-position: center top;
  }
  .zen__desk {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    row-gap: 0.75rem;
    min-height: 0;
  }
  .zen__desk img {
    width: 100%;
    border-radius: 16px;
  }
  .zen__desk img:first-child {
    height: 100%;
    min-height: 0;
    object-fit: cover;
    object-position: left top;
  }
}

/* ---------- contacto ---------- */

.contact {
  padding-top: var(--s);
  padding-bottom: var(--s);
}

.contact__title {
  word-spacing: 0.06em;
  grid-column: 1 / -1;
  font-size: clamp(2.5rem, 6.4vw, 6.75rem);
  font-weight: 760;
  line-height: 0.93;
  letter-spacing: -0.07em;
  margin-left: -0.035em;
}

.contact__lead {
  grid-column: 1 / -1;
  margin-top: var(--g);
  max-width: 28rem;
}

.contact__actions {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: var(--b);
}

@media (min-width: 560px) {
  .contact__actions {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
  }
}

@media (min-width: 960px) {
  .contact {
    align-items: end;
  }
  .contact__title {
    grid-column: 1 / span 7;
    grid-row: 1;
  }
  .contact__lead {
    grid-column: 1 / span 6;
    grid-row: 2;
  }
  .contact__actions {
    grid-column: 8 / span 5;
    grid-row: 1 / span 2;
    margin-top: 0;
  }
}

/* ---------- pie ---------- */

.footer {
  padding-bottom: var(--b);
  font-size: 1rem;
  color: var(--muted);
}

.footer__legal {
  grid-column: 1 / -1;
}

.footer__links {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  margin-top: var(--g);
}

.footer__links a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--ink);
  font-weight: 560;
  transition: color 0.2s;
}

.footer__links a:hover {
  color: var(--accent);
  transition: none;
}

@media (min-width: 960px) {
  .footer__legal {
    grid-column: 1 / span 6;
    padding-top: 0.6875rem;
  }
  .footer__links {
    grid-column: 8 / span 5;
    margin-top: 0;
  }
}

/* ---------- páginas de texto ---------- */

.doc {
  padding-top: clamp(9rem, 22svh, 13rem);
  padding-bottom: var(--s);
}

.doc__title {
  word-spacing: 0.06em;
  grid-column: 1 / -1;
  margin-left: -0.04em;
  font-size: clamp(2.75rem, 7.2vw, 7rem);
  font-weight: 760;
  line-height: 0.93;
  letter-spacing: -0.07em;
}

.doc__facts {
  grid-column: 1 / -1;
  margin-top: var(--b);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-width: 42rem;
}

.doc__facts {
  gap: 0.75rem;
}

.doc__facts dt {
  color: var(--muted);
  font-size: 0.9375rem;
}

@media (min-width: 560px) {
  .doc__facts {
    gap: 0.25rem;
  }
  .doc__facts div {
    display: flex;
    column-gap: 1rem;
  }
  .doc__facts dt {
    min-width: 7.5rem;
    font-size: inherit;
  }
}

.doc__facts dd {
  margin: 0;
  font-weight: 560;
  overflow-wrap: anywhere;
}

.doc__facts a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  margin-block: -0.5rem;
  color: inherit;
}

.doc__body {
  grid-column: 1 / -1;
  margin-top: var(--b);
  display: flex;
  flex-direction: column;
  gap: var(--b);
  max-width: 42rem;
}

.doc__body h2 {
  font-size: clamp(1.375rem, 1.2rem + 0.7vw, 1.75rem);
  font-weight: 680;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 0.75rem;
}

.doc__body p + p,
.doc__body p + ol,
.doc__body ol + p {
  margin-top: 0.75rem;
}

.doc__body ol {
  padding-left: 1.5rem;
}

.doc__body li + li {
  margin-top: 0.5rem;
}

.doc__body li {
  padding-left: 0.25rem;
}

.doc__body ul {
  list-style: none;
}

.doc__body ol {
  list-style: decimal;
}

@media (min-width: 960px) {
  .doc__body {
    grid-column: 1 / span 8;
  }
}

.doc__body :target,
.doc__body section:target {
  scroll-margin-top: 5rem;
}

.notfound {
  min-height: 100svh;
  align-content: center;
  padding-block: 8rem;
}

.notfound .doc__title {
  grid-column: 1 / -1;
}

.notfound .hero__actions {
  margin-top: var(--b);
}

.notfound .btn {
  width: auto;
}

/* titulares con interlineado < 1: el padding evita que el auditor marque desborde vertical (no hay recorte real: no hay overflow oculto) */
.hero__title,
.row__name,
.contact__title,
.doc__title {
  padding-block: 0.12em;
  margin-block: -0.12em;
}

.link--block {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-weight: 600;
}

.doc__body p:has(> .link--block) {
  margin-top: 0;
}
