@font-face {
  font-family: "Archivo Black";
  src: url("../fonts/archivo-black-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
}

:root {
  font-synthesis: none;
  --niumud-pink: #f2b5cd;
  --niumud-black: #070707;
  --niumud-paper: #f2f0eb;
  --niumud-header-height: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { margin: 0; scroll-behavior: smooth; background: var(--niumud-black); }
body { margin: 0; min-width: 320px; background: var(--niumud-black); color: #f8f8f4; font-family: Inter, Arial, Helvetica, sans-serif; }
body.niumud-page { display: flex; min-height: 100vh; min-height: 100dvh; flex-direction: column; }
body.niumud-page:not(.niumud-contact-page) { height: 100vh; height: 100dvh; overflow: hidden; }
img, video { max-width: 100%; }
button, a { -webkit-tap-highlight-color: transparent; }

.niumud-skip-link {
  position: sticky;
  flex: 0 0 var(--niumud-header-height);
  z-index: 10001;
  top: 8px;
  left: 8px;
  padding: 11px 15px;
  color: #111;
  background: var(--niumud-pink);
  font-size: 13px;
  font-weight: 800;
  transform: translateY(-160%);
  transition: transform .2s ease;
}
.niumud-skip-link:focus { transform: none; }

.niumud-header {
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  right: 0;
  height: var(--niumud-header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 0 clamp(18px, 3vw, 52px);
  border-bottom: 1px solid rgba(12, 12, 12, .12);
  color: #111;
  background: rgba(248, 247, 244, .96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform .35s cubic-bezier(.22, 1, .36, 1), background-color .25s ease;
}
.niumud-header.is-hidden { transform: translateY(-105%); }
body.admin-bar .niumud-header { top: 32px; }
.niumud-header__brand { display: flex; width: 132px; height: 52px; align-items: center; }
.niumud-header__brand img { display: block; width: 100%; height: auto; }
.niumud-header__nav { display: flex; align-items: center; gap: clamp(18px, 2.2vw, 38px); }
.niumud-header__nav a {
  position: relative;
  color: #111;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-decoration: none;
  text-transform: uppercase;
}
.niumud-header__nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -7px;
  height: 2px;
  background: var(--niumud-pink);
  transition: right .28s cubic-bezier(.22, 1, .36, 1);
}
.niumud-header__nav a:hover::after,
.niumud-header__nav a:focus-visible::after,
.niumud-header__nav a[aria-current="page"]::after { right: 0; }
.niumud-header__languages {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid #111;
  border-radius: 100px;
}
.niumud-header__languages i { font-style: normal; opacity: .42; }
.niumud-header__nav .niumud-header__languages a { font-size: 9px; line-height: 1; opacity: .42; }
.niumud-header__nav .niumud-header__languages a[aria-current="true"] { opacity: 1; }
.niumud-header__nav .niumud-header__languages a::after { display: none; }
.niumud-header__toggle { display: none; }

#niumud-content { position: fixed; top: 0; left: 0; width: 1px; height: 1px; pointer-events: none; }

body.niumud-page:not(.niumud-contact-page) > :is(#nm-home, #nm-method, #nm-services, #nm-team, #nmp-projects-v5) {
  flex: 1 1 auto;
  height: calc(100dvh - var(--niumud-header-height)) !important;
  min-height: 0 !important;
}
body.niumud-page:not(.niumud-contact-page) :is(#nm-home .nm-stage, #nm-method .nmm-stage, #nm-services .nms-stage, #nm-team .nmt-sticky, #nmp-projects-v5 .nmp-hero__stage, #nmp-projects-v5 .nmp-case__stage) {
  height: calc(100dvh - var(--niumud-header-height)) !important;
  min-height: 0 !important;
}

.niumud-generic {
  min-height: 100vh;
  padding: 150px max(24px, 8vw) 100px;
  color: #111;
  background: var(--niumud-paper);
}
.niumud-generic article { max-width: 880px; margin: 0 auto; font-size: 18px; line-height: 1.65; }
.niumud-generic h1 { margin: 0 0 45px; font: 400 clamp(50px, 8vw, 110px)/.9 "Archivo Black", Arial, sans-serif; letter-spacing: -.06em; text-transform: uppercase; }

.niumud-error { min-height: 100vh; display: grid; place-content: center; padding: 110px 24px; text-align: center; background: var(--niumud-pink); color: #111; }
.niumud-error__code { margin: 0; font: 400 clamp(120px, 25vw, 420px)/.7 "Archivo Black", Arial, sans-serif; letter-spacing: -.09em; opacity: .1; }
.niumud-error h1 { margin: -10px 0 35px; font-size: clamp(34px, 6vw, 78px); }
.niumud-error a { color: #111; font-weight: 900; letter-spacing: .08em; }

/* Contenido de proyectos disponible en el HTML inicial: mejora la lectura humana y la indexación. */
#nmp-projects-v5 .nmp-native-projects {
  min-height: 100vh;
  padding: clamp(100px, 10vw, 170px) clamp(20px, 6vw, 100px);
  color: #111;
  background: #f2f0eb;
}
#nmp-projects-v5 .nmp-native-projects > .nmp-kicker { color: #9e5573; }
#nmp-projects-v5 .nmp-native-projects > h2 {
  max-width: 1150px;
  margin: 24px 0 clamp(55px, 7vw, 100px);
  font-size: clamp(50px, 7vw, 120px);
  line-height: .82;
}
#nmp-projects-v5 .nmp-native-projects__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid rgba(17,17,17,.25); }
#nmp-projects-v5 .nmp-native-projects__grid article { min-height: 235px; padding: 26px 28px 38px 0; border-bottom: 1px solid rgba(17,17,17,.25); }
#nmp-projects-v5 .nmp-native-projects__grid article:not(:nth-child(3n+1)) { padding-left: 28px; border-left: 1px solid rgba(17,17,17,.25); }
#nmp-projects-v5 .nmp-native-projects__grid span { color: #9e5573; font-size: 9px; font-weight: 900; letter-spacing: .18em; }
#nmp-projects-v5 .nmp-native-projects__grid h3 { margin: 35px 0 14px; font: 400 clamp(25px, 2.4vw, 38px)/1 "Archivo Black", Arial, sans-serif; text-transform: uppercase; }
#nmp-projects-v5 .nmp-native-projects__grid p { max-width: 390px; color: #4a4845; font-size: 15px; line-height: 1.5; }

@media (max-width: 782px) {
  :root { --niumud-header-height: 64px; }
  .niumud-header { height: var(--niumud-header-height); padding: 0 16px; }
  body.admin-bar .niumud-header { top: 46px; }
  .niumud-header__brand { width: 112px; height: 44px; }
  .niumud-header__toggle {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: auto 22px;
    grid-template-rows: repeat(2, 6px);
    align-items: center;
    gap: 0 11px;
    border: 0;
    padding: 10px 0 10px 10px;
    color: #111;
    background: transparent;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .12em;
  }
  .niumud-header__toggle span { grid-row: 1 / 3; }
  .niumud-header__toggle i { display: block; width: 22px; height: 1px; background: currentColor; transition: transform .25s ease; }
  .niumud-header__toggle[aria-expanded="true"] i:nth-of-type(1) { transform: translateY(3px) rotate(45deg); }
  .niumud-header__toggle[aria-expanded="true"] i:nth-of-type(2) { transform: translateY(-3px) rotate(-45deg); }
  .niumud-header__nav {
    position: fixed;
    inset: var(--niumud-header-height) 0 auto;
    display: flex;
    min-height: calc(100dvh - var(--niumud-header-height));
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 0;
    padding: 30px 22px max(34px, env(safe-area-inset-bottom));
    background: #f2b5cd;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-18px);
    transition: opacity .25s ease, transform .35s cubic-bezier(.22,1,.36,1);
  }
  body.admin-bar .niumud-header__nav { top: var(--niumud-header-height); }
  .niumud-header__nav.is-open { opacity: 1; pointer-events: auto; transform: none; }
  .niumud-header__nav a { padding: 13px 0; border-bottom: 1px solid rgba(17,17,17,.2); font: 400 clamp(31px, 10vw, 52px)/1 "Archivo Black", Arial, sans-serif; letter-spacing: -.045em; }
  .niumud-header__nav a::after { display: none; }
  .niumud-header__languages { width:max-content; min-height:48px; margin-top:24px; padding:0 15px; gap:10px; border:1px solid #111; border-radius:100px; }
  .niumud-header__nav .niumud-header__languages a { padding:0; border:0; font:800 11px/1 Inter,Arial,sans-serif; letter-spacing:.08em; }
  #nmp-projects-v5 .nmp-native-projects { padding: 90px 20px; }
  #nmp-projects-v5 .nmp-native-projects > h2 { font-size: clamp(46px, 14vw, 72px); }
  #nmp-projects-v5 .nmp-native-projects__grid { grid-template-columns: 1fr; }
  #nmp-projects-v5 .nmp-native-projects__grid article,
  #nmp-projects-v5 .nmp-native-projects__grid article:not(:nth-child(3n+1)) { min-height: 0; padding: 24px 0 34px; border-left: 0; }
  #nmp-projects-v5 .nmp-native-projects__grid h3 { margin-top: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
